hi all gurus,
I've some doubts regarding the sapscripts.I understand the usage of perform which is calling a subroutines from abap program.my doubt here is whenever i writing the sapscript,i need to pass the value..for example &cust_name$ to the subroutines inorder for it to search for..let say customer ID. how should i know tat the &cust_name& is actually from which structures?
Thank You.
Hi Joan
Incase of using variables w.r.t structures, it can be used as &<wa>-fld1&. In this case <wa> is a structure.
Alternatively, through the print program the value of this field can be moved to a structure and pass it to the form.
Eg:
Print Program:
<temp_var> = <wa>-fld1.
Form:
&<temp_var>&
Hope the above info can give you some idea.
Kind Regards
Eswar
hi Naren,
i wish to know hw whihc structure i shd take the value out and pass it to the subroutine.
for example,
PERFORM CONTACT_PERSON IN PROGRAM ZMPOI001
USING &EKKO-LIFNR&
CHANGING &CONTACT_PERSON&
ENDPERFORM
how do i kow tat i need to use EKKO-LIFNR this structure rather than others? thank you
Hi,
Check this sample code..
>PERFORM CONTACT_PERSON IN PROGRAM ZMPOI001
>USING &EKKO-LIFNR&
>CHANGING &CONTACT_PERSON&
FORM CONTACT_PERSON TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
READ TABLE IN_PAR WITH KEY 'EKKO-LIFNR'.
CHECK SY-SUBRC = 0.
READ TABLE OUT_PAR WITH KEY 'CONTACT_PERSON'.
CHECK SY-SUBRC = 0.
OUT_PAR-VALUE = 'TEST'.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Is this your requirement..
Thanks,
Naren
thx Naren and Eswar
Eswar,
Yeah,tat's d problem am facing now.Thx for the infor.by the way,mind i ask a dumb Q..where to find the print program? sorry as i am very new to SAP. Thank you.
regards,
Joan
Add a comment