USING WITH SELECTION-TABLE rspar

Hi,
I want to Submit a report via selection screen filling the selection screen values.
Do let me know how to fill the selection-table and pass it.
Thanks & Regards,
SP

Hi,
SAP keyword docu explains it clearly.......
... WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
Cheers,
jose.

Similar Messages

  • Problems using WITH SELECTION-TABLE

    I am trying to call rfrecpsfa140 using:
      SUBMIT rfrecpsfa140
      "VIA SELECTION-SCREEN
      WITH SELECTION-TABLE gt_rsparams. "parameter table
    I am setting up the table gt_rsparams like this
      "Company Code
      wa_rsparams-selname = 'S_BUKRS'.
      wa_rsparams-kind    = 'S'.
      wa_rsparams-low     = '1000'.
      wa_rsparams-sign    = 'I'.
      wa_rsparams-option  = 'EQ'.
      APPEND wa_rsparams TO gt_rsparams.
      "Land Record
      wa_rsparams-selname = 'S_SGRNR'.
      wa_rsparams-kind    = 'S'.
      wa_rsparams-low     = '287'.
      wa_rsparams-sign    = 'I'.
      wa_rsparams-option  = 'EQ'.
      APPEND wa_rsparams TO gt_rsparams.
    "Land Record
      wa_rsparams-selname = 'S_SGRNR'.
      wa_rsparams-kind    = 'S'.
      wa_rsparams-low     = '392'.
      wa_rsparams-sign    = 'I'.
      wa_rsparams-option  = 'EQ'.
      APPEND wa_rsparams TO gt_rsparams.
    Table is defined like this
           gt_rsparams            TYPE STANDARD TABLE OF rsparams,            "parameter table
           wa_rsparams            like line of gt_rsparams.                   "Work area for gt_rsparams
    The problem I am having is that I am only seeing the results for the first land record, if I uncomment the VIA SELECTION SCREEN and run it, the Multiple Selections is Active, when I go into the multiple selections I can see both land records, however, if I close out of that window I get a message "The entered selections were not copied". If I select Copy from that screen, then run it I get info for both land records.
    Seems like I am setting up the gt_rsparams table wrong, or maybe calling the program incorrectly.
    Any ideas??

    try this way..
    data: r_bukrs type range of bukrs,
            wa_bukrs like line of r_bukrs,
            r_sgrnr type range of sgrnr,
            w_sgrnr like line of r_sgrnr.
    *wa_bukrs-selname = 'S_BUKRS'.
    wa_bukrs-low = '1000'.
    wa_bukrs-sign = 'I'.
    wa_bukrs-option = 'EQ'.
    APPEND wa_bukrs TO r_bukrs.
    *w_sgrnr-selname = 'S_SGRNR'.
    w_sgrnr-low = '287'.
    w_sgrnr-sign = 'I'.
    w_sgrnr-option = 'EQ'.
    APPEND w_sgrnr TO r_sgrnr.
    *w_sgrnr-selname = 'S_SGRNR'.
    w_sgrnr-low = '392'.
    w_sgrnr-sign = 'I'.
    w_sgrnr-option = 'EQ'.
    APPEND w_sgrnr TO r_sgrnr.
    SUBMIT rfrecpsfa140
      with s_bukrs in r_bukrs
      with s_rgrnr in r_sgrnr
      and return.

  • 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.

  • I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY WUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ??

    I HAVE A SOURCE TABLE WITH 10 RECORDS AND TARGET TABLE 15 RECORDS. MY QUESTION IS USING WITH THE TABLE COMPARISON TRANSFORM .I WANT TO DELETE UNMATCHED RECORDS FROM THE TARGET TABLE ?? HOW IT IS ??

    Hi Kishore,
    First identify deleted records by selecting "Detect deleted rows from comparison table" feature in Table Comparison
    Then Use Map Operation with Input row type as "delete" and output row type as "delete" to delete records from target table.

  • SUBMIT ......WITH SELECTION-TABLE

    Dear All,
    I am using the following statement to send report to spool:
    SUBMIT riafvc20  TO SAP-SPOOL
          SPOOL PARAMETERS K_PARAMS
          WITHOUT SPOOL DYNPRO AND RETURN WITH SELECTION-TABLE seltab.
    When I read the contents from the spool, I get the records only pertaining to first record in seltab. Any insights on why this is happening.
    Note: seltab is an internal table without a header line.
    Thanks in Advance,
    Rajesh

    seltab was populated using the following statement.
    LOOP AT i_order.
      MOVE: 'AUFNR'  TO seltab_wa-selname,
            'S'      TO seltab_wa-kind,      " SELECT-OPTION
            'I'      TO seltab_wa-sign,
            'EQ'     TO seltab_wa-option,
            i_order-aufnr  TO seltab_wa-low,
            ' '     TO seltab_wa-high.
      APPEND seltab_wa TO seltab.
      ENDLOOP.
    Below is the code of the program. Please note that there are 2 submit statements, the first one is working fine, but not the second submit statement.
    FUNCTION Z_TEST_REPAIR.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(P_AUART) LIKE  DIAUFK-AUART
    *"  TABLES
    *"      T_OUTPUT STRUCTURE  ZLINE
    DATA: i_list LIKE abaplist OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF i_list_conv OCCURS 1,
              line(256),
            END OF i_list_conv.
    DATA : BEGIN OF I_SPOOL OCCURS 0,
              RQIDENT LIKE TSP01-RQIDENT,
           END OF I_SPOOL.
    DATA : I_ACTUAL      LIKE SOLI OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF i_order OCCURS 0,
              aufnr LIKE aufk-aufnr,
            END OF i_order.
      DATA: seltab     TYPE TABLE OF rsparams,
            seltab_wa  LIKE LINE OF seltab.
      RANGES: r_aufnr FOR aufk-aufnr.
      DATA: v_lines TYPE i.
      DATA : K_PARAMS      LIKE PRI_PARAMS,
             V_JOBCOUNT LIKE TBTCM-JOBCOUNT,
             V_SPOOL_NO LIKE  TSP01-RQIDENT,    "SPOOL NO.
             V_LIST LIKE PRI_PARAMS-PLIST.
      MOVE: 'AUART'  TO seltab_wa-selname,
            'S'      TO seltab_wa-kind,      " SELECT-OPTION
            'I'      TO seltab_wa-sign,
            'EQ'     TO seltab_wa-option,
            p_auart  TO seltab_wa-low,
            ' '      TO seltab_wa-high.
      APPEND seltab_wa TO seltab.
    MOVE: 'AUART'  TO seltab_wa-selname,
           'S'      TO seltab_wa-kind,      " SELECT-OPTION
           'I'      TO seltab_wa-sign,
           'EQ'     TO seltab_wa-option,
           'Z001'  TO seltab_wa-low,
           ' '      TO seltab_wa-high.
    APPEND seltab_wa TO seltab.
        CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
             IMPORTING
                  JOBCOUNT        = V_JOBCOUNT
             EXCEPTIONS
                  NO_RUNTIME_INFO = 1
                  OTHERS          = 2.
        IF SY-SUBRC <> 0.
        ENDIF.
        CONCATENATE 'ACT' V_JOBCOUNT INTO V_LIST.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
         EXPORTING
              LIST_NAME      = V_LIST
              NO_DIALOG      = 'X'
         IMPORTING
              OUT_PARAMETERS = K_PARAMS.
       SUBMIT riaufk20 TO SAP-SPOOL
                      SPOOL PARAMETERS K_PARAMS
                      WITHOUT SPOOL DYNPRO AND RETURN WITH SELECTION-TABLE seltab.
    This select neither goes by primary nor any index as we are passing
    rq2name which is not a part of primary or any index
      SELECT RQIDENT FROM TSP01 INTO TABLE I_SPOOL WHERE RQ2NAME = V_LIST.
      IF SY-SUBRC = 0.
        SORT I_SPOOL BY RQIDENT DESCENDING.
        READ TABLE I_SPOOL INDEX 1.
        V_SPOOL_NO = I_SPOOL-RQIDENT.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                RQIDENT              = V_SPOOL_NO
                DESIRED_TYPE         = 'RAW'
           TABLES
                BUFFER               = I_ACTUAL
           EXCEPTIONS
                NO_SUCH_JOB          = 1
                JOB_CONTAINS_NO_DATA = 2
                SELECTION_EMPTY      = 3
                NO_PERMISSION        = 4
                CAN_NOT_ACCESS       = 5
                READ_ERROR           = 6
                TYPE_NO_MATCH        = 7
                OTHERS               = 8.
      IF SY-SUBRC <> 0.
      ENDIF.
    *====================================================================
      DATA: v_text1(20).
      LOOP AT I_ACTUAL.
        IF sy-tabix GT 3.
          SPLIT I_ACTUAL-line AT '|' INTO v_text1 I_ACTUAL-line.
          SPLIT I_ACTUAL-line AT '|' INTO v_text1 I_ACTUAL-line.
          SPLIT I_ACTUAL-line AT '|' INTO i_order-aufnr I_ACTUAL-line.
          APPEND i_order.
          CLEAR  i_order.
        ENDIF.
      ENDLOOP.
    IF NOT I_ORDER[] IS INITIAL.
      DESCRIBE TABLE i_order LINES v_lines.
      DELETE i_order INDEX v_lines.
    ENDIF.
      REFRESH seltab.
      CLEAR   seltab_wa.
      REFRESH i_list.
      REFRESH i_list_conv.
      SORT i_order.
      LOOP AT i_order.
      MOVE: 'AUFNR'  TO seltab_wa-selname,
            'S'      TO seltab_wa-kind,      " SELECT-OPTION
            'I'      TO seltab_wa-sign,
            'EQ'     TO seltab_wa-option,
            i_order-aufnr  TO seltab_wa-low,
            ' '     TO seltab_wa-high.
      APPEND seltab_wa TO seltab.
      ENDLOOP.
    *========================================================================
      Refresh: I_SPOOL, I_ACTUAL.
      clear:   V_JOBCOUNT, V_LIST, V_SPOOL_NO, K_PARAMS.
       CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
             IMPORTING
                  JOBCOUNT        = V_JOBCOUNT
             EXCEPTIONS
                  NO_RUNTIME_INFO = 1
                  OTHERS          = 2.
        IF SY-SUBRC <> 0.
        ENDIF.
        CONCATENATE 'ACT' V_JOBCOUNT INTO V_LIST.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
         EXPORTING
              LIST_NAME      = V_LIST
              NO_DIALOG      = 'X'
         IMPORTING
              OUT_PARAMETERS = K_PARAMS.
    *DATA: RANGE_LANGU    TYPE RANGE OF aufk-aufnr,
         RANGE_LANGU_WA LIKE lINE OF RANGE_LANGU.
    LOOP AT i_order.
    MOVE:
           'I'      TO RANGE_LANGU_WA-sign,
           'EQ'     TO RANGE_LANGU_WA-option,
           i_order-aufnr  TO RANGE_LANGU_WA-low,
           ' '     TO RANGE_LANGU_WA-high.
    APPEND RANGE_LANGU_WA TO RANGE_LANGU.
    endloop.
       SUBMIT riafvc20  TO SAP-SPOOL
                      SPOOL PARAMETERS K_PARAMS
                      WITHOUT SPOOL DYNPRO AND RETURN WITH SELECTION-TABLE seltab.
                     via selection-screen.
    This select neither goes by primary nor any index as we are passing
    rq2name which is not a part of primary or any index
      SELECT RQIDENT FROM TSP01 INTO TABLE I_SPOOL WHERE RQ2NAME = V_LIST.
      IF SY-SUBRC = 0.
        SORT I_SPOOL BY RQIDENT DESCENDING.
        READ TABLE I_SPOOL INDEX 1.
        V_SPOOL_NO = I_SPOOL-RQIDENT.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                RQIDENT              = V_SPOOL_NO
                DESIRED_TYPE         = 'RAW'
           TABLES
                BUFFER               = I_ACTUAL
           EXCEPTIONS
                NO_SUCH_JOB          = 1
                JOB_CONTAINS_NO_DATA = 2
                SELECTION_EMPTY      = 3
                NO_PERMISSION        = 4
                CAN_NOT_ACCESS       = 5
                READ_ERROR           = 6
                TYPE_NO_MATCH        = 7
                OTHERS               = 8.
      IF SY-SUBRC <> 0.
      ENDIF.
      t_output[] = I_ACTUAL[].
    ENDFUNCTION.

  • Use of selection table with 4 fields

    Hi everyone
    Can someone please explain to me what is the use of the seltab 4 fields, how they are used and provide an example, cos Im kinda struggling understanding them...
    Thanks in advance
    Adam

    Hi,
    Explicity there is a selection table for select-options that is seltab and it have sign, low, high, and option.
    Actually these values are also available in ranges.
    Just to explain you go through this info.
    What are the difference between SELECT-OPTIONS & RANGES?
    Here both SELECT-OPTIONS & RANGES works for the same purpose. They both are used for the range selection from selection screen. The main diff. between them is, while we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW & HIGH. But in case of RANGES, this internal table should be defined explicitly.
    Eg. to SELECT-OPTIONS :
    REPORT YARSELECT.
    TABLES YTXLFA1.
    SELECT-OPTIONS : VENDOR FOR YTXLFA1-LIFNR.
    INITIALIZATION.
    VENDOR-LOW = 1000. " It specifies the range starting value.
    VENDOR-HIGH = 2000. " It specifies the range ending value.
    VENDOR-OPTION = 'BT'. " specifies ranges value is in between.
    VENDOR-SIGN = 'I'. "specifies both inclussive.
    APPEND VENDOR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB
    WHERE LIFNR IN VENDOR.
    Eg. to RANGES:
    REPORT YARRANGE.
    TABLES YTXLFA1.
    RANGES: VENDOR FOR YTXFLA1-LIFNR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB
    WHERE LIFNR IN VENDOR.
    Here with RANGES user has to design an internal table with fields -
    SIGN,OPTION,LOW and HIGH EXPLICITLY.
    >
    Example:
    select-options: bukrs for zstock-bukrs.
    Should the user fill in 'ABFI' in BUKRS on the selection screen, BUKRS will look like this:
    IEQABFI
    This is because BUKRS is set as a table as follows:
    begin of bukrs occurs 0,
    SIGN(1) type c,
    OPTION(2) type c,
    LOW like bukrs,
    HIGH like bukrs,
    end of bukrs.
    Now, when you create the following range, it will have the exact same fields set inside its table:
    Ranges: bukrs for zstock-bukrs.
    The difference is, because ranges doesn't show on the selection screen, you will have to fill it yourself, meaning you will have to fill bukrs-sign, bukrs-option, bukrs-low & bukrs-high all manually.
    Some tips:
    Sign is always I (for Include) or E (for Exclude)
    Option can be a whole range, which includes:
    EQ (Equal)
    BT (Between))
    CP (Contain Pattern)
    So let's say you want to have the range check for all company codes not starting with AB, you will set your code as follow:
    ranges: bukrs for zstock-bukrs.
    bukrs-sign = 'E'. "Exclude
    bukrs-option = 'CP'. "Pattern
    bukrs-low = 'AB*'. "Low Value
    bukrs-high = ''. "High Value
    append bukrs.
    Always remember to APPEND your range when you fill it, as the WHERE clause checks against the lines of the range table, not against the header line.
    Hope this explains it well enough.
    >
    What does SIGN "I" & "E" mean?
    The "I" stands for Include, and the "E" for Exclude.
    The easiest way to learn how the range selections work is, create the following dummy program:
    report dummy.
    tables: mara.
    select-options: matnr for mara-matnr.
    start-of-selection.
    loop at matnr.
    write: / matnr-sign,
    matnr-option,
    matnr-low,
    matnr-high.
    endloop.
    Run this program, and fill in a lot of junk into MATNR. Fill in some includes, some excludes, some ranges, etc., and you will soon realise how the system builds ranges (select-options). Once you know that, you can fill your own ranges quickly and efficiently.
    Hope this info helps.
    Regards,
    Kumar.

  • Ago Function with Select Table--HELP!

    When my physical layer was setup using all 'Physical Table' types, my time series functions were working.
    I had to modify my fact table to be of a 'Select' type (using SQL). When I remap my data, my time series functions fail with the following message:
    "[nQSError: 22038] Function AGO requires at least one measure attribute in its first argument."
    We have to be able to use select tables with time serious functions--what am I missing!?
    Thanks!!

    does your new 'select table' contain the same number of columns with same datatypes?
    did you restart the services (if developing in online mode- which is not recommended)
    Lastly, if all fails,can you create those views on the database rather than in the physical layer?

  • 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

  • Change crystal report data source dynamically failed with multi tables report

    hello all
    i have many reports created by someone else on his own machine using same database file i use
    my application use Visual studio 2013 win form with crystal report pack 9
    i use rpt files provided to me
    connect database use OLEDB
    to show form i use below code
    SQLstr = " select what ever  from  table "                      ' defined as Public
    reportName = rpt file path & report name
    showReport()
    public sub showReport()
    reportTable.clear()                                                       ' defined as Public
    DBAdapter = new oleDpdataAdapter(SQLstr,DBconnection)
    DBAdapter.fill(reportTable)
    dim rptDoc as new Crystaldesicin.crystalreports.Engine.ReportDocument
    rptDoc.load(reportName)
    rptDoc.setdatasource(reportTable)
    formRpt.RptViewer.reportsource = rptDoc
    formRpt.showdialog()
    now
    when i use one table report with (select from one table) >>>>> works perfectly
    but when i use report retrieve data from 2 tables and group   data like using
    SQLstr = " select 'table'.'coulumn', 'table2'.'column' ....... etc
    from 'table1'
    INNER JOIN 'table2' ON 'table'.'coulumn' = 'table2'.'column'
    it's not working and formrpt shown but asking for database login
    I noted that in database login window : server name refer to ORIGINAL DATABASE USED BY Report Creator not to my local database
    ================================================
    i tried to set
    rptDoc.datasourceconnection.item(0).setconnection("","databse file path and name", False)
    rptDoc.datasourceconnection.item(0).setlogin("admin","")
    but the same
    using dataset instead of reportTable the same error
    ================================================
    what i missed in this type of reports?
    ( apologize about long take and poor English )

    Hi
    Please have a look at the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • 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.

  • Module Pool with select options

    Hi,
    I have created select-option and radio button in Module pool. My req is that I when the user enters any value and click on the radio button the respective programs should be executed.
    Thanks
    Hari

    Hi Hariharan,
    I would recommend you to use primarily use push button and then after SUBMIT statement, and also the example for the same is provided below:
    *Code used to execute a report
    SUBMIT Zreport.
    *Code used to populate 'select-options' & execute report
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    * load each personnel number accessed from the structure into
    * parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    *Code used to populate 'parameters' & execute report
    SUBMIT zreport with p_param1 = 'value'
                    with p_param2 = 'value'.
    Please validate the same at your end as well, please come back, if inputs are required.
    BR/Thanks
    Pranav Agrawal

  • Selection table

    hi all,
    can anyone tell me how to use selection table with option of NE?
    I wrote a code like
    L_t_RANGE-SIGN = 'I'.
    L_t_RANGE-option = 'NE'.
    L_t_RANGE-low = 'Y'.
    But the error message says SIGN 'I' with option 'NE' is not allowed. Neigher does 'E'.
    Thanks.
    Linda

    I actually don't have a problem with either.  This program works really well.  Run it and check the selection screen, check material,  you can see the fields there in multiple selection.
    report zrich_0002 .
    data: iSEL TYPE TABLE OF RSPARAMS.
    data: xsel type rsparams.
    xsel-SELNAME = 'MATNR'.
    xsel-KIND    = 'S'.
    xsel-SIGN    = 'I'.
    xsel-OPTION  = 'EQ'.
    xsel-LOW     = '000000000040000692'.
    append xsel to isel.
    xsel-SELNAME = 'MATNR'.
    xsel-KIND    = 'S'.
    xsel-SIGN    = 'I'.
    xsel-OPTION  = 'NE'.
    xsel-LOW     = '000000000040000693'.
    append xsel to isel.
    xsel-SELNAME = 'MATNR'.
    xsel-KIND    = 'S'.
    xsel-SIGN    = 'E'.
    xsel-OPTION  = 'EQ'.
    xsel-LOW     = '000000000040000694'.
    append xsel to isel.
    submit RM07DOCS
            via selection-screen
                    with selection-table isel
                              and return.
    This program runs transaction MB51
    Regards,
    Rich Heilman

  • How do you select an item from a table indicator with a mouse click and then use that selection in code?

    Hi,
    I am displaying a list of filesfrom a directory  in a table on the front panel of a VI as part of a program I am developing. I would like the user to be able to select from that table so that particular file can be processed. Is there a way to do this?
    Thanks,
    Aaron

    you'll find that most of the useful functionality of the labview user control interface is hidden within the property node and invoke node functions. just right click a control or indicator terminal on the block diagram and mouse over to create, then to property node or invoke node. lots of fun stuff in there. attached is an example. one file is saved for labview 8.0, the other is saved for labview 8.6.
    Message Edited by Root Canal on 10-16-2008 11:17 AM
    global variables make robots angry
    Attachments:
    file selection table.vi ‏26 KB
    file selection table lv 8.0.vi ‏42 KB
    file selection table.PNG ‏18 KB

  • How to obtain the selected rows in the model with af:Table using selectMany

    Hi ,
    I am using multi select af:Table and it is based on a programmatically populated view. When the table is single select I can use the getCurrentRow at the view implementation. I wonder whether there is a way to get list of selected rows within the view implementation for the multi-select scenario.
    I saw some ways of doing it in the page's backing bean but it will be more appropriate if I could do it at the model project.
    Thanks
    My environment is JDeveloper 10.1.3.3 and jdk 1.4

    Thanks for your reply.
    What you say makes sense. I thought there might be way of setting the selected rows in the model also as we do woth the current row.
    But looks like these two different things.
    Anyway I am doing it by passing the values through the backing bean.
    Thanks

  • How to delete the record in the table without using lead selection?

    hi,
    I have added the separate column "delete" to the table uielement and so for each record or row of the table the appropriate "delete" link to action will be there................the code below works when the particular row is selected through lead selection only.......
    help me how to delete without using lead selection.....
      DATA:
      NODE_MODULE                         TYPE REF TO IF_WD_CONTEXT_NODE,
      ELEM_MODULE                         TYPE REF TO IF_WD_CONTEXT_ELEMENT,
      STRU_MODULE                         TYPE IF_V_MODULE=>ELEMENT_MODULE .
       data itab TYPE TABLE OF zac_modules.
      navigate from <CONTEXT> to <MODULE> via lead selection
      NODE_MODULE = WD_CONTEXT->GET_CHILD_NODE( NAME = `MODULE` ).
      get element via lead selection
      ELEM_MODULE = NODE_MODULE->GET_ELEMENT(  ).
      get all declared attributes
      ELEM_MODULE->GET_STATIC_ATTRIBUTES(
        IMPORTING
          STATIC_ATTRIBUTES = STRU_MODULE ).
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
        IMPORTING
         TABLE  = itab )
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id.
    CALL METHOD NODE_MODULE->BIND_TABLE
        EXPORTING
          NEW_ITEMS            = itab
       SET_INITIAL_ELEMENTS = ABAP_TRUE
       INDEX                =
    ENDMETHOD.

    Hi  ,
    The onclick event provides you with a standard paramater "CONTEXT_ELEMENT" which has the element from which the event is triggered.
    so you can declare this in the handler(if it is not there) and use it as follows.
    CONTEXT_ELEMENT  TYPE REF TO IF_WD_CONTEXT_ELEMENT  an importing paramater.
    DATA:
    NODE_MODULE TYPE REF TO IF_WD_CONTEXT_NODE,
    ELEM_MODULE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
    STRU_MODULE TYPE IF_V_MODULE=>ELEMENT_MODULE .
    data itab TYPE TABLE OF zac_modules.
    CONTEXT_ELEMENT->GET_STATIC_ATTRIBUTES(
    IMPORTING
    STATIC_ATTRIBUTES = STRU_MODULE ). "Using the context_element paramater to get the static attributes.
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
    IMPORTING
    TABLE = itab )   "getting all the data.
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id. "deleting the particular row from the table and binding it.
    CALL METHOD NODE_MODULE->BIND_TABLE
    EXPORTING
    NEW_ITEMS = itab
    * SET_INITIAL_ELEMENTS = ABAP_TRUE
    * INDEX =
    thanks,
    Aditya.

