on ‎2008 Jun 20 2:22 PM
how can i use Perform Statement in SAP Script?
i want to pass one value from Script to a subroutine in another program and to receive one result back?
pls tell me the solution.........
<MOVED TO CORRECT FORUM BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 20, 2008 9:25 AM
Request clarification before answering.
Hi Babu,
You can do this :
Code to be written in the Form Editor:
/:DEFINE &CUST& = '00000021'.
/:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF
/: USING &CUST&
/: CHANGING &NAME&
/:ENDPERFORM.
Code to be written in the Program :
REPORT Z_HENRIKF_SCRIPT_FORM .
TABLES scustom.
FORM get_name tables in_tab structure itcsy out_tab structure itcsy.
read table in_tab index 1.
select single * from scustom
where id = in_tab-value.
if sy-subrc = 0.
read table out_tab index 1.
move scustom-name to out_tab-value.
modify out_tab index sy-tabix.
else.
read table out_tab index 1.
move 'No name' to out_tab-value.
modify out_tab index sy-tabix.
endif.
You could also fill the ouput parameter table this way
READ TABLE out_par WITH KEY 'NAME1'.
out_par-value = l_name1.
MODIFY out_par INDEX sy-tabix.
ENDFORM.
reward points if usefull.
Regards,
Najmuddin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.