Dynamically calling selection screens with obligatory

TABLES :
******selection-screen: begin of block bal with frame title txt3.
******parameters: RB1  radiobutton group rd1 user-command abc default 'X'.
******parameters: RB2  radiobutton group rd1.
******selection-screen: end of block bal.
******selection-screen: begin of block B1 with frame title txt1.
******SELECT-OPTIONS  : s_cust  FOR KNA1-kunnr OBLIGATORY  MODIF ID r1.
******SELECT-OPTIONS  : s_plant  FOR plko-werks OBLIGATORY MODIF ID r1 .
******selection-screen: end of block val.
******selection-screen: begin of block upd with frame title txt2.
******SELECT-OPTIONS:  s_vend  FOR lfa1-lifnr OBLIGATORY modif id r2.
******SELECT-OPTIONS: s_plan  FOR plko-werks OBLIGATORY modif id r2.
******selection-screen: end of block upd.
Here i need to call these two selection screens dynamically depends on radio buttion selection.
But
Problem is a arising when when both are obligatory in selection screen ( with out obligatory , it is working fine)
I need to call screens dynamically, ecen though we have obligatory
Let me know procedure , the possibility of same funcationality in tabstips & selection screen.
Madhu

Hi Madhu,
You have to write code in AT SELECTION-SCREEN OUTPUT event.
First of all remove obligatory from select-options declaration. Do it dynamically in AT SELECTION-SCREEN OUTPUT event.
You enable or disable the block depending upon the rediobutton selected. Then in the venet AT SELECTION-SCREEN ON field, you can check whethere user has entered data into that field or not depending upon the radiobutton selected.
TABLES : kna1,
         plko,
         lfa1.
SELECTION-SCREEN: BEGIN OF BLOCK bal WITH FRAME TITLE txt3.
PARAMETERS: rb1 RADIOBUTTON GROUP rd1 USER-COMMAND abc DEFAULT 'X'.
PARAMETERS: rb2 RADIOBUTTON GROUP rd1.
SELECTION-SCREEN: END OF BLOCK bal.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE txt1.
SELECT-OPTIONS : s_cust FOR kna1-kunnr  MODIF ID r1.
SELECT-OPTIONS : s_plant FOR plko-werks MODIF ID r1 .
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK upd WITH FRAME TITLE txt2.
SELECT-OPTIONS: s_vend FOR lfa1-lifnr MODIF ID r2.
SELECT-OPTIONS: s_plan FOR plko-werks MODIF ID r2.
SELECTION-SCREEN: END OF BLOCK upd.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF rb1 EQ 'X'.
      IF ( screen-name EQ 'S_CUST-LOW'
        OR screen-name EQ 'S_CUST-HIGH'
        OR screen-name EQ 'S_PLANT-LOW'
        OR screen-name EQ 'S_PLANT-HIGH') .
        screen-active = '1' .
      ENDIF.
      IF ( screen-name EQ 'S_VEND-LOW'
        OR screen-name EQ 'S_VEND-HIGH'
        OR screen-name EQ 'S_PLAN-LOW'
        OR screen-name EQ 'S_PLAN-HIGH') .
        screen-active = '0' .
      ENDIF.
    ELSEIF rb2 EQ 'X'.
      IF ( screen-name EQ 'S_VEND-LOW'
        OR screen-name EQ 'S_VEND-HIGH'
        OR screen-name EQ 'S_PLAN-LOW'
        OR screen-name EQ 'S_PLAN-HIGH') .
        screen-active = '1' .
      ENDIF.
      IF ( screen-name EQ 'S_CUST-LOW'
        OR screen-name EQ 'S_CUST-HIGH'
        OR screen-name EQ 'S_PLANT-LOW'
        OR screen-name EQ 'S_PLANT-HIGH') .
        screen-active = '0' .
      ENDIF.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
Regards,
Anil Salekar

