<?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: Submit Statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462500#M218149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pass values to program2 using the selection table or using the WITH extenstion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;submit report2
       WITH P_PARM1 = 'AValue'
             and return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here P_PARM1 is a parameter in the REPORT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What part are you having a problem with?  Can you post your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jul 2006 14:40:46 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-07-12T14:40:46Z</dc:date>
    <item>
      <title>Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462499#M218148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've 2 programs say PR1 &amp;amp; PR2. I have to select output row/rows of program PR1 as Input for PR2 (at click event). I tried the submit statement for it as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Report PR1:&lt;/P&gt;&lt;P&gt;SUBMIT PR2&lt;/P&gt;&lt;P&gt;       WITH SELECTION-TABLE itab&lt;/P&gt;&lt;P&gt; AND RETURN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here itab is the internal table which contains the selected records from PR1 output. &lt;/P&gt;&lt;P&gt;I tried this with Import &amp;amp; Export Statement also but not getting the desired output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 14:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462499#M218148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-12T14:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462500#M218149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pass values to program2 using the selection table or using the WITH extenstion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;submit report2
       WITH P_PARM1 = 'AValue'
             and return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here P_PARM1 is a parameter in the REPORT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What part are you having a problem with?  Can you post your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 14:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462500#M218149</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-12T14:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462501#M218150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhavana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There should not be any problem with Imprt and Export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export int_tab to memory id 'MID'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you call submit statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT prg_name and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the other program , you can IMPORT the table using IMPORT Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 14:43:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462501#M218150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-12T14:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462502#M218151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the selection-table is not the output of the pr2 program but an internal table which has all the selection criteria(all parameters,select-option values) in PR2 program.&lt;/P&gt;&lt;P&gt;Itab must be filled with all those selection values before you pass to the submit statement.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 14:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462502#M218151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-12T14:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462503#M218152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Yopu need to save the Data to the Database, fo rthis you need to use Import and Export with Database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For Export :&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c2c358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c2c358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;for Import:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c46358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c46358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this you need to Delete the data from the Database&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c46358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c46358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the Submit statment with the use of this Internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;if you want the output of a report as input &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/rep_submit.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/rep_submit.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 14:50:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462503#M218152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-12T14:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462504#M218153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhavana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider these two programs I have done using both &amp;lt;b&amp;gt;WITH SELECTION-TABLE&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;IMPORT/EXPORT&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Program 1(ZZTEST_ARUN_1).&lt;/P&gt;&lt;P&gt;I have two radio buttons. If I select Material the program executes its own code. If I select plant data is fetched and exported to memory. Then it gets the selection parameters of the Program 2(ZZTEST_ARUN_2) through the FM &amp;lt;b&amp;gt;RS_REFRESH_FROM_SELECTOPTIONS&amp;lt;/b&amp;gt;.  Then I populate the values for selection screen and pass using the &lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;SUBMIT....WITH SELECTION-TABLE&amp;lt;/b&amp;gt; option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zztest_arun_1.
  TABLES: t001w.
  DATA : it_marc TYPE STANDARD TABLE OF marc WITH HEADER LINE,
         it_werks TYPE STANDARD TABLE OF t001w WITH HEADER LINE.

   PARAMETERS material RADIOBUTTON  GROUP  abc.     "Material General Details

   PARAMETERS plant RADIOBUTTON GROUP abc DEFAULT 'X'.      "Material Plant Details

   START-OF-SELECTION.

   IF material EQ 'X'.
   
*If Material selected own code executes   

    SELECT * FROM marc INTO TABLE it_marc UP TO 200 ROWS .
     LOOP AT it_marc.

     WRITE :/ it_marc-matnr,
            it_marc-werks.
     ENDLOOP.

   ENDIF.

  IF plant EQ 'X'.

*If Plant selected data fetched   

    SELECT * FROM t001w INTO TABLE it_werks UP TO 50 ROWS.
    
*Exported to Memory
    
    EXPORT it_werks[] TO MEMORY ID 'TEST'.

*Declare on selection table type RSPARAMS

&amp;lt;b&amp;gt;    DATA :   stable	LIKE	rsparams OCCURS 0 WITH HEADER LINE.&amp;lt;/b&amp;gt;

