SAP Sourcing scripts – editing and source control maintenance

Scripts are, in short, one of the winning points of SAP Sourcing. As much as I appreciate the technology behind them (myself being a core java dev), they present huge gaps when it comes to methodology of development and maintenance.

The methodology in this case translates to either editing scripts directly in SAP Sourcing (yes, some people are masochists) or a low-level copy-paste. I cannot stress enough about the issues that can arise out of this.

This blog post will cover my recommendations for scripts on:

Editing – editor, formatter

Maintaining – source control maintenance, git, SourceTree app

Editing SAP Sourcing Scripts

When I’m not coding in Eclipse, my editor of choice for SAP Sourcing scripts (for Windows) is SynWrite (download here).

For an easy-to-use program you can simply download SourceTree which will handle everything for you with an excellent GUI.

The result:

EDITOR

I like SynWrite a lot compared to other alternatives (Notepad++ etc), because of the option to have a good formatterand a neat tree structure which shows all your functions in the script (cool!).

SOURCE CONTROL MANANGEMENT

Just compare what ever you are using as methodology (manual backups, oma extracts, attachment blobs etc) with the screenshot below.

If you’ve followed on to this point you might be having two questions:

Can we have code autocomplete and validation like in a full-fledged IDE?

NOT in SynWrite or other editors you might be using.

YES, it can be done in Eclipse or Netbeans; I am using such options within Eclipse. BUT, coding beanshell in Eclipse is (for the moment) way too complicated to qualify for a public release or recommendation.

What’s the point of all of this, if it doesn’t solve the initial problem – having to copy-paste scripts from local files back into SAP Sourcing?

This post aims to provide a <<phase-one (the basis)>> for script management – getting the files in a coherent format into a version-control system.

In the next couple of days (stay tuned) I will release the <<phase-two>>: A tool that will automatically deploy your scripts from your SCM into Sourcing. So make sure you get your scripts in a local format under version control as soon as possible.