<?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 Submit Program and related issues in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591281#M1435893</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 have a Standard Report program which on input of particular parameter value displays a ALV Grid Output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, ,my requirement is as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I generate a Z-program which has Select-option for a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each value in the Select-option , I need to submit the Standard Report program in background using SUBMIT statement.&lt;/P&gt;&lt;P&gt;Now, I dont want ALV Grid Output to be displayed , instead want to get back the Output Data into the Z-program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, after processing for all Select-option values I will be displaying the required Output from my Z-program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me how can I do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main issues are:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. On running a program through SUBMIT, how to suppress the Output which gets displayed?&lt;/P&gt;&lt;P&gt;2. How to get back the data from Called program to Calling program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shivaa.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Feb 2010 22:25:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-08T22:25:33Z</dc:date>
    <item>
      <title>Submit Program and related issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591281#M1435893</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 have a Standard Report program which on input of particular parameter value displays a ALV Grid Output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, ,my requirement is as follows:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I generate a Z-program which has Select-option for a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each value in the Select-option , I need to submit the Standard Report program in background using SUBMIT statement.&lt;/P&gt;&lt;P&gt;Now, I dont want ALV Grid Output to be displayed , instead want to get back the Output Data into the Z-program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, after processing for all Select-option values I will be displaying the required Output from my Z-program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me how can I do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main issues are:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. On running a program through SUBMIT, how to suppress the Output which gets displayed?&lt;/P&gt;&lt;P&gt;2. How to get back the data from Called program to Calling program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shivaa.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 22:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591281#M1435893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-08T22:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Program and related issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591282#M1435894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shiva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this:(My suggestion)&lt;/P&gt;&lt;P&gt;1. You can copy the standard program in Z-namespace and comment the code which displays the output in ALV gird. After the result set is prepared, add the code like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  EXPORT &amp;lt;result_table&amp;gt; TO MEMORY ID 'RES_TABLE'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. You can create the selection parameters table in your Z program and call the copied standard program using the SUBMIT keyword.&lt;/P&gt;&lt;P&gt;the code snippet:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
      gt_params      TYPE TABLE OF   rsparams,
      gw_params    TYPE                     rsparams.


" To prepare the selection parameters table, loop on the select-option field as shown:
  LOOP AT &amp;lt;selectio-option&amp;gt;.
    CLEAR: gw_params.
    gw_params-selname = '....'. " selname should match with the field used in the standard program while firing the SELECT "query. It should be in Capital letters.
    gw_params-kind = 'S'. " P: if parameter, S: select-option
    gw_params-sign = &amp;lt;selectio-option&amp;gt;-sign.
    gw_params-option = &amp;lt;selectio-option&amp;gt;-option.
    gw_params-low = &amp;lt;selectio-option&amp;gt;-low.
    gw_params-high = &amp;lt;selectio-option&amp;gt;-high.
    APPEND gw_params TO gt_params.
  ENDLOOP.

" Continue with the other SELECT-OPTIONS in the same manner, if any.

" Call the copied program
  SUBMIT &amp;lt;copied_stand_prg&amp;gt; AND RETURN
          USER sy-uname
          WITH SELECTION-TABLE gt_params.

" Import the result set
" make sure that the type of the tables match
  IMPORT &amp;lt;result_table&amp;gt; TO gt_tabl FROM MEMORY ID  'RES_TABLE'.

" Now you can perform any operation on this table and display the result set in ALV grid

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you will find this useful...:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;s@k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2010 03:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591282#M1435894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-09T03:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Program and related issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591283#M1435895</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;You can use Submit report as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SUBMIT rm07docs USING SELECTION-SET 'PLANT 4000'
       WITH p_online = 'X'
       TO SAP-SPOOL
       SPOOL PARAMETERS   %_print
       WITHOUT SPOOL DYNPRO
       AND RETURN.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then find out what the spool number is that was just created:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: l_i_tsp01 TYPE STANDARD TABLE OF tsp01 WITH HEADER LINE .

  DATA: l_c_rq2name LIKE tsp01-rq2name.

  CONCATENATE report+0(8)
              sy-uname+0(3)
         INTO l_c_rq2name SEPARATED BY '_'.

  SELECT * FROM tsp01 INTO TABLE l_i_tsp01 WHERE  rq2name = l_c_rq2name.

  SORT l_i_tsp01 BY rqcretime DESCENDING.
  READ TABLE l_i_tsp01 INDEX 1.
  v_spool_num = l_i_tsp01-rqident.
  IF sy-subrc NE 0.
    CLEAR v_spool_num.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM 'RSPO_RETURN_ABAP_SPOOLJOB' to convert in into table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 TYPES: BEGIN OF ty_spool_output,
            default(256) TYPE c,
         END OF ty_spool_output,
         ty_t_spool_output TYPE STANDARD TABLE OF ty_spool_output.

*-- INTERNAL TABLES
  DATA :i_spool_output     TYPE ty_t_spool_output,
        wa_spool_output    TYPE ty_spool_output.

CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
    EXPORTING
      rqident              = v_spool_num
    TABLES
      buffer               = i_spool_output
    EXCEPTIONS
      no_such_job          = 1
      not_abap_list        = 2
      job_contains_no_data = 3
      selection_empty      = 4
      no_permission        = 5
      can_not_access       = 6
      read_error           = 7
      OTHERS               = 8.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then process this internal table and use it in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2010 04:10:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591283#M1435895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-09T04:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Program and related issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591284#M1435896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this. for eg.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: it_listobject1   LIKE abaplist OCCURS 1 WITH HEADER LINE,
it_ascii1        TYPE STANDARD TABLE OF ty_ascii  WITH HEADER LINE,

 SUBMIT rm07docs WITH werks EQ p_werks 
                 WITH lifnr IN s_lifnr   "select-option
                  ....
                 EXPORTING LIST TO MEMORY
                 AND RETURN.

 CALL FUNCTION 'LIST_FROM_MEMORY'
   TABLES
     listobject = it_listobject1.

 CALL FUNCTION 'LIST_TO_ASCI'
   TABLES
     listasci           = it_ascii1
     listobject         = it_listobject1.

 LOOP AT it_ascii1 .
    SEARCH it_ascii1-text FOR '-----' .
    IF sy-subrc EQ 0.
      DELETE it_ascii1.
      CLEAR it_ascii1.
    ENDIF.
  ENDLOOP.


  LOOP AT it_ascii1 .
    g_count1 = g_count1 + 1.
    IF g_count1 GT 2.
      IF it_ascii1-text+61(4) EQ p_werks.
         wa_it_stock-matnr = it_ascii1-text+1(18).
         wa_it_stock-werks = it_ascii1-text+61(4).
         l_matnr = wa_it_stock-matnr.
         l_werks = wa_it_stock-werks.
      ELSE.
        wa_it_stock-matnr = l_matnr.
        wa_it_stock-werks = l_werks.
        wa_it_stock-bwart = it_ascii1-text+6(3).
        wa_it_stock-mblnr = it_ascii1-text+12(10).

        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'   " adding leading zero
          EXPORTING
            input  = wa_it_stock-matnr
          IMPORTING
            output = wa_it_stock-matnr.

        APPEND wa_it_stock TO it_stock.
        CLEAR wa_it_stock.
      ENDIF.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2010 04:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-related-issues/m-p/6591284#M1435896</guid>
      <dc:creator>p604431</dc:creator>
      <dc:date>2010-02-09T04:11:15Z</dc:date>
    </item>
  </channel>
</rss>