*Call this FM to get the Selection screen details
*of Program ZZTEST_ARUN_2 (it returns Select Options, Parameters..)

  &amp;lt;b&amp;gt;  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'&amp;lt;/b&amp;gt;
       EXPORTING
         curr_report     = 'ZZTEST_ARUN_2'
      TABLES
         selection_table = stable
      EXCEPTIONS
         not_found       = 1
         no_report       = 2
         OTHERS          = 3.
      
    IF sy-subrc &amp;lt;&amp;gt; 0.
     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

   stable-sign = 'I'.
   stable-option = 'BT'.
   
* populate some selection condition
   READ TABLE it_werks INDEX 10.
   stable-low = it_werks-werks.

   READ TABLE it_werks INDEX 40.
   stable-high = it_werks-werks.

   APPEND stable.

*Submit it then
   SUBMIT zztest_arun_2
       WITH SELECTION-TABLE stable
       AND RETURN.

   ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second Program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zztest_arun_2.
TABLES: t001w.

DATA : it_werks TYPE STANDARD TABLE OF t001w WITH HEADER LINE.

SELECT-OPTIONS : s_werks FOR t001w-werks.



*Import the stored data.
IMPORT it_werks[] FROM MEMORY ID 'TEST'.


*Display the data based on selection criteria got
*form ZZTEST_ARUN_1
LOOP AT it_werks WHERE werks &amp;lt;b&amp;gt; IN s_werks&amp;lt;/b&amp;gt;.
  WRITE : / it_werks-werks,
            it_werks-name1.

ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun Sambargi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Arun Sambargi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 16:25:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462504#M218153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-12T16:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462505#M218154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bhavana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the selection table can only succeed if the select-options of the 2nd report fit to the output of the first report. But even if you juggle out the correct format this is very unstable as there are no means for static checks on this relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you mentioned already import/export are another possibilty, but this lacks also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Reports as modularization unit is in general not the best idea. My proposal is to move all logic of the 2nd report into a method / fuba and call from the 1st report. If you also need the 2nd report you can easily also call the fuba from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;  Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2006 19:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462505#M218154</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2006-07-12T19:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462506#M218155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m populating the data in the selection table &amp;#147;stable&amp;#148; as  below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                curr_report     = &amp;#145;ZINFO'&lt;/P&gt;&lt;P&gt;           TABLES&lt;/P&gt;&lt;P&gt;                selection_table = stable&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                not_found       = 1&lt;/P&gt;&lt;P&gt;                no_report       = 2&lt;/P&gt;&lt;P&gt;                OTHERS          = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab1.&lt;/P&gt;&lt;P&gt;READ TABLE stable WITH KEY selname = 'WEKES'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          stable-sign   = 'I'.&lt;/P&gt;&lt;P&gt;          stable-option = 'EQ'.&lt;/P&gt;&lt;P&gt;          stable-low    = itab1-wekrs.&lt;/P&gt;&lt;P&gt;          MODIFY stable TRANSPORTING sign option low&lt;/P&gt;&lt;P&gt;                        WHERE selname = 'P_AUFNR'.&lt;/P&gt;&lt;P&gt;        ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE stable WITH KEY selname = 'TANKID'.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          stable-sign   = 'I'.&lt;/P&gt;&lt;P&gt;          stable-option = 'EQ'.&lt;/P&gt;&lt;P&gt;          stable-low    = itab1-tankid.&lt;/P&gt;&lt;P&gt;          MODIFY stable TRANSPORTING sign option low&lt;/P&gt;&lt;P&gt;                        WHERE selname = 'TANKID'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;SUBMIT ZINFO&lt;/P&gt;&lt;P&gt;           WITH SELECTION-TABLE stable&lt;/P&gt;&lt;P&gt;          AND RETURN .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;In this case I can populate the selection screen fields of Zinfo by only last selected record from output.&lt;/P&gt;&lt;P&gt;I want populate the selection screen of prg &amp;#147;Zinfo&amp;#148; by multiple records (Multiple selections) selected from output of calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I populate the stable for multiple records? Which value of option field I need to use for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bhavana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2006 10:33:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462506#M218155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-14T10:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462507#M218156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Bhavana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do it in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  zztest_1.

DATA :   stable	LIKE	rsparams OCCURS 0 WITH HEADER LINE,
         it_mara TYPE STANDARD TABLE OF mara WITH HEADER LINE.

