cancel
Showing results for 
Search instead for 
Did you mean: 

Printing data in script without changing standard driver program

former_member1284402
Participant
0 Kudos

hi all,

i made a zscript of 'RVINVOICE01' for billing and this zscript is assigned to standard driver program 'RVADIN01' but problem is that now i need to display CIN detail in this output of tcode VF02.can anyone please let me know how would i do in Zscript Without changing standard driver program?

can anyone please help me?

Regards saurabh.

Edited by: saurabh srivastava on Apr 18, 2009 9:36 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

one way is to

First you can write Perform statement like the follwoing code in main Window :

PERFORM abcb IN PROGRAM Zxyz

USING &XXX1&

USING &XXX2&

CHANGING &YYY1&

CHANGING &YYY2&.

THEN GOTO or create dummy PROGRAM Zabcd write code as is follows using ITCSY STRUCTURE

FORM XXXX TABLES IN_TAB LIKE TABLE OF ITCSY

OUT_TAB LIKE TABLE OF ITCSY.

write the Necessary code here and transfer the data into OUT_TAB.

ENDFORM.

Remember u would have to create a text symbol for each variable u need to print on the script.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi saurabh srivastava ,

You need to create a program in SE38 like Z_TEST of type Subroutine pool and do as follow

In script need to code like this:

/: PERFORM GET_COMPNAME IN PROGRAM Z_TEST

/: USING &PLANT_CODE& "let say this plant code in your script

/: CHANGING &V_CMPCODE&

/: ENDPERFORM.

After this you can use the value &V_CMPNAME& in that window like :

P1 &V_CMPNAME&

In program Z_TEST code like this :

FORM get_compcode TABLES input_tab STRUCTURE itcsy

output_tab STRUCTURE itcsy.

DATA: V_CMPNAME(45).

READ TABLE input_tab WITH KEY name = 'PLANT_CODE'.

IF sy-subrc = 0.

lv_werks = input_tab-value.

select company name....

READ TABLE output_tab WITH KEY name = 'V_CMPNAME'.

IF SY-SUBRC = 0.

output_tab-value = V_CMPNAME.

MODIFY output_tab TRANSPORTING value

WHERE name = 'V_CMPNAME'.

ENDIF.

ENDFORM.

This could solve your problem.

Regards,

Suneel G