To use the selection screen entry in another program

dear all,
i have a requirement that i want to use the selection screen entry of my zmodule pool to the selection screen of a zreport and want to use its output in my module pool.
how could i do this in my module pool programing??
i hope u get my question, i want to use the output of my zreport in my module pool with the same selection screen as given in module pool.,directly in my module pool output without opening my zreport seperately for this same selection screen data

Hi,
  You can use SUBMIT statement in your module program to call the zreport program in background.
Press F1 on Submit statement and you will find required detials of this statement. For using submit statement
you have to create an internal table of type RSPARAMS and pass it in the submit statement.
eg.
DATA :
*  table to be passed to background report 'ZREPORT1'
    int_rspar TYPE TABLE OF rsparams,
    ws_rspar TYPE rsparams.
CONSTANTS: c_include     TYPE rsparams-sign               VALUE 'I',
           c_kind        TYPE rsparams-kind               VALUE 'S',
           c_between     TYPE rsparams-option             VALUE 'BT'.
*Preparing the table to be passed to the background report.
*populating SELECT-OPTION for knb1-kunnr (Customer Number)
CLEAR : ws_rspar.
ws_rspar-selname = 'S_KUNNR'. "Should be the name of select option as in                               the called report
ws_rspar-kind = c_kind.
ws_rspar-sign = c_include.
ws_rspar-option = c_between.
ws_rspar-low = '1'.
ws_rspar-high = '100'.
APPEND ws_rspar TO int_rspar.
*populating SELECT-OPTION for knb1-bukrs (Company code)
CLEAR : ws_rspar.
ws_rspar-selname = 'S_BUKRS'.
ws_rspar-kind = c_kind.
ws_rspar-sign = c_include.
ws_rspar-option = c_between.
ws_rspar-low = 'a'.
ws_rspar-high = 'z'.
APPEND ws_rspar TO int_rspar.
submit zreport
  with selection-table int_rspar
      EXPORTING LIST TO MEMORY
          and return.
The above code will execute the zreport in backgournd.
Now to get the output of the zreport :-
*This internal table stores the value
*Of output listed to memory
DATA BEGIN OF itab_list OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA END OF itab_list
* To read from the memory. The output of the program that is executed in background is then populated in the itab_list table.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
* To write it onto the output
CALL FUNCTION 'WRITE_LIST'
EXPORTING
WRITE_ONLY = 'X'
TABLES
listobject = itab_list
EXCEPTIONS
EMPTY_LIST = 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.
Regards,
Bhavesh.

