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

Add fields to script?

Former Member
0 Likes
674

Hi,

I want to add one field in the output of the script please let me know the step by step procedure.

regards,

vijay

7 REPLIES 7
Read only

Former Member
0 Likes
639

u can do that by 2 way...

<b>1) using perform..</b>:PERFORM get_date IN PROGRAM zreport

/:USING &SALESORDER&

/:CHANGING &S_DATE&

/:ENDPERFORM

Now you can print S_DATE.

Write this code in the new ABAP program would be

REPORT zreport.

FORM get_date TABLES in_tab STRUCTURE ITCSY

out_tab STRUCTURE ITCSY .

READ TABLE in_tab INDEX 1.

SELECT some_date FROM ztab

WHERE salesorder = in_tab-value.

IF sy-subrc EQ 0.

READ TABLE out-tab INDEX 1.

MOVE ztab-somedate TO out_tab-value

MODIFY out_tab INDEX 1.

ENDIF.

ENDFORM.

<b>2)use variable</b>...

1st select the value in driver programm which u want to print in sap script .

than in sap script in which window u want to display it go there.

and rite ur variable value like &var&

Read only

Former Member
0 Likes
639

sorry

Read only

Former Member
0 Likes
639

Hi,

You can do this by writing the code in the form....

PERFORM <P1> IN PROGRAM <ztest>

USING &input1&

CHANGING &input2&

ENDPERFORM

You need to get the value for input1 from the driver program.

Form P1....

Endform....

Regards,

Ram Mohan

Read only

0 Likes
639

Please let me know where i have to write the 'perform' in the form.

Read only

Former Member
0 Likes
639

HI,

I want to add extra fields for VE01 transaction. This transaction data is coming from script.

In print program and form what modifications i have to do for adding the fields.

Regards,

vijay

Read only

dani_mn
Active Contributor