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.

Similar Messages

  • Help needed in selection screen - Urgent

    Hi Experts,
    I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters.
    e.g : if radiobutton1 is selected, njo activation needed,
           if radiobutton2 is selected, activate selection screen parameter p_one,
           if radiobutton3 is selected, activate selection screen parameter p_two.
    All three radiobuttons are attached to the same radio button group.
    I have assigned the parameters p_one, p_two, p_three to MODIF ID as follows.
    p_one - NULL
    p_two - t01
    p_three - t02.
    on the selection of a radio button I want the corresponding parameter to get activated.
    please help me.
    Regards,
    Arul jothi A.

    hi
    jothi
    AT SELECTION-SCREEN OUTPUT.                                      
      CASE SY-TCODE.                                                 
        WHEN 'ZEDI6'.                                                
          LOOP AT SCREEN.                                             
            CASE SCREEN-GROUP4.                                      
              WHEN '001'.                  "Sales order select       
                SCREEN-ACTIVE = '1'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '002'.                  "Delivery select          
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                        
              WHEN '003'.                  "Invoice select           
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '004'.                  "PO Select                
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
    regards
    praveen

  • Detailed pop up screen in selection screen - urgent

    hai experts,
    how can we give a detailed pop up screen in selection screen.
    My requirement is,
    To display Details of spool Nos taken for current porogram to take print out from end user.
    from OWN SPOOL REQUEST displays all other programs........
    can any one give a right solution?
    reward will avail for use full answer.
    thanks in advance.
    regards,
    jai.m

    Hi Jai
    May be you can use this FM POPUP_WITH_TABLE_DISPLAY_OK with the list of spool number populated into internal table.
    If you are particulary looking for selection screen, then decalre your selection screen as below
    Selection-screen begin of screen 9000.
    Selection-screen end of screen.
    Then use the statement Call selection-screen 9000 starting at x y.
    Hope this helps !
    Regards
    Ranganath

  • Restricting values F4 help in selection screen-Urgent

    Hi,
    can anyone pls tell how can I ristrict the values for search help in any field in selection screen.
    please tell me the way to hide some values in F4 help in selection screen so that user can not see those data for selection.
    Regards

    i think u can not hide the data.........
    create own f4 help............restrict the data and then pass it the f4 internal table....
    fro exp;;;;;
    types : begin of ty_tab,
              post_code1 like adrc-post_code1,
             end of ty_tab.
      data : it_tab type ty_tab occurs 0.
      data : lt_field type table of dfies,
             lw_field type dfies.
      select post_code1 from adrc into corresponding fields of table it_tab.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
          exporting
            retfield        = 'POST_CODE1'
            dynpprog        = sy-repid
            dynpnr          = sy-dynnr
            dynprofield     = 'LI_LIST1'
            value_org       = 'S'
          tables
            value_tab       = it_tab
         field_tab       = lt_field
          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.
    Regards
    Anbu

  • Code for selection screen,  urgent

    Hi Everyone,
      I need code for selection screen.
      I have four radio buttons, p1, p2,p3,p4(assume)
    If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
    Regards,
    Nagaraju

    Hi,
    REPORT ZTEST222 .
    PARAMETERS : p_add  RADIOBUTTON GROUP radi
                             USER-COMMAND radio MODIF ID MOD,
      p_disp RADIOBUTTON GROUP radi DEFAULT 'X'  MODIF ID pod,
      p_chng RADIOBUTTON GROUP radi MODIF ID rad,
      p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
    SELECT-OPTIONS : s_idn    FOR  vendor   MODIF ID mod,
                                   s_pcode  FOR ws_c_pcode MODIF ID pod.
    PARAMETERS:  p_plant    LIKE  zaw_pol_plan-plant   MODIF ID rad,
                 p_zzvend   LIKE  zaw_pol_plan-zzvendor   MODIF ID cod.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_add EQ 'X'.
          IF screen-group1 EQ 'MOD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_disp EQ 'X'.
          IF screen-group1 EQ 'POD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_chng EQ 'X'.
          IF screen-group1 EQ 'RAD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_er_log EQ 'X'.
          IF screen-group1 EQ 'COD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    Pls. reward if useful
        ENDLOOP.
    Pls. reward if useful

  • Infoset query ('At Selection-Screen') - Urgent

    Hi All,
    The below code for selection criteria 'At Selection-Screen' for an infoset-query works ok, but i find 2 problems, can someone help.
    1. When user presses F4, i wanted the output to display
       SG Singapore
       IN   India
       But at the moment it just displays
       SG
       IN
    2. If the user enters any other value apart from the above 2 i do not want the query to execute, instead show something like enter a valid value. But at the moment if i enter another country code manually just to test eg: US, the query runs with this selection which i do not want.
    Hope my problem is clear, await inputs.
    Code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR VEN_CTY-LOW.
            IT_LAND-VEN_CTY = 'SG'.
            IT_LAND-LTEXT   = 'Singapore'.
              APPEND IT_LAND.
            IT_LAND-VEN_CTY = 'IN'.
            IT_LAND-LTEXT   = 'India'.
              APPEND IT_LAND.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'VEN_CTY'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2.
    IF SY-SUBRC = 0.
        READ TABLE IT_LAND INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO VEN_CTY-LOW.
    ENDIF.

    Hi vivek,
    for the 2nd problem,
    create a range for ingapor and india say r_range.
    and
    r_range will have two values say india, singapore.
    loop at VEN_CTY.
    if ven_cty not in r_range.
    display error message.
    exit.
    endloop.
    try this and let me know.
    reward if helpful.
    thanks .
    ranya

  • Selection screen urgent

    Hi .
    Would  you please help me about define a selection with this rules ..On selection screen  select-options date for sy-datum .
    if radio button A selected I want to refresh date's screen only year and this selection will be in terms of whole year .
    if radio button B selected I want to refresh date's screen only month and year (01.2006 - 04-2006 ) .and make this selection available 01.01.2006 - 31.04.2006.User do not have to see days .
    if radio button C selected I want to refres date's screen as listbox 1.period 2. period 3. period . And 1 . period is selected make available 01.01.2006 .31.04.2006.
    2.is selected  01.05.2006. 31.08.2006.
    3. is selected 01.09.2006 31.12.2006.
    Thanks in advance ..

    Append a function code to your radio-button.
    And screen-group to you optional parameters/select-options
    in your SELECTION-SCREEN OUPUT (PBO)
    set the desired parameter active or inactive depending on with button is on
    LOOP AT SCREEN.
    IF screen-group1 = c_group1.
    if button1 = 'X'.
    screen-active = 1.
    else
    screen-active = 0.
    endif.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Regards

  • Regarding Infoset (At Selection-Screen) - Urgent

    Hi All,
    In Infoset 'Selections' tab, i have defined a selection parameter 'country', i want the user to have options to input only 5 country codes. The country code i am reading from LFA1-LAND1 as this relates to Vendor.
    I would like to know, what code should i enter in 'At Selection-Screen' to ensure that, when the user press F4 they only see these 5 country code + the description?
    Hope my problem is clear, await inputs.
    Vivek

    Hi Vivek,
    Here i am trying to give you the code again. Please try this code in your program.
    SELECT-OPTIONS: land1  FOR lfa1_land1.
    DATA: BEGIN OF IT_LAND OCCURS 0,
              LAND1  LIKE LFA1_LAND1,
              LTEXT(15)  TYPE C,
              END OF IT_LAND.
    IT_LAND-LAND1 = 'IN'.
    IT_LAND-LTEXT = 'INDIA'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'DE'.
    IT_LAND-LTEXT = 'GERMANY'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'AF'.
    IT_LAND-LTEXT = 'AFGHANISTAN'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'AT'.
    IT_LAND-LTEXT = 'Austria'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'AD'.
    IT_LAND-LTEXT = 'Andorra'.
    APPEND IT_LAND1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR LAND1-LOW.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'LAND1'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO LAND1-LOW.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR LAND1-HIGH.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'LAND1'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO LAND1-HIGH.
      ENDIF.

  • 0FISCPER - not populates value in the look up - selection screen -(urgent)

    Hi all,
    Fiscal year/period ( 0FISPER )is set to user input veriable that to appears in the selection screen, when we click on the Lookup for the Fiscal Year/period - don’t get the list of possible Periods to choose from.
    its an Master data infoprovider and fiscal period fetching the data from T009C. Hope it might be the reason not appear the possible periods in lookup.
    How to get the fiscal yesr periods in look up?
    Even I am not able to edit the Master data Tab of the Onfoobject in chnage mode.
    what could be reson ?

    Hi,
    what type of search help is this.
    If uou created this search help through se11 then assign values to the importing & exporting fields in the down side of the screen.
    With Regards,
    Sumodh.P

  • Clearing Selection Screen (urgent)

    I have 4 radio buttons in my selection screen. First is selected by default. Now when 2nd will be selected, the contains of the screen fields will be cleared. I have tried with At selection screen output.
    Where the condition is
    if Rd2 = 'X".
    p1 = ' '.
    endif.
    but every time when the 2nd radio button is selected and entering data into screen fields, after  pressing enter all the screen gets cleared.
    Tell me some other options.........

    hi,
    try like this
    PARAMETERS:rad1 RADIOBUTTON GROUP rad1 USER-COMMAND rad,
               rad2 RADIOBUTTON GROUP rad1,
               rad3 RADIOBUTTON GROUP rad1,
               rad4 RADIOBUTTON GROUP rad1.
    PARAMETERS: mat LIKE mara-matnr DEFAULT '101'.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF rad2 = 'X'.
          IF screen-name = 'MAT'.
            screen-input = '1'.
            CLEAR mat.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    reward if usefull...

  • How to replace the values in variable selection Screen urgent plz

    Hi all,
    I am having a requirement. where the user need pass the value in the variable, Here v r having option like '1' and '2' which represent 'month' and 'ytd'.
    While selecting user view as 1,2 .Now my requirement is to replace the value 1=monthly and 2=ytd while the user passing the value to avoid the confusion.
    Is it possible if so plz let me know
    Regards

    Dear Venkat.
    You please try the following steps:
    1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
    2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
    3. Selcet the following options:
       Query Execution Filter Val. Selectn  -  'Only Posted Value for Navigation'
       Filter Value Repr. At Query Exec. -      'Selector Box Without Values'
    Please let me know if there is any more issue. Feel free to raise further concern
    Thnx,
    Sukdev K

  • Variable selection screen(urgent)

    Hi gurus ,
    can any plz help me in this regard.
    -- Given the inputs in the variable screen and executed and finally displayed the result area. that's fine.....
    But upon refresh iam getting  the same previous input values in the variable screen.
    -- Upon refresh we need blank(with no previous input values) in the variable screen.
    So how can i get this,plz help me
    Regards,
    Rambo.

    If you want blank input fields, you need to code your way out of it.
    If your users can accept a "#" sign, you can set this as the default value for your variables - but it wont work, if you use those variable values to derive values for other variables before the screen is processed, because "blank" is not a valid input...
    br
    jacob

  • How can i set dynamice for week on Selection screen..pls help me..Urgent

    Hi..All
    please Help me .. i am very  confused..
    i need to set a varient for week which is dynamic on selection screen.
    b) Week from current week to current week + 2. (<b>Dynamic selection)</b>how can i set dynamice for week on Selection screen,,
    how can i do this..i am alrady set dynamice variant for Date.. there is option for D.. but in case of week there is a no option.
    pls help me..urgent
    thamks in advance.
    mayukh

    Hi,
    I think the way out is use the dynamic select option while setting up the varinat and use sy-datum to sy-datum+9 which should essentially serve the purpose.
    While saving the variant, for that particular date field check the Selection variable checkbox, then Choose D
    option and then choose current days + or - option from there.
    Rgds,
    HR

  • Reading Text File from selection Screen and populating table (Urgent)

    Hi All,
    I have some requirment like i in my report i have to initial my Input feild from text file is it good to populate a internal table or range.
    I have three feild in a excel file that entry can more then 500
    data example
    Matnr Date             Day
    A1     10.07.2007    12
    B1     10.07.2007    10
    A1     19.07.2007    15
    C1     20.08.2007    30
    E1     11.09.2007    12
    This report for Price Protection claim.
    even u can help me out with proper table plz this is urgent.

    Hi..
    <b>parameters:</b>
      p_file(50) type c.
    <b>data:</b>
      begin of itab occurs 0,
         matnr type vbak-matnr,
         date type sy-datum,
         day(2) type n,
      end of itab.
    <b>at selection-screen on value-request for p_fname.</b>
      perform get_path.
    <b>start-of-selection.</b>
    <b>CALL FUNCTION 'GUI_UPLOAD'</b>
      <b>EXPORTING
        FILENAME                      =  p_fname
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'</b>
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
    <b>  TABLES
        DATA_TAB                      = itab</b>
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This Sub routine is used to get the file name
    *There are no interface parameters passed to this subroutine.
    FORM get_path .
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
       DEF_FILENAME            =  P_FNAME
      DEF_PATH               = ' '
      MASK                   = ' '
      MODE                   = ' '
      TITLE                  = ' '
    IMPORTING
       FILENAME                =  P_FNAME
      RC                     =
    EXCEPTIONS
       INV_WINSYS             = 1
       NO_BATCH               = 2
       SELECTION_CANCEL       = 3
       SELECTION_ERROR        = 4
       OTHERS                 = 5
    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.                    " get_path
    data:

  • Need help to disable input selection-screen - very urgent

    Hi SAP experts,
    I have a requirement where in I need to disable ( Grey out ) the input fileds on the selection screen .
    My problem is as I am using ABAP query I am not able to use any events ( AT SELECTION-SCREEN OUTPUT ).
    My selection screen looks like this
    MATERIAL NUMBER ( SELECT-OPTIONS)
    MATERIAL TYPE ( PARAMETERS )
    Now I want to add one more check box below the above fields on the selection-screen.When I click on the check-box,the MATERIAL NUMBER  must be greyed out and MATERIAL TYPE should remain the same.
    Please let me know the coding for the same. All answers would be rewarded.
    Thanks in Advance,
    Suresh.

    Hi,
    Check out these codes.
    1.
    TABLES : mara, makt.
    parameter: p_matnr type mara-matnr,
               p_maktx type makt-maktx.
    at selection-screen output.
    select single maktx
    from makt
    into p_maktx
    where matnr = p_matnr
    and spras = 'EN'.
    loop at screen.
      if screen-name = 'P_MAKTX'.
        screen-input = 0.
        modify screen.
      endif.
    endloop.
    2.
    TABLES : mara, makt.
    TYPES:BEGIN OF tp_maktx,
          maktx TYPE makt-maktx,
          END OF tp_maktx.
    DATA:t_maktx TYPE STANDARD TABLE OF tp_maktx,
         wa_maktx TYPE tp_maktx.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECT-OPTIONS: s_maktx FOR makt-maktx.
    INITIALIZATION.
      REFRESH s_maktx[].
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'S_MAKTX-LOW' or screen-name = 'S_MAKTX-HIGH'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
      REFRESH s_maktx[].
      if s_matnr[] is not initial.
      SELECT maktx FROM makt
      INTO TABLE t_maktx
      WHERE matnr IN s_matnr
      AND spras = 'EN'.
      endif.
      LOOP AT t_maktx INTO wa_maktx.
        s_maktx-low = wa_maktx-maktx.
        APPEND s_maktx.
        CLEAR:wa_maktx.
      ENDLOOP.
    3.
    TABLES : mara, makt.
    parameter p_cb1 type c as checkbox.
    parameter p_cb2 type c as checkbox.
    parameter p_cb3 type c as checkbox.
    initialization.
    loop at screen.
    if screen-name = 'P_CB3'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    at selection-screen output.
    *loop at screen.
    *if screen-name = 'P_CB3'.
    *screen-invisible = 1.
    *modify screen.
    *endif.
    *endloop.
    loop at screen.
    if p_cb1 = 'X'.
      if screen-name = 'P_CB2'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB3'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    if p_cb2 = 'X'.
      if screen-name = 'P_CB3'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB1'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    if p_cb3 = 'X'.
      if screen-name = 'P_CB1'.
      screen-invisible = 1.
      modify screen.
      endif.
      if screen-name = 'P_CB2'.
      screen-invisible = 0.
      modify screen.
      endif.
    endif.
    endloop.
    Reward if helpful..
    Regards.