Similar Messages

  • How to pass Selection screen values to another program's selection screen

    Hello,
    I have a requriement where in which i need to pass the selection screen values (say list of pernrs) and few others of one program to selection screen of another. 
    One option that i came across is using Submit. But am unware how to pass only the selection screen values (there wont be any data processing or filtering).  Just the values of one prgm's selection screen are to be sent to another.
    Thanks
    RK

    prog1.
    data:lt_params type table of RSPARAMS.
    data:wa like line of lt_params.
    parameters:pa1 type sy-datum.
    select-options:so1 type sy-dtaum.
    wa-SELNAME = 'PA2'.               "Seletion screen field name
    wa-KIND     = 'P'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = pa1.                    "Selection Option Low,Parameter value
    append wa to lt_params.
    loop at so1.
    wa-SELNAME = 'SO2'.               "Seletion screen field name
    wa-KIND     = 'S'.                    "P-Parameter,S-Select-options
    wa-SIGN     = 'I'.                    "I-in
    wa-OPTION     = 'EQ'.               "EQ,BT,CP
    wa-LOW     = so1-low.               "Selection Option Low,Parameter value
    wa-HIGH     = so1-high.               "Selection Option Low,Parameter value
    append wa to lt_params.
    endloop.
    CALL FUNCTION 'SUBMIT_REPORT'
      EXPORTING
        report                 = 'ZPROG2.'   "report name of ur tocde
        RET_VIA_LEAVE          = ''            "IF 'X' returns to the called program after execution
        SKIP_SELSCREEN         = 'X'       "If 'X' selection screen of called program is not displayed
    TABLES
       SELECTION_TABLE        = lt_params       "Contains values to the selection screen
    EXCEPTIONS
      JUST_VIA_VARIANT       = 1
      NO_SUBMIT_AUTH         = 2
      OTHERS                 = 3
    Prog2.
    parameters:pa2 type sy-datum.
    select-options:so2 type sy-dtaum.
    write pa2.
    skip 1.
    loop at so2.
    write:so2-low,so2-high.
    skip 1.
    endloop.
    Edited by: Keshu Thekkillam on Aug 20, 2009 3:22 PM

  • Sending selection screen information to another program.

    Hi Friends ,
                             we have a requirement here.
    I have 2 reports , each having a selection screen , and finally after entry in selection screen, the result is generated as alv reports.
    Current requirement is, in teh first report, i had to make the selection screen of the second report [ in blocl 2] along with the existing first report selection screen  [block 1]  . So, now there are two blocks  in  the first report.
    Now the requirement is , whn i fill up the selection criteria of the second report in the  screen, on execution of the report, the program should be able to collect the secelction screen information from the firts report, block 2  , and submit it in the second report, and execute the second report , and generate the output.
    I am just uncomfortable / unaware of the syntax, or code  to SUBMIT the selection screen information to the second report , from the first report.
    Can any one help me with the necesary code in the firts report to submit the block 2 information, and the code in report 2 , to receive it.
    Regards,
    Arnab.

    Hi Bala / All ,
          as per given code by you, I designed my sample code as follows. Let me tell you, I have 4 parameters in selection screen block, that I needed to send to the program zs2 from zs1.
    REPORT  ZS1.
    *DATA text TYPE c LENGTH 10.
    DATA: text TYPE c LENGTH 10,
    rspar_tab TYPE TABLE OF rsparams,
    rspar_line LIKE LINE OF rspar_tab,
    range_tab LIKE RANGE OF text,
    range_line LIKE LINE OF range_tab.
    SELECTION-SCREEN BEGIN OF block b1.
    SELECT-OPTIONS: selcrit1 FOR text,
    selcrit2 FOR text,
    selcrit3 FOR text,
    selcrit4 FOR text,
    SELECTION-SCREEN END OF block b1.
    rspar_line-selname = SELCRIT1.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    rspar_line-selname = SELCRIT2.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    rspar_line-selname = SELCRIT3.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    rspar_line-selname = SELCRIT4.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-low = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign = 'E'.
    range_line-option = 'EQ'.
    range_line-low = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign = 'E'.
    range_line-option = 'EQ'.
    range_line-low = 'K'.
    APPEND range_line TO range_tab.
    *SUBMIT report1 USING SELECTION-SCREEN '1100'
    *WITH SELECTION-TABLE rspar_tab
    *WITH selcrit2 BETWEEN 'H' AND 'K'
    *WITH selcrit2 IN range_tab
    *AND RETURN
    SUBMIT RHALESMD
    WITH SELECTION-TABLE rspar_tab
    WITH selcrit1 IN range_tab
    WITH selcrit2 IN range_tab
    WITH selcrit3 IN range_tab
    WITH selcrit4 IN range_tab
    AND RETURN.
    In the debugging mode I can see rspar_tab  getting populated with data.I wish to know , if this process is OK, then I guess the activities in this program is done, but how do i receive this selection screen data at the zprogram 2. I mean this must have some receiving parameters / coding  at the  receiving program also!!
    Please suggest !!
    Regards,
    Arnab.

  • How to use dynamic selection screen inputs in main program

    hi all,
      its a report where in it calls one dynamic selection screen( user need to enter the parameters here) after that i need to use those inputs for some check, can any buddy help how to use/ get that input parameters into main program.
    regards,
    vara..

    Hi,
    i think u have created that dynamic selection screen in seperate program and calling to ur main program.instead of that u just create that synamic selection screen program as include program and include it in ur main program.
    or u need to use set/get parameter id concept.
    rgds,
    bharat.

  • Variant for selection screen with the Table control entries in another Tab

    Hi Guys,
      The requirement is to create a variant for the two tabs on a selection screen.
      First tab contains the select options and the second contains table control for making entries.
      So will it be possible to create a variant when the user makes entries in the fields in one tab and the table on other tab?

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • BEx web report selection screen entries retain when closing and opening the report again

    Hello all,
    please help me in the below query.
    Till last month the entries we made in BEx web report selection screen are retained in the selection screen even when we close the web report and open it again from portal without logging off. But recently this functionality is missing and the entries in selection screen are not remembered when we close and open the same report again. It is a good feature for the users. Have you come across this issue?

    No...I think i can reframe the question very clearly......For ex:  we are opening a Bex Web report...so initally we would be prompted by the variable selection screen...in which we have to give the entries(Values) for those variables like Cal month, Sales org, Company code, etc.....Later on the report will get open based on the values we have given......
    Now if we close the particular report without logging off then if i try to open the same report that selected values are missing.....earlier it used to remember the values we have given until we log off....But now that functionality is missing....It was very useful feature.....Can you please tel me what can be done to resolve this??
    I hope the explanation would be clear now.

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

  • How to use MM/YYYY Format in the selection Screen?

    There is this program RMCB0300 where the date format in the selection screen has MM/YYYY Format.
    I am working on a report which requires it "Period" Field in the selection screen to be in the same format.
    However, i am trying to give the select option as " SL_SPMON FOR S031-SPMON MODIF ID PER." and declaring S031 table in the declaration part.
    But still, its not been able to provide me F4 help in the inpur screen.
    Can someone please provide me some guidance in this regard?

    Hi,
    the following works for me..
    *& Report  ZPMONAT                                                     *
    report  zpmonat                                 .
    tables: s031.
    selection-screen begin of block abc.
    select-options:  sl_spmon for s031-spmon.
    selection-screen end of block abc.
    at selection-screen on value-request for sl_spmon-low.
      perform monat_f4.
    at selection-screen on value-request for sl_spmon-high.
      perform monat_f4.
    start-of-selection.
    end-of-selection.
    *&      Form  monat_f4
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form monat_f4 .
      data: begin of mf_dynpfields occurs 1.
              include structure dynpread.
      data: end   of mf_dynpfields.
      data: mf_returncode   like sy-subrc,
            mf_monat        like isellist-month,
            mf_hlp_repid    like sy-repid.
      field-symbols: <mf_feld>.
    * Wert von Dynpro lesen
      get cursor field mf_dynpfields-fieldname.
      append mf_dynpfields.
      mf_hlp_repid = sy-repid.
      do 2 times.
        call function 'DYNP_VALUES_READ'
          exporting
            dyname               = mf_hlp_repid
            dynumb               = sy-dynnr
          tables
            dynpfields           = mf_dynpfields
          exceptions
            invalid_abapworkarea = 01
            invalid_dynprofield  = 02
            invalid_dynproname   = 03
            invalid_dynpronummer = 04
            invalid_request      = 05
            no_fielddescription  = 06
            undefind_error       = 07.
        if sy-subrc = 3.
    *     Aktuelles Dynpro ist Wertemengenbild
          mf_hlp_repid = 'SAPLALDB'.
        else.
          read table mf_dynpfields index 1.
    *     Unterstriche durch Blanks ersetzen
          translate mf_dynpfields-fieldvalue using '_ '.
          exit.
        endif.
      enddo.
      if sy-subrc = 0.
    *   Konvertierung ins interne Format
        call function 'CONVERSION_EXIT_PERI_INPUT'
          exporting
            input         = mf_dynpfields-fieldvalue
          importing
            output        = mf_monat
          exceptions
            error_message = 1.
        if mf_monat is initial.
    *     Monat ist initial => Vorschlagswert aus akt. Datum ableiten
          mf_monat = sy-datlo(6).
        endif.
        call function 'POPUP_TO_SELECT_MONTH'
          exporting
            actual_month               = mf_monat
          importing
            selected_month             = mf_monat
            return_code                = mf_returncode
          exceptions
            factory_calendar_not_found = 01
            holiday_calendar_not_found = 02
            month_not_found            = 03.
        if sy-subrc = 0 and mf_returncode = 0.
    *     ASSIGN (MF_DYNPFIELDS-FIELDNAME) TO <MF_FELD>. " ==>> note 148804
    *     <MF_FELD> = MF_MONAT.
          call function 'CONVERSION_EXIT_PERI_OUTPUT'
            exporting
              input  = mf_monat
            importing
              output = mf_dynpfields-fieldvalue.
          collect mf_dynpfields.
          call function 'DYNP_VALUES_UPDATE'
            exporting
              dyname               = mf_hlp_repid
              dynumb               = sy-dynnr
            tables
              dynpfields           = mf_dynpfields
            exceptions
              invalid_abapworkarea = 01
              invalid_dynprofield  = 02
              invalid_dynproname   = 03
              invalid_dynpronummer = 04
              invalid_request      = 05
              no_fielddescription  = 06
              undefind_error       = 07.           "<<== note 148804
        endif.
      endif.
    endform.                                                    " monat_f4
    Regards,
    Suresh Datti

  • Is there a way to use 'GET PERNR' without the selection screens?

    I would like to use the GET PERNR event in a batch program without using the default selection screens.  I would like to be able to use my own selection screen and parameters, but only get them along with the default selection options for payroll period.  I've tried removing the screen number from the attributes screen, but still get these options.  Is this possible?

    hi Kiran,
    report Category is a Pushbutton on the Attributes popup, it only appears if you use PNP logical DB.
    this is from SAPHelp: "Report Category
    Category used for HR reports that use the PNP logical database. It controls the type and number of fields that appear on the selection screen of an evaluation report."
    hope this helps
    ec

  • Error while using selection option variable in the selection screen

    Hi All,
    I am facing an issue while using selection option variable in the selection screen for one of my reports.
    Scenario: For the field "Region From" we need to have wild card logic () in tes selection screen, for example if we put "BE" in the selection screen for the field Region From then the query should be executed only for those "Region From" values which begin from "BE".
    Approach: For the above requirement I have made a selection option variable for "Region From". This allows use wild card
    But when the report is executed we get the following error:
    "System error in program CL_RSR_REQUEST. Invalid filter on ETVRGNFR".
    (ETVRGNFR is technical name of the info object Region From)
    Though the report is executed it displays all the values for the field "Region From" irrespective of the selection given in the selection screen.
    Please give suggestions / alternate solutions to crack this issue.
    Thanks in advance
    Regards
    Priyanka.

    Hi,
    Try to use a variable of type Customer Exit and do the validation inside the exit to display according to your request.
    This is just my view, i am not sure if u are already using this or Char. Variable.
    Cheers.
    Ranga.

  • ALV using OOABAP  fieldnames changing in the selection screen

    Hi
    I am new to OOABAP.Here is the requirement.
    I need to create a ALV report, in the selection screen field label can change and it needs to display in ALV report. selection screen contains 4 checkboxes. based on selection hide the columns in ALV display.
    Can anyone help me in this?
    Thanks
    sapien

    u build field cat "at selection-screen event.
    LET S_A, S_B, S_C, S_D BE THE SELECTION SCREEN FIELD.
    AT SELECTION-SCREEN.
    PERFORM BUILD_FIELDCAT USING S_A S_B S_C S_D.
    form build_fieldcat using s_a type ... s_b type .... so on
    if s_a = 'X'.
    FIELDCAT-FIELDNAME = '......'.
    append fieldcat.
    if s_b = 'X'.
    FIELDCAT-FIELDNAME = '......'.
    append fieldcat.
    IF S_C = 'X'.
    FIELDCAT-FIELDNAME = '......'.
    append fieldcat.
    IF S_D = 'X'.
    FIELDCAT-FIELDNAME = '......'.
    append fieldcat.

  • Adding Standard Text to the Selection Screen obtained using PARAMETERS

    Hi all,
    I have a report program which has the selection screen declared by the key word PARAMETERS.
    Now I need to make the changes to this program such that a Text Editor appears on the Selection Screen and has a Standard text that should be displayed.
    How can I do it?
    I saw the screen number of the Selection Screen and went to screen painter and tried to add the Text Editot..but it did not let me dou2026.Why?
    How should I add a standard text to a selection screen? The standard text should not be on top , but some where on the screen.
    Regards,
    Jessica Sam

    Hi Sam,
    I dont want to create a new screen for this. On the existing screen whihc was built using PARAMETERS key word..i should insert a blokc of text whihc is mpre than 5-6 lines..how should i do it.
    I navigated to Text Elements---->Selection Texts
    it is now asking for Name and Text and i see in Name column the name of the parametsr that they used for Check box, radio button etc and in Text i see the text that is appearing on the screen
    Now i am not sure what is should do next
    My req is..i should display a block of standard text that doesnt change and whihc is of 4-6 lines?
    how should i do it?
    please also help me with what data declartions that i should do in parametrs key word in program?
    Regards,
    Jessica Sam

  • How to skip the Selection screen while using BAPI_MATERIAL_DELETE

    Hi,
    I have to delete material master.
    I'm using BAPI_MATERIAL_DELETE Fm,
    But while executing this BAPI it is going to a screen where it is asking to tick the Check Box for material number.
    Can you please tell me how to execute the BAPI Avoiding the selection screen.
    Thanks & Regards,
    Rajender

    Hi,
    Thanks for replying.
    We have to run the BAPI in Background, Then how to achieve the default values.
    Thanks & Regards,
    Rajender.

  • Filtering of the data based upon the selection screen data using ldb

    Hi Experts ,
    I am using ldb pnpce, for my report ,and i created my own report category with selection paramaters
    action type and payroll area
    now the problem is when i am giving the action type as Z0 ,the data to be extracted is not getting filtered
    based upon the action type ,the data consists the records having different action types other than Z0
    Please give me some solution for this

    Thanks Durga ,but the link wat ever u was for hiding the selection screen fields
    but my question is when am using get pernr event my data is not getting filtered with the selection screen paramater value
    i,e m giving action type as only hiring ,but m getting the data for all the action types ,its not filtering based upon my selection

  • Possibele entries are not populating for the fields on the selection screen

    Hi,
    Possible entries are not populating for the fields on the selection screen for the query.But its working fine in Development and Quality Systems.
    Can any body help me out
    Regards,
    Amit.

    Hi,
    In the Selection screen,go to Settings->Value Restrictions tab->Read Mode Settings->Custom radio button and select the options Values in Master Data or Only Values in InfoProv or Only Posted values for navigation.
    After this setting,check whether you are getting the data or not.
    Rgds,
    Murali

