Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PLEASE HELP WITH SAPSCRIPTS!

Former Member
0 Likes
447

Hello everyone!

I really need a lot of help 'cause i'm completly new on programming sapscript, so I don't know where and how to edit a sapscript, for example in program that extracts information before it is send to the script, how am I supposed to do that, and where to edit the sapscript, for example the especified fields that receive the information, if any one could help me, I really aprecciate it!

Thaks for your time

2 REPLIES 2
Read only

former_member221770
Contributor
0 Likes
362

Guillermo,

What SAPscript are you trying to modify? Once you know this, you can go to transaction NACE to find the SAPscript Name and Print Program. Let's say you are trying to change invoice, go to NACE and select "V3" - Billing. Click on the "Output Types" button and select the relevant Outpt Type (in this case "RD00". Single click on this node and select "Processing Routines" (this is on the left hand "tree" structure").

The "Program" column is your Print Program (this gathers all the data and calls your SAPscript) and the "Form" column identifies your SAPscript.

You can modify the print program like any ABAP program via SE80. You can use the SAPscript Editor (SE71) to modify your SAPscript.

Within the SAPscript there are "Text Elements" defined in each window (they are defined as "/E"). The Print Program calls these Text Elements via the FM "WRITE_FORM".

This should get you started.

Cheers,

Pat.

Read only

Former Member
0 Likes
362

Hi Guillermo,

In print program, there is a function 'OPEN_FORM', here you can find the name of your Sapscript form. Put a breakpoint there and see. Alternatively, if it doesn't help, look in the table TNAPR for the name of Form for your print program.

Once you know exactly the name of your Sapscript form, go to your sapscript form using TXN SE71.

Try to use Graphical form painter (its easy), for doing this: goto setting (in top menu) -> Form Painter -> check the Graphical form Painter.

You will get a graphical window for 'LAYOUT'. When you right click on any window in this graphical layout, choose edit text. Now, change the editor from GOTO -> Change editor. Here, you will get a very comfortable looking editor.

Now, look for symbols '/E' in the left hand side boxes, corresponding to them are the 'ELEMENTS'. This is what you need to identify first. Now, see which information is getting printed under which element. You can find same element in your print program in Functions 'WRITE_FORM'. So, you can find which portion of print program is printing in which element. Now you can definitely plan for making changes.

Moreover, like ABAP, debugger is here too for your help, For activating the debugger, just goto SE71, write your form name and without going further, just go to UTILITIES -> Activate Debugger. Now, run your print program and see the fun of debugger on script form. It will help you understand each and every thing, what changes are desirable in print program and what in form.

To assign a changed form name to print program or vice versa, i.e. in simple words, to redefine the mapping of print program - form name so that your desirable print program prints your required form, please check the link below (i got reward points for it 😞

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://

Also, if you are apprehensive about making changes, its a good idea to copy your Sapscripts to local files, later if something goes undesirable while making changes, you can re-import your saved script. Also, this goes well for taking back-up of script form. Txn for doing it: RSTXSCRP. Please check the link below for more information(i got reward points for this too 😞

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://

Cheers

Ashish Jain