Maybe you are looking for

  • VERY URGENT Help with istalling developer 9i

    i downloaded all the files from the web site and they are *.brk after i ran the *.bat file i created a *.exe file i tryed to run it and this an error that the file isn't vaild on win 32 application it's very urgent if you have any idea how to install

  • Error occurred backing up this iPhone (-37) error

    Hi tried upgrading my iPhone 3GS from 4.3.5 to ios5. Last night the sync failed as my pc crashed and today when I tried to update I received the -37 error.  Tried the backup a few times but received the same error. Can anyone help please?

  • Unable to import table in owb 9.2

    i am using warehouse builder 9.2 and database 9i R2 the source databse is also oracle 9i R2 when i create a source module to import the required tabe metadata i found that some table did not apper in the available objects i discovered that for those

  • Is it legal to use the apple logo for wallpaper design?

    Dear Applers, is it legal to use the Apple logo for my wallpaper which I design and create. I want to share this wallpaper on my website. The wallpaper are funny like others which already exists. For example a wallpaper where the Apple logo looks lik

  • Teclado y Trackpad congelados

    Al salir de reposo, ya no puedo escribir ni utilizar el trackpad, si funciona con mouse inalámbrico pero no puedo escribir hasta después de un tiempo. Mackbook air mid 2013 con yosemite