Maybe you are looking for

  • Transfer QI stk to blocked stk with BAPI_GOODSMVT_CREATE (Error msg QA495)

    Hy, I would like to create an mass udpate stock program which  transfer the QI stock to blocked (because shelf expiration date is passed). So, i use the BAPI_GOODSMVT_CREATE with movement type 350. But the following error message appears : "Change th

  • Org unit with extenal number range

    hello comunity. I want to create a org unit using the BAPI to create BP, assigning the BP role BUP004 (org unit) and after that assign it manually in the PPOMA_CRM txt. The problem is that the system doesn´t allow to create a Org unit in txt BP, the

  • Event Driven Publishing

    I am following the examples given for this on technet, but on compiling I get these errors: ORA-20999: ORA-06512: at "PORTAL.SRW", line 284 ORA-06512: at "PORTAL.SRW", line 815 ORA-06512: at line 11 This is the code I'm using. What can I be doing wro

  • Issue with decision popup with yes/no combination

    hI, I'm having issue with create_popup_2_confirm method.I'm using yes no option in my popup.But when I click on yes button in the popup though OP_YES outbound plug is getting triggered of component GS_PTC, but not able to get any fired outbound plug

  • Weird email error

    I have received emails on my btinternet.com account from that were intended for someone with my name but not me! This happened once before. They've bought stuff but not used my credit card - if anything, I have info on their financial affairs from th