on 07-10-2007 10:42 AM
hi
when we call a program frm a form we use the below code can anyone explain me the full implication and process and how it works and waht it refers to
fsap script form code : PERFORM GET_CODE IN PROGRAM z_PH3
using USING &vbak-VBELN& changing &ZINT&.....
program code in z_ph3
FORM get_code TABLES inttab STRUCTURE itcsy
outtab STRUCTURE itcsy.
code...
....
..
endforms
WHAT DOES THIS ITCSY REFERS AND HOW IT IS CALLED AND HOW VALUES ARE PASSED AND WHT DOES USING AND CHANGING REFERS HERE AND CAN ANYONE EXPLAIN ME THE WHOLE PROCESS HOW THIS CODE WILL CALL AND WORK AND WHAT DOES THE VARIUS THING MENTION IN IT WORKS LIKE INTTAB OUTTAB SYTRUCTURE ITCSY AAND ITS USE ETC
REGARDS
arora
Hi
ITCSY is the structure to create the interface for routines called by a sapscript.
A routine of this kind has to be like this:
FORM <NAME FORM> TABLES INTAB STRUCTURE ITCSY
OUTTAB STRUCTURE ITCSY.
DATA: MY_VAR LIKE ...
* In INTAB there are the variables inserting by USING:
READ TABLE INTAB WITH KEY NAME = <VARIABLE NAME>.
IF SY-SUBRC = 0.
*---> Get the value from INTAB-VALUE
MOVE INTAB-VALUE TO MY_VAR.
ENDIF.
* In OUTTAB there are the variables inserting by CHANGING:
READ TABLE OUTTAB WITH KEY NAME = <VARIABLE NAME>.
IF SY-SUBRC = 0.
*---> Set the value to OUTTAB-VALUE
MOVE MY_VAR TO OUTTAB-VALUE.
MODIFY OUTTAB INDEX SY-TABIX.
ENDIF.
ENDFORM
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi MAx
actually my question was based on how it works internally and how sap process it
form and code i know how to put but i want to understand the processing how it happens? how the data is going and what role does strututure itcsy plays in it and for what other purpose in sap script it is used?
regards
Nishant
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.