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

Creating sapscript from a standard sapscript - need suggestions

Former Member
0 Likes
573

Hi,

I am currently working on a settlement form.

There is a standard invoice settlement with the following details:

- SAPscript - MR_PRINT

- Program - RM08NAST

- Entry Routine - ENTRY_KONS

My task is to create a new SAPscript, which will have a different look. However, the new SAPscript will be 90% composed of existing standard data, with the other 10% composed of several new fields.

At 1st, I thought of just copying the entire standard print-program.

However, the entry point ENTRY_KONS calls an FM that does all the data selection. This FM has tons of includes inside.

What is generally done, especially in regards to output type KONS? what do I do?

Do I copy every include or create my own program and copy only what I need?

Please help.

Thanks,

John

4 REPLIES 4
Read only

Former Member
0 Likes
528

Hi John,

You may use existing includes as it is (no need to copy into zinclude) since you not need to change them for your new data manipulation.

On the other hand in include some manipulation is done by SAP and if you now change their standard fields calculation according to your requirement than only you need to copy these includes into zinclude and add your piece of code.

Another possibility If you are going to add any new window or new fields in script than for calling WRITE_FORM for new window you may need to copy the include where all WRITE_FORM definition is maintained.

Hope it make sense.

Read only

Former Member
0 Likes
528

Hi,

I would suggest you to avoid changing the standard Includes. Let them be the standard one only. Put all your code in the main Z Prog only and try to create new includes for your Custom Code.

Change a Standard Include by renaming it as Z Include only when it is the last option.

Remember renaming a standard Include as Z include will bring issues in Version Upgrades and you will not be getting any additional functionality introduced by SAP in that Standard Include in future.

Read only

former_member585060
Active Contributor
0 Likes
528

Hi,

If additional fields are few and any relationship with the existing data.

Copy Standard sapscript and use original print program.

You try using Subroutines, You can get the data for the additional fields and other calculations in the subroutines and pass the data to the sapscript.

First identify from which tables the additional fields reside and any relation with the existing data in the

sapscript which can be used as USING parameter in PERFORM statement.

Call the subroutine, fetch the data and do additional calculations and send data back to sapscript.

Refer the SAP help link on PERFORM statement

http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

you can find many threads on PERFORM in SAPSCRIPTS, do a search in SCN for additional help on that statement.

Regards

Bala Krishna

Read only

Former Member
0 Likes
528

Hello John, I want help from you. Could you plz explain me the process u have done for MR_PRINT ???

Thanks in Advance.

Ajay kumar