<?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 calling forms from program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002596#M956244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts&lt;/P&gt;&lt;P&gt;I need to write a form in a program to get values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code. But i cant seem to succesfully compile it. Need help. I want to take&lt;/P&gt;&lt;P&gt;ernam from sapscript and send name and lastname back. Can u please fill the function.&lt;/P&gt;&lt;P&gt;Also i have an error says  itcyy is not a structure ?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZME23N_SAPSCR_FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : user_Addr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_Values 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;*READ TABLE IN_PAR WITH KEY 'ERNAM'. &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*data firstname like user_addr-name_first.&lt;/P&gt;&lt;P&gt;*select single * from user_Addr&lt;/P&gt;&lt;P&gt;*where bname = ernam.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*firstname = user_Addr-name_first.&lt;/P&gt;&lt;P&gt;*lastname = user_addr-name_last.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jun 2008 11:15:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-16T11:15:46Z</dc:date>
    <item>
      <title>sapscript calling forms from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002596#M956244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts&lt;/P&gt;&lt;P&gt;I need to write a form in a program to get values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code. But i cant seem to succesfully compile it. Need help. I want to take&lt;/P&gt;&lt;P&gt;ernam from sapscript and send name and lastname back. Can u please fill the function.&lt;/P&gt;&lt;P&gt;Also i have an error says  itcyy is not a structure ?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZME23N_SAPSCR_FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : user_Addr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_Values 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;*READ TABLE IN_PAR WITH KEY 'ERNAM'. &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*data firstname like user_addr-name_first.&lt;/P&gt;&lt;P&gt;*select single * from user_Addr&lt;/P&gt;&lt;P&gt;*where bname = ernam.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*firstname = user_Addr-name_first.&lt;/P&gt;&lt;P&gt;*lastname = user_addr-name_last.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 11:15:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002596#M956244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T11:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript calling forms from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002597#M956245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;    In sapscript write this in editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform Performname  in program &amp;lt;program name&amp;gt; using &amp;lt;ernam&amp;gt; changing &amp;lt;fieldname&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in program write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form &amp;lt;performname&amp;gt;TABLES IN_PAR STUCTURE ITCSY &lt;/P&gt;&lt;P&gt;OUT_PAR STRUCTURE ITCSY. &lt;/P&gt;&lt;P&gt;read table in_par with key name = 'ERNAM'.&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;ur logic.&lt;/P&gt;&lt;P&gt;...read table out_par with key name = ' '.&lt;/P&gt;&lt;P&gt;out_par- value = field value.&lt;/P&gt;&lt;P&gt; modify out_par.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 11:20:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002597#M956245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T11:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript calling forms from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002598#M956246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the PERFORM command to call an ABAP subroutine &lt;/P&gt;&lt;P&gt;(form) from &lt;/P&gt;&lt;P&gt;any program, subject to the normal ABAP runtime &lt;/P&gt;&lt;P&gt;authorization &lt;/P&gt;&lt;P&gt;checking. You can use such calls to subroutines for &lt;/P&gt;&lt;P&gt;carrying out &lt;/P&gt;&lt;P&gt;calculations, for obtaining data from the database that is &lt;/P&gt;&lt;P&gt;needed at &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;when a &lt;/P&gt;&lt;P&gt;document is formatted for display or printing. &lt;/P&gt;&lt;P&gt;Communication between a &lt;/P&gt;&lt;P&gt;subroutine that you call and the document is by way of &lt;/P&gt;&lt;P&gt;symbols whose &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;SAPscript &lt;/P&gt;&lt;P&gt;replace modules, such as TEXT_SYMBOL_REPLACE or &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;the four &lt;/P&gt;&lt;P&gt;SAPscript symbol types. &lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;The ABAP subroutine called via the command line stated &lt;/P&gt;&lt;P&gt;above must be &lt;/P&gt;&lt;P&gt;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;P&gt;&lt;/P&gt;&lt;P&gt;REPORT QCJPERFO. &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;&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 'PAGE'. &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 'NEXTPAGE'. &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 'BARCODE'. &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 = '|'. "First page &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE. &lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE = '||'. "Next 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;IF NEXTPAGE = 0. &lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE+2 = 'L'. "Flag: last page &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;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 11:20:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002598#M956246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T11:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript calling forms from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002599#M956247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT ZME23N_SAPSCR_FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : user_Addr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_Values 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;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this structure i am taking this error on compilation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter "OUT_PAR" STRUCTURE "ITCSY" - field "ITCSY" is not a strucutre.&lt;/P&gt;&lt;P&gt;Pls help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 11:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002599#M956247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T11:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript calling forms from program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002600#M956248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can do this using perform in the script.&lt;/P&gt;&lt;P&gt;Go through the below documentations.&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;Reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anomitro Guha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 11:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-calling-forms-from-program/m-p/4002600#M956248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T11:40:52Z</dc:date>
    </item>
  </channel>
</rss>