Similar Messages

  • Dynamically calling selection screen in loop

    Hi all
        Please help me to solve this problem.I need to call a selection screen(like a dialog screen) containing 2 fields depending on the loop counter in a program.
    Thank You.
    Regards
    Giri.

    Hi
       I will explain indetail.I am displaying a SAPSCIPT throup program.Before displaying it I have to choose groupvalues or individual value.If it is individual then i don't have any problem because I have to display the dialog box which accepts details and current status values of that particular individual only once.But I don't know how to display dailog box which accepts these 2 values dynamically without knowing the number before for groupvalues.Because the group which we select may have 3,4 or any other number of individual values.Please help me.
    Thank You.
    Regards
    Giri.

  • Dynamic selection screen with ABAP web dynpro

    Hi all.
        How can I create dynamic selection screen with ABAP web dynpro? Thank you in advance.

    hi yinglak.....
             this is possible........ all the ui elelments has the property called visible and enabled.... just assign an attribute of type wdui_visibility to the visible property....
    in the wddomodify method..... check for the radio button value and pass the value true or false to this attribute and it gets changed automatically.
    ---regards,
       alex b justin

  • Issue with CALL SELECTION-SCREEN

    Hi experts,
    I am working on a report.
    Here on the selection screen , based on the selection of some radiobuttons ,i want to call a secondary selection screen.
    So i am using the following program code ,
    AT SELECTION-SCREEN on BLOCk blk.
    IF p_abc  =  c_x.
        CALL SELECTION-SCREEN 100 STARTING AT 20 5.
        IF sy-subrc <> 0.
          MESSAGE text-011 TYPE c_e .
        ENDIF.
      ENDIF.
    so currently , once i complete my slection on the screen 100 , the popup screen stays there and rest of the programing logic is executed correctly.
    My issue is that , once i complete my slection on the screen 100, i want that the pop up should be closed
    And then the the rest of the program logic should continue.    
    please guide me how ,this can be done.
    Regards,
    Rajesh Kumar.

    Hi
    The event AT SELECTION-SCREEN and AT SELECTION-SCREEN ON BLOCK  are very similar, only the second event see the part of selection-screen defined in the block.
    This events are triggered as soon as the user does something: so press ENTER, F8,........
    If u want the second-selction screen is shown once and the main selection-screen has to be displayed under the second one, u can try to run the second one only if the report has to run, so if the user has pressed F8, code ONLI.
    AT SELECTION-SCREEN on BLOCk blk.
    CHECK SY-UCOMM = 'ONLI'.
    IF p_abc = c_x.
      CALL SELECTION-SCREEN 100 STARTING AT 20 5.
      IF sy-subrc 0.
         MESSAGE text-011 TYPE c_e .
      ENDIF.
    ENDIF.
    In tihs way the rest of the program will be executed, else u need to move all code of the event START-OF-SELECTION and END-OF-SELECTION in the event AT SELECTION-SCREEN, or, just as I said before, to move the calling of POPUP to event START-OF-SELECTION.
    Max

  • Short dump while using call selection-screen mdynnr

    Hi ALL,
    I need your help and information.
    In programmes, We are using the statament " CALL SELECTION-SCREEN MDYNNR " 
    and passing the screens dynamically into variable mdynnr.
    And the programme is going to dump after executing 50 times.
    When we
    can we use any other statement instead of CALL SELECTION-SCREEN MDYNNR.
    Your information helps us lot.
    Thanks in advance.
    Srinivasa Reddy.

    Hi,
    As you know Call Screen is the statement, but you will get the problem if you are going to call it in the same LUW repeatedly. So, FM is the only convenient way to do it. This is very easy. Just create a FM and replace you statement with this FM. Hopefully this will solve your problem.
    Check this comment " When you call a new main program in order to use a screen sequence (for example, using CALL TRANSACTION), a new SAP LUW begins. This may be an undesired effect, especially when you are trying to modularize a transaction that updates the database.
    An alternative to this is to use an external procedure, whose main program is linked to a screen sequence, and which contains the corresponding dialog modules. Procedures run in the same SAP LUW and internal session as their calling program."
    Thanks,

  • Selection screen with radio button groups

    hi experts,
    i have 3 frames in selection screen. in first frame i have two radio buttons. if i select 1st radio button 2nd  frame should be in active and  3rd frame should be disable mode. if i select 2nd radio button then 3rd  frame should be in active and other 2nd frame should be disable mode. in which event  i need to write the code.
    can any one help me regarding this and give some sample code.
    rgds,
    nag.

    Here is the example which will explain it completely :
    *& Report  Z_sscr                                                 *
    *  Published at ****************
    *&DYNAMIC Selection screen based on user clicks on the radiobutton*
    REPORT  zsscr.
    *TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
    TYPE-POOLS : vrm,
                 icon.
    *SELECTION SCREEN FIELDS
    TABLES : sscrfields.
    *GLOBAL DECLARATIONS
    DATA : flag TYPE c,
          tablename(10),
          mmtable LIKE dd02l-tabname,
          sdtable LIKE dd02l-tabname,
          hrtable LIKE dd02l-tabname.
    *DECLARATIONS FOR SELECTION SCREEN STATUS
    DATA it_ucomm TYPE TABLE OF sy-ucomm.
    ***********SELECTION-SCREENS**********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    *FOR DYNAMIC DISPLAY OF MODULES
    PARAMETERS :  pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
                  pb RADIOBUTTON GROUP rad MODIF ID rad,
                  pc RADIOBUTTON GROUP rad MODIF ID cad.
    SELECTION-SCREEN SKIP.
    **TO INCLUDE DYNAMIC ICONS
    SELECTION-SCREEN COMMENT 2(6) text_001.
    *DYNAMIC LIST BOX BASED ON USER SELECTIONS
    PARAMETERS one AS LISTBOX VISIBLE LENGTH 20  MODIF ID mod.
    PARAMETERS two AS LISTBOX VISIBLE LENGTH 20   MODIF ID rad.
    PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.
    SELECTION-SCREEN END OF BLOCK blk1.
    *DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
    SELECTION-SCREEN: FUNCTION KEY 1,
                      FUNCTION KEY 2,
                      FUNCTION KEY 3.
    **EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
    AT SELECTION-SCREEN OUTPUT.
    *CLICK OF FIRST RADIO BUTTON
      IF pa = 'X'.
        sscrfields-functxt_01 = 'Materials Management'.
        WRITE icon_plant AS ICON TO text_001.
    *CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
        LOOP AT SCREEN.
          IF screen-group1 = 'MOD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'RAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *CLICK OF SECOND RADIO
      IF pb = 'X'.
        sscrfields-functxt_02 = 'Sales And Distribution'.
        WRITE icon_ws_ship AS ICON TO text_001.
        LOOP AT SCREEN.
          IF screen-group1 = 'RAD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'MOD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *CLICK OF THIRD RADIO
      IF pc = 'X'.
        sscrfields-functxt_03 = 'Human Resources'.
        WRITE icon_new_employee AS ICON TO text_001.
        LOOP AT SCREEN.
          IF screen-group1 = 'RAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'MOD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
    *WITH F8 BUTTON DISABLED
      APPEND :  'PRIN' TO it_ucomm,
                'SPOS' TO it_ucomm,
                'ONLI' TO it_ucomm.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = sy-pfkey
        TABLES
          p_exclude = it_ucomm.
    **EVENT ON THE SELECTION
    AT SELECTION-SCREEN.
    * LIST BOX ONE VALUES
      CASE one.
        WHEN '1'.
          mmtable = 'MARC'.
        WHEN '2'.
          mmtable = 'MARA'.
        WHEN '3'.
          mmtable = 'MARD'.
        WHEN '4'.
          mmtable = 'MARM'.
      ENDCASE.
    * LIST BOX TWO VALUES
      CASE two.
        WHEN '1'.
          sdtable = 'VBAK'.
        WHEN '2'.
          sdtable = 'VBAP'.
        WHEN '3'.
          sdtable = 'VBUK'.
        WHEN '4'.
          sdtable = 'VBUP'.
      ENDCASE.
    * LIST BOX THREE VALUES
      CASE three.
        WHEN '1'.
          hrtable = 'PA0001'.
        WHEN '2'.
          hrtable = 'PA0006'.
        WHEN '3'.
          hrtable = 'PA0022'.
        WHEN '4'.
          hrtable = 'PA0008'.
      ENDCASE.
    *VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
    *AND ENABLING THE BUTTONS TO PERFORM F8
      CASE sscrfields-ucomm.
        WHEN 'FC01'.
          tablename = mmtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC02'.
          tablename = sdtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC03'.
          tablename = hrtable.
          sscrfields-ucomm = 'ONLI'.
      ENDCASE.
    *INITIALIZATION EVENT
    INITIALIZATION.
    *VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
      PERFORM f4_value_request_pa.
      PERFORM f4_value_request_pb.
      PERFORM f4_value_request_pc.
    *START OF SELECTION EVENT
    START-OF-SELECTION.
    *SUBROUTINE FOR OUTPUT
      PERFORM output.
    *&      Form  f4_value_request_PA
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
    FORM f4_value_request_pa.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'Plant Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '2'.
      l_value-text = 'General Material Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '3'.
      l_value-text = 'Storage Location Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '4'.
      l_value-text = 'Units of Measure for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'ONE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 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.
    ENDFORM. " f4_value_request_tabname
    *&      Form  f4_value_request_PB
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2
    FORM f4_value_request_pb.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'Sales Document: Header Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '2'.
      l_value-text = 'Sales Document: Item Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '3'.
      l_value-text = 'Sales Document:Header Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '4'.
      l_value-text = 'Sales Document: Item Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'TWO'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 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.
    ENDFORM. " f4_value_request_PB
    *&      Form  f4_value_request_PC
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3
    FORM f4_value_request_pc.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '2'.
      l_value-text = 'Address Infotype 0006'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '3'.
      l_value-text = 'Education Infotype 0022'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_value-key = '4'.
      l_value-text = 'Basic Pay Infotype 0008'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'THREE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 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.
    ENDFORM. " f4_value_request_PC
    *&      Form  OUTPUT
    *       text
    *      -->P_TABLENAME  text
    *fINAL OUTPUT
    FORM output.
      DATA p_table(10).
      p_table = tablename.
    *popup to display teh selected table and
    *Continue button is clicked
      CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
        EXPORTING
          titel        = 'User Selections '
          textline1    = p_table
          textline2    = 'is the Selected table'
          start_column = 25
          start_row    = 6.
    *assigning the table value in p_table to the
    * Table in SE16 transaction by explicitly calling
      SET PARAMETER ID 'DTB' FIELD p_table.
      CALL TRANSACTION 'SE16'.
    ENDFORM.                    "OUTPUT
    Reward If found Helpful.

  • How to replace the existing selection screen with new selection screen

    Hi,
    I have first selection screen with parametre as a table name, then I have created dynamic selection screen as 2nd selection screen with different fields of that table as select options. This is done using genaration of dynamic report. Now If I click on button on this 2nd selction screen , then I want to replace this 2nd dynamic selection screen , with the other selection screen fields.
    Can anybody guide me, How to do replace one slection screen with different selection screen.
    and one imp thing is this selction screen is populating with dynamic fields on it.
    Regards,
    Mrunal

    As I can understand you want to make some of the screen field to disable or visible on screen  depending upon the interaction of user with screen 1.
    You may use this example code in PBO of screen 2.
    LOOP AT SCREEN.
        " action has been taken to modify the area office screen as per the option chosen at screen 99.
        CASE ACTION.
            " if the user has taken up the option of UPLOAD
          WHEN 'UP'.     " screen processing while we upload the plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_VE'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
          WHEN 'DN'.      " screen processing while we upload the approved plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'AO_UP' OR SCREEN-NAME = 'AO_VE'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
          WHEN 'VW'.      " screen processing while we view the plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'RLGRAP-FILENAME' OR SCREEN-NAME = 'FNAME'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
            " and hide the file input field
            IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_UP'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
        ENDCASE.
      ENDLOOP.

  • Calling Selection Screen in Modal dialog box

    Hi Experts.
    I have created screen 9000 having user interface and in tool bar there is create button in the screen 9000
    The create button 9001 will call another screen with different I/O fields (9001 is Modal dialog screen).
    In the 9001 there is push button for which the selection screen is called 9002.
    I have declared 9002 as subscreen and called the screen 9002 in user command.
    In the Screen 9001 when user clicks the push button i need to get pop up screen where the user select some data.
    How i need to do ?
    I am getting error can't call subscreen in modal dialog box.
    Thanks,
    ERPSAP

    HI,
    HOpe this will help you
    How to call table control in subscreen in module pool program
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/reg-tab-strip-control-module-pool-abap-444944
    http://12go.com/sap/search?query=title%3A(calling%20subscreens%20in%20module%20pool)
    Regards,
    Pravin

  • Want to use ldb selection screen with select queries

    I want to use ldb selection screen with select queries since ldb having performance issue .How can I use the fields of the dynamic selection of LDB in the select queries

    Hi,
    Check the code snippet below: Here 'XXXX' is the table for your select query.
      DATA L_DS_CLAUSES TYPE RSDS_WHERE.
      MOVE 'XXXX' TO L_DS_CLAUSES-TABLENAME.
      READ TABLE DYN_SEL-CLAUSES WITH KEY L_DS_CLAUSES-TABLENAME
                                 INTO L_DS_CLAUSES.
      SELECT * FROM XXXX
              WHERE field1 IN ...
               AND   field2 ....
               AND (L_DS_CLAUSES-WHERE_TAB).
          PUT XXXX.
      ENDSELECT.
    You can also try using the FM 'RS_REFRESH_FROM_DYNAMICAL_SEL' passing SY-CPROG in curr_report and 'M'  for mode to get the dynamic selection screen values.
    Regards,
    Munesh.

  • To call Selection screen In BSP

    I have written a report "zdemo" in abap editor with some selection screen. I'm desperately looking for <b>_how to call Selection screen In BSP_</b>.
    Any kind of help will be apreciated.
    nikhil

    Hi Nikhil,
    There is no way that, you can call a selection-screen directly or create automatically as in the case of report in ABAP.
    The possible way could be
    Create one more page for holding the selection screen input fields with a submit button.
    On click on submit, do the processing and call the result page.
    Regards,
    Ravi

  • Calling selection screen of another  program

    Hi all,
         Am trying to call a program from a enhancement section of IW3K transaction using the following statement.But the selection screen of the program is not getting displayed.
    but the screen is dispalyed when i run the statement in debug mode.
    Can anyone help me on this...
    useful answers will be rewarded.
    submit Z XXXXX            via selection-screen
                                       WITH s_ispla =  'BEKD'
                                       WITH p_rsnum =  CAUFVD-rsnum
                                       WITH s_rspos in   i_range_tab
                                       and RETURN.

    hi,
    You can call one selection screen from other selection screen program using SUBMIT command.
    The syntax is as follows -
    codeSUBMIT... VIA SELECTION-SCREEN
    USING SELECTION-SET <var>
    WITH <sel> <criterion>
    WITH FREE SELECTIONS <freesel>
    WITH SELECTION-TABLE <rspar>.[/code]
    e.g.
    The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
    codeREPORT demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS paramet(14) TYPE c.
    SELECT-OPTIONS selecto FOR number.[/code]
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    codeREPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
    rspar TYPE TABLE OF rsparams,
    wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
    / 'Selection 2'.
    AT LINE-SELECTION.
    CASE sy-lilli.
    WHEN 4.
    seltab-sign = 'I'. seltab-option = 'BT'.
    seltab-low = 1. seltab-high = 5.
    APPEND seltab.
    SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
    WITH paramet eq 'Selection 1'
    WITH selecto IN seltab
    WITH selecto ne 3
    AND RETURN.
    WHEN 5.
    wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
    wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
    wa_rspar-low = 14. wa_rspar-high = 17.
    APPEND wa_rspar TO rspar.
    wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
    wa_rspar-low = 'Selection 2'.
    APPEND wa_rspar TO rspar.
    wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
    wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
    wa_rspar-low = 10.
    APPEND wa_rspar TO rspar.
    SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
    WITH SELECTION-TABLE rspar
    AND RETURN.
    ENDCASE.[/code]
    => To leave a called program, you can use SUBMIT .... AND RETURN. by choosing F3 or F15 from list level 0 of the called report.

  • Multiple selection screens with status gui

    Hi,
    I want to make a report with two selection screens and i should create a status gui for these two.
    So, I've tried to do, the following:
    * FIRST SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK bk WITH FRAME.
    PARAMETERS: pa(200) TYPE c.
    SELECT-OPTIONS: so FOR sflight-carrid.
    SELECTION-SCREEN END OF BLOCK bk.
    * /FIRST SCREEN
    * SECOND SCREEN
    SELECTION-SCREEN BEGIN OF SCREEN 2000.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME.
    PARAMETERS: pa2(200) TYPE c.
    SELECTION-SCREEN END OF BLOCK bk1.
    SELECTION-SCREEN END OF SCREEN 2000.
    * /SECOND SCREEN
    AT SELECTION-SCREEN OUTPUT.
      SET PF-STATUS 'Z_STAT'.
      SET TITLEBAR 'COISO'.
    AT SELECTION-SCREEN.
      IF sy-dynnr EQ '1000'.
        CASE sy-ucomm.
          WHEN 'BACK' OR 'EXIT' OR 'CANC'.
            LEAVE TO SCREEN 0.
          WHEN 'EXECUTAR'.
            CALL SELECTION-SCREEN 2000.
            IF sy-subrc <> 0.
              LEAVE TO SCREEN 1000.
            ENDIF.
        ENDCASE.
    The problem is that on the first selection screen i have the status gui that I've created, but when i use CALL SELECTION-SCREEN 2000
    the status gui (Z_STAT) is not assigned with the screen 2000.
    Is this possible? If yes how, and how can i capture which button on status gui of screen 2000 was clicked, because the field sy-ucomm after the call selection-screen 2000 is not updated?
    Regards,
    Pedro Bessa

    harsh bhalla,
    its the same report. with two selection-screens. Can't i have status gui for both of them?
    Gurpreet Singh,
    I have a selection screen. Not a screen. Can a have a pbo for a selection-screen? or one for each selection-screen?
    The table SSCRFIELDS and the field sy-ucomm stays with the value from the first selection-screen.
    Regards,
    Pedro Bessa

  • Back on a CALL SELECTION-SCREEN from an ALV

    Hi all,
    I have created a program with a normal selection-screen (1000).
    According to the selected values, when I press "Execute" I go to a next selection-screen (2000) with instruction CALL SELECTION-SCREEN 2000.
    Then I display an ALV.
    When I press the back button, I want to go back to screen 2000, but actually I go directly to screen 1000.
    PARAMETERS : p_choic1 RADIOBUTTON GROUP cho DEFAULT 'X'.
    PARAMETERS : p_choic2 RADIOBUTTON GROUP cho.
    SELECTION-SCREEN BEGIN OF SCREEN 2000.
    PARAMETERS : p_table TYPE char10.
    SELECTION-SCREEN END OF SCREEN 2000.
    START-OF-SELECTION.
      IF NOT p_choic1 IS INITIAL.
        CALL SELECTION-SCREEN 2000.
        PERFORM alv_process.
      ENDIF.
    Have you got any idea of what I can do to return to screen 2000 from the ALV after pressing Back button ?
    Thanks.

    Hi,
    Follow below sample code...
    SELECTION-SCREEN BEGIN OF SCREEN 2000.
    PARAMETERS p_mat  TYPE matnr.
    PARAMETERS p_enam TYPE ernam.
    SELECTION-SCREEN END OF SCREEN 2000.
    START-OF-SELECTION.
    set PF-STATUS 'STATUS'.
      WRITE:/ p_mat,
              p_enam.
    AT USER-COMMAND.
      CASE SY-UCOMM.
      WHEN 'S2000'.
          CALL SELECTION-SCREEN 2000.
      WHEN 'EXIT'.
          EXIT.
      ENDCASE.
    Ram.

  • How to call selection screen before smartforms?

    Hi experts,
    I wanna call a selection screen before displaying smartforms. In NACE transaction, I have program that calls the smartforms and In that program, I wanna add a selection screen with three fields whom values comes from a value range that prepared by me. I don't wanna use popup selection FM's because as ,I said, I wanna display the values according to a value range.
    Do you know any way to do this?

    REPORT zsd_rv56td00.
    SET EXTENDED CHECK OFF.
    TABLES: vbpla, thead, ttxern, ttxit, t005, vbddl, stxh, sadr. "SADR40A
    INCLUDE vttkdata.                      "Shipment Header
    INCLUDE vttsdata.                      "Shipment Segment
    INCLUDE vttpdata.                      "Shipment Items
    INCLUDE vbpadata.                      "Partner
    INCLUDE vtfadata.                      "Flow
    INCLUDE sadrdata.                      "Address
    INCLUDE vtlfdata.                      "Delivery Selection
    INCLUDE rvadtabl.                      "Messages
    INCLUDE vsedata.                       "shipping units
    INCLUDE rv56acom.                      "I/O-Structure
    *INCLUDE zsd_form_screens.
    SET EXTENDED CHECK ON.
    DATA:
      xscreen(1)              TYPE c,
      retcode                 LIKE sy-subrc VALUE 0,
      there_was_output(1)     TYPE c        VALUE space,
      new_page_was_ordered(1) TYPE c        VALUE space.
    CONSTANTS:
      no(1)  VALUE space,
      yes(1) VALUE 'X'.
    TABLES : tpar,vbak.                                         "n_742056.
    SELECTION-SCREEN BEGIN OF SCREEN 900.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECT-OPTIONS :
    s_ulke FOR vbak-zzcikisulke,
    s_gumruk FOR vbak-zzvarisgumruk,
    s_ant FOR vbak-zzantrepo.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 900.
    Florian as you can see I created the screen! It exists!

  • CALL SELECTION SCREEN problem

    Hello!
    I have a problem. In my riport I have a selection screen (1000), a main screen (2000), and a screen (400) this is called inside a loop, to fill some datas when you hit the print button.
      CLEAR L_TOTAL.
      SORT LT_EBAN BY BNFPO.
      LOOP AT LT_EBAN.
        GT_ITEM2-FIELD01 = SY-TABIX.
        GT_ITEM2-FIELD02 = LT_EBAN-MATNR.
    *---Part name, Type, Maker
        SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.
         CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.
         ITEM = LT_EBAN-BNFPO.
         CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.
    *---Machine
        GT_ITEM2-FIELD06 = ST_400-MACHINE.
    After this, i could not use the LEAVE TO SCREEN 0, because it's not going back to secreen '2000' , I'm getting a blank 400 screen.
    Thatswhy I used CALL SCREEN '2000', and it's fine.
    But in the case of the Selection screen (1000) something is wrong.
    On the screen 2000 I using this logic.
    MODULE EXIT_2000 INPUT.
      CASE OK_CODE.
        WHEN 'BACK' OR 'EXIT'.
          CLEAR OK_CODE.
           CALL SELECTION-SCREEN '1000'.
           LEAVE PROGRAM.
        WHEN 'CANC'.
          PERFORM EXIT_PROGRAM.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR OK_CODE.
    ENDMODULE.                 " exit_2000  INPUT
    With this logic, the program is going to the SELECTION-SCREEN, when I hit the back button, and when we are already on the SELECTION-SCREEN, it's leaving the program. This is also ok.
    But when I hit the back button, and on the SELECTION-SCREEN I want to run the program again, it's not going to the program logic, it's jumping to this CALL SELECTION-SCREEN '1000', and leaving of course.
    START-OF-SELECTION.
      PERFORM DSP1_PROC.
      IF GT_DISPLAY[] IS INITIAL.
        MESSAGE S208(00) WITH 'No data.'.
        EXIT.
      ENDIF.
      IF S_RET = '1'.
        MESSAGE I208 WITH 'Document not found'.
        S_RET = ' '.
      ELSE.
        S_RET = ' '.
        CALL SCREEN '2000'.
      ENDIF.
    So my question is, that the above logic, when I running the program first time It's working good, at the START-OF-SELECTION, but when I trying to runnig from the SELECTION-SCREEN "second time", from the   START-OF-SELECTION it's jumping to the CALL SELECTION-SCREEN '1000'. How can I avoid this. I want that from the  START-OF-SELECTION, never go to the CALL SELECTION-SCREEN '1000'.
    Thank You
    Edited by: Roland on Dec 5, 2011 11:27 AM

    Hi Max!
    Yeah, I was thinking the same, that the problem is with that loop.
    But I don't know, how can I solved in a different way, because when we hit the print button, we getting all the items from a table, and we starting looping on them. In the loop we passing the values to a GT_ITEM table, later this table is connected with an excell, so it will be printed out in an excell form.
    So I have to call this screen so many times, how many items we have. Sometimes just 1, sometimes 4, 6, 9, and so on.
    For this items I have to add 2 more fields, wich are uploaded by the user. ( The other fields are coming from the table)
    So if I going out from the loop after the CALL SCREEN 400, I think the next item wont be get the values. Or maybe any of them, because this is before the APPEND GT_ITEM. So this methode wont be called, no data would be in the table, nothing will be printed.
    *-Item
      SELECT BNFPO MATNR TXZ01 MENGE MEINS ERNAM PREIS BEDNR EBELN EBELP
        INTO CORRESPONDING FIELDS OF TABLE LT_EBAN
        FROM EBAN
       WHERE BANFN  =  GT_DISPLAY-BANFN
         AND LOEKZ  =  ' '.
      CLEAR L_TOTAL.
      SORT LT_EBAN BY BNFPO.
      LOOP AT LT_EBAN.
        GT_ITEM2-FIELD01 = SY-TABIX.
        GT_ITEM2-FIELD02 = LT_EBAN-MATNR.
    *---Part name, Type, Maker
        SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.
         CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.
         ITEM = LT_EBAN-BNFPO.
         CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.
    *---Machine
        GT_ITEM2-FIELD06 = ST_400-MACHINE.
    *---Using Qty
        WRITE ST_400-USING UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD08.
    *---Now Stock
        CLEAR L_LABST.
        SELECT SUM( LABST ) INTO L_LABST
          FROM ZMM0460T
         WHERE MATNR = LT_EBAN-MATNR
           AND WERKS = '3A10'.
        WRITE L_LABST UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD09.
        WRITE LT_EBAN-MENGE UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD10.
        IF NOT LT_EBAN-EBELN IS INITIAL.
          CLEAR LS_EKPO.
          SELECT SINGLE NETPR WAERS PEINH
            INTO CORRESPONDING FIELDS OF LS_EKPO
            FROM EKPO AS A INNER JOIN EKKO AS B ON A~EBELN EQ B~EBELN
           WHERE A~EBELN = LT_EBAN-EBELN
             AND A~EBELP = LT_EBAN-EBELP.
          IF LS_EKPO-WAERS <> 'HUF'.
            CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
              EXPORTING
                DATE             = SY-DATUM
                FOREIGN_AMOUNT   = LS_EKPO-NETPR
                FOREIGN_CURRENCY = LS_EKPO-WAERS
                LOCAL_CURRENCY   = 'HUF'
              IMPORTING
                LOCAL_AMOUNT     = LS_EKPO-NETPR.
          ENDIF.
          IF LS_EKPO-PEINH IS INITIAL. LS_EKPO-PEINH = 1. ENDIF.
          LT_EBAN-PREIS = LS_EKPO-NETPR / LS_EKPO-PEINH.
        ENDIF.
        WRITE LT_EBAN-PREIS CURRENCY 'HUF' TO GT_ITEM2-FIELD11.
        CONDENSE GT_ITEM2-FIELD11.
        CONCATENATE GT_ITEM2-FIELD11 'Ft' INTO GT_ITEM2-FIELD11
          SEPARATED BY SPACE.
        L_NETWR = LT_EBAN-MENGE * LT_EBAN-PREIS.
        WRITE L_NETWR CURRENCY 'HUF' TO GT_ITEM2-FIELD12.
        CONDENSE GT_ITEM2-FIELD12.
        CONCATENATE GT_ITEM2-FIELD12 'Ft' INTO GT_ITEM2-FIELD12
          SEPARATED BY SPACE.
        L_TOTAL = L_TOTAL + L_NETWR.
    *---Unit
        SELECT SINGLE UNIT INTO GT_ITEM2-FIELD13
          FROM ZMM0500T
         WHERE PERNR = LT_EBAN-BEDNR.
    *---Name
        SELECT SINGLE SNAME INTO GT_ITEM2-FIELD14
          FROM PA0001
         WHERE PERNR = LT_EBAN-BEDNR
           AND ENDDA = '99991231'.
    *---Append
        GT_ITEM2-CNTR01 = ''.
        APPEND GT_ITEM2. CLEAR: GT_ITEM2, ST_400, DESCR, ITEM.
      ENDLOOP.
      GT_ITEM2-FIELD11 = 'Total'.
      WRITE L_TOTAL CURRENCY 'HUF' TO GT_ITEM2-FIELD12.
      CONDENSE GT_ITEM2-FIELD12.
      CONCATENATE GT_ITEM2-FIELD12 'Ft' INTO GT_ITEM2-FIELD12
        SEPARATED BY SPACE.
      GT_ITEM2-CNTR01 = 'B'.
      APPEND GT_ITEM2. CLEAR GT_ITEM2.
    ANy idea?
    Thank You
    Edited by: Roland on Dec 5, 2011 1:36 PM
    Edited by: Roland on Dec 5, 2011 1:50 PM