START-OF-SELECTION.

  SELECT * FROM mara INTO TABLE it_mara UP TO 10 ROWS.
  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
      curr_report     = 'ZZTEST_2'
    TABLES
      selection_table = stable
    EXCEPTIONS
      not_found       = 1
      no_report       = 2
      OTHERS          = 3.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  BREAK-POINT.

*Read the selection table.

  READ TABLE stable WITH KEY selname = 'MATNR'.
  IF sy-subrc = 0.

*Then loop the output table and appen the values.
    LOOP AT it_mara.  "Specify some condition if possible to restrict the values.

      stable-sign   = 'I'.
      stable-option = 'EQ'.
      stable-low    =  it_mara-matnr.
      &amp;lt;b&amp;gt;APPEND stable.&amp;lt;/b&amp;gt;
    ENDLOOP.
  ENDIF.

  BREAK-POINT.

*Then submit the Program

  SUBMIT zztest_2
  WITH SELECTION-TABLE stable
  AND RETURN .


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun Sambargi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2006 11:14:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462507#M218156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-14T11:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462508#M218157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Bhavana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT rep. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;1. ... LINE-SIZE col &lt;/P&gt;&lt;P&gt;2. ... LINE-COUNT lin &lt;/P&gt;&lt;P&gt;3. ... TO SAP-SPOOL &lt;/P&gt;&lt;P&gt;4. ... VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;5. ... AND RETURN &lt;/P&gt;&lt;P&gt;6. ... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;7. ... USER user VIA JOB job NUMBER n &lt;/P&gt;&lt;P&gt;8. ... Various additions for parameter transfer to rep &lt;/P&gt;&lt;P&gt;9. ... USING SELECTION-SETS OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Calls the report rep . Leaves the active program and starts the new report rep . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... LINE-SIZE col &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Prints the report with the line width col . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... LINE-COUNT lin &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Prints the report with lin lines (per page). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4&lt;/P&gt;&lt;P&gt;... VIA SELECTION-SCREEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Displays the selection screen for the user. In this case, the selection screen is redisplayed after return from the report list display - the user's entries are retained. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 5&lt;/P&gt;&lt;P&gt;... AND RETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal mode . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 6&lt;/P&gt;&lt;P&gt;... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST" . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 7&lt;/P&gt;&lt;P&gt;... USER user VIA JOB job NUMBER n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Schedules the specified report in the job specified by the job name job and the job number n . The job runs under the user name user and you can omit the addition USER user . The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT . This addition can only be used with the addition ...AND RETURN . &lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 9&lt;/P&gt;&lt;P&gt;... USING SELECTION-SETS OF PROGRAM prog &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Uses variants of the program prog when executing the program rep . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;Important &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The programs prog and rep must have the same SELECT-OPTIONS and PARAMETER s. Otherwise, variants of the program prog may be destroyed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari . On the other hand, all variant-related actions on the selection screen of rep (Get , Save as variant , Display , Delete ) refer to the variants of prog . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT REPORT01&lt;/P&gt;&lt;P&gt;VIA SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;USING SELECTION-SET 'VARIANT1'&lt;/P&gt;&lt;P&gt;USING SELECTION-SETS OF PROGRAM 'REPORT00'&lt;/P&gt;&lt;P&gt;AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00 . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note&lt;/P&gt;&lt;P&gt;Runtime errors &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_PROGRAM_NOT_FOUND : The specified program was not found. &lt;/P&gt;&lt;P&gt;SUBMIT_WRONG_TYPE : The specified program is not a report. &lt;/P&gt;&lt;P&gt;SUBMIT_IMPORT_ONLY_PARAMETER : Only one value passed to a report parameter. &lt;/P&gt;&lt;P&gt;SUBMIT_WRONG_SIGN : Invalid value passed to a selection with the addition SIGN . &lt;/P&gt;&lt;P&gt;SUBMIT_IN_ITAB_ILL_STRUCTURE : Table passed to a selection with WITH sel IN itab had an unexpected structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with this Example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: listobject like abaplist occurs 1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;listobject = listobject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OTHERS = 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message ID '61' TYPE 'E' NUMBER '731'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with 'LIST_FROM_MEMORY'.&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;Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2006 11:29:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement/m-p/1462508#M218157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-14T11:29:50Z</dc:date>
    </item>
  </channel>
</rss>

