Prob in Submit Report via Selection screen.

Hi,
I have to submit a report via selection screen.
The report name is detemined at run time.
This i am able to handle easily as we can use SUBMIT (V_PROG)...
                               WHERE V_PROG contains the name of the report that i get at runtime...
Now the issue :::::::
I have to also populate a select-options on the called report on submit.
usually this is done by :
                                            SUBMIT (V_PROG)
                                            name of select-option in itab...
However in my case the name of the <name of select-option> is also detemined at runtime say PNPPERNR.
Now if i use any variable / field symbol for the name of the select - option (like for the called program), it does not work (the called report does not have the values i populate in ITAB for the particular select-option)
I have also tried Macro but cant find solution...
ANY IDEAS ??

Hi Anuj,
When you are getting the report name in runtime, you can also get the report selection screen information during runtime.
Now how are you going to decide which values you will move to which selection screen variables of which report? If you have a way to determine this, then here is a program that works on that assumption.
REPORT ztest1 .
DATA: i_seltab          TYPE TABLE OF rsparams WITH HEADER LINE,
      i_selections_info TYPE TABLE OF selinfo WITH HEADER LINE.
DATA: v_report LIKE sy-repid,
      v_matnr  LIKE mara-matnr.
PARAMETERS: p_rep1 RADIOBUTTON GROUP rad DEFAULT 'X',
            p_rep2 RADIOBUTTON GROUP rad.
SELECT-OPTIONS: s_matnr FOR v_matnr.
START-OF-SELECTION.
  IF p_rep1 = 'X'.
*-- some criteria to determine the name of the report
    v_report = 'ZTEST2'.
  ELSE.
    v_report = 'ZTEST4'.
  ENDIF.
*-- get the parameters for the report
  CALL FUNCTION 'RS_SELECTIONS_DESCRIPTION'
       EXPORTING
            report              = v_report
       TABLES
            selections_info     = i_selections_info
       EXCEPTIONS
            no_selections       = 1
            report_not_existent = 2
            subroutine_pool     = 3
            OTHERS              = 4.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  LOOP AT i_selections_info WHERE name = 'S_MATNR'.
*-- some criteria based on which, move the values from this program
*   to the called program
    CLEAR i_seltab.
    i_seltab-selname = i_selections_info-name.
    i_seltab-kind    = i_selections_info-kind.
    i_seltab-sign    = 'I'.
    i_seltab-option  = 'EQ'.
    i_seltab-low     = s_matnr-low.
    i_seltab-high    = s_matnr-high.
    APPEND i_seltab.
  ENDLOOP.
  IF NOT i_seltab[] IS INITIAL.
    SUBMIT (v_report) VIA SELECTION-SCREEN
            WITH SELECTION-TABLE i_seltab .
  ENDIF.
If this works for you, please reward and close the post.
Regards,
Srinivas

