<?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 Report in Background... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851597#M1319776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What Should I to pass it. When I try with TEXPR I receive a dumping error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2009 14:14:30 GMT</pubDate>
    <dc:creator>mrahhaoui</dc:creator>
    <dc:date>2009-07-02T14:14:30Z</dc:date>
    <item>
      <title>Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851592#M1319771</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;&lt;/P&gt;&lt;P&gt;I have a problem when I want to execute my report in background rkaep000. There are some fields which are dynamic (e.g. "%%DYN001-LOW") . On my own selction screen I have some fields that are used in the standard report "rkaep000" as dynamic. So, I can't to pass the value to the standard report. Because the report doesn't work properly. I tried to see in the debugger and I remarked that the fields which their screen fields name are dynamics are filled in the table 'GT_FREE_SEL_RANGES[1]-FRANGE_T[1]-SELOPT_T'.  But to be honnest I don't know how to use it and give the right name in my work area "wa_p-selname'. I already checked in the forum before to post my message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody could help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"Controlling Area
  LOOP AT s_kokrs.
    CLEAR wa_p.
    wa_p-selname = 'P_KOKRS'.
    wa_p-kind = 'S'.
    wa_p-sign = s_kokrs-sign.
    wa_p-option = s_kokrs-option.
    wa_p-low = s_kokrs-low.
    wa_p-high = s_kokrs-high.
    APPEND wa_p TO i_tab.
  ENDLOOP.

"Partner Object
  LOOP AT s_parob.
    CLEAR wa_p.
    wa_p-selname = 'P_AROBJ'.
    wa_p-kind = 'S'.
    wa_p-sign = s_parob-sign.
    wa_p-option = s_parob-option.
    wa_p-low = s_parob-low.
    wa_p-high = s_parob-high.
    APPEND wa_p TO i_tab.
  ENDLOOP.

"Posting Date
  LOOP AT s_budat.
    CLEAR wa_p.
    wa_p-selname = 'R_BUDAT'.
    wa_p-kind = 'S'.
    wa_p-sign = s_budat-sign.
    wa_p-option = s_budat-option.
    wa_p-low = s_budat-low.
    wa_p-high = s_budat-high.
    APPEND wa_p TO i_tab.
  ENDLOOP.

"Debit Type
  CLEAR wa_p.
  wa_p-selname = 'BELTP'.
  wa_p-kind = 'P'.
  wa_p-sign = 'I'.
  wa_p-option = 'EQ'.
  wa_p-low = p_beltp.
  APPEND wa_p TO i_tab.

"Bus. Transaction
  LOOP AT s_vrgng.
    CLEAR wa_p.
    wa_p-selname = 'GT_FREE_SEL_RANGES[1]-FRANGE_T[1]-SELOPT_T'.
    wa_p-kind = 'S'.
    wa_p-sign = s_vrgng-sign.
    wa_p-option = s_vrgng-option.
    wa_p-low = s_vrgng-low.
    wa_p-high = s_vrgng-high.
    APPEND wa_p TO i_tab.
  ENDLOOP.

"Layout
  CLEAR wa_p.
  wa_p-selname = 'P_DISVAR'.
  wa_p-kind = 'P'.
  wa_p-sign = 'I'.
  wa_p-option = 'EQ'.
  wa_p-low = p_layout.
  APPEND wa_p TO i_tab.

  IF rd_cost = 'X'.
    SUBMIT rkaep000 WITH p_tcode = 'KSB1'  WITH SELECTION-TABLE i_tab
    TO SAP-SPOOL SPOOL PARAMETERS print_parameters ARCHIVE PARAMETERS archi_parameters
     WITHOUT SPOOL DYNPRO VIA JOB w_name NUMBER w_number
     AND RETURN.
 ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jul 2, 2009 11:09 AM (Tried to fix the layout...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 11:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851592#M1319771</guid>
      <dc:creator>mrahhaoui</dc:creator>
      <dc:date>2009-07-02T11:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851593#M1319772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the [SUBMIT|http://help.sap.com/abapdocu/en/ABAPSUBMIT.htm] statement, &lt;/P&gt;&lt;P&gt;- for dynamic selection : use the [WITH FREE SELECTIONS texpr|http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_5@5@] option, (textpr is an internal table of type RSDS_TEXPR from type group RSDS)&lt;/P&gt;&lt;P&gt;- for static selection use the [WITH SELECTION-TABLE rspar |http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_3@3@] option (rspar is an internal table of DD type RSPARAMS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 11:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851593#M1319772</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-07-02T11:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851594#M1319773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally Ranges are just like internal tables and used to pass data in queries in where clause as select options.&lt;/P&gt;&lt;P&gt;If we have assign RANGES in selection screen, we have to pass some data before using them in queries.&lt;/P&gt;&lt;P&gt;So please check the queries where these ranges are used. do thes ranges have some data prior to used in queries?&lt;/P&gt;&lt;P&gt;These might have declared in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 11:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851594#M1319773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T11:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851595#M1319774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply I tried to pass like you told me but when the partner object and the business transaction haven't been passed. I clicked on "Futher Selection Criteria" and selected the fields choosen but nothing inside. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*Partner Object
  LOOP AT s_parob.
    w_texpr-tablename = 'COVP'.
    w_expr-option = s_parob-option.
    w_expr-fieldname = 'PAROB1'.
    w_expr-low = s_parob-low.
    w_expr-high = s_parob-high.

    APPEND w_expr TO w_texpr-expr_tab.
    APPEND w_texpr TO texpr.
  ENDLOOP.

*  "Bus. Transaction
  LOOP AT s_vrgng.
    CLEAR wa_p.
    w_texpr-tablename = 'COVP'.
    w_expr-option = s_vrgng-option.
    w_expr-fieldname = 'VRGNG'.
    w_expr-low = s_vrgng-low.
    w_expr-high = s_vrgng-high.

    APPEND w_expr TO w_texpr-expr_tab.
    APPEND w_texpr TO texpr.
  ENDLOOP.
......

** Submit for KSB1 transaction -&amp;gt; Cost Center
  IF rd_cost = 'X'.
    SUBMIT rkaep000
      WITH p_tcode = 'KSB1'
*      WITH SELECTION-TABLE i_tab
      WITH FREE SELECTIONS texpr
      VIA SELECTION-SCREEN
       TO SAP-SPOOL
         SPOOL PARAMETERS print_parameters
         ARCHIVE PARAMETERS archi_parameters
         WITHOUT SPOOL DYNPRO
         VIA JOB w_name NUMBER w_number
       AND RETURN.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 12:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851595#M1319774</guid>
      <dc:creator>mrahhaoui</dc:creator>
      <dc:date>2009-07-02T12:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851596#M1319775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use the FM FREE_SELECTIONS_RANGE_2_EX to convert RANGES to the required format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 12:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851596#M1319775</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-07-02T12:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851597#M1319776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What Should I to pass it. When I try with TEXPR I receive a dumping error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 14:14:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851597#M1319776</guid>
      <dc:creator>mrahhaoui</dc:creator>
      <dc:date>2009-07-02T14:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Report in Background...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851598#M1319777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the sample at [WITH FREE SELECTIONS texpr |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_5@5@]&lt;/P&gt;&lt;P&gt;(Just modify you code to fill a rsds_trange type and then convert via FM to rsds_texpr type.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 06:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-report-in-background/m-p/5851598#M1319777</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-07-03T06:02:58Z</dc:date>
    </item>
  </channel>
</rss>

