<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ITCSY STRUCTURE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439454#M825968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nagi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally ITCSY structure is used SAP SCRIPTS.&lt;/P&gt;&lt;P&gt;Suppose you are standard Driver program for your form and still you wanted to do some calculations,then you dont need to touch your standard program and in your Forms you cant write select queries also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this purpose, calulations and queries will be performed outside the Script and still you can bring in those values into your form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this pupose only ITCSY structure is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Note: Reward Points if you find useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2008 07:41:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-19T07:41:48Z</dc:date>
    <item>
      <title>ITCSY STRUCTURE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439452#M825966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all of You,&lt;/P&gt;&lt;P&gt;What is the use of ITCSY Structure ? i am having some knowledge is correct or not pls check it?&lt;/P&gt;&lt;P&gt;suppose i have completed the script program .every thing is fine and i missed to do sub total with out changing the code ,by using ITCSY structure we can rectify it ? or any other pls explain it what the purpose of ITCSY Structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 07:35:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439452#M825966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T07:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: ITCSY STRUCTURE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439453#M825967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  It is a structure, have 2 fields name and value and can be used to transfer data between script and program. Check the below code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example get the value of shipment document number based on billing document number&lt;/P&gt;&lt;P&gt;VBDPR-VBELN_VL is the billing document number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In Script......&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/:   PERFORM GET_SHIPMENT_NO IN PROGRAM ZVADIN01&lt;/P&gt;&lt;P&gt;/:   USING &amp;amp;VBDPR-VBELN_VL&amp;amp;&lt;/P&gt;&lt;P&gt;/:   CHANGING &amp;amp;Z_TKNUM&amp;amp;.&lt;/P&gt;&lt;P&gt;/:   ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In program...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: Z_TKNUM LIKE VTTP-TKNUM.&lt;/P&gt;&lt;P&gt;DATA: Z_TEMP_TKNUM LIKE VTTP-TKNUM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_SHIPMENT_NO TABLES INTAB STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;                            OUTTAB STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;READ TABLE INTAB WITH KEY NAME = 'VBDPR-VBELN_VL'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;CLEAR Z_TEMP_TKNUM.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          INPUT   = INTAB-VALUE&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;          OUTPUT  = Z_TEMP_TKNUM&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;          OTHERS  = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR Z_TKNUM.&lt;/P&gt;&lt;P&gt;SELECT TKNUM INTO Z_TKNUM UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;                  FROM VTTP&lt;/P&gt;&lt;P&gt;                  WHERE VBELN = Z_TEMP_TKNUM.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;READ TABLE OUTTAB WITH KEY NAME = 'Z_TKNUM'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;OUTTAB-NAME = 'Z_TKNUM'.&lt;/P&gt;&lt;P&gt;OUTTAB-VALUE = Z_TKNUM.&lt;/P&gt;&lt;P&gt;MODIFY OUTTAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujjji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 07:39:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439453#M825967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T07:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: ITCSY STRUCTURE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439454#M825968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nagi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally ITCSY structure is used SAP SCRIPTS.&lt;/P&gt;&lt;P&gt;Suppose you are standard Driver program for your form and still you wanted to do some calculations,then you dont need to touch your standard program and in your Forms you cant write select queries also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this purpose, calulations and queries will be performed outside the Script and still you can bring in those values into your form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this pupose only ITCSY structure is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Note: Reward Points if you find useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 07:41:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439454#M825968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T07:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: ITCSY STRUCTURE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439455#M825969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The structure ITCSY contains field name and field value.&lt;/P&gt;&lt;P&gt;The system does not execute the PERFORM command within &lt;/P&gt;&lt;P&gt;SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. &lt;/P&gt;&lt;P&gt;The replace modules can only replace symbol values or &lt;/P&gt;&lt;P&gt;resolve include texts, but not interpret SAPscript control commands. &lt;/P&gt;&lt;P&gt;Syntax in a form window: &lt;/P&gt;&lt;P&gt;/: PERFORM &amp;lt;form&amp;gt; IN PROGRAM &amp;lt;prog&amp;gt; &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR1&amp;amp; &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR2&amp;amp; &lt;/P&gt;&lt;P&gt;...... &lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR1&amp;amp; &lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR2&amp;amp; &lt;/P&gt;&lt;P&gt;...... &lt;/P&gt;&lt;P&gt;/: ENDPERFORM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INVAR1 and INVAR2 are variable symbols and may be of any of &lt;/P&gt;&lt;P&gt;the four SAPscript symbol types. &lt;/P&gt;&lt;P&gt;OUTVAR1 and OUTVAR2 are local text symbols and must &lt;/P&gt;&lt;P&gt;therefore be &lt;/P&gt;&lt;P&gt;character strings. &lt;/P&gt;&lt;P&gt;The ABAP subroutine called via the command line stated &lt;/P&gt;&lt;P&gt;above must be defined in the ABAP report prog as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM &amp;lt;form&amp;gt; TABLES IN_TAB STRUCTURE ITCSY &lt;/P&gt;&lt;P&gt;OUT_TAB STRUCTURE ITCSY. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The values of the SAPscript symbols passed with /: USING... &lt;/P&gt;&lt;P&gt;are now &lt;/P&gt;&lt;P&gt;stored in the internal table IN_TAB . Note that the system &lt;/P&gt;&lt;P&gt;passes the &lt;/P&gt;&lt;P&gt;values as character string to the subroutine, since the &lt;/P&gt;&lt;P&gt;field Feld &lt;/P&gt;&lt;P&gt;VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR &lt;/P&gt;&lt;P&gt;80). See the &lt;/P&gt;&lt;P&gt;example below on how to access the variables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table OUT_TAB contains names and values of the &lt;/P&gt;&lt;P&gt;CHANGING &lt;/P&gt;&lt;P&gt;parameters in the PERFORM statement. These parameters are &lt;/P&gt;&lt;P&gt;local text &lt;/P&gt;&lt;P&gt;symbols, that is, character fields. See the example below &lt;/P&gt;&lt;P&gt;on how to &lt;/P&gt;&lt;P&gt;return the variables within the subroutine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From within a SAPscript form, a subroutine GET_BARCODE in &lt;/P&gt;&lt;P&gt;the ABAP &lt;/P&gt;&lt;P&gt;program QCJPERFO is called. Then the simple barcode &lt;/P&gt;&lt;P&gt;contained there &lt;/P&gt;&lt;P&gt;('First page', 'Next page', 'Last page') is printed as &lt;/P&gt;&lt;P&gt;local variable &lt;/P&gt;&lt;P&gt;symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition in the SAPscript form: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;PAGE&amp;amp; &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;NEXTPAGE&amp;amp; &lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;BARCODE&amp;amp; &lt;/P&gt;&lt;P&gt;/: ENDPERFORM &lt;/P&gt;&lt;P&gt;/ &lt;/P&gt;&lt;P&gt;/ &amp;amp;BARCODE&amp;amp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coding of the calling ABAP program: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT QCJPERFO. 

FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY 
OUT_PAR STRUCTURE ITCSY. 

DATA: PAGNUM LIKE SY-TABIX, "page number 

NEXTPAGE LIKE SY-TABIX. "number of next page 

READ TABLE IN_PAR WITH KEY 'PAGE'. 
CHECK SY-SUBRC = 0. 
PAGNUM = IN_PAR-VALUE. 

READ TABLE IN_PAR WITH KEY 'NEXTPAGE'. 
CHECK SY-SUBRC = 0. 
NEXTPAGE = IN_PAR-VALUE. 

READ TABLE OUT_PAR WITH KEY 'BARCODE'. 
CHECK SY-SUBRC = 0. 
IF PAGNUM = 1. 
OUT_PAR-VALUE = '|'. "First page 

ELSE. 
OUT_PAR-VALUE = '||'. "Next page 

ENDIF. 

IF NEXTPAGE = 0. 
OUT_PAR-VALUE+2 = 'L'. "Flag: last page 
ENDIF. 

MODIFY OUT_PAR INDEX SY-TABIX. 

ENDFORM.

ITCPO - This structure contains the Output device. 

REPORT ZPSAPSCRIPT.
TABLES : EKKO, 
EKPO, 
KNA1, 
USR01, 
MARA, 
MAKT.

DATA : BEGIN OF ZOPTION.
INCLUDE STRUCTURE ITCPO.
DATA : END OF ZOPTION.

PARAMETERS: P_EBELN LIKE EKKO-EBELN,
P_EBELP LIKE EKPO-EBELP.

CLEAR EKPO.
SELECT SINGLE * FROM EKPO
WHERE EBELN = P_EBELN AND
EBELP = P_EBELP.

CLEAR KNA1.
SELECT SINGLE NAME1 FROM KNA1
INTO KNA1-NAME1
WHERE KUNNR = EKPO-KUNNR.

CLEAR MAKT.
SELECT SINGLE MAKTX FROM MAKT
INTO MAKT-MAKTX
WHERE MATNR = EKPO-MATNR AND
SPRAS = SY-LANGU.

CLEAR USR01.
SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.

ZOPTION-TDDEST = USR01-SPLD. "Output device (printer)
ZOPTION-TDIMMED = 'X'. "Print immediately
ZOPTION-TDDELETE = 'X'. "Delete after printing
ZOPTION-TDPROGRAM = 'ZPQRPRNT'. "Program Name

CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'

ARCHIVE_INDEX = ' ' 
ARCHIVE_PARAMS = ' ' 
DEVICE = 'PRINTER'
DIALOG = ' '
FORM = 'Z_TESTSCRIPT'
LANGUAGE = SY-LANGU
OPTIONS = ZOPTION
IMPORTING
LANGUAGE = SY-LANGU

EXCEPTIONS
OTHERS = 1.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER'

FUNCTION = 'SET' 
TYPE = 'BODY' 
WINDOW = 'HEADER'
EXCEPTIONS
ELEMENT = 1.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'MAIN'

FUNCTION = 'SET' 
TYPE = 'BODY' 
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'FOOTER'

FUNCTION = 'SET' 
TYPE = 'BODY' 
WINDOW = 'FOOTER'
EXCEPTIONS
ELEMENT = 1.

CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
UNOPENED = 1
OTHERS = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 07:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439455#M825969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T07:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: ITCSY STRUCTURE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439456#M825970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your delibrate answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 05:08:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itcsy-structure/m-p/3439456#M825970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T05:08:31Z</dc:date>
    </item>
  </channel>
</rss>