Similar Messages

  • SUBMIT Zxx VIA SELECTION-SCREEN AND RETURN

    SUBMIT Zxx VIA SELECTION-SCREEN AND RETURN
    and it's dont make f8 why

    wa_rspar-selname = 'P_DEALNO'.
    wa_rspar-kind = 'S'.
    wa_rspar-sign = 'I'.
    wa_rspar-option = 'EQ'.
    wa_rspar-low  = T_FORDER-DEAL_No.
       APPEND wa_rspar TO rspar.
    Submit ZSDR_SALESORDER_DISPLAY
         using Selection-screen '1000'
               WITH SELECTION-TABLE rspar.
    orelse
    *submit RSEIDOC2 with docnum-low = docnum with
                       credat-low = credat
                               and return.

  • SUBMIT  RPCDTCU0_CE VIA SELECTION-SCREEN just wont work

    Hi all,
    I use SUBMIT  RPCDTCU0_CE VIA SELECTION-SCREEN
    with PNPTIMED = '1'
    with PNPXABKR = 'US'
    with PNPPABRP = '8'
    with PNPPABRJ = '2009'
    with PNPPERNR-LOW = '73265'
    with PNPABKRS-LOW = 'US'
    with ZLSCH-LOW = 'C'
    with TEST = 'X'
    with UPD_PCL2 = 'X'
    with SW_ADV1 = 'X'
    with NEWLOG_D = 'X'.
    The moment I run the progrm, it receive "program terminated message"
    Any other idea on how I should run the program and get to pass the value into the program?

    Hi,
    Try using extension of selection table instead of wtih parameters..
       [WITH SELECTION-TABLE rspar]
    Nag

  • SUBMIT via selection screen and return gives dump

    Hi Guys,
    When i have used SUBMIT via SELECTION SCREEN and RETURN, it gave me the selection screen and subsequent report is executed properly without an error and when i pressed back button, it went to selection screen without any issues but the problem is when i press back from the selection screen it gives me a dump. Could you guys think of what would be the probelm.
    Thanks in Advance.
    Santosh.

    Hi Santhosh,
    What is the dump u r getting? I tried like this and is working file.
    Report1
    REPORT  Z75694TEST1.
    PARAMETERS po_1 TYPE c.
    WRITE po_1.
    SUBMIT Z75694_TEST VIA SELECTION-SCREEN AND RETURN.
    Report2
    REPORT Z75694_TEST .
    PARAMETERS: po_2 TYPE c.
    WRITE po_2.
    Thanks,
    Vinod.

  • Submit via selection-screen - Return automatically

    Hello so far I have a code ....
    <b> SUBMIT (p_pname) EXPORTING LIST TO MEMORY AND RETURN
                         USING SELECTION-SET p_vname.</b>
    Now what this does is self explanatory. Afterwards I just write the list to the program with the submit statment.
    However, instead of using a variant. I would like to have an option that it goes to the selection-screen where the user can input the parameters and return back to the original program afterwards.
    When I tried this ...
    <b>SUBMIT (p_pname) VIA SELECTION-SCREEN
                       EXPORTING LIST TO MEMORY AND RETUR</b>
    What happens is that it goes to the selection-screen, but stays in that program which I submitted and sends the report there. Its only when I press the back button is when it Exports list to memory.
    As mentioned my desired process is that after the selection-screen process is done. You return back and the report is generated there. Thank you every one and good day.

    Chad,
    As you need the selection screen of the calling program, unless you exit out of the report, its not going to come out of the program. Once the program is displayed, you will hav explicity come out of it.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Problem in Submit via selection screen statement

    Dear Experts,
    I have designed selection screen and a dialog screen 100. I am passing the selection screen values to dialog screen using Selection screen via selection screen statement. When i tried to change the values in dialog screen, it is not allowing me to do so and the values are not refreshed.
    I have searched the SDN Forum, but not able to find the suitable thread.
    Regards,
    Ramesh Manoharan
    Edited by: ramesh.manoharan on Mar 17, 2010 1:03 PM

    Hi,
    I have used the below statement to pass values the values from selection screen to dialog screen (Created as an Executable program)
    Submit <pgm> via selection screen
      with ...... .
    Dialog screen is created as an executable program where i have created two subscreen area and populating the Selection Screen as subscreen by using the below statement:
    selection-screen begin of screen <subscreen no.> as subscreen.
    selection-screen end of screen <subscreen no.>.
    The problem i am facing is that the values of selection screen are getting populated in the dialog screen. But when i tried to change the input values in the dialog selection screen. I am unable to do that and it is not showing the new entered values. Only the previous values are shown (got from selection screen from Submit via selection screen statement).
    Kindly let me know where i am going wrong ? Kindly help me to overcome the problem .
    Regards,
    Ramesh Manoharan

  • How to set cursor after submit via selection-screen

    hi guys,
    i would like to set cursor to certain field, after submit via selection-screen.
    eg.
    SUBMIT   z_mm_kbr_gr_label_01
                VIA SELECTION-SCREEN
                WITH p_mblnr = p_mblnr
                WITH p_zeile = p_zeile
                WITH p_gjahr = p_gjahr
                WITH p_ccode = p_ccode
                WITH p_dcode = p_dcode
                WITH p_crt = p_crt
                WITH p_print = p_print.
    i want to set cursor field 'p_ccode' after going back to
    z_mm_kbr_gr_label_01. the program always go to the first field on the screen whatever i do.
    may i know how to do this?
    thanks.

    Hi,
    Please try like below .
    at selection-screen output.
    SET CURSOR FIELD  'P_CCODE' .

  • Problem with SUBMIT report [ WITH SELECTION-TABLE ] or [ IN range ]

    Hello Everybody,
    I am trying to call transaction F.80 for mass reversal of FI documents by using SUBMIT sentence and its parameters like this:
      LOOP AT i_zfi013 INTO wa_zfi013.
        PERFORM llena_params USING 'BR_BELNR' 'S' 'I' 'EQ' wa_zfi013-num_doc ''.
    range_line-sign   = 'I'.
    range_line-option = 'EQ'.
    range_line-low    = wa_zfi013-num_doc.
    APPEND range_line TO range_tab.
    endloop.
    Line: -
          SUBMIT sapf080
            WITH br_bukrs-low = p_bukrs
            WITH SELECTION-TABLE it_params  [ same  problem with -  WITH BR_BELNR IN range_tab]
            WITH br_gjahr-low = p_an1
            WITH stogrd = '05'
            WITH testlauf = ''
            AND RETURN.
    My problem is that  when the report is executed the BR_BELNR only delete one document of the all the inputs in the selection criteria from the loop. if I add the statement [ VIA SELECTION-SCREEN] in the SUBMIT if open the multiple selection criteria in the screen I can check that all the documents are set in it from the ABAP code in the loop from it I just need to push F8 to copy them and run the program processing all the documents normally .
    Can some one help me with this? is there a way to execute the transaction BY the SUBMIT with the multiple selection criteria for the Document Number working well?
    Thank for you time and help.

    This is my code:
      TYPES: BEGIN OF T_ZFI013,
              BUKRS     TYPE BUKRS,
              GJAHR     TYPE GJAHR,
              MONAT     TYPE MONAT,
              ANLN1     TYPE ANLN1,
              ANLN2     TYPE ANLN2,
              NUM_DOC     TYPE BELNR_D,
              DATE     TYPE DATUM,
              TIME  TYPE UZEIT,
              USER     TYPE SYUNAME,
             END OF T_ZFI013.
       DATA: I_ZFI013  TYPE STANDARD TABLE OF T_ZFI013,
             WA_ZFI013 TYPE T_ZFI013,
      DATA: br_belnr       TYPE BELNR_D,
            rspar_tab  TYPE TABLE OF rsparams,
            rspar_line LIKE LINE OF rspar_tab,
            range_tab  LIKE RANGE OF br_belnr,
            range_line LIKE LINE OF range_tab."range_tab.
      LOOP AT i_zfi013 INTO wa_zfi013.
        range_line-sign   = 'I'.
        range_line-option = 'EQ'.
        range_line-low    = wa_zfi013-num_doc.
        APPEND range_line TO range_tab.
      ENDLOOP.
      SUBMIT sapf080
        WITH br_bukrs-low = p_bukrs
        WITH br_belnr IN range_tab
        WITH br_gjahr-low = p_an1
        WITH stogrd = '05'
        WITH testlauf = ''.
    This is the RANGE_TAB table before submit:
    1     I     EQ     1001xxxxxx
    2     I     EQ     1002xxxxxx
    3     I     EQ     1003xxxxxx
    4     I     EQ     1004xxxxxx
    5     I     EQ     1005xxxxxx
    6     I     EQ     1006xxxxxx
    7     I     EQ     1007xxxxxx
    8     I     EQ     1008xxxxxx
    I think this wont work for some reason so I will start to do this by a BDC.
    Many thanks for your help.

  • Submit report using selection-table to report 'RKAEP000'(Tcode ksb1)

    Hi,
    I am calling report "RKAEP000'(This is the report for tcode KSB1) using submit statement in my program to import the ksb1 output in my program. For time being I am calling this report using selection-set 'variant'.
    The selection screen of ksb1 is designed with modulepool program (screen 100).
    The selection screen of my program is similar to ksb1 initial screen, except layout option and controlling area is on the screen itself instead of calling it through menu.
    Please tell me how to post the selction criteria of my report to the calling program 'RKAEP000'.
    Thanks,
    suresh

    You can use WITH addition of SUBMIT statement.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Regards,
    Premal

  • Submit program with selection screen parameters - getting blank values

    Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN  )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN  ) but the value is blank in selection screen. I'm using the below code for this.
    SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR   SIGN 'I'
                      WITH WERKS_GL EQ I_WERKS   SIGN 'I'
                      WITH PLSCN    EQ I_TPLSCN  SIGN 'I'
        via selection-screen        AND RETURN.
    Could anyone please help me how to display value '000' rather than blanks.
    thanks in advance.

    If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
    SUBMIT rmcpamrp
      WITH matnr_gl = i_matnr
      WITH plscn    = i_tplscn
      WITH werks_gl = i_werks
      via selection-screen       
       AND RETURN .
    If I_MATNR, I_TPLSCN and I_WERKS are of type range then try  with
    SUBMIT rmcpamrp
      WITH matnr_gl IN i_matnr
      WITH plscn    IN i_tplscn
      WITH werks_gl IN i_werks
    via selection-screen       
       AND RETURN
    Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM

  • Run alv report without selection screen in background

    Hello Every body,
    i programmed a ALV Report without selection screen, and i want to create a job for this alv report.
    Any help?
    Thank u.
    Ouail.

    Hi Steve,
    Can you tell me where i have to put your code?
    this is my abap code:
    START-OF-SELECTION.
       p_filref = '\\SAPSERVER\f\SAFT\ivat\FI_Extract_1000_20140709_102346_910.XML'.
       PERFORM copy_from_xml_to_itab TABLES it_ref_file
                                     ref_xml_data
                                     USING p_filref.
    **Begin Extraction File
       SUBMIT ZZ_FI_IVAT_EXTRACTOR
       WITH p_bukrs EQ '1000'
       WITH p_gjahr EQ '1998'
       WITH filepath EQ '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
       WITH cldata eq space
       AND RETURN.
       DATA: FILE_TABLE  TYPE TABLE OF SDOKPATH,
       DIR_TABLE  TYPE TABLE OF SDOKPATH.
       CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
         EXPORTING
           DIRECTORY  = '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
           FILTER     = '*.*'
         TABLES
           FILE_TABLE = FILE_TABLE
           DIR_TABLE  = DIR_TABLE
         EXCEPTIONS
           CNTL_ERROR = 1
           OTHERS     = 2.
       IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
       "get file name
       LOOP AT FILE_TABLE INTO p_filref.
       ENDLOOP.
       CONCATENATE '\\SAPSERVER\f\SAFT\iVAT_Extractie\' p_filref INTO path.
       PERFORM copy_from_xml_to_itab TABLES t_ext_file
                                     ext_xml_data
                                     USING path.
       PERFORM fill_xml_tab_in .
       perform build_fieldcatalog.
       PERFORM compare_data_ref_ext.
       PERFORM send_email.
       perform display_alv_report.
       PERFORM delete_extraction_file.
    in the perform copy_from_xml_to_itab TABLES it_ref_file......, i use this code:
       CREATE OBJECT gcl_xml.
    *Upload XML File
       CALL METHOD gcl_xml->import_from_file
         EXPORTING
           filename = p_filref
         RECEIVING
           retcode  = gv_subrc.
       IF gv_subrc = 0.
         CALL METHOD gcl_xml->render_2_xstring
           IMPORTING
             retcode = gv_subrc
             stream  = gv_xml_string
             size    = gv_size.
         IF gv_subrc = 0.
           REFRESH gt_xml_data[].
    * Convert XML to internal table
           CALL FUNCTION 'SMUM_XML_PARSE'
             EXPORTING
               xml_input = gv_xml_string
             TABLES
               xml_table = gt_xml_data
               return    = gt_return.
         ENDIF.
       ENDIF.

  • Call a report with selection screen as subscreen.

    Hi all,
    i need to Submit And Return a Report having some parameters and Select options, from a Function Module.
    all i want that the Selection Scrren of Report should appeared as Subscreeen, so that Calling Screen sould be visible in Background.
    Is this Possible , if yes then How ?
    thanks in advance,
    Nitin

    Running new report means opening new internal session. This can't be embeded within the current internal session where your function group (function module specifically) runs. So there is no such a way which you could run a report inside a subscreen area.
    If you however want only selection screen of the report to be embeded inside your subscreen area (not run) you can use
    "report Z_SUBSCREEN_REPORT
    SELECTION-SCREEN BEGIN OF SCREEN 0200 as SUBSCREEN.
      PARAMETERS pa type c.
    SELECTION-SCREEN end of SCREEN 0200.
    "main screen's flow logic in function group with subscreen area
    PROCESS BEFORE OUTPUT.
      call SUBSCREEN area INCLUDING 'Z_SUBSCREEN_REPORT '0200'.
    Regards
    Marcin

  • Call Program from another Program using varient via Selection Screen

    I am calling a standard report from my Z Program via Selection screen.
    Is there any way to hide the Execute button that is seen when we see the called program selection screen?

    Hi Shyam,
                      Thanks for the quick reply.
    But my requirement is to show the selection screen of called program as i need to make some values changes in the selection Screen.
    However, the user can accidently click the execute button which i dont want thats why i need to hide the execute button.
    My aim is to change values of selection screen but nto execute it.
    Is it possible?

  • How can i do submit to 2 selection screen  ?

    i try to do submit for program RKAEP000 ,
    this program have few selection screen  ,
    how can i send parameters to prarameters in
    more than one selection screen ,
    i add exmple for what i need :
    SUBMIT RKAEP000
        USING SELECTION-SCREEN '100'
        VIA SELECTION-SCREEN
            WITH P_TCODE = 'KOB1'
            WITH  AUFNR IN SO_AUFNR
            WITH KSTAR IN SO_KSTAR
            WITH  R_BUDAT IN SO_BUDAT
            WITH BUKRS IN SO_BUKRS
          USING SELECTION-SCREEN '110'
            WITH  P_DISVAR   EQ 'DBW' sign 'I'

    Please check the following code
    TABLES : aufk,
             rkpln,
             cskb,
             cobk,
             t001.
    DATA: wa_rsparams TYPE rsparams,
           i_rsparams TYPE STANDARD TABLE OF rsparams.
    DATA: wa_cskb TYPE cskb,
           i_cskb TYPE STANDARD TABLE OF cskb.
    DATA: wa_cobk TYPE cobk,
           i_cobk TYPE STANDARD TABLE OF cobk.
    DATA: wa_t001 TYPE t001,
           i_t001 TYPE STANDARD TABLE OF t001.
    DATA: wa_aufk TYPE aufk,
           i_aufk TYPE STANDARD TABLE OF aufk.
    PARAMETERS : p_code   TYPE sytcode,
                 p_disvar TYPE slis_vari.
    SELECT-OPTIONS: s_aufnr FOR rkpln-aufnr,
                    s_kstar FOR cskb-kstar,
                    r_budat FOR cobk-budat,
                    s_bukrs   FOR t001-bukrs.
    wa_rsparams-selname  = 'P_TCODE'.
    wa_rsparams-kind     = 'P'.
    wa_rsparams-sign     = 'I'.
    wa_rsparams-option   = 'EQ'.
    wa_rsparams-low      =  p_code.
    APPEND wa_rsparams TO i_rsparams.
    CLEAR  wa_rsparams.
    wa_rsparams-selname  = 'P_DISVAR'.
    wa_rsparams-kind     = 'P'.
    wa_rsparams-sign     = 'I'.
    wa_rsparams-option   = 'EQ'.
    wa_rsparams-low      =  p_disvar.
    APPEND wa_rsparams TO i_rsparams.
    CLEAR  wa_rsparams.
    wa_rsparams-selname  = 'AUFNR'.
    wa_rsparams-kind     = 'S'.
    wa_rsparams-sign     = 'I'.
    wa_rsparams-option   = 'BT'.
    wa_rsparams-low      =  s_aufnr-low.
    wa_rsparams-high      =  s_aufnr-high.
    APPEND wa_rsparams TO i_rsparams.
    CLEAR  wa_rsparams.
    wa_rsparams-selname  = 'KSTAR'.
    wa_rsparams-kind     = 'S'.
    wa_rsparams-sign     = 'I'.
    wa_rsparams-option   = 'BT'.
    wa_rsparams-low      =  s_kstar-low.
    wa_rsparams-high     =  s_kstar-high.
    APPEND wa_rsparams TO i_rsparams.
    CLEAR  wa_rsparams.
    wa_rsparams-selname  = 'R_BUDAT'.
    wa_rsparams-kind     = 'S'.
    wa_rsparams-sign     = 'I'.
    wa_rsparams-option   = 'BT'.
    wa_rsparams-low      =  r_budat-low.
    wa_rsparams-high     =  r_budat-high.
    APPEND wa_rsparams TO i_rsparams.
    CLEAR  wa_rsparams.
    wa_rsparams-selname  = 'BUKRS'.
    wa_rsparams-kind     = 'S'.
    wa_rsparams-sign     = 'I'.
    wa_rsparams-option   = 'BT'.
    wa_rsparams-low      =  s_bukrs-low.
    wa_rsparams-high     =  s_bukrs-high.
    APPEND wa_rsparams TO i_rsparams.
    CLEAR  wa_rsparams.
    SUBMIT rkaep000 WITH SELECTION-TABLE i_rsparams AND RETURN.

  • Submit Program without Selection-Screen

    Hi,
        I am submitting the SAP Standard program, which contains selections screen.
        i am passing values to standard program using via-selection screen.
        Is there any way to suppress / skip the selection-screen what is appearing after submit
    Thanks
    Uma

    Hi,
    use like this...
    call transacton 'Tcode' and skip first screen.
    Regards
    kiran

Maybe you are looking for