Maybe you are looking for

  • Using My Passport hard drive with Time Machine

    i bought a new 320gb My Passport external hard drive to use on both a Mac and a PC. I connected it to my macbook and it mounts and shows that its formatted to FAT32 under disk utility. when i open up time machine to back up the data, it recognizes th

  • Opening an image from LR 2 in CS5 results in an image 2-3 stops lighter

    When I open an image from Lr2 into CS5 or CS3 the image is 2-3 stops lighter than what it was in Lightroom. My color settings for the working space and the  image profile are ProPhoto in both LR and PS. Does any one have an idea of what is causing th

  • AVG add-in for Outlook 2013

    I'm running Outlook 2013 under Windows 8.1. I am also running AVG Internet Security 2015 (purchased version, not the free anti-virus one). I have enabled the AVG add-in. The first time I started Outlook after installing AVG, I noticed that the AVG gr

  • Advance to a capital PO

    Hi Frnds, When i am making an advance to a vendor for capital PO (Asset) , the system is directly debiting the asset account and not the vendor a/c ? Is there any way that the system debits the vendor a/c. and not the asset a/c. and give the PO numbe

  • AT&T MicroCell not working after iOS 5 Update

    I live is a "Fringe" area with poor reception from my carrier, AT&T; one bar. We installed an AT&T MicroCell and reception in and around my home was much better; five bars and the carrier indicator on the iPhone shows AT&T MicroCell. Since installing