<?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 sapscript in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550207#M249654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FORM GET_PACK TABLES IT_INPUT STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;IT_OUTPUT STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the question is wrf th the above statement, as in can u put just itab in both the places of  IT_INPUT and IT_OUTPUT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Sep 2006 06:30:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-04T06:30:03Z</dc:date>
    <item>
      <title>sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550207#M249654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FORM GET_PACK TABLES IT_INPUT STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;IT_OUTPUT STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the question is wrf th the above statement, as in can u put just itab in both the places of  IT_INPUT and IT_OUTPUT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 06:30:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550207#M249654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-04T06:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550208#M249655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ITCSY structure is used to represent the tables that are passed form the SAPScript to a subroutine pool program. Check the following extract form SAPHElp...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling ABAP Subroutines: PERFORM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax in a form window:&lt;/P&gt;&lt;P&gt;&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 the four SAPscript symbol types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP subroutine called via the command line stated 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;...&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... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the 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 CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (&amp;#145;First page&amp;#146;, &amp;#145;Next page&amp;#146;, &amp;#145;Last page&amp;#146;) is printed as local variable 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;&lt;/P&gt;&lt;P&gt;/ &amp;amp;BARCODE&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coding of the calling ABAP program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT QCJPERFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY&lt;/P&gt;&lt;P&gt;OUT_PAR STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: PAGNUM LIKE SY-TABIX, "page number &lt;/P&gt;&lt;P&gt;NEXTPAGE LIKE SY-TABIX. "number of next page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IN_PAR WITH KEY &amp;#145;PAGE&amp;#146;.&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;PAGNUM = IN_PAR-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IN_PAR WITH KEY &amp;#145;NEXTPAGE&amp;#146;.&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;NEXTPAGE = IN_PAR-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE OUT_PAR WITH KEY &amp;#145;BARCODE&amp;#146;.&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;IF PAGNUM = 1.&lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE = &amp;#145;|&amp;#146;. "First page &lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE = &amp;#145;||&amp;#146;. "Next page &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NEXTPAGE = 0.&lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE+2 = &amp;#145;L&amp;#146;. "Flag: last page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY OUT_PAR INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Aslo check this link...&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/d1/802d91454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/d1/802d91454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 06:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550208#M249655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-04T06:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550209#M249656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i understand you correctly,&lt;/P&gt;&lt;P&gt;can we put ITAB in both the places of IT_INPUT and IT_OUTPUT. if this is your question, then NO is my response.&lt;/P&gt;&lt;P&gt;here is the brief description ,why ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_INPUT is the internal table to hold the NAME of the field and its VALUE coming from the SCRIPT.&lt;/P&gt;&lt;P&gt;and IT_OUTPUT is the internal table to hold the NAME of the variables and Its values(what we calculate in this FORM and populate to that fields).&lt;/P&gt;&lt;P&gt;IT_OUTPUT is the internal table fields and for those fields values we calcualte in this form and populate to that IT_OUTPUT.&lt;/P&gt;&lt;P&gt;check this link, to get more idea on FORM calling from SCRIPT.&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2239419"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so we cant use the same name for both the tables. use either ITAB and OTAB accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if this is right, we should not do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 06:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550209#M249656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-04T06:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550210#M249657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anupama,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think we can use a name other than it_input and it_output , i have tried the same and it is working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; FORM vsum 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;Yes but we cannot have the same name for the incomming table and the outgoing table because they have to store differen vales , (in_tab )one stores the values that are being input from the form for the calculation purpose and other stores the values that have to be sent back to the form (out_tab)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Please reward points if helpful.&lt;/P&gt;&lt;P&gt;Sunmit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: sunmit bhandari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 06:55:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550210#M249657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-04T06:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550211#M249658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;go through this link which ll give you complete idea about the ITCSY,&lt;/P&gt;&lt;P&gt;PERFORM ZOVERDRACHT IN PROGRAM ZALGFUNC1 &lt;/P&gt;&lt;P&gt;   USING &amp;amp;KOMVD-KWERT&amp;amp;	    "amount &lt;/P&gt;&lt;P&gt;   USING &amp;amp;KOMK-WAERK&amp;amp;	    "currency &lt;/P&gt;&lt;P&gt;   CHANGING &amp;amp;OVER&amp;amp;	    "my total &lt;/P&gt;&lt;P&gt;ENDPERFORM &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;the ABAP called is: &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM ZOVERDRACHT TABLES TAB_IN STRUCTURE ITCSY TAB_OUT STRUCTURE ITCSY. &lt;/P&gt;&lt;P&gt;  data: h_bedrag like komvd-kwert, &lt;/P&gt;&lt;P&gt;	c_bedrag(18), &lt;/P&gt;&lt;P&gt;	c_over(18), &lt;/P&gt;&lt;P&gt;	h_valuta like komk-waerk. &lt;/P&gt;&lt;P&gt;  READ TABLE TAB_IN WITH KEY 'KOMVD-KWERT'. &lt;/P&gt;&lt;P&gt;  if sy-subrc = 0. &lt;/P&gt;&lt;P&gt;    c_bedrag = TAB_IN-VALUE. &lt;/P&gt;&lt;P&gt;  else. &lt;/P&gt;&lt;P&gt;    READ TABLE TAB_IN WITH KEY 'KOMVD-KBETR'. &lt;/P&gt;&lt;P&gt;    if sy-subrc = 0. &lt;/P&gt;&lt;P&gt;      c_bedrag = TAB_IN-VALUE. &lt;/P&gt;&lt;P&gt;    endif. &lt;/P&gt;&lt;P&gt;  endif. &lt;/P&gt;&lt;P&gt;  READ TABLE TAB_IN WITH KEY 'KOMK-WAERK'. &lt;/P&gt;&lt;P&gt;  if sy-subrc = 0. &lt;/P&gt;&lt;P&gt;    h_valuta = TAB_IN-VALUE. &lt;/P&gt;&lt;P&gt;  endif. &lt;/P&gt;&lt;P&gt;  replace '.' with ' ' into c_bedrag. &lt;/P&gt;&lt;P&gt;  replace ',' with '.' into c_bedrag. &lt;/P&gt;&lt;P&gt;  condense c_bedrag no-gaps. &lt;/P&gt;&lt;P&gt;  h_bedrag = c_bedrag. &lt;/P&gt;&lt;P&gt;  if h_valuta = 'BEF'. &lt;/P&gt;&lt;P&gt;    h_bedrag = h_bedrag / 100. &lt;/P&gt;&lt;P&gt;  endif. &lt;/P&gt;&lt;P&gt;  h_over = h_over + h_bedrag. &lt;/P&gt;&lt;P&gt;  write h_over to c_over currency h_valuta. &lt;/P&gt;&lt;P&gt;  tab_out-name = 'OVER'. &lt;/P&gt;&lt;P&gt;  shift c_over by 4 places left. &lt;/P&gt;&lt;P&gt;  tab_out-value = c_over. &lt;/P&gt;&lt;P&gt;  APPEND TAB_OUT. &lt;/P&gt;&lt;P&gt;  CLEAR TAB_OUT. &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; &lt;/P&gt;&lt;P&gt;h_over is defined as a global variable (top of program, outside this form) &lt;/P&gt;&lt;P&gt;so it keeps its value: &lt;/P&gt;&lt;P&gt;DATA h_over like komvd-kwert. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To print it on top of the main page you can insert this at the top of window &lt;/P&gt;&lt;P&gt;MAIN: &lt;/P&gt;&lt;P&gt;IF &amp;amp;PAGE&amp;amp; &amp;gt; '1'. &lt;/P&gt;&lt;P&gt;,,,,,,,,,,,,Overdracht,,,,&amp;amp;OVER(I14)&amp;amp; &lt;/P&gt;&lt;P&gt;ENDIF &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To print it at the bottom: &lt;/P&gt;&lt;P&gt;IF &amp;amp;NOVER&amp;amp; NE 'X' &lt;/P&gt;&lt;P&gt;,,,,,,,,,,,,Overdracht,,,,&amp;amp;OVER(I14)&amp;amp; &lt;/P&gt;&lt;P&gt;ENDIF &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I set &amp;amp;NOVER&amp;amp; to 'X' after printing the end values (totals on the last page) &lt;/P&gt;&lt;P&gt;so it doesn't try to print my intermediary value any more: &lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;NOVER&amp;amp; = 'X' &lt;/P&gt;&lt;P&gt;Here I also clear my intermediary value because if you print several &lt;/P&gt;&lt;P&gt;invoices at once there is the danger that the intermediary value 'carries &lt;/P&gt;&lt;P&gt;on' from one invoice to another &lt;/P&gt;&lt;P&gt;PERFORM ZCLEAR IN PROGRAM ZALGFUNC1 &lt;/P&gt;&lt;P&gt;ENDPERFORM &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;and the ABAP in question is very simple: &lt;/P&gt;&lt;P&gt;FORM ZCLEAR TABLES TAB_IN STRUCTURE ITCSY TAB_OUT STRUCTURE ITCSY. &lt;/P&gt;&lt;P&gt;  clear h_over. &lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2006 07:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/1550211#M249658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-04T07:18:14Z</dc:date>
    </item>
  </channel>
</rss>

