cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new fields in the Standard Script layout

Former Member
0 Kudos

Hello Gurus,

I have a requirement where I need to add 3 new fields in the layout.

My question is do I need to change the print program also?

Thanks in advance.

Regards

Varma

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

If the 3 fields are in Main window then you need to modify the standard program...If those fields are not in Main window i.e line items then you can write external subroutine in another report program and call it here like:

perform <form_name> in Program <Prog_name> using <f1> <F2>........

changing <f1> <f2>..........

Then Create a Report <prog_name> and write

form <Form_Name> using tables using it type itcsy............

Write required code to get the field values............

End form.

Former Member
0 Kudos

Hi ,

Its not necessary to change the driver program. If the new values which you are adding in the layout are fetched in the program then you can directly use them without doing anything.

And if these values are not fetched in the driver program then you can use the PERFORM command to call an ABAP subroutine (form) from any customized program. You can fetch the value from the routine and use it.

Code will look like in the sript:

/: PERFORM GET_NEWVALUES IN PROGRAM ZCJPERFO

/: USING &INPUT&

/: CHANGING &NEWVALUE1&

/: CHANGING &NEWVALUE2&

/: CHANGING &NEWVALUE3&

/: ENDPERFORM

REPORT ZCJPERFO.

Form routine in the customize program.

FORM GET_NEWVALUES TABLES IN_PAR STUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

<body>

ENDFORM

Get back in case of any doubts.

Cheers

Ajay

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

hi,

if the values of your fields are present on the moment of printing of the items (with that fields) you have not to copy the print program. This is easy to check by puttiing the fields in the script.

If printed it is ok

if not printed then you still have the possibility to get that values with a /: PERFORM ........ /: ENDPERFORM.

If you do so then you still donot have to copy the printprogram.

success.,

Gr., Frank

former_member585865
Contributor
0 Kudos

Hi Varma,

Welcome to SCN

if the three fields are in the standard itself,you don't need to copy the program to Zprogram,straightaway you can call that in form.

else you have to copy in to Zprogram.