Defining Selection-Screen Depending on Client

Good Morning,
I need to hide one parameter from my selection-screen depending on sy-mandt.
Is it possible? If yes, can anyone show an example?
Regards,
Pedro Gaspar

hi
u can put ur fields in a block sepicific for a particular client.
u check the mandt and display the corresponding block while hiding the others.
check this sample code:
TABLES: eban,
        SSCRFIELDS.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
          rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
           p_matnr TYPE eban-matnr MODIF ID g1,
           sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
           str_loc TYPE eban-lgort MODIF ID g4.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
declaration of internal tables and work areas to be used
DATA: BEGIN OF it_pr OCCURS 0,
      banfn TYPE eban-banfn,
      bnfpo TYPE eban-bnfpo,
      loekz TYPE eban-loekz,
      statu TYPE eban-statu,
      ekgrp TYPE eban-ekgrp,
      matnr TYPE eban-matnr,
      werks TYPE eban-werks,
      lgort TYPE eban-lgort,
      preis TYPE eban-preis,
      peinh TYPE eban-peinh,
      END OF it_pr.
DATA: BEGIN OF it_mat OCCURS 0,
      matnr TYPE eban-matnr,
      END OF it_mat.
*DATA:BEGIN OF ITAB1 OCCURS 0,
  DATA: l_answer.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF it_fieldcat,
      it_event TYPE slis_t_event,
      wa_event TYPE slis_alv_event.
declaration of variables to be used
DATA: r_ucomm TYPE sy-ucomm,
      mat_no TYPE eban-matnr,
      len TYPE i VALUE 1,
      count TYPE i VALUE IS INITIAL,
      iflag TYPE i VALUE IS INITIAL,
      iflag1 TYPE i VALUE 0.
DATA :pr_id TYPE sy-repid,
rt_extab TYPE slis_t_extab.
INITIALIZATION.
  pr_id = sy-repid.
AT SELECTION-SCREEN OUTPUT.
<b>  IF rad1 = 'X' AND SY-MANDT = <client 1></b>
    LOOP AT SCREEN.
      IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
        screen-active = '1'.
        screen-input = 0.
      ELSEIF screen-group1 = 'G2'.
        screen-active = '0'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  <b>ELSEIF rad2 = 'X'  and sy-mandt = <client 1></b>
    LOOP AT SCREEN.
      IF screen-group1 = 'G1'  OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
        screen-active = '0'.
      ELSEIF screen-group1 = 'G2'.
        screen-active = '1'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
  IF mtr = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'G1'.
        screen-input = 1 .
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
  IF sloc = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'G4'.
        screen-input = 1 .
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
clear sy-ucomm.
iflag = 1.
endif.
regards
ravish
<b>plz dont forget to reward points if helpful</b>

