on 11-14-2006 7:17 AM
hi
i would like to know about ITCSY.
regards
ratna
hi,
<b>warm welcome to sdn</b>
1. This structure ITSCSY
(which is actually of type ITCSY)
2. is usually used in SAPSCRIPT (SE71)
while calling EXTERNAL SUBROUTINES.
3. the DEFINITION of this
FORM,
contains two parameters, IN and OUT,
which are of tuype ITCSY
4. These internal tables, then , contain
the
VARIABLENAME, AND VARIABLE VALUE,
which is passed using PERFORM.
this structure is used in signature of the FORM which is called from a sapscript. Sometimes you will see in the sapscript a PERFORM statement, where it resides in another program, if you look at this program, at the FORM routine, you will see that the importing/exporting parameters are typed like this structure. It is used to pass data between the FORM and the sapscript.
rgds
Anver
<b><i>
if hlpful pls mark points</i></b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The structure ITCSY is used in relation with SAPScripts. You can call a Routine in any program in SAPScript.
For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
/: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
/: USING &var1&
/: CHANGING &var2&
/: ENDPERFORM.
Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
In the program ZSHAIL_BASIC, you have to call the subroutine as
FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
ENDFORM.
IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
This value can thus be obtained in var2 specified in SAPScript.
hi,
In sap scripts, there are certain cases where we need to use some external subroutines which should be called by the script to achieve certain functionality. So these external subroutines are defined with an input and output structure which is of type ITCSY.
FORM F_GET_HEADER_DETAILS TABLES ITAB STRUCTURE ITCSY
OTAB STRUCTURE ITCSY.
* Warehouse number
CLEAR V_LGNUM.
READ TABLE ITAB WITH KEY NAME = 'LTAK-LGNUM'
TRANSPORTING VALUE.
V_LGNUM = ITAB-VALUE.
*-Get TO number
CLEAR V_TO_NO.
READ TABLE ITAB WITH KEY NAME = 'LTAK-TANUM'
TRANSPORTING VALUE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITAB-VALUE
IMPORTING
OUTPUT = V_TO_NO.
OTAB-VALUE = V_TO_NO.
MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'TO_NO'.
*-Get Plant
READ TABLE ITAB WITH KEY NAME = 'LTAP-WERKS'
TRANSPORTING VALUE.
*-Get Company Name
CLEAR V_COMPANY_NAME.
SELECT T001~BUTXT INTO V_COMPANY_NAME
UP TO 1 ROWS
FROM T001K JOIN T001
ON T001K~BUKRS = T001~BUKRS
WHERE BWKEY = ITAB-VALUE(4).
ENDSELECT.
IF SY-SUBRC = 0.
OTAB-VALUE = V_COMPANY_NAME.
MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'COMPANY_NAME'.
ENDIF.
SELECT VBPA~ADRNR
ADRC~NAME1
ADRC~NAME2
ADRC~NAME3
ADRC~NAME4
ADRC~CITY1
ADRC~CITY2
ADRC~POST_CODE1
ADRC~STREET
ADRC~REGION
ADRC~TEL_NUMBER
ADRC~MC_STREET
INTO X_ADRC
UP TO 1 ROWS
FROM VBPA JOIN ADRC
ON VBPA~ADRNR = ADRC~ADDRNUMBER
WHERE VBELN = V_DEL_NO
AND POSNR = C_000000
AND PARVW = 'WE'.
ENDSELECT.
IF SY-SUBRC = 0 AND X_ADRC-ADRNR NE X_KNA1-ADRNR.
WRITE X_KNA1-ERDAT TO OTAB-VALUE.
MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'ISS_DT'.
OTAB-VALUE = X_KNA1-KUNNR.
MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'CUS_NO'.
OTAB-VALUE = X_ADRC-NAME1.
MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'CUS_NAME'.
endif.
This way the value is passed from the program to the scripts.
Hope this helps.
Regards,
Richa
Hi
ITCSY is a communication structure used to pass the value fromSPScript perform routine program to the called subroutine.
thanks
Anirban M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
itcsy is a structure.. it is used to retrive the fieldname and value in the form to print program... for example..
in the form....se71.
write an external subroutine...
PERFORM ADDR IN PROGRAM ZRVADOR01.
USING &VBDKA-VBELN&
CHANGING &V_KUNNR&
CHANGING &V_NAME1&
CHANGING &V_STRAS&
CHANGING &V_LAND1&
CHANGING &V_REGIO&
ENDPERFORM.
in the print program write the form for this routine..
FORM ADDR TABLES INTAB STRUCTURE ITCSY OUTTAB STRUCTURE ITCSY.
data: v_vbeln(10) type n,
v_kunnr like vbak-kunnr.
data: v_name1 like kna1-name1,
v_STRAS like kna1-stras,
v_LAND1 like kna1-land1,
v_REGIO like kna1-regio.
*get the value from form
read table intab index 1.
v_vbeln = intab-value.
*select the customer number from vbak
select single kunnr
from vbak
into v_kunnr
where vbeln = v_vbeln.
*select the customer data from kna1
select name1
STRAS
LAND1
REGIO
into (v_name1, v_STRAS, v_LAND1,
v_REGIO)
from kna1
where kunnr = v_kunnr.
endselect.
*cust_num
read table outtab index 1.
outtab-value = v_kunnr.
modify outtab index 1.
*cust_name
read table outtab index 2.
outtab-value = v_name1.
modify outtab index 2.
*cust_street
read table outtab index 3.
outtab-value = v_stras.
modify outtab index 3.
*cust_country
read table outtab index 8.
outtab-value = v_land1.
modify outtab index 8.
*cust_region
read table outtab index 9.
outtab-value = v_regio.
modify outtab index 9.
endform. "ADDR
try this for your requirment..
regards
kothai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ITCSY structure is used in signature of the FORM which is called from a sapscript.
Sometimes you will see in the sapscript a PERFORM statement, where it resides in another program, if you look at this program, at the FORM routine, you will see that the importing/exporting parameters are typed like this structure. It is used to pass data between the FORM and the sapscript.
Best Regards,
Vibha
*Please mark all the helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.