At selection-screen on radiobutton group is triggering again on execute??

Hi Friends,
I want to show a Information pop up on selection of a radio button for that i have done
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RG.
  IF P_UPL = 'X'.
    CALL FUNCTION 'POPUP_TO_INFORM'
      EXPORTING
        TITEL = TEXT-017
        TXT1  = TEXT-015
        TXT2  = TEXT-016.
  ENDIF.
I have two radio buttons and second radio button is P_UPL. Its working fine.
But same event is getting triggered when execute button is pressed( i mean when report is executed ), which i don't want.
How to restrict.
Any help is greately appreciated.
Thanks,
Simha

when the event is clicked for the first time .
Initiate the before the popup is called .
Now when again when you execute and p_upl = 'X'
check the falg if value then don't call the pop-up .
and clear the flag at that moment .
So the Popup fun is ignored when you click execute event .
SEE THE lines in bold .
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RG.
  IF P_UPL = 'X'.
if v_flag is initial.
v_flag = 'X'.
    CALL FUNCTION 'POPUP_TO_INFORM'
      EXPORTING
        TITEL = TEXT-017
        TXT1  = TEXT-015
        TXT2  = TEXT-016.
ENDIF.
  ENDIF.

Similar Messages

  • Regarding At selection-screen on Radiobutton    output....

    Hi...
    This is the code I used, to check AT SELECTION-SCREEN ON RADIOBUTTON.
    But, after displaying the error message,
    all fields are becoming inactive in selection screen.
    CODE:
    TYPES : BEGIN OF st_employee,
                  cid TYPE zintelli_emp-cid,              
                 cname TYPE zintelli_emp-cname,         
             l   ocation TYPE zintelli_emp-location,           
                phno TYPE zintelli_emp-phno ,          
                gender TYPE zintelli_emp-gender,       
            END OF st_employee.
    DATA :  it_employee TYPE STANDARD TABLE OF      st_employee,
            wa_employee TYPE st_employee,
            v_cid TYPE  zintelli_emp-cid.
    SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title.
    PARAMETERS : p_cid TYPE st_employee-cid obligatory.
    PARAMETERS : p_cname TYPE st_employee-cname,       
                 p_culoc TYPE st_employeelocation,    
                 p_phno TYPE st_employee-phno. 
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(6) rc1.
    PARAMETERS : rb_1 RADIOBUTTON GROUP b .
    SELECTION-SCREEN COMMENT 15(7) rc2.
    PARAMETERS :  rb_2 RADIOBUTTON GROUP b.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN PUSHBUTTON /35(10) pb1 USER-COMMAND pb1.
    SELECTION-SCREEN SKIP 5.
    SELECTION-SCREEN END OF SCREEN 500.
    CALL SELECTION-SCREEN '500'.
    INITIALIZATION.
      title  = 'CUSTOMER INFORMATION'.
      pb1 = 'INSERT'.
      rc1 = 'MALE'.
      rc2 = 'FEMALE'.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP b.
      IF rb_1 EQ 'X'.
        p_cid = p_cid+0(1).
        IF p_cid NE 'M'.
          MESSAGE e020(z50871msg) WITH 'The id should start with "M" '.
         EXIT.
        ENDIF.
      ELSE.
        p_cid = p_cid+0(1).
        IF p_cid NE 'F'.
          MESSAGE e020(z50871msg) WITH 'The id should start with "F" '.
          EXIT.
        ENDIF.
        ENDIF.
    Regards
    sandeep.

    At selection-screen on FIELD
              Will give work like: If given input is wrong then it will give the Error message and all other fields will be diasable except the entered wrong on At selection-screen on FIELD.
    until you give the right input it won't go for next At Selection-screen On FILED.
    If you Don't want to disable other fields Use ONLY AT SELECTION-SCREEN.
    Regards,
    Umashankar

  • Regarding At selection-screen on radiobutton

    Hi..
    I need sample code on AT SELECTION-SCREEN ON RADIOBUTTON.
    thanx and regards
    Sandeep.

    Hi,
    Just copy paste this code and run it,
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
    R2 RADIOBUTTON GROUP RAD1,
    R3 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
    R5 RADIOBUTTON GROUP RAD2,
    R6 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF R1 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
    IF R4 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    note: after selecting the choices press F8 and test.
    hope this helps.

  • Enable a field in selection screen using radiobuttons

    Hi gurus,
    I am having 2 radio buttons in a group.
    If I click on the second radio button a field for path should appear i.e enabled or else the field should be in disable mode if it is first radio button.
    Please send me the code.
    promise to reward
    Mac

    Hi
      Try this code
    tables ltak.
    parameters :rad_tc radiobutton group rad1 default 'X' user-command ucom,
                rad_pr radiobutton group rad1 .
    selection-screen begin of block blk1 with frame.
    selection-screen begin of line.
    selection-screen comment 1(20) text-001.
    parameters : p_tanum like ltak-tanum modif id abc.
    parameters : p_tapos like ltap-tapos modif id abc.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text-002.
    parameters : p_user like sy-uname modif id abc.
    selection-screen end of line.
    selection-screen end of block blk1.
    selection-screen begin of block blk3 with frame.
    selection-screen comment 1(20) text-003.
    select-options : s_tanum for ltak-tanum modif id cda.
    parameters : zp_user like sy-uname modif id cda.
    selection-screen end of block blk3.
    at selection-screen output.
      loop at screen.
        if rad_tc = 'X' and screen-group1 = 'CDA'.
          screen-input = '0'.
          modify screen.
        endif.
        if rad_pr = 'X' and screen-group1 = 'ABC'.
          screen-input = '0'.
          modify screen.
        endif.
      endloop.
    If your query is solved kindly close the thread and award points
    cheers
    Shafiq

  • Selection screen value not assigning to the value when executed for the first time

    Hi ,
    Im My program at selection screen there are company code, vendor account and open items at key date(takes system date as default value).
    Facing problem at open items at key date - Open key date parameter is taken from LDB - KDF.
    First time when I am executing the program it is taking system date value in the selection screen variable even though I have given the different date.
    This problem is only when I execute for first time or press enter without giving company code.
    Can any one please help us to come out of this problem.
    Regards
    Sri Bhargavi

    HI,
         you can use the Event as AT SELECTION-SCREEN

  • How to catch a switching of radiobutton in "AT SELECTION-SCREEN"

    Hi,
    I have a selection screen with 2 radiobuttons in group 001.
    I need to perform some code when I change a status of particular radiobutton (checked - unchecked).
    I have a code in AT SELECTION SCREEN ON RADIOBUTTON GROUP 001 but this code is not executed on changing a status of particular radiobutton.
    Any help is appreciated.
    Thank you.
    Marian

    Check the sample code.
    REPORT  ypra_sample56.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETER: p_r1 RADIOBUTTON GROUP rg1 USER-COMMAND vend DEFAULT 'X',
               p_r2 RADIOBUTTON GROUP rg1,
               p_r3 RADIOBUTTON GROUP rg1.
    SELECTION-SCREEN END OF BLOCK a1.
    SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-002.
    PARAMETER: p_c1 TYPE c AS CHECKBOX,
               p_c2 TYPE c AS CHECKBOX,
               p_c3 TYPE c AS CHECKBOX,
               p_c4 TYPE c AS CHECKBOX,
               p_c5 TYPE c AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK a2.
               INITIALIZATION
    INITIALIZATION.
      PERFORM enable_fields.
               AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      PERFORM sel_screen_output.
               START OF SELECTION
    START-OF-SELECTION.
      DATA: ws_data TYPE tarifnr.
      ws_data  =  'ZPNGT_EM1'.
      IF ws_data CA '1' OR ws_data CA '2' .
        WRITE:/ ws_data.
      ENDIF.
    *&      Form  sel_screen_output
          Selection screen Output
    FORM sel_screen_output.
      IF p_r1 EQ 'X' OR p_r2 EQ 'X'.
        PERFORM enable_fields.
      ENDIF.
      IF p_r3 EQ 'X'.
        LOOP AT SCREEN.
          IF screen-name EQ 'P_C4' OR screen-name = 'P_C5'.
            screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sel_screen_output
    *&      Form  enable_fields
          enable fields in selection screen
    FORM enable_fields .
      IF p_r1 EQ 'X' OR p_r2 EQ 'X'.
        LOOP AT SCREEN.
          IF screen-name EQ 'P_C4' OR screen-name EQ 'P_C5'.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " disable_fields
    Regards,
    Prakash.

  • Reg : Selection Screen For PNP LDB

    Hi All,
    I am having problem in selection screen of logical database PNP..  I am attaching the screenshot of the screen which I am using.
    [https://www.2big2send.com/collect/861452b5d77254eea4fa17cec4842d63]
    Actually.. I created 3 radio buttons down in the screen.. i.e. Delta, delta for X date, full file.
    If the user click on Delta radio button then he can only select today radio button.. If he select others than.. the error message should come.. Can anyone help me.. coz.. I dont know.. which event is triggering if the user select other than today radio button of the PNP screen.
    I put break points on the AT SELECTION SCREEN and AT SELECTION SCREEN OUTPUT.
    But, none of the event is triggering.. Can anyone help me regarding this.
    Thanks,
    Regards,
    Jhings.

    Hi...
    Thanks for the reply.. I did this also..
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP $zb2.
      BREAK-POINT.
    $zb2 is the group name of the radio button which is there in PNP logical database selection screen..
    Same problem again.. this event is not triggering also..
    Regards,
    Jhings

  • Is it possible to have two at selection-screen events in a program

    Hi all,
         I have a selection screen wherein i am using i have 5 radiobuttons and 3 select-options and a parameter. I am trying to use two at selection-screen events
    1) at selection-screen on radiobutton group rad1.
    2) AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_STATUS.
    the second event is not getting triggered.
    I have to get certain values for the parameter p_status based on the radiobutton selected from an internal table(the field doesn't belong to any dictionary table i am filling an itab with some values based on the radiobutton selected) pls help. its urgent.
    Regards
    Tharanath

    Hi
    TYPES : BEGIN OF ST_OBJID_SH,
             OTYPE TYPE HRP1000-OTYPE,
             OBJID TYPE HRP1000-OBJID,
            END OF ST_OBJID_SH.
    DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
    DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
    IF S_OBJID IS NOT INITIAL.
        SELECT OTYPE OBJID FROM HRP1000
                     INTO TABLE IT_OBJID_SH
                     WHERE OTYPE = 'D'.
    IF SY-SUBRC EQ 0.
    SEARCH HELP FOR QUALIFICATION.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
                 DDIC_STRUCTURE         = ' '
            RETFIELD               =  'OBJID'
                 PVALKEY                = ' '
           DYNPPROG               = SY-REPID
           DYNPNR                 = SY-DYNNR
           DYNPROFIELD            = 'S_OBJID'
                 STEPL                  = 0
                 WINDOW_TITLE           =
                 VALUE                  = ' '
           VALUE_ORG              = 'S'
                 MULTIPLE_CHOICE        = ' '
                 DISPLAY                = ' '
                 CALLBACK_PROGRAM       = ' '
                 CALLBACK_FORM          = ' '
                 MARK_TAB               =
               IMPORTING
                 USER_RESET             =
          TABLES
            VALUE_TAB              =  IT_OBJID_SH
                 FIELD_TAB              =
                 RETURN_TAB             = RETURN_TAB
                 DYNPFLD_MAPPING        =
               EXCEPTIONS
                 PARAMETER_ERROR        = 1
                 NO_VALUES_FOUND        = 2
                 OTHERS                 = 3
        IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    Use in this way it will defently triggers
    <b>REward if usefull</b>

  • AT SELECTION-SCREEN - Urgent

    Could anybody tell me what does the event( AT SELECTION-SCREEN ) only do ? I am asking only about AT SELECTION-SCREEN
                                                           Regards,
                                                           SAURAV  LAHIRY

    hI,
    At selection-screen is the event of a report program in which we have to validate the selection screen fields.
    SELECTION SCREEN
    Selection screens are special screens that are defined with the help of ABAP statements. As programmers do not have access to the flow logic of selection screens, they cannot define dialog modules for selection screens. The ABAP runtime environment fully controls the processing flow of selection screens. To allow programmers to modify the selection screen before it is called (PBO) and react to user actions on the selection screen (PAI), the ABAP runtime environment generates a number of special selection screen events before the selection screen is displayed and after the user has executed actions on the selection screen
    AT SELECTION-SCREEN OUTPUT
    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
    Example
    SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    CHECK SCREEN-GROUP1 = 'XYZ'.
    SCREEN-INTENSIFIED = '1'.
    MODIFY SCREEN.
    ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST
    The event is triggered when the user calls the F4 help for the field field. If no corresponding event block has been defined, no possible values help or values list from the Dictionary is displayed. If a corresponding event block exists, it takes precedence over the default possible values help mechanism. It is then up to the programmer to ensure in the event block that an appropriate list of values is displayed, and that the user can choose a value from it.
    No event block AT SELECTION-SCREEN ON VALUE-REQUEST can be created for input fields on the selection screen that are declared within the logical database used. You cannot override the input help mechanism of the logical database within the executable program. You can define separate help within the logical database program using the VALUE-REQUEST option in the PARAMETERS and SELECT-OPTIONSstatements.
    Example
    INCLUDE DBXYZSEL
    PARAMETERS PL_TYPE LIKE SAPLANE-PLANETYPE VALUE-REQUEST.
    REPORT SAPDBXYZ DEFINING DATABASE XYZ.
    TABLES SAPLANE.
    FORM PL_TYPE_VAL.
    CALL FUNCTION ...
    ENDFORM.
    AT SELECTION-SCREEN ON HELP-REQUEST
    If the data type of an input field declared in an executable program is defined in the ABAP Dictionary, the documentation of the underlying data element is automatically displayed if the user positions the cursor in that field and presses F1. To create help for input fields that have no Dictionary reference, or to override the help normally linked to the field, you can create an event block for the event
    AT SELECTION-SCREEN ON HELP-REQUEST FOR <field>
    The event is triggered when the user calls the F1 help for the field <field>. If no corresponding event block has been defined, the help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default help mechanism. It is then up to the programmer to ensure that appropriate help is displayed.
    You cannot declare the event block AT SELECTION-SCREEN ON HELP-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the help mechanism of a logical database within the program. You can define separate help within the logical database program using the HELP-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.
    REPORT SELECTION_SCREEN_F1_DEMO.
    PARAMETERS: P_CARR_1 TYPE S_CARR_ID,
    P_CARR_2 TYPE S_CARR_ID.
    AT SELECTION-SCREEN ON HELP-REQUEST FOR P_CARR_2.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 60 10.
    This program declares a selection screen with two parameters that both refer to the data element S_CARR_ID in the ABAP Dictionary. The documentation from the ABAP Dictionary is used for P_CARR_1, and a help screen 100 is called for P_CARR_2. The help screen is defined in the Screen Painter as a modal dialog box with next screen 0. It contains the help text defined as help texts. The screen does not require any flow logic.
    AT SELECTION-SCREEN ON field
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON field
    event is triggered. The input field field can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.
    Example:
    REPORT event_demo.
    NODES spfli.
    AT SELECTION-SCREEN ON city_fr.
    IF carrid-low EQ 'AA' AND city_fr NE 'NEW YORK'.
    MESSAGE e010(hb).
    ENDIF.
    If the user enters “AA” in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city.
    AT SELECTION-SCREEN ON RADIOBUTTON
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi>
    is triggered when the contents of all of the fields in a radio button group are passed from the selection screen to the ABAP program. To define a radio button group <radi>, use the addition RADIOBUTTON GROUP <radi> in the corresponding PARAMETERS statements. This event block allows you to check the whole group. If an error message occurs within this event block, the radio button group is made ready for input again on the selection screen. The individual fields of radio button groups do not trigger the event AT SELECTION-SCREEN ON <field>.
    REPORT EVENT_DEMO.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
    R2 RADIOBUTTON GROUP RAD1,
    R3 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
    R5 RADIOBUTTON GROUP RAD2,
    R6 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF R1 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
    IF R4 = 'X'.
    MESSAGE W040(HB).
    ENDIF.
    If the user does not change one of the radio button groups, a warning is displayed.
    AT SELECTION-SCREEN ON BLOCK
    In the PAI event of the selection screen, the event
    AT SELECTION-SCREEN ON BLOCK <block>
    is triggered when the contents of all of the fields in a block are passed from the selection screen to the ABAP program. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK <block> and SELECTION-SCREEN END OF BLOCK <block>. You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block, the fields in the block are made ready for input again on the selection screen.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Want to trigger at selection screen on 'X'  using mouse click event.

    I've designed a report which has two radiobuttons i would to like change the selection screen depends on the selection of the button as of now i'm selecting the button and hitting enter so that at selection screen on radiobutton group triggers.but for more user friendly I would like trigger as soon as i click on the button. Is it possible to do this?
    cheers
    Anand

    Hi,
    all the selection screen elements which u want to be appearing on the screen during one radio button should be declared as:
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-001.
    *PARAMETERS:      rb_img    RADIOBUTTON GROUP rad1.
    PARAMETERS:      p_from    like bkpf-bldat modif id gr2,
                     p_to      like bkpf-bldat modif id gr2.
    SELECT-OPTIONS:  s_arobj  FOR   toa01-ar_object modif id gr2.
    SELECTION-SCREEN END OF BLOCK b_2.
    SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-001.
    *PARAMETERS:      rb_invo   RADIOBUTTON GROUP rad1.
    SELECT-OPTIONS:  s_bukrs   FOR bkpf-bukrs modif id gr1,
                     s_belnr   FOR bkpf-belnr modif id gr1,
                     s_gjahr   FOR bkpf-gjahr modif id gr1,
    SELECTION-SCREEN END OF BLOCK b_3.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'GR1'.  
          IF RB_INVO  = SPACE.
            SCREEN-ACTIVE = 0.
          ELSE.
            SCREEN-ACTIVE = 1.
          ENDIF.
          MODIFY SCREEN.
        ELSEIF SCREEN-GROUP1 = 'GR2'.
          IF RB_INVO  = C_X.
            SCREEN-ACTIVE = 0.
          ELSE.
            SCREEN-ACTIVE = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Hope this helps you.
    Regards,
    Anjali

  • 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

  • Problem in calling a selection-screen

    Hi Friends,
        Please see the code below.
    when r_rbr = 'X', I'm calling sel screen 100.
    when r_cvr = 'X', I'm calling selection screen 200.
    Now the problem is that when I call screen 100 or 200 & press BACK button, even then also it goes to start of selection.Please help.
    AT SELECTION-SCREEN ON RADIOBUTTON  GROUP r1.
      IF g_flag IS INITIAL.
        IF r_rbr = c_x.
    *BREAK-POINT.
          CALL SELECTION-SCREEN 100.
          g_flag  = 'X'.
        ELSEIF r_cvr = c_x.
          CALL SELECTION-SCREEN 200.
          g_flag  = 'X'.
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
    fetch data from data base tables
      IF r_rbr = c_x
       AND g_flag NE 'X'.
        PERFORM fetch_data.
        PERFORM data_consolidate.
      ENDIF.
      IF r_cvr = c_x.
    AND g_flag NE 'X'.
        PERFORM fetch_data1.
      ENDIF.

    Hi,
    Do it this way...
    Tables : SSCRFIELDS.  " Added
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP r1.
    IF g_flag IS INITIAL.
    IF r_rbr = c_x.
    *BREAK-POINT.
    CALL SELECTION-SCREEN 100.
    g_flag = 'X'.
    clear sscrfields-ucomm.      " Added line
    ELSEIF r_cvr = c_x.
    CALL SELECTION-SCREEN 200.
    g_flag = 'X'.
    clear sscrfields-ucomm.  " Added line
    ENDIF.
    ENDIF.
    START-OF-SELECTION.
    * fetch data from data base tables
    IF r_rbr = c_x
    AND g_flag NE 'X'.
    PERFORM fetch_data.
    PERFORM data_consolidate.
    ENDIF.
    IF r_cvr = c_x.
    * AND g_flag NE 'X'.
    PERFORM fetch_data1.
    ENDIF.
    Please let me know if this does not work
    Regards,
    Siddarth

  • Validations at selection-screen

    hi ,
    how to do validations at selection-screen?
    with regards
    always learner
    points will be rewarded if useful

    Hi Buddy
      Its good to learn alwasys . Here are some progarms which are useful in selection- screen.
    Dont forget to reward points.
    at selection-screen.
    select LIFNR
           from LFB1
           into table
           where lifnr in s_lifnr.
    if sy-subrc ne 0.
    message e888(sabapdocu) with 'no number found'.
    endif.
    in this way u can write the select query.
    selection-screen begin of block b1.
    parameters: p_datum1 type sy-datum,
    p_datum2 type sy-datum.
    selection-screen end of block b1.
    at selection-screen on block b1.
    if p_datum1 is initial
    and p_datum2 is initial.
    message e001(00) with 'Enter at least one date'.
    endif.
    PARAMETERS: TEST1(10) MODIF ID SC1,
                TEST2(10) MODIF ID SC2,
                TEST3(10) MODIF ID SC1,
                TEST4(10) MODIF ID SC2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'SC1'.
        SCREEN-INTENSIFIED = '1'.
        MODIFY SCREEN.
        CONTINUE.
      ENDIF.
      IF SCREEN-GROUP1 = 'SC2'.
        SCREEN-INTENSIFIED = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
      PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
                  R2 RADIOBUTTON GROUP RAD1,
                  R3 RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
      PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
                  R5 RADIOBUTTON GROUP RAD2,
                  R6 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
      IF R1 = 'X'.
        MESSAGE W040(HB).
      ENDIF.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
      IF R4 = 'X'.
        MESSAGE W040(HB).
      ENDIF.

  • SELECTION-SCREEN problem

    [Background:]
    (1)There are two parameters in a radio button group.
        One is P_SCREEN,it means display report on screen
       and another is P_FILE,it means output report into a file.
    (2)There is a parameter P_NTFILE, use it to indicate output file path.
    [Target:]
    (1)After the selection-screen built,
       If the P_FILE is checked,P_NTFILE should be enable.
       If the P_SCREEN is checked,P_NTFILE should be disable.
    [Code:]
    Parameter in Block2
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: P_SCREEN RADIOBUTTON GROUP R1. " Screen output
    SELECTION-SCREEN COMMENT 04(21) TEXT-001.
    SELECTION-SCREEN POSITION 32.
    PARAMETERS: P_FILE RADIOBUTTON GROUP R1. " NTFILE output
    SELECTION-SCREEN COMMENT 35(17) TEXT-002.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    Parameter in Block3
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME.
    PARAMETERS: P_NTFILE(45) TYPE C LOWER CASE OBLIGATORY MODIF ID SC1.
    P_PCFILE      LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END   OF BLOCK B3.
    *&      AT SELECTION-SCREE
    AT SELECTION-SCREEN.
      IF P_SCREEN = 'X'.
        FLAG = 0.
      ENDIF.
      IF P_FILE = 'X'.
        FLAG = 1.
      ENDIF.
    *&      AT SELECTION-SCREE ON <FIELD>
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP R1.
      IF P_SCREEN = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'SC1'.
            SCREEN-INPUT = FLAG.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF P_FILE = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'SC1'.
            SCREEN-INPUT = FLAG.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    [Problem:]
    P_NTFILE can not refresh between enable and disable status.
    Anyone can help me?

    *& Report  Z_JAGANOBJECT                                               *
    REPORT  Z_JAGANOBJECT line-count 0(1)                          .
    Tables sscrfields.
    *--parameters--
            SELECTION-SCREEN BEGIN OF BLOCK RB1 WITH FRAME TITLE new.
            selection-screen :skip 2.
                PARAMETERS : cmp_name(10) type c,
                             imp_code(5) type n,
                             exp_cmp(10) TYPE c,
                             Exp_mtrl(10) TYPE c.
    ------------------------radi button---------------------
               SELECTION-SCREEN BEGIN OF BLOCK RB WITH FRAME TITLE text.
               selection-screen: skip 1.
                 PARAMETERS : Import RADIOBUTTON GROUP RB user-command usr,
                              Export RADIOBUTTON GROUP RB DEFAULT 'X'.
               SELECTION-SCREEN END OF BLOCK RB.
               SELECTION-SCREEN END OF BLOCK RB1.
    *--push button--
    SELECTION-SCREEN PUSHBUTTON /40(20) SAVE USER-COMMAND STORE.
    DATA : FLAG TYPE I.
    *--internal tables--
    data :    begin of itab occurs 0,
                 cmp_name(10) type c,
                 imp_code(5) type n,
              end of itab.
    data :    begin of itab1 occurs 0,
                 exp_cmp(10) TYPE c,
                 Exp_mtrl(10) TYPE c,
              end of itab1.
    *--initalisaton--
    INITIALIZATION.
    save = 'store'.
    text = ' Type '.
    new = ' Import- Export details'.
    *--selection screen--
    AT SELECTION-SCREEN.
          case SSCRFIELDS-ucomm.
               when 'STORE'.
               FLAG = '1'.
                    if import = 'X'.
                       itab-cmp_name = cmp_name.
                       itab-imp_code = imp_code.
                append itab.
                clear itab.
                endif.
                    if export = 'X'.
                       itab1-exp_cmp = exp_cmp.
                       itab1-Exp_mtrl = Exp_mtrl.
               append itab1.
               clear itab1.
               endif.
               ENDcase.
    *--selection screen output--
    AT SELECTION-SCREEN OUTPUT.
      IF export = 'X'.
       LOOP AT SCREEN.
          IF SCREEN-NAME = 'CMP_NAME' OR  SCREEN-NAME = 'IMP_CODE'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
       elseIF import  = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'EXP_CMP' OR SCREEN-NAME = 'EXP_MTRL'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    end-of-selection.
    LOOP AT ITAB.
    WRITE : /10 itab-cmp_name, 30 itab-imp_code.
    ENDLOOP.
    LOOP AT ITAB1.
    WRITE : /10 itab1-exp_cmp,50 itab1-exp_mtrl.
    ENDLOOP.
    hope its useful,
    reward points if its useful
    regards
    vijay

  • Display Output on the Selection-screen

    Hi all ! Could anybody tell me to how to display the name of the vendor/customer next to the input box on the selection screen area ? e.g. As soon as one presses the enter key after entering the vendor code on 'XK03' transaction screen, the name of the respective vendor is shown right next to the vendor code input box on the selection screen area.

    Hi,
    In AT-selection screen event write the code for getting the the Customer/vendor Name and display it on the screen.
    In-order for the Radiobutton selection process to initiate the 'AT selection-screen' event you need to add the 'USER_COMMAND' option to the parameter declaration. See code below.
    *Code used to Initiate the 'AT selection-screen' EVENT from radiobuttons.
    selection-screen begin of block group with frame title text-s04.
    parameters: p_sel1 type c radiobutton group sel user-command upd.
    parameters: p_sel2 type c radiobutton group sel.
    parameters: p_sel3 type c radiobutton group sel.
    selection-screen end of block group.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
      IF  p_sel1 = 'X'.
        Write select query to get teh customer/vendor name and display it.
      ENDIF.
    You can use LFA1 or KNA1 to get vendor/customer name

Maybe you are looking for

  • What to Do When Your iPad is Not Charging?

    When you first bought your iPad, did you plug it into your PC and become frustrated when you discovered that it wouldn’t take a charge? Were you disappointed to discover that the iPad doesn’t charge through PCs and you have to plug it into the wall t

  • Error while creating document in cv01n

    In cv01n while attaching excel,word etc.file,at the time of saving error massege given is document can not change.Please provide me solution

  • I can't view my iTunes purchases!!!

    I recently attempted to sync iPad 2 to my iMac.  When I started the sync, it seemed like the operation was taking longer than it should, so stopped iTunes, disconnected the iPad and restarted the Mac.   When I reconnected my iPad,  all of the data wa

  • Batch cost in billing

    Hi all, How can i make the cost (VPRS) in the bill to be the current cost of the batch. Thanks

  • How can I disable the mouse pad? I prefer to use a mouse.

    The pad is particularly a nuisance when I try to type, perhps I catch it with my wrists, I don't know. I'd rather use a mouse.