07-30-2009 1:58 PM
HI all,
In the script(SE71) i want write perform statement. How to write..Can any one give me an example..
07-30-2009 2:01 PM
07-30-2009 2:03 PM
Hi,
You can write Perform in script
as
/:PERFORM GET_QUANT_CHAR IN PROGRAM ZTRANSFER_ITCSY
/:USING ®UH-HKTID&
/:USING ®UH-HBKID&
E/:CHANGING &V_BANKL&
/:CHANGING &V_BANKN& .
/:ENDPERFORM.
Regards,
Vijay
07-30-2009 2:04 PM
Hi,
Try like below,
In format select /: command line.
PERFORM GET_TAX_DETAILS IN PROGRAM ZZTEST
USING &KNUMV&
USING &LNNUM&
CHANGING &TAX&
CHANGING &TOTTAX&
ENDPERFORM
07-30-2009 2:05 PM
Hi,
In script:
DEFINE &MARA-MATNR& = '000000000000000038'
PERFORM DISP_NAME IN PROGRAM ZPRK_SCRIPTS_PERFORM
USING &MARA-MATNR&
CHANGING &MARA-MATKL&
ENDPERFORM
and in program
FORM DISP_NAME TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
DATA: LV_V1 TYPE MARA-MATNR,
LV_V2 TYPE MARA-MATKL.
CLEAR IN_TAB.
READ TABLE IN_TAB INDEX 1.
if sy-subrc = 0.
LV_V1 = IN_TAB-VALUE.
endif.
SELECT SINGLE MATKL FROM MARA INTO LV_V2
WHERE MATNR EQ LV_V1.
read table out_tab with key name = 'MARA-MATKL'.
if sy-subrc = 0.
OUT_TAB-VALUE = LV_V2.
modify out_tab index sy-tabix.
CLEAR OUT_TAB.
endif.
ENDFORM.
Regards,
R K.
07-30-2009 5:31 PM
07-30-2009 2:05 PM
Hi Mahaboob,
In the main window please use this syntax:
/:Perfom Z_GET_XXX IN PROGRAM Z_ XXX
/:USING &VAR_1&
/:USING &VAR_2&
/:USING &VAR_&
/:CHANGING &VAR_BLA_1&
/:CHANGING &VAR_BLAB_2&
/:ENDPERFORM
Then create program Z_XXX and FORM Z_GET_XXX.
Blacky.
07-30-2009 2:07 PM
Hi,
In SCRIPT we nedd to give name of the Include Program in
the PERFORM statement.
e,g. PERFORM F_GET_ADDRESS IN PROGRAM ZRETURNORDER.
....
ENDPERFORM
In script we need to write command PERFORM....ENDPERFORM
In script the PERORM ...ENDPERFORM will be in window of
script (SE71)and there is separate INCLUDE prorame(SE38)
sample code for routines in script.
/: PERFORM FORM_TEST IN PROGRAM ZTEST
/: USING &VAR1&
/: USING &VAR2&
/: USING &VAR3&
/: .............
/: USING &VARN&
/: CHANGING &VAR_OUT1&
/: ................
/: CHANGING &VAR_OUTN&
in the program ZTEST...
FORM FORM_TEST tables in_tab structure itcsy
out_tab structure itcsy.
Get value of VARN
data: varn like ....
read table in_tab with key name = 'VARN'.
if sy-subrc = 0.
move in_tab-value to varn.
endif.
Update the value of VAR_OUTN
read table out_tab with key name = 'VAR_OUTN'.
if sy-subrc = 0.
move <value> to out_tab-value.
modify out_tab index sy-tabix.
endif.
ENDFORM.
with regards,
Mamta Kumari
07-30-2009 2:10 PM
Hi Try this,
/: PERFORM GET_DATA IN PROGRAM ZGETDATA " define a zprogram of type subroutine and write your logic to get the value
/: USING &v1&
/: changing &v2&
/: Endperform
In your subroutine program zgetdata
FORM get_equi TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
data: v1(10).
in_tab will have the data that your are passing from script.
READ TABLE in_tab INDEX 1.
v1 = intab-value.
out_tab will hold the values you are passing to the script
read table out_tab with key 'v2'
v2 = 'TEST'.
MODIFY out_tab INDEX sy-tabix.
endform.
Regards,
Satish