How to validate a select-option field on the selection- screen

Hi,
   I need to validate a selection-option field in the selection-screen.
Requirement is : i need to read each of customer number one by one and validateCan you please me in achieving this.
Best Regards
Mamatha.B

hi,
chk this sample code.
SELECT-OPTIONS : s_kunnr for kna1-kunnr.
AT SELECTION-SCREEN.
     if 'S_KUNNR-HIGH' = "condition
    "put your required validation here
     endif.
rgds
Anver
Message was edited by:
        Anversha s

Similar Messages

  • Collective search on the Select-options field on the selection screen

    Hello experts,
                       I have a Y program and a selection screen for it. I have to get the BKPF-BELNR in the search help list. Since the table is too bulky to get all the documents form it. I thought I might need a condition of company code for fetching the documents. I have company code on the selection screen, but if I press F4, on the BELNR, my select-options internal table for <b>company code</b> is remains initial. I think for F4 events the values doesn't get populated in the internal tables, not sure.
                       Can you tell me, how to get the company code entered on the selection screen, on the F4 event. Or If this doesn't work, will collective search help solve my problem? If yes, Please let me know, which function module I can use to add a collective search to my select-options on the selection screen.
    Thanks,
    Ganesh Khumse.
    Points will be rewarded!

    Hi
    do like this
    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.
    ***********SELECTION SCREEN DESIGN***********************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
    SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
    SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    **********END OF SELECTION SCREEN DESIGN*****************
    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.

  • Dialog programming - How to place a select-option field in a dialog screen

    Hi all,
    In Dialog Programming, How to place a select-option field in a dialog screen.
    Kindly give me some example code...
    Thanks,
    Jaffer Ali.S

    hi Ali,
    U can add select-options in ur module pool by using  SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN  command.
    check this link for reference.....
    http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
    Example Code :
    DATA : ok_code TYPE sy-ucomm.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
                p_rad2 RADIOBUTTON GROUP grp1,
                p_rad3 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr,
                    s_matkl FOR  mara-matkl,
                    s_mtart FOR  mara-mtart.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1010.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    CALL SCREEN 1010 .
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    SCREEN 100 ****************
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    <b>***** where sub_1010 is name of sub-screen area</b>
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_1010.
      MODULE user_command_0100.
    <<< REMOVED BY MODERATOR >>>
    Harimanjesh AN
    Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM

  • Disable the Select-options field in the viewcontainer

    Hi,
    I  have two select option fields(Date,Number) in a viewcontainer .
    Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
    Thanks in Advance.
    Regards,
    bala.

    Hi,
    I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
    I just had one select-option on my scr...but it can be done with two too...
    step1: 
    created three attributes at component level under the attribute tab ( as suggested by Thomas )
    ENABLE_PRI_SELECTOPTION type  WDY_BOOLEAN 
    M_HANDLER type ref to     IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS  type ref to     IWCI_WDR_SELECT_OPTIONS
    Note: all are with public check box checked....so that all your views can see these attributes
    I created a method at componenet controller leverl:  create_select_option....in this method i have following code:
    DATA:
      lt_range_table TYPE REF TO data,
    *  rt_range_table TYPE REF TO data,
      read_only TYPE abap_bool,
      typename TYPE string.
      DATA:
      lr_componentcontroller TYPE REF TO ig_componentcontroller,
      l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    * create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
    * create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table(
      i_typename = 'PERSNO' ).
    * add a new field to the selection
      wd_this->m_handler->add_selection_field(
      i_id = 'PERSNO'
    I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
    I_NO_INTERVALS = abap_true
      it_result = lt_range_table
      i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ).   <-----pls see here how i am controlling the read only property
    I assume you know this much...already....but i am just putting everything down....
    step2:
    in my view where i want to display the select-options....i added this code under my wddoinit method
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false.    <--pls see initially we want this field to be open
      lo_componentcontroller->create_select_option(
    step3: 
    i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
    under that button action method i added the following code:
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
       "<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
    "this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
    "which produces dump from system....
    lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
    i_id = 'PERSNO' ).
    "now call the same method which we created at component level to create the select_options...
    lo_componentcontroller->create_select_option(
    that is all....it works great for me.....let us know if still have any questions....
    Thanks...
    AS...

  • Select-option + ALV on the same screen

    hi,
    how can we can get Select-option + ALV on the same screen.
    Thanks,
    Gaurav

    hi gaurav,
    Use the following code...It works...
    TABLES: vbrk.
    *CONSTANTS
    CONSTANTS :
    c_x(1)        TYPE c VALUE 'X',
    c_zxto        TYPE vbak-auart VALUE 'ZXTO',
    c_e           TYPE spras VALUE 'E',
    c_000000      TYPE posnr VALUE '000000',
    c_ship_to     TYPE parvw VALUE 'WE'.      "Ship To Party
    Table Types
    TYPES: BEGIN OF ty_vbrk_vbrp,
    vbeln TYPE vbrk-vbeln,    "Billing doc
    posnr TYPE vbrp-posnr,    "Billing item
    aubel TYPE vbrp-aubel,    "Sales order
    waerk TYPE vbrk-waerk,    "Doc currency
    mvgr1 TYPE vbrp-mvgr1,    "Material group 1
    mvgr3 TYPE vbrp-mvgr3,    "Material group 3
    mvgr4 TYPE vbrp-mvgr4,    "Material group 4
    matnr TYPE vbrp-matnr,    "Material no
    ntgew TYPE vbrp-ntgew,    "Net wt
    gewei TYPE vbrp-gewei,    "Wt unit
    kzwi1 TYPE vbrp-kzwi1,                             "Subtotal 1
    kursk TYPE vbrp-kursk,    "Exchange rate
    END   OF ty_vbrk_vbrp.
    TYPES: BEGIN OF ty_data,
    land1 TYPE vbpa-land1,
    landx TYPE t005t-landx,
    mvgr3 TYPE vbrp-mvgr3,
    mvgr4 TYPE vbrp-mvgr4,
    bezei3 TYPE tvm3t-bezei,
    bezei4 TYPE tvm4t-bezei,
    ntgew_tea_bag TYPE vbrp-ntgew,
    ntgew_pkt_tea TYPE vbrp-ntgew,
    ntgew_bulk_tea TYPE vbrp-ntgew,
    kzwi1_tea_bag TYPE vbrp-kzwi1,    "Subtotal 1 Tea Bag
    kzwi1_pkt_tea TYPE vbrp-kzwi1,    "Subtotal 1 Pkt Tea
    kzwi1_bulk_tea TYPE vbrp-kzwi1,   "Subtotal 1 Bulk Tea
    ntgew_tot TYPE vbrp-ntgew,
    kzwi1_tot TYPE vbrp-kzwi1,
    line_color(4) TYPE c,  "For line color
    END OF ty_data.
    TYPES: BEGIN OF ty_vbpa,
    vbeln TYPE vbpa-vbeln,
    land1 TYPE vbpa-land1,
    END OF ty_vbpa.
    TYPES: BEGIN OF ty_t005t,
    land1 TYPE t005t-land1,
    landx TYPE t005t-landx,
    END OF ty_t005t.
    TYPES: BEGIN OF ty_tvm3t,
    mvgr3 TYPE tvm3-mvgr3,
    bezei TYPE tvm3t-bezei,
    END OF ty_tvm3t.
    TYPES: BEGIN OF ty_tvm4t,
    mvgr4 TYPE tvm4-mvgr4,
    bezei TYPE tvm4t-bezei,
    END OF ty_tvm4t.
    DATA: it_vbrk_vbrp TYPE STANDARD TABLE OF ty_vbrk_vbrp,
    wa_vbrk_vbrp TYPE ty_vbrk_vbrp,
    it_vbpa TYPE STANDARD TABLE OF ty_vbpa,
    wa_vbpa TYPE ty_vbpa,
    it_data TYPE STANDARD TABLE OF ty_data,
    wa_data TYPE ty_data,
    it_t005t TYPE STANDARD TABLE OF ty_t005t,
    wa_t005t TYPE ty_t005t,
    it_tvm3t TYPE STANDARD TABLE OF ty_tvm3t,
    wa_tvm3t TYPE ty_tvm3t,
    it_tvm4t TYPE STANDARD TABLE OF ty_tvm4t,
    wa_tvm4t TYPE ty_tvm4t.
    Global data for grand total
    DATA:
    w_tot_ntgew_tea_bag TYPE vbrp-ntgew,
    w_tot_ntgew_pkt_tea TYPE vbrp-ntgew,
    w_tot_ntgew_bulk_tea TYPE vbrp-ntgew,
    w_tot_ntgew_tot TYPE vbrp-ntgew,
    w_tot_kzwi1_tea_bag TYPE vbrp-kzwi1,
    w_tot_kzwi1_pkt_tea TYPE vbrp-kzwi1,
    w_tot_kzwi1_bulk_tea TYPE vbrp-kzwi1,
    w_tot_kzwi1_tot TYPE vbrp-kzwi1.
    Global data definitions for ALV
    DATA :
    ALV Grid container
    w_alv_container TYPE REF TO cl_gui_custom_container,
    ALV Grid
    w_alv_grid      TYPE REF TO cl_gui_alv_grid,
    w_layo          TYPE        lvc_s_layo,     "For layout
    wt_fieldcat     TYPE        lvc_t_fcat,     "For field catalog
    okcode          TYPE         okcode,        "OK Code
    w_to(2)         TYPE         c,
    w_title         TYPE        string.
    ---- START OF SELECTION SCREEN -
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    Billing Date
    SELECT-OPTIONS: s_fkdat FOR vbrk-fkdat MEMORY ID vf OBLIGATORY no intervals.
    SELECTION-SCREEN:SKIP 1.
    SELECTION-SCREEN: END OF BLOCK b1.
    ---- END OF SELECTION SCREEN -
    ----   EVENT START-OF-SELECTION  -
    START-OF-SELECTION.
    Get billing data from Delivery header(VBRK) and item (VBRP)
    PERFORM get_billing_data.
    Get ship-to country
    PERFORM get_ship_to_data.
    Get material group description 3
    PERFORM get_material_group_3.
    Get material group description 4
    PERFORM get_material_group_4.
    Form the ALV Grid title
    PERFORM form_title.
    Process data
    PERFORM process_data.
    Populate text descriptions
    PERFORM populate_description.
    ----   EVENT END-OF-SELECTION  -
    END-OF-SELECTION.
    Set the text to when date high is there
    IF NOT s_fkdat-high IS INITIAL.
    w_to = 'to'(c16).
    ENDIF.
    Call the scren 9000 for ALV Display
    CALL SCREEN 9000.
    *&      Form  get_billing_data
    Get billing data from Delivery header(VBRK) and item (VBRP)
    & store in internal table it_vbrk_vbrp
    FORM get_billing_data .
    REFRESH: it_vbrk_vbrp.
    Select Billing data by joining VBRK & VBRP and store in it_vbrk_vbrp
    SELECT a~vbeln
    b~posnr
    b~aubel
    a~waerk
    b~mvgr1
    b~mvgr3
    b~mvgr4
    b~matnr
    b~ntgew
    b~gewei
    b~kzwi1
    b~kursk
    FROM vbrk AS a INNER JOIN vbrp AS b
    ON avbeln = bvbeln
    INTO TABLE it_vbrk_vbrp
    WHERE a~fkdat IN s_fkdat
    Consider only non-deleted document
    AND fksto = space
    Billing doc type should be ZXTB
    AND fkart = 'ZXTB'
    AND pstyv = c_zxto.
    *IF sy-subrc <> 0.
    *MESSAGE i999(zttl) WITH 'No data is there'(m06).
    *LEAVE LIST-PROCESSING.
    *ENDIF.
    ENDFORM.                    " get_billing_data
    *&      Form  get_ship_to_data
    Get Ship-To party data
    FORM get_ship_to_data .
    DATA: l_it_vbpa TYPE STANDARD TABLE OF ty_vbpa.
    REFRESH: it_vbpa, it_t005t.
    IF NOT it_vbrk_vbrp[] IS INITIAL.
    SELECT vbeln
    land1
    FROM vbpa
    INTO TABLE it_vbpa
    FOR ALL ENTRIES IN it_vbrk_vbrp
    WHERE vbeln = it_vbrk_vbrp-aubel
    AND posnr = c_000000
    AND parvw = c_ship_to.
    IF sy-subrc <> 0.
    MESSAGE i999(zttl) WITH 'Exporter country not maintained'(m02).
    LEAVE LIST-PROCESSING.
    ELSE.
    SORT it_vbpa BY vbeln.
    Create an unique and sorted driver table
    l_it_vbpa[] = it_vbpa[].
    SORT l_it_vbpa BY land1.
    DELETE ADJACENT DUPLICATES FROM l_it_vbpa COMPARING land1.
    IF NOT l_it_vbpa[] IS INITIAL.
    Get the country description from T005t table
    SELECT land1
    landx
    FROM t005t
    INTO TABLE it_t005t
    FOR ALL ENTRIES IN l_it_vbpa
    WHERE spras = c_e
    AND  land1 = l_it_vbpa-land1.
    IF sy-subrc = 0.
    SORT it_t005t BY land1.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM.                    " get_ship_to_data
    *&      Form  get_material_group_3
    Get material group 3
    FORM get_material_group_3 .
    DATA: l_it_vbrk_vbrp TYPE STANDARD TABLE OF ty_vbrk_vbrp.
    REFRESH: it_tvm3t.
    Create an unique and sorted driver table
    l_it_vbrk_vbrp[] = it_vbrk_vbrp[].
    SORT l_it_vbrk_vbrp BY mvgr3.
    DELETE ADJACENT DUPLICATES FROM l_it_vbrk_vbrp COMPARING mvgr3.
    IF NOT l_it_vbrk_vbrp[] IS INITIAL.
    SELECT mvgr3
    bezei
    FROM tvm3t
    INTO TABLE it_tvm3t
    FOR ALL ENTRIES IN l_it_vbrk_vbrp
    WHERE mvgr3 = l_it_vbrk_vbrp-mvgr3.
    IF sy-subrc = 0.
    SORT it_tvm3t BY mvgr3.
    ENDIF.
    ENDIF.
    ENDFORM.                    " get_material_group_3
    *&      Form  get_material_group_4
    Get material group 4
    FORM get_material_group_4 .
    DATA: l_it_vbrk_vbrp TYPE STANDARD TABLE OF ty_vbrk_vbrp.
    REFRESH: it_tvm4t.
    Create an unique and sorted driver table
    l_it_vbrk_vbrp[] = it_vbrk_vbrp[].
    SORT l_it_vbrk_vbrp BY mvgr4.
    DELETE ADJACENT DUPLICATES FROM l_it_vbrk_vbrp COMPARING mvgr4.
    IF NOT l_it_vbrk_vbrp[] IS INITIAL.
    SELECT mvgr4
    bezei
    FROM tvm4t
    INTO TABLE it_tvm4t
         FOR ALL ENTRIES IN l_it_vbrk_vbrp
         WHERE mvgr4 = l_it_vbrk_vbrp-mvgr4.
         IF sy-subrc = 0.
           SORT it_tvm4t BY mvgr4.
         ENDIF.
       ENDIF.
    ENDFORM.                    " get_material_group_4
    *&      Form  process_data
    Process the data and do summation and populate final display table
    FORM process_data .
       LOOP AT it_vbrk_vbrp INTO wa_vbrk_vbrp.
         CLEAR: wa_data, wa_vbpa.
         READ TABLE it_vbpa INTO wa_vbpa WITH KEY
                                      vbeln = wa_vbrk_vbrp-aubel
                                      BINARY SEARCH.
         IF sy-subrc = 0.
           wa_data-land1 = wa_vbpa-land1.
         ENDIF.
         wa_data-mvgr3 = wa_vbrk_vbrp-mvgr3.
         wa_data-mvgr4 = wa_vbrk_vbrp-mvgr4.
    Do an unit conversion of the quamtity
         CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
           EXPORTING
             input                      = wa_vbrk_vbrp-ntgew
         NO_TYPE_CHECK              = 'X'
         ROUND_SIGN                 = ' '
            unit_in                    = wa_vbrk_vbrp-gewei
            unit_out                   = 'TO' "Metric tonn
          IMPORTING
            output                     = wa_vbrk_vbrp-ntgew
          EXCEPTIONS
            conversion_not_found       = 1
            division_by_zero           = 2
            input_invalid              = 3
            output_invalid             = 4
            overflow                   = 5
            type_invalid               = 6
            units_missing              = 7
            unit_in_not_found          = 8
            unit_out_not_found         = 9
            OTHERS                     = 10.
         IF sy-subrc <> 0.
           wa_vbrk_vbrp-ntgew = wa_vbrk_vbrp-ntgew.
         ENDIF.
    Convert the currency from Customer currency to local
    currency by multiplying with kursk
         wa_vbrk_vbrp-kzwi1 =  wa_vbrk_vbrp-kzwi1 * wa_vbrk_vbrp-kursk.
    Convert the amount to Lacks by dividing with 100000
        wa_vbrk_vbrp-kzwi1 = wa_vbrk_vbrp-kzwi1 / 100000.       "DV1K905028
    When MVGR1 is between A to F use the amount as TEA_BAG
         IF wa_vbrk_vbrp-mvgr1 BETWEEN 'A' AND 'F'.
           wa_data-ntgew_tea_bag = wa_vbrk_vbrp-ntgew.
           wa_data-kzwi1_tea_bag = wa_vbrk_vbrp-kzwi1.
         ENDIF.
    When MVGR1 is between G to L use the amount as TEA_BAG
         IF wa_vbrk_vbrp-mvgr1 BETWEEN 'G' AND 'L'.
           wa_data-ntgew_pkt_tea = wa_vbrk_vbrp-ntgew.
           wa_data-kzwi1_pkt_tea = wa_vbrk_vbrp-kzwi1.
         ENDIF.
    When MVGR1 is between G to L use the amount as TEA_BAG
         IF wa_vbrk_vbrp-mvgr1 = 'M'.
           wa_data-ntgew_bulk_tea = wa_vbrk_vbrp-ntgew.
           wa_data-kzwi1_bulk_tea = wa_vbrk_vbrp-kzwi1.
         ENDIF.
         COLLECT wa_data INTO it_data.
       ENDLOOP.
    ENDFORM.                    " process_data
    *&      Form  populate_description
    Populate the description fields
    FORM populate_description .
       LOOP AT it_data INTO wa_data.
         CLEAR: wa_t005t.
         READ TABLE it_t005t INTO wa_t005t WITH KEY land1 = wa_data-land1
                                                BINARY SEARCH.
         IF sy-subrc = 0.
           wa_data-landx = wa_t005t-landx.
         ENDIF.
    Read description of Material group 3
         CLEAR wa_tvm3t.
         READ TABLE it_tvm3t INTO wa_tvm3t WITH KEY
                                  mvgr3 = wa_data-mvgr3
                                  BINARY SEARCH.
         IF sy-subrc = 0.
           wa_data-bezei3 = wa_tvm3t-bezei.
         ENDIF.
    Read description of Material group 4
         CLEAR wa_tvm4t.
         READ TABLE it_tvm4t INTO wa_tvm4t WITH KEY
                                  mvgr4 = wa_data-mvgr4
                                  BINARY SEARCH.
         IF sy-subrc = 0.
           wa_data-bezei4 = wa_tvm4t-bezei.
         ENDIF.
    Get the grand totals
         wa_data-ntgew_tot = wa_data-ntgew_tea_bag
                  + wa_data-ntgew_pkt_tea
                  + wa_data-ntgew_bulk_tea.
         wa_data-kzwi1_tot = wa_data-kzwi1_tea_bag
                  + wa_data-kzwi1_pkt_tea
                  + wa_data-kzwi1_bulk_tea.
         MODIFY it_data FROM wa_data TRANSPORTING landx
                                                  bezei3
                                                  bezei4
                                                  ntgew_tot
                                                  kzwi1_tot.
    Summattion of grand totals
         w_tot_ntgew_tea_bag  = w_tot_ntgew_tea_bag  + wa_data-ntgew_tea_bag.
         w_tot_ntgew_pkt_tea  = w_tot_ntgew_pkt_tea  + wa_data-ntgew_pkt_tea.
         w_tot_ntgew_bulk_tea  = w_tot_ntgew_bulk_tea  + wa_data-ntgew_bulk_tea.
         w_tot_ntgew_tot  = w_tot_ntgew_tot  + wa_data-ntgew_tot.
         w_tot_kzwi1_tea_bag  = w_tot_kzwi1_tea_bag  + wa_data-kzwi1_tea_bag.
         w_tot_kzwi1_pkt_tea  = w_tot_kzwi1_pkt_tea  + wa_data-kzwi1_pkt_tea.
         w_tot_kzwi1_bulk_tea  = w_tot_kzwi1_bulk_tea  + wa_data-kzwi1_bulk_tea.
         w_tot_kzwi1_tot  = w_tot_kzwi1_tot  + wa_data-kzwi1_tot.
       ENDLOOP.
    Append a grand Total row at the end
       CLEAR wa_data.
       wa_data-landx = 'Grand Total:'.
       wa_data-ntgew_tea_bag = w_tot_ntgew_tea_bag.
       wa_data-ntgew_pkt_tea = w_tot_ntgew_pkt_tea.
       wa_data-ntgew_bulk_tea = w_tot_ntgew_bulk_tea.
       wa_data-ntgew_tot = w_tot_ntgew_tot.
       wa_data-kzwi1_tea_bag = w_tot_kzwi1_tea_bag.
       wa_data-kzwi1_pkt_tea = w_tot_kzwi1_pkt_tea.
       wa_data-kzwi1_bulk_tea = w_tot_kzwi1_bulk_tea.
       wa_data-kzwi1_tot = w_tot_kzwi1_tot.
       wa_data-line_color    = 'C310'.
       APPEND wa_data TO it_data.
    ENDFORM.                    " populate_description
    *&      Module  STATUS_9000  OUTPUT
    Initialise PF-STATUS and title
    MODULE status_9000 OUTPUT.
       SET PF-STATUS 'MAIN9000'.
       SET TITLEBAR 'TITLE_9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  initialize_9000  OUTPUT
          text
    MODULE initialize_9000 OUTPUT.
    Call the ALV grid to display data
    SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE text-001.
      Billing Date
    SELECT-OPTIONS: s_fkdat1 FOR vbrk-fkdat MEMORY ID vf OBLIGATORY NO-EXTENSION.
    SELECTION-SCREEN:SKIP 1.
    SELECTION-SCREEN: END OF BLOCK B2.
       PERFORM display_alv_grid.
    ENDMODULE.                 " initialize_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    Module to handle User Command
    MODULE user_command_9000 INPUT.
       CASE okcode.
         WHEN 'BACK'.
           SET SCREEN 0.
           CLEAR okcode.
           LEAVE SCREEN.
         WHEN 'CANCEL'.
           SET SCREEN 0.
           CLEAR okcode.
           LEAVE SCREEN.
         WHEN 'EXIT'.
           CLEAR okcode.
           LEAVE PROGRAM.
         WHEN OTHERS.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Form  display_alv_grid
    Display the data in ALV Grid
    FORM display_alv_grid .
       IF w_alv_container IS INITIAL.
    Create the alv container object
         CREATE OBJECT w_alv_container
           EXPORTING
             container_name = 'ALV_GRID'
           EXCEPTIONS
               cntl_error                  = 1
               cntl_system_error           = 2
               create_error                = 3
               lifetime_error              = 4
               lifetime_dynpro_dynpro_link = 5
               OTHERS                      = 6.
         IF sy-subrc <> 0.
           MESSAGE e999(zttl) WITH 'Problem in ALV display'(t04).
         ENDIF.
    Create the ALV grid object. The parent is the ALV container
         CREATE OBJECT w_alv_grid
           EXPORTING
             i_parent = w_alv_container
           EXCEPTIONS
             error_cntl_create = 1
             error_cntl_init   = 2
             error_cntl_link   = 3
             error_dp_create   = 4
             OTHERS            = 5.
         IF sy-subrc <> 0.
           MESSAGE e999(zttl) WITH 'Problem in ALV display'(t04).
         ENDIF.
    This subrotine creates the field catalog and
    store in internal table lt_fieldcat
         PERFORM prepare_fieldcat CHANGING wt_fieldcat.
    Layout design
         w_layo-no_toolbar = ''.
    Not to allow totaling feature
         w_layo-no_totline = c_x.
    Report title
       w_layo-grid_title = text-004.
         w_layo-grid_title = w_title.
         w_layo-zebra      = c_x.    "Alternating line color (striped)
         w_layo-cwidth_opt = c_x.    "Optimize column width
         w_layo-sel_mode   = 'A'.    "Selection Mode
    Name of the color field
         w_layo-info_fname = 'LINE_COLOR'."For row color
    Call the method to display the data in ALV grid
         CALL METHOD w_alv_grid->set_table_for_first_display
           EXPORTING
             i_save                        = 'A'
             is_layout                     = w_layo
           CHANGING
             it_outtab                     = it_data[]
             it_fieldcatalog               = wt_fieldcat
           EXCEPTIONS
             invalid_parameter_combination = 1
             program_error                 = 2
             too_many_lines                = 3
             OTHERS                        = 4.
         IF sy-subrc <> 0.
           MESSAGE e999(zttl) WITH text-t04.
         ENDIF.
       ELSE.
    If the container & grid object is alreadt there reuse them
         CALL METHOD w_alv_grid->refresh_table_display
           EXCEPTIONS
             finished = 1
             OTHERS   = 2.
         IF sy-subrc <> 0.
           MESSAGE e999(zttl) WITH text-t04.
         ENDIF.
       ENDIF.
       IF okcode = 'CANCEL'.
         EXIT.
       ENDIF.
    ENDFORM.                    " display_alv_grid
    *&      Form  prepare_fieldcat
    Prepare the list of fields to be displayed                          *
         <--P_WT_FIELDCAT  text
    FORM prepare_fieldcat  CHANGING pt_fieldcat TYPE lvc_t_fcat.
       DATA : lx_fcat TYPE lvc_s_fcat.
       REFRESH: pt_fieldcat.
    **List of fields to be displayed should be added in pt_fieldcat
    Customer PO no
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'LANDX'.
       lx_fcat-ref_field = 'T005T'.
       lx_fcat-ref_table = 'T005T'.
       lx_fcat-coltext = 'Market Name'(c01).
       lx_fcat-seltext = text-c01.
       APPEND lx_fcat TO pt_fieldcat.
    Flavour type
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'BEZEI3'.
       lx_fcat-ref_field = 'BEZEI'.
       lx_fcat-ref_table = 'TVM3'.
       lx_fcat-coltext = 'Flavour Type'(c02).
       lx_fcat-seltext = text-c02.
       APPEND lx_fcat TO pt_fieldcat.
    Tea type
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'BEZEI4'.
       lx_fcat-ref_field = 'BEZEI4'.
       lx_fcat-ref_table = 'TVM4'.
       lx_fcat-coltext = 'Tea Type.'(c03).
       lx_fcat-seltext = text-c03.
       APPEND lx_fcat TO pt_fieldcat.
    Tea Bag Quantity in KG
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'NTGEW_TEA_BAG'.
       lx_fcat-ref_field = 'NTGEW'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'Tea Bag(MT)'(c04).
       lx_fcat-seltext = text-c04.
       APPEND lx_fcat TO pt_fieldcat.
    PKT Tea  Quantity in KG
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'NTGEW_PKT_TEA'.
       lx_fcat-ref_field = 'NTGEW'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'PKT Tea(MT)'(c05).
       lx_fcat-seltext = text-c05.
       APPEND lx_fcat TO pt_fieldcat.
    Bulk Tea  Quantity in MT
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'NTGEW_BULK_TEA'.
       lx_fcat-ref_field = 'NTGEW'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'Bulk Tea(MT)'(c06).
       lx_fcat-seltext = text-c06.
       APPEND lx_fcat TO pt_fieldcat.
    Total Quantity in MT
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'NTGEW_TOT'.
       lx_fcat-ref_field = 'NTGEW'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'Total(MT)'(c07).
       lx_fcat-seltext = text-c07.
       APPEND lx_fcat TO pt_fieldcat.
    Tea Bag Quantity in KG
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'KZWI1_TEA_BAG'.
       lx_fcat-ref_field = 'KZWI1'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'Tea Bag(FOB-Lacs)'(c08).
       lx_fcat-seltext = text-c08.
       APPEND lx_fcat TO pt_fieldcat.
    PKT Tea  Price in Lakh
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'KZWI1_PKT_TEA'.
       lx_fcat-ref_field = 'KZWI1'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'PKT Tea(FOB-Lacs)'(c09).
       lx_fcat-seltext = text-c09.
       APPEND lx_fcat TO pt_fieldcat.
    PKT Tea  Quantity in KG
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'KZWI1_BULK_TEA'.
       lx_fcat-ref_field = 'KZWI1'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'Bulk Tea(FOB-Lacs)'(c10).
       lx_fcat-seltext = text-c10.
       APPEND lx_fcat TO pt_fieldcat.
    Total amount
       CLEAR lx_fcat.
       lx_fcat-fieldname = 'KZWI1_TOT'.
       lx_fcat-ref_field = 'KZWI1'.
       lx_fcat-ref_table = 'VBRP'.
       lx_fcat-coltext = 'Total(FOB-Lacs)'(c11).
       lx_fcat-seltext = text-c11.
       APPEND lx_fcat TO pt_fieldcat.
    ENDFORM.                    " prepare_fieldcat
    *&      Form  form_title
    Form the ALV Title
    FORM form_title .
       DATA: l_date(10) TYPE c.
       CONCATENATE s_fkdat-low6(2)  s_fkdat-low4(2)  s_fkdat-low(4)
       INTO l_date SEPARATED BY '/'.
       CONCATENATE 'TTD - Statement of Export' '-From' l_date INTO
    w_title SEPARATED BY space.
       CLEAR l_date.
       IF NOT s_fkdat-high IS INITIAL.
         CONCATENATE s_fkdat-high6(2)  s_fkdat-high4(2)  s_fkdat-high(4)
         INTO l_date SEPARATED BY '/'.
         CONCATENATE w_title 'to' l_date INTO w_title SEPARATED BY space.
       ENDIF.
    ENDFORM.                    " form_title

  • Error while using selection option variable in the selection screen

    Hi All,
    I am facing an issue while using selection option variable in the selection screen for one of my reports.
    Scenario: For the field "Region From" we need to have wild card logic () in tes selection screen, for example if we put "BE" in the selection screen for the field Region From then the query should be executed only for those "Region From" values which begin from "BE".
    Approach: For the above requirement I have made a selection option variable for "Region From". This allows use wild card
    But when the report is executed we get the following error:
    "System error in program CL_RSR_REQUEST. Invalid filter on ETVRGNFR".
    (ETVRGNFR is technical name of the info object Region From)
    Though the report is executed it displays all the values for the field "Region From" irrespective of the selection given in the selection screen.
    Please give suggestions / alternate solutions to crack this issue.
    Thanks in advance
    Regards
    Priyanka.

    Hi,
    Try to use a variable of type Customer Exit and do the validation inside the exit to display according to your request.
    This is just my view, i am not sure if u are already using this or Char. Variable.
    Cheers.
    Ranga.

  • How to hide the select-options fields on radiobutton select in webdynpro

    hi
    Could you please help how to hide the select-option fields in webdynpro
    there are four radio buttons
    for every radiobutton there is corresponding the select_option filed is associated to it
    user as only provision select  one radio button and reset of the select-option fileds should be hidden
    which ever the radio button is selected corresponding the select-options fileld should be displayed
    please find the attachement below

    Hi Nine,
    To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
    Sample code :
    Write the below code in the Event handler of Radio Button.
    DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
    lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
    This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
    Regards,
    Ravikiran.k

  • Select-option field on module pool screen

    hi all,
    Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e.  how can i get that multiple selections tab after the high field of the select-options.
    thanks in advance,
    vinny

    All you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen).  Here is a sample program.
    report zrich_0006 .
    tables: mara.
    * Custom Selection Screen 1010
    <b>selection-screen begin of screen 1010 as subscreen.</b>
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_rad1 radiobutton group grp1 default 'X',
                p_rad2 radiobutton group grp1,
                p_rad3 radiobutton group grp1.
    select-options: s_matnr for  mara-matnr,
                    s_matkl for  mara-matkl,
                    s_mtart for  mara-mtart.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    endmodule.
    *&      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
    endmodule.
    <b>* Screen screen 100 with a subscreen area called "subscreen_1010"
    * Screen Flow Logic follows
    *process before output.
    *  module status_0100.
    *  call subscreen subscreen_1010 including sy-repid '1010'.
    *process after input.
    *  call subscreen subscreen_1010 .
    *  module user_command_0100.</b>
    Regards,
    Rich Heilman

  • Reading from select-options field into the internal table

    Hi,
      I have to read the low and high ranges from the select-options fields into a field in the internal table in order to update the same field in line item table. since the user may change the screen fields, i need to pass the values directly from the screen and store it in a variable in the internal table. Is there a way to pass both ranges, low and high to one variable which holds the entire range?
    Thanks,
    Sruthy

    Hi,
    In the Selection screen you can directly read the field(Select-option)value using read statement as follows:
    READ TABLE <SELECT-OPTIONS field name> [using index] INTO <work area>.
    After reading you can directly access all the values as follows and can store them in the variables:
    var1 = <work area>-LOW
    var2 = <work area>-HIGH
    var3 = <work area>-SIGN
    var4 = <work area>-OPTION
    as per your requirement.
    I think this will help you.
    <b>Kindly reward if helpful.</b>
    Regards,
    Shakuntala.

  • How do we declare a date field in the selection screen?

    As an input,so that the user can give a appro date.
    Thanks in advance.
    Regards,
    Shilpa

    You can also do a select-option for a date.
    select-options: s_datum for sy-datum.
    REgards,
    Rich Heilman

  • Overlapping of an Select-Option Field and the Extension Button.

    Hi,
    I have declared a Select-Option as follows:
    Tables:  agr_define  .
    select-options: s_role for agr_define-agr_name obligatory
                                                 no intervals .
    It is not throwing any error.
    If I execute this program, On the selection screen, I find one field where I can enter the Role and an extension button to enter multiple roles.
    But the F4 help overlaps on the Extension Button and the customer wants this overlapping to be removed, I mean this F4 help button and the Extension button should not overlap with each other.
    Can you help me acheive this.
    Thanks and Regards,
    Ishaq.

    Boss,
    You cannot avoid that overlapping.
    yes, one can change the system screen 1000.
    but, in future it will definitely create problems like if you add any extra field and if are using that code in some other server it will never get reflected.So, will you go to Screen 1000 of that server and change the screen attributes again??
    okay even i would like to find the answer for that.
    If you find the solution, do send me the real answer in this same thread.

  • How to Validate a Portal Form field from the database

    I created a Portal Form based on a procedure, which requires three parameters. One of the parameters is Item Number. I need to check if the Item Number exists in database. I am trying to use pl/sql button event handler, where I try to use the select count(*) statement to verify. However, I don't know how to reference the form field in the where clause. Please advise. Or is it possible to achieve this by creating a javascript? If you go to 'Shared Component' provider and click on javascript, you will see some system validation scripts, which you can call in the form level validation. My doubts with javascipt is how I can talk to database in the script? Any input is appreciated.

    Hi,
    You cannot access the DB from the script. If you want to access the values of a field you should use session variables. Here is a sample to access the values of a form field.
    declare
    ticket_no varchar2(20);
    flight_no varchar2(20);
    blk varchar2(30) := 'DEFAULT';
    begin
    ticket_no := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_TICKET_NO');
    flight_no := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    end;
    Thanks,
    Sharmila

  • Hiding and then making select-options visible on the selection-screen

    I've created a selection screen. On this i've got a field (pr_inpt) depending on whose value i have to display the rest select-options viz. (so_c1, so_n1, so_d1, so_t1) say ,
    1.)if (pr_inpt) contains value 'A' then display (so_c1 & so_d1)
    2.)if (pr_inpt) contains value 'B' then display (so_n1, so_d1 & so_t1)
    To achieve it, in the initialization event, i looped at the screen and for all (so_c1, so_n1, so_d1, so_t1) i made screen-active = '0'. Due to this my objective to hide fields in the beginning is achieved.
    Next when user is entering value into (pr_inpt), i am making screen-active = '1' at selection-screen output event, for those relevant select-options (say if A, then made active for so_c1 & so_d1) but my problem is that it is making all select-options (so_c1, so_n1, so_d1, so_t1) visible on the screen which i don't want.
    How can i achieve this, also is it possible to change the label of the select-options while displaying.
    Plz help.

    hi just copy and paste following code into ur abap editor and see weather this logic helps u ????
    REPORT Z_HRA1.
    tables: pa0000, pa0001.
    parameters: p_chk1 as checkbox user-command rusr,
    p_chk2 as checkbox user-command rusr,
    p_chk3 as checkbox user-command rusr,
    p_chk4 as checkbox user-command rusr,
    p_chk5 as checkbox user-command rusr.
    selection-screen: begin of block blk1 with frame.
    select-options: s_pernr for pa0000-pernr modif id ABC no-extension no intervals,
    s_stat2 for pa0000-stat2 modif id DEF,
    s_werks for pa0001-werks modif id GHI,
    s_persg for pa0001-persg modif id JKL,
    s_persk for pa0001-persk modif id MNO.
    selection-screen: end of block blk1.
    AT SELECTION-SCREEN output.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'ABC'.
    IF p_chk1 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'DEF'.
    IF p_chk2 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'GHI'.
    IF p_chk3 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'JKL'.
    IF p_chk4 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'MNO'.
    IF p_chk5 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Regards
    Gagan

  • How to write in selection screen after the select option field?

    Hi
    Please help me with this...
    i need to write format of date after the select option field in the selection screen.
    its like..
    date ___________  to ___________     <b>yyyymmdd</b>
    points will be awarded..
    thanx

    Use  selection-screen comment 1(31) text-005 -> this will give you format option.
    See the below sysntax ,you have to use like this
    Selection-screen begin of block b2 with frame title text-002.
    selection-screen begin of line.
    selection-screen comment 1(31) text-004.
    parameter:        r_1   radiobutton group rad1.
    selection-screen end of line.
    selection-screen begin of line.
    Aging  Report
    selection-screen comment 1(31) text-005.
    parameter:        r_2   radiobutton group rad1.
    selection-screen comment 40(30) text-003.
    parameter: p_expir as checkbox.
    selection-screen end of line.
    selection-screen begin of line.
    Materials with no Expiry Date
    selection-screen comment 1(31) text-006.
    parameter:        r_3   radiobutton group rad1.
    selection-screen comment 40(30) text-007.
    parameter : p_bin as checkbox ."default 'X'.
    selection-screen end of line.
    selection-screen end of block b2.
    selection-screen end of block b0.

  • How to set focus and mark red on certain select option field

    hi experts
    I embedded a select_option view in my application and  tried to use IF_WD_SELECT_OPTIONS->request_focus to set focus on a certain select option field if the logical check failed, and also hope the low field of the select option can be marked red....but things does not happen that way....
    could anyone kindly tell me how to implement that requirement?
    tkx and regards
    sun

    What is the problem you are facing in this ?
    Requesting focus is easy.
    just call the method request focus and pass the id of the parameter whose lower value field you want to focus.
    as shown below.
    code you might have written in wddoinit
    DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.
        DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    *   * create the used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
        WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
        WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'ZDEALERID' ).
    * * add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'ID'
      IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    code for focusing a field.
    wd_this->m_handler->request_focus( i_id = 'ID' ).
    you must have declared attributes m_handler and m_wd_select_options type reffering to IF_WD_SELECT_OPTIONS and
    IWCI_WDR_SELECT_OPTIONS respectively.
    and regarding that red color i am not sure it is possible without using message manager.
    thanks
    sarbjeet

Maybe you are looking for

  • Problem with flash in InternetExplorer 7

    Hi, previously I had a lot of crashes in IE 7 and it was caused by Flash10a.ocx. So couple of days ago I uninstalled and reinstalled the newest version of Flash player. Today the same problem occured with the following error message: Program error in

  • 24" iMac displaying small green lines

    I'm having a big problem with my iMac 24" when I'm using Aperture or iTunes music videos in full screen mode. I am getting groups of little green lines about an inch long and a pixel or two deep, stacked in groups of five or six on top of each other

  • Display error message when duplicate entry made

    hello i have a jsp form, from that i have insert my data to the database, and also the insert values shows on the other jsp file. i have used jdbc for that. My problem is that when i made the dulicate entry for the partocular on field value, it doesn

  • EBP Security -  Users under single org unit

    Hi All, My Client has a question on EBP Security and I want you experts to help me in this regard, as I did not work on it before. Initial screen of transaction code USERS_GEN, its better says to limit number of users under a single Organizational Un

  • My computer is blinking ?

    Hello, My computer is blinking ? It does works properly but its blinking once a while as 1/4 sec. at approx. every minute, not regularly. Any idea ? Thanks Louis