Maybe you are looking for

  • A Select statement with Appending table statement in it.

    Hi,   How can I use a select statement with a <Appening table> statement in it. SELECT DISTINCT <field Name>                 FROM <DB table name>                 APPENDING TABLE <itab>                 WHERE <fieldname> EQ <Itab1-fieldname>           

  • IDOC Monitoring returns wrong result

    Hi All I set up IDOC Monitoring to generate Yellow alert when No. of IDOC is less than 6 and ref when it is more than 6. However, even when the no. of IDOC is more than 6, I get a Yellow alert. I checked "Auto Notif" under Notifications and Service D

  • HAL exception

    hi everyone, while loading data into HFM application , i am getting following error "VBIS exception set by "Financial Management1 ( adapter name)" in " HFM (flow diagram name)": java.lang.NoSuchMethodError: GetIsNoDataAt" due to this error, out of @

  • Recmd for low cost, multi point temp logging

    Can someone recommend the best, low cost way to monitor temp at 16 pts. We are doing qualifiation tests of an oven used in an bio tech research application. But we are a startup and I need to stretch my capital budget as much as possible. Here are th

  • Arabic data display

    Hi, We use translatable valueset for capturing positions. Values both english and arabic have been entered for this translatable valueset. Positions have been created in the positions window using this valueset. One position has been assigned for an