Similar Messages

  • Problem with user defined selection-screens

    Hi,
    in my case, i have a default selection screen and a user defined selection screen. Now, after selecting a radio button in default selection screen, the user defined selection screen is called. after executing it report output is displayed. now if i press f3 (back) it is going to default selection screen. here my requirement is, when i press f3 it should go to the user defined selection.
    Can u plz help me solve this.
    bye n regards
    sree

    Any modifications to screen 1000 will be lost the next time the program is generated.
    When the user hits the back key from the report output, your ABAP is restarted just like when you originally started it.  That is why you are getting the default selection screen again.
    Use the AT USER-COMMAND event.  When BACK is hit from the report, use the SUBMIT command to re-execute the program, passing it the selections from the default selection screen.  Leave out the RETURN option.
    For help on filling the selection screen during SUBMIT, help is available at
    http://help.sap.com/saphelp_470/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm

  • Problem with ALV and user defined selection screen. please help!

    Hi Experts,
           I have program which has a user defined selection screen 9001. On executing the selection screen i call a ALV using resuse_alv_grid function module.
    What problem I am facing is that when I press back button from ALV page it goes to the se38 editor instead of selection screen.
    How to resolve this?
    Thanks
    Gopal

    Hi,
    This might be due to LEAVE TO TRANSACTION statement. You might be running the program from SE38. Try to run the program using Z-TCode assigned to it.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was edited by: Bharat Reddy V

  • Transporting user defined selection screen from one server to another

    How to transport a user defined selection screen (0100) from one server to another.
    PBO and PAI modules written in PBO and PAI events for the selection screen are
    not transported.
    How to transport the modules in the events for the selection screen.

    Hi,
    Krishna, <b>All</b> the Objects(prms,classes,tables,stru...) will be transported thru Transport Objects only..
    Check Utilities->version->Version Mgt -> Here u will have the Transport number(if it's created under trnasportable obj).If you do not find TP no,then u would hav saved that as a Local Object.
    Then Relase the TP no from SE10 Trnx.
    Rgds,
    Jothi.P

  • User defined selection screen

    Hi, In my program i used a default seelction screen and 5 user defined selection screen. Based on the selections made in default selection screen, it should go to the corresponding user defined screen.
    and the problem iam getting if i press enter jey insted of F8.
    ""Selection screen ZP2I_MASSCHANGE_TEMP1 1000 was
    not called using CALL SELECTION-SCREEN"""
    the code is as follows.
          A T   S E L E C T I O N-S C R E E N
    *AT SELECTION-SCREEN.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP rgp1.
    CHECK SY-UCOMM EQ 'ONLI' OR SY-UCOMM EQ 'CRET' .
    Download
      IF r_dwnld = c_check.
    Material Screen Call
        IF r_matplt = c_check.
          CLEAR p_werks7.
          sree = 'A'.
          CALL SELECTION-SCREEN 170.
          ENDIF.
    Material Storage Screen Call
        IF r_matstr = c_check.
          CLEAR p_werks1.
          sree = 'B'.
          CALL SELECTION-SCREEN 110.
        ENDIF.
    Material Handling Screen Call
        IF r_mathan = c_check.
          CLEAR p_werks2.
          sree = 'C'.
          CALL SELECTION-SCREEN 120.
        ENDIF.
    Material Pick/Up Delivery Screen Call
        IF r_pcdt = c_check.
          CLEAR p_werks3.
          sree = 'D'.
          CALL SELECTION-SCREEN 130.
        ENDIF.
    Material Inboundlogistics Screen Call
        IF r_inlogs = c_check.
          CLEAR p_werks4.
          sree = 'E'.
          CALL SELECTION-SCREEN 140.
        ENDIF.
    Material Packaging Screen Call
        IF r_pkng = c_check.
          CLEAR p_werks5.
          sree = 'F'.
          CALL SELECTION-SCREEN 150.
        ENDIF.
      ENDIF.
    Upload Screen Call
      IF r_upld = c_check.
        IF ( r_matplt = c_check OR
           r_matstr = c_check OR
           r_mathan = c_check OR
           r_pcdt   = c_check OR
           r_inlogs = c_check OR
           r_pkng   = c_check  ).
          CLEAR p_uload.
          sree = 'G'.
          CALL SELECTION-SCREEN 160.
        ENDIF.
      ENDIF.
         s T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
    DOWNLOAD
      CASE sree.
        WHEN 'A'.
    Select Material Details
          PERFORM get_material_data.
          IF NOT tbl_matplt[] IS INITIAL.
            IF p_dalv7 = c_check.
    Display list in ALV
              PERFORM setup_alv_report.
            ELSE.
    Download Storage data into local file
              PERFORM download_file USING  p_matdet.
            ENDIF.
          ELSE.
            MESSAGE s020.
          ENDIF.
          CALL SELECTION-SCREEN 170.
    Select Material storage data
        WHEN 'B'.
          PERFORM get_storage_data.
          IF NOT tbl_matstr[] IS INITIAL.
            IF p_dalv1 = c_check.
    Display list in ALV
              PERFORM setup_alv_report.
            ELSE.
    Download Storage data into local file
              PERFORM download_file USING  p_matstr.
            ENDIF.
          ELSE.
            MESSAGE s020.
          ENDIF.
          CALL SELECTION-SCREEN 110.
    Select Material Handling data
        WHEN 'C'.
          PERFORM get_materialhandling.
          IF NOT tbl_mathand[] IS INITIAL.
            IF p_dalv2 = c_check.
    Display list in ALV
              PERFORM setup_alv_report.
            ELSE.
    Download Material Handling data into local file
              PERFORM download_file USING  p_mathan.
            ENDIF.
          ELSE.
            MESSAGE s020.
          ENDIF.
          CALL SELECTION-SCREEN 120.
    Select Pick/Up DayTime data
        WHEN 'D'.
          PERFORM get_pickup_delivery.
          IF NOT tbl_pcdel[] IS INITIAL.
            IF p_dalv3 = c_check.
    Display list in ALV
              PERFORM setup_alv_report.
            ELSE.
    Download Pick/Up DayTime data into local file
              PERFORM download_file USING  p_pcdt.
            ENDIF.
          ELSE.
            MESSAGE s020.
          ENDIF.
          CALL SELECTION-SCREEN 130.
    Select Inbound Logistics data
        WHEN 'E'.
          PERFORM get_inboundlogistics.
          IF NOT tbl_inlog[] IS INITIAL.
            IF p_dalv4 = c_check.
    Display list in ALV
              PERFORM setup_alv_report.
            ELSE.
    Download Inbound Logistics data into local file
              PERFORM download_file USING  p_inlogs.
            ENDIF.
          ELSE.
            MESSAGE s020.
          ENDIF.
          CALL SELECTION-SCREEN 140.
    Select Packaging data
        WHEN 'F'.
          PERFORM get_packaging.
          IF NOT tbl_pkng[] IS INITIAL.
            IF p_dalv5 = c_check.
    Display list in ALV
              PERFORM setup_alv_report.
            ELSE.
    Download Packaging data into local file
              PERFORM download_file USING  p_pkng.
            ENDIF.
          ELSE.
            MESSAGE s020.
          ENDIF.
          CALL SELECTION-SCREEN 150.
        WHEN 'G'.
    Material Details data upload
          IF r_matplt = c_check.
    Free memory IDs corresponding to upload tables
            PERFORM free_memory.
    Upload Material details from local file
            PERFORM load_file USING p_uload.
    Prepare data
            PERFORM prepare_mat_data.
    Get actual Material Details from ZP2_MATPLT
            PERFORM get_old_material_data.
    Validate new data against database entries
            PERFORM validate_material_data.
    Check Plant authorization
    Move plants to itab.
            REFRESH tbl_plts.
            LOOP AT tbl_matplt.
              tbl_plts-werks = tbl_matplt-werks.
              APPEND tbl_plts.
              CLEAR  tbl_plts.
            ENDLOOP.
            DELETE ADJACENT DUPLICATES FROM tbl_plts
            COMPARING werks.
    Check authoriztions
            PERFORM check_plant_authorization1 TABLES tbl_plts.
            REFRESH tbl_plts.
            IF p_trun IS INITIAL.
    Modify material data
              PERFORM modify_zp2_matplt.
            ENDIF.
    Material Storage data upload
            IF r_matstr = c_check.
    Free memory IDs corresponding to upload tables
              PERFORM free_memory.
    Upload material storage data from local file
       PERFORM load_matstr_data USING p_uload.
              PERFORM load_file USING p_uload.
    Get the material storage data from database
              PERFORM get_old_storage_data.
    Get material plant data for the corresponding
    Storage data.
              PERFORM get_matplt_data_storage.
    Get data from table fields
              PERFORM get_tblfld_values.
    Validate data against database entries
              PERFORM validate_storage_data.
    Check Plant authorization
    Move plants to itab.
              REFRESH tbl_plts.
              LOOP AT tbl_matstr.
                tbl_plts-werks = tbl_matstr-werks.
                APPEND tbl_plts.
                CLEAR  tbl_plts.
              ENDLOOP.
              DELETE ADJACENT DUPLICATES FROM tbl_plts
              COMPARING werks.
    Check authoriztions
              PERFORM check_plant_authorization1 TABLES tbl_plts.
              REFRESH tbl_plts.
              IF p_trun IS INITIAL.
    Modify material storage data
                PERFORM modify_zp2matstr_table.
              ENDIF.
            ENDIF.
    Material Handling data upload
            IF r_mathan = c_check.
    Free memory IDs corresponding to upload tables
              PERFORM free_memory.
    Upload material Handling data from local file
              PERFORM load_file USING p_uload.
    Get the material Handling data from database
              PERFORM get_old_materialhandling.
    Get material plant data for the corresponding
    handling data.
              PERFORM get_matplt_data_handling.
    Validate data against database entries
              PERFORM validate_handling_data.
    Check Plant authorization
    Move plants to itab.
              REFRESH tbl_plts.
              LOOP AT tbl_mathand.
                tbl_plts-werks = tbl_mathand-werks.
                APPEND tbl_plts.
                CLEAR  tbl_plts.
              ENDLOOP.
              DELETE ADJACENT DUPLICATES FROM tbl_plts
              COMPARING werks.
    Check authoriztions
              PERFORM check_plant_authorization1 TABLES tbl_plts.
              REFRESH tbl_plts.
              IF p_trun IS INITIAL.
    Modify material handling data
                PERFORM modify_zp2mathand_table.
              ENDIF.
       ELSEIF sy-ucomm = c_s.
         LEAVE SCREEN.
            ENDIF.
    Material Pick/Up DayTime data upload
            IF r_pcdt = c_check.
    Free memory IDs corresponding to upload tables
              PERFORM free_memory.
    Upload Pick/Up DayTime file data from local file
              PERFORM load_file USING p_uload.
    Get the Pick/Up DayTime data from database
              PERFORM get_old_pickup_delivery.
    Get Inbound logistics data corresponding to handling
              PERFORM get_inlogs_pcdel.
    Validate data against database entries
              PERFORM validate_pcdel_data.
    Check Plant authorization
    Move plants to itab.
              REFRESH tbl_plts.
              LOOP AT tbl_pcdel.
                tbl_plts-werks = tbl_pcdel-werks.
                APPEND tbl_plts.
                CLEAR  tbl_plts.
              ENDLOOP.
              DELETE ADJACENT DUPLICATES FROM tbl_plts
              COMPARING werks.
    Check authoriztions
              PERFORM check_plant_authorization1 TABLES tbl_plts.
              REFRESH tbl_plts.
              IF p_trun IS INITIAL.
    Modify Pick/Up DayTime table
                PERFORM modify_zp2pcdt_table.
              ENDIF.
       ELSEIF sy-ucomm = c_s.
         LEAVE SCREEN.
            ENDIF.
    Material Inbound Logistics data upload
            IF r_inlogs = c_check.
    Free memory IDs corresponding to upload tables
              PERFORM free_memory.
    Upload Inbound Logistics file data from local file
              PERFORM load_file USING p_uload.
    Get the Inbound Logistics data from database
              PERFORM get_old_inboundlogistics.
    Get data from table fields
              PERFORM get_tblfld_values.
    Get Vendor data
              PERFORM get_vendor_inlog.
    Get material plant data for the corresponding
    Inboundlogistics data.
              PERFORM get_matplt_data_inlog.
    Validate data against database entries
              PERFORM validate_inlog_data.
    Check Plant authorization
    Move plants to itab.
              REFRESH tbl_plts.
              LOOP AT tbl_inlog.
                tbl_plts-werks = tbl_inlog-werks.
                APPEND tbl_plts.
                CLEAR  tbl_plts.
              ENDLOOP.
              DELETE ADJACENT DUPLICATES FROM tbl_plts
              COMPARING werks.
    Check authoriztions
              PERFORM check_plant_authorization1 TABLES tbl_plts.
              REFRESH tbl_plts.
              IF p_trun IS INITIAL.
    Modify Inbound Logistics table
                PERFORM modify_zp2inlog_table.
              ENDIF.
            ENDIF.
    Packaging data upload
            IF r_pkng = c_check.
    Free memory IDs corresponding to upload tables
              PERFORM free_memory.
    Upload Packaging file data from local file
              PERFORM load_file USING p_uload.
    Get the Packaging data from database
              PERFORM get_old_packaging.
    Get material plant data for the corresponding
    Packaging data.
              PERFORM get_matplt_data_pkng.
    Get Vendor data
              PERFORM get_vendor_pkng.
    Get data from table fields
              PERFORM get_tblfld_values.
    Load Primary container reference data
              PERFORM primary_container_data.
    Validate data against database entries
              PERFORM validate_packaging_data.
    Check Plant authorization
    Move plants to itab.
              REFRESH tbl_plts.
              LOOP AT tbl_pkng.
                tbl_plts-werks = tbl_pkng-werks.
                APPEND tbl_plts.
                CLEAR  tbl_plts.
              ENDLOOP.
              DELETE ADJACENT DUPLICATES FROM tbl_plts
              COMPARING werks.
    Check authoriztions
              PERFORM check_plant_authorization1 TABLES tbl_plts.
              REFRESH tbl_plts.
              IF p_trun IS INITIAL.
    Modify Packaging data
                PERFORM modify_zp2pckg_table.
              ENDIF.
            ENDIF.
          ENDIF.
       IF p_trun = c_check.
    Display the Error list
        PERFORM display_result.
          CALL SELECTION-SCREEN 160.
      ENDIF.
      ENDCASE.
    Another problem is If i press BACK on the report output, it is coming to the default selection screen. and my requirement is, it should come to the corressponding user defined selection screen and not the default selection screen.
    PLz help me in this regard.. Iam breaking my heading, but could not able to solve it.
    Thanks in advance
    sree

    Hello,
    You must have defined user command for the radio button. This is not required. Just try putting it in at selection screen. AT SELECTION-SCREEN ON RADIOBUTTON GROUP rgp1.
    the moment the user clicks the radio button it will go to this event and call the screen. Just use AT SELECTION-SCREEN.
    Regards,
    Shekhar Kulkarni

  • User defined Selection screen for Logical database

    hi all,
           can we display a user defined selection screen instead of the default selection screen in LDB . eg pnp
    cheers
    senthil

    Hi,
    to my knowledge, the selection screen of a logical database can only be changed (versions!) in the logical database itself.
    What you can do is, write a program with your own selection screen an then either call another program that uses the LDB or -  much better - you call the LDB from your program with function module LDB_PROCESS!
    Example taken from the example library (TA ABAPDOCU):
    <b>REPORT demo_logical_database.
    DATA wa_spfli TYPE spfli.
    SELECT-OPTIONS s_carr FOR wa_spfli-carrid.
    DATA: callback TYPE TABLE OF ldbcb,
          callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
          seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode     = 'SPFLI'.
    callback_wa-get         = 'X'.
    callback_wa-get_late    = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SPFLI'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    callback_wa-ldbnode     = 'SFLIGHT'.
    callback_wa-get         = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SFLIGHT'.
    APPEND callback_wa TO callback.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'CARRID'.
    LOOP AT s_carr.
      MOVE-CORRESPONDING s_carr TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
         EXPORTING
              ldbname                     = 'F1S'
              variant                     = ' '
         TABLES
              callback                    = callback
              selections                  = seltab
         EXCEPTIONS
              ldb_not_reentrant           = 1
              ldb_incorrect               = 2
              ldb_already_running         = 3
              ldb_error                   = 4
              ldb_selections_error        = 5
              ldb_selections_not_accepted = 6
              variant_not_existent        = 7
              variant_obsolete            = 8
              variant_error               = 9
              free_selections_error       = 10
              callback_no_event           = 11
              callback_node_duplicate     = 12
              OTHERS                      = 13.
    IF sy-subrc <> 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    FORM callback_spfli USING name  TYPE ldbn-ldbnode
                              wa    TYPE spfli
                              evt   TYPE c
                              check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.
    FORM callback_sflight USING name  TYPE ldbn-ldbnode
                                wa    TYPE sflight
                                evt   TYPE c
                                check TYPE c.
      WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.
    ENDFORM.</b>

  • Calling selection screen depends on radio buttion selection

    I need to call two selection screens (not radio buttons selection screens) depends on radio buttion selection
    Eg :
       R1-radio button
      R2- radio button
    if we select R1- we should get selection screen to enter input values like parameters, select options
       PARAMETERS:     p_abc TYPE    MARA-matnr OBLIGATORY
      SELECT-OPTIONS: s_mno  FOR   MARC- chngr OBLIGATORY.
      PARAMETERS:     p_xyz TYPE     MARA - amktxOBLIGATORY.  (just example)
    If we select R2, we should get selection screen to enter input values like parameters, select options
    PARAMETERS:         p_abcd TYPE    KNA1-matnr OBLIGATORY
      SELECT-OPTIONS:  s_mnop  FOR   VBAK- chngr OBLIGATORY.
      PARAMETERS:        p_xyza TYPE     VBAP - amktxOBLIGATORY  (just example)
    if we select 1 , other should be hide
    Madhu

    Hi,
    this is an example:
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETER R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND SET1.
    PARAMETER R2 RADIOBUTTON GROUP G1 .
    SELECTION-SCREEN BEGIN OF BLOCK B21 WITH FRAME TITLE TEXT-004.
    PARAMETER: P1 LIKE IBIPPARMS-PATH MODIF ID FPA.
    SELECTION-SCREEN END OF BLOCK B21.
    SELECTION-SCREEN BEGIN OF BLOCK B22 WITH FRAME TITLE TEXT-004.
    PARAMETER: P2 LIKE IBIPPARMS-PATH MODIF ID FPB.
    SELECTION-SCREEN END OF BLOCK B22.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA: P_CHECK.
    AT SELECTION-SCREEN OUTPUT.
      IF P_CHECK <> 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA' OR
             SCREEN-GROUP1 = 'FPB'.
            SCREEN-INPUT = '0'.
            SCREEN-INVISIBLE = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        P_CHECK = 'X'.
      ENDIF.
      IF R1 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF R2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Angelo.

  • Define selection screen for ldb_process

    Hi I'm using the call function ldb_process for KDF(lfa1, lfb1, bsik), the trouble is that the information its different than if i do it on a normal report defining the logical database kdf and selection screen 903.
    I find that the difference is because the selection screen, this is because the default selection screen for the kdf database is 1000, and this selection has the "Open items at key date" selection with the current date.
    The question is:
    How can i define the selection screen 903 using the call function ldb_proces?
    Thanks
    Pablo Santos

    Hi,
    You cannot define screen version 903 using function LDB_PROCESS. Instead use table "SELECTIONS" of the function module .
    Cheers.

  • Logical database : user defined selection screen

    Hi Experts,
                 I am working with HR-ABAP. The logical databases provide a selection screen......but i want to use a selection screen of my own and not that of the LDB.
    Plz help...............

    hi do like this....
    go to attributes-->hr report catagory-->master data...here use the value _____000(5underscores and 000 )..
    you wii get that..
    regards,
    venkat

  • User defined selection screen sequence

    Hello Everyone,
    I have a kind of an issue with selection screens. Story goes like this. I have a main sel.screen (no 1000) where I have some selection list. Now based on this selection i display another sel.screen (with my given number, let's say 9000). Then i fill selection criterion on screen 9000 press F8 and I get results. So far so good. Now when i 'back' button system displays the first, initial sel.screen (1000) instead of the last displayed (9000). I've tried to modify this behaviour and I am able to display the last sel.screen (9000) after pressing 'back' button but then when i press 'F8' instead of results I get initial sel.screen (1000) again. Is there anything I could do to make it work in the way I want to ?
    Regards
    Pawel

    Ok so let me present the code (or at least the most important parts) as Selva asked because using 'set screen 0' did not help. it is possible that I used it in wrong place so even more presenting code should help:
    * some global data definition
    *definition of mail sel.screen:
    SELECTION-SCREEN BEGIN OF BLOCK selscr1
                     WITH FRAME TITLE text-001.
    PARAMETERS: "select interface
         p_i001(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
    SELECTION-SCREEN END   OF BLOCK selscr1.
    *definiotion of following sel.screens;
    SELECTION-SCREEN BEGIN OF SCREEN 1002.
      SELECTION-SCREEN BEGIN OF BLOCK selscr2 WITH FRAME TITLE text-001.
        PARAMETER: p_ws02(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
    *    PARAMETER: p_t02 like GV_TABNAME DEFAULT 'zint_v_infin002'.
      SELECTION-SCREEN END   OF BLOCK selscr2.
    SELECTION-SCREEN end OF SCREEN 1002.
    SELECTION-SCREEN BEGIN OF SCREEN 1004.
      SELECTION-SCREEN BEGIN OF BLOCK selscr3 WITH FRAME TITLE text-001.
        PARAMETER: p_ws04(4) as listbox visible length 20 OBLIGATORY DEFAULT 'XXX'.
      SELECTION-SCREEN END   OF BLOCK selscr3.
    SELECTION-SCREEN end OF SCREEN 1004.
    *******************   END OF SCREENS ***********************************************************
    AT SELECTION-SCREEN ON p_i001. "parameter from screen 1000
      CASE p_i001.
        WHEN '002'.
          call SELECTION-SCREEN 1002.
        WHEN '004'.
          call SELECTION-SCREEN 1004.
        WHEN OTHERS.
          CALL SELECTION-SCREEN 1000.
       ENDCASE.
    *** some settings made basing on selections from following screens
    AT selection-SCREEN on p_ws02.
      gv_werks = p_ws02.
    AT selection-SCREEN on p_ws04.
      gv_werks = p_ws04.
    INITIALIZATION
    * filling listbox
    START-OF-SELECTION.
      CASE p_i001.
        WHEN '002'.
         "select 002 relevant data
         "alv display
        WHEN '004'.
         "select 004 relevant data
         "alv display
      ENDCASE.
      END-OF-SELECTION.
    so as i mentioned before when i press 'back' on alv list I end up with screen 1000 instead 1004 (it's 1004 in real life not 9000). when i tried to change i was able to display 1004 selection when i pressed 'back' on alv but then instead of getting new list system takes ma back to 1000 scr again
    regards
    Pawel

  • TO HAVE USER DEFINED SELECTION SCREEN USING LOGICAL DATABASE AFI

    AFI is the logical database i need to use, but if i include the AFI is the program attributes, i get the selection screen which is already there for AFI, but i need to get the selection screen, that i have defined

    Hi ,
    you can exclude sel. from ldb with
    loop at screen - statement
    and you can include your own sel-option and parameters
    regards Andreas

  • Problem with a selection-screen.

    HI, I want to make a screen at execution time.
    Depending of a flag variable, it´s the way that i made the layout of the screen at execution time.
    Here's a code example.
    SELECTION-SCREEN BEGIN OF SCREEN 0200 .
       if pasos-descripcion = '01 DERIVACION BANORTE'.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME title text-T03
    NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 5.
    SELECTION-SCREEN COMMENT 5(3) TEXT-T01 for field cc1.
    parameters cc1(10) type c.
    SELECTION-SCREEN POSITION 25.
    SELECTION-SCREEN COMMENT 25(2) TEXT-T02 for field cc2.
    parameters cc2(10) type c.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME title text-T04
    NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 5.
    SELECTION-SCREEN COMMENT 5(3) TEXT-T01 for field cc3.
    parameters cc3(10) type c.
    SELECTION-SCREEN POSITION 25.
    SELECTION-SCREEN COMMENT 25(2) TEXT-T02 for field cc4.
    parameters cc4(10) type c.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN END OF SCREEN 0200.
    elseif pasos-descripcion = '02 DERIVACION BANORTE'.
         SELECTION-SCREEN SKIP 1.
         SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME title text-T05
    NO INTERVALS.
    parameters cc5 type n.
    parameters cc6 type n.
    SELECTION-SCREEN END OF BLOCK B3.
       endif.
    SELECTION-SCREEN END OF SCREEN 0200.
        call selection-screen '0200'.
    I tried to do this, but causes an error.
    How can i try to solve this?, Is it possible to do?
    Thanks.
    Reward points for helpful answers.

    This example was implemented using the standard selection screen which you should use if that is the only selection screen in your program, no need to define selection screen 0200.  But if you do want to define it this way, your code would be like this.
    REPORT zrich_001.
    DATA: pasos-descripcion TYPE string.
    SELECTION-SCREEN BEGIN OF SCREEN 0200 .
    *IF pasos-descripcion = '01 DERIVACION BANORTE'.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t03
    NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 5.
    SELECTION-SCREEN COMMENT 5(3) text-t01 FOR FIELD cc1 MODIF ID ss1.
    PARAMETERS cc1(10) TYPE c MODIF ID ss1.
    SELECTION-SCREEN POSITION 25.
    SELECTION-SCREEN COMMENT 25(2) text-t02 FOR FIELD cc2 MODIF ID ss1.
    PARAMETERS cc2(10) TYPE c MODIF ID ss1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t04
    NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 5.
    SELECTION-SCREEN COMMENT 5(3) text-t01 FOR FIELD cc3 MODIF ID ss1.
    PARAMETERS cc3(10) TYPE c MODIF ID ss1.
    SELECTION-SCREEN POSITION 25.
    SELECTION-SCREEN COMMENT 25(2) text-t02 FOR FIELD cc4 MODIF ID ss1.
    PARAMETERS cc4(10) TYPE c MODIF ID ss1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b2.
    *SELECTION-SCREEN END OF SCREEN 0200.
    *ELSEIF pasos-descripcion = '02 DERIVACION BANORTE'.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t05
    NO INTERVALS.
    PARAMETERS cc5 TYPE n MODIF ID ss2.
    PARAMETERS cc6 TYPE n MODIF ID ss2.
    SELECTION-SCREEN END OF BLOCK b3.
    *ENDIF.
    SELECTION-SCREEN END OF SCREEN 0200.
    INITIALIZATION.
      pasos-descripcion =  '01 DERIVACION BANORTE'.
      CALL SELECTION-SCREEN '0200'.
    AT SELECTION-SCREEN.
      IF pasos-descripcion = '01 DERIVACION BANORTE'.
        pasos-descripcion = '02 DERIVACION BANORTE'.
      ELSEIF pasos-descripcion = '02 DERIVACION BANORTE'.
        pasos-descripcion = '01 DERIVACION BANORTE'.
      ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF pasos-descripcion = '01 DERIVACION BANORTE'.
          IF screen-group1 = 'SS2'.
            screen-active = '0'.
          ENDIF.
        ELSEIF  pasos-descripcion = '02 DERIVACION BANORTE'.
          IF screen-group1 = 'SS1'.
            screen-active = '0'.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Regards,
    Rich Heilman

  • Regarding hiding Selection screen block

    hi all ,
    i have 2 blocks in the selection screen. the First block has 4 radiobuttons and the second block has 4 parameters.
    i need to hide the block 2 based on the radiobutton checked in the initail block.
    if radiobutton 1 or 2 is selected then the block should not be visible and if the rdbtn 3 or 4 is selected the block should be visible
    i have wriiten the code but it doesn't work at all. the block is hidden but when i select the radiobtn 3 or 4 it doesn't work
    the code i hve wriiten is as follows
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: par1 RADIOBUTTON GROUP rg2 DEFAULT 'X' USER-COMMAND ucom1
    PARAMETERS: par2 RADIOBUTTON GROUP rg2 .
    PARAMETERS: par3 RADIOBUTTON GROUP rg2 .
    PARAMETERS: par4 RADIOBUTTON GROUP rg2
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETER p_pwwrk TYPE plaf-pwwrk  MODIF ID FSC.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS p_wch TYPE cr_hname MODIF ID FSC.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECT-OPTIONS s_mdv01 FOR g_mdv01 MODIF ID FSC.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK a1.
    I have declared this  after Initialization.
    AT SELECTION-SCREEN OUTPUT.
    if par3 eq 'X' or par4 eq 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'FSC'.
    screen-active = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    endif.
    can anybody please suggest.
    Thanx
    Srinivas

    Hiding Input Fields Locate the document in its SAP Library structure
    To suppress the display of the input field on the selection screen, you use the following syntax:
    PARAMETERS p ...... NO-DISPLAY ......
    Although parameter p is declared, it is not displayed on the selection screen.
    If the parameter belongs to the standard selection screen, you can assign a value to it either by using the DEFAULT addition when you declare it, or during the INITIALIZATION event. If you call the executable program using the SUBMIT statement, the calling program can also pass the value.
    When you use user-defined selection screens, you can assign a value to the parameter at any time before calling the selection screen.
    If you want to display a parameter only in certain cases, for example, depending on the values entered by the user in other input fields of the selection screen, you cannot use the NO-DISPLAY addition. If you use NO-DISPLAY, the parameter actually is an element of the interface for program calls, but not an element of the selection screen. As a result, you cannot make it visible using the MODIFY SCREEN statement.
    To hide a parameter that is an element of the selection screen, you must declare it without the NO-DISPLAY addition and suppress its display using the MODIFY SCREEN statement.
    We can Hide parameter / select option in selection screen dynamically by manipulating screen object.
    SCREEN is like an internal table with a header line. However, you do not have to declare it in your program. Go to debugging mode and then view structure of screen.
    You can modify SCREEN in your ABAP program during the PBO event of a screen. Its contents override the static attributes of the screen fields for a single screen call. The only statements that you can use with SCREEN are:
    LOOP AT SCREEN.
    MODIFY SCREEN.
    ENDLOOP.
    We can hide parameter by set screen-active to 0.
    Here is example of how to hide parameter in selection screen. Write it, and change click on radiobutton to hide parameter.
        REPORT ZAALGAL0006.
        DATA: d_ucomm LIKE sy-ucomm.
        PARAMETERS: p_grpa1(10) MODIF ID A,
        p_grpa2(5) MODIF ID A,
        p_grpb1(2) MODIF ID B.
        PARAMETERS: p_actA RADIOBUTTON GROUP rad1 USER-COMMAND ACT DEFAULT 'X',
        p_actB RADIOBUTTON GROUP rad1.
        AT SELECTION-SCREEN.
        d_ucomm = sy-ucomm.
        AT SELECTION-SCREEN OUTPUT.
        LOOP AT screen.
        IF p_actA = 'X'.
        IF screen-group1 = 'B'.
        screen-active = 0.
        ENDIF.
        ELSEIF p_actB = 'X'.
        IF screen-group1 = 'A'.
        screen-active = 0.
        ENDIF.
        ENDIF.
        MODIFY screen.
        ENDLOOP.
        START-OF-SELECTION.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Can you giv me a brief introduction regarding selection screen with one eg:

    Hello
    can you giv me a brief introduction regarding selection screen with one eg:

    Hi Ranjith,
    Selection Screens
    Selection screens are one of the three types of screen in the R/3 System, along with dialog screens and lists. You use them whenever you want the user to enter either a single value for a field or fields, or to enter selection criteria.
    Function
    ABAP programs use screens to obtain input from users. The most general type of screen is a dialog screen, which you create using the ABAP Workbench tools Screen Painter and Menu Painter These tools allow you to create screens for data input and output. However, each of these screens requires its own flow logic.
    Defining and Calling Selection Screens
    You often use screens purely for data input . In these cases, you can use a selection screen. Selection screens provide a standardized user interface in the R/3 System.  Users can enter both single values and complex selections.  Input parameters are primarily used to control the program flow, while users can enter selection criteria to restrict the amount of data read from the database. You can create and save predefined sets of input values in the ABAP Editor for any selection screen. These are called variants.  Texts on the selection screen are stored as language-specific selection texts in the program text elements.  If you start an executable report using the SUBMIT statement, the input fields of the selection screen also serve as a data interface.
    Defining and Calling Selection Screens
    You define selection screens using ABAP statements in a program.  Simple statements allow you to create input fields, checkboxes, and radio buttons, and design the screen layout.  If you want to create a screen exclusively for data input, you do not need to create it using the normal dialog programming tools. When you create a selection screen, the system automatically assumes the tasks of the Screen Painter and Menu Painter.
    The rules for calling and defining selection screens in ABAP programs depend on the program type:
    ·         Executable program (type 1) without logical database
    You can use a single standard selection screen and as many user-defined selection screens as you wish. The standard selection screen is called automatically when you start the program.  User-defined selection screens, on the other hand, are called using the CALL SELECTION-SCREEN statement in a program.  The standard selection screen always has the screen number 1000. User-defined selection screens can have any screen number except 1000.
    ·         Executable program (type 1) with logical database
    The standard selection screen for an executable program linked to a logical database is made up of the logical database selections and the program selections.
    ·         Module pools (type M) and function modules (type F)
    You can only use user-defined selection screens in module pools and function modules. These can have any number apart from 1000. You can only call a selection screen from a function module using the CALL SELECTION-SCREEN statement. You can also define selection screens as Subscreens and incorporate them in screens or tabstrip controls.
    Hope this is useful.
    regards
    Ram
    Message was edited by:
            Ramanujan Chitrakootam

  • Selection screen in type m program

    How can we define Selection screen in type m program?
    Moderator message - please search the forum before asking. Thread locked.
    Edited by: Rob Burbank on Sep 20, 2009 2:19 PM

    Hi Anil ,
    Type M are module pool programs.
    For these you have to create you screen and then determine their flow in your program.
    These are executed by transactions.
    Search tutorials on module pool program .
    Hope its help you

Maybe you are looking for