Skip to Content
avatar image
Former Member

How to get the values of Select-options from the screen.

The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    May 17, 2007 at 11:39 AM

    Hi Shikha,

    Use FM <b>RS_REFRESH_FROM_SELECTOPTIONS</b>.

    This will give u Current contents of selection screen.

    Reward points if helpful.

    Regards,

    Hemant

    Add comment
    10|10000 characters needed characters exceeded

  • May 17, 2007 at 11:42 AM

    Look at the dynpro 1000:

    usually for select-option sx you have two fields: sx-low and sx-high.

    Loot at the select option itself if you need offscreen values.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 06, 2007 at 08:37 AM

    Hi Shikha,

    use the select option LOW and HIGH fields as the field names to append into the internal table for DYNPFIELDS and you would get the low and high values of the select option after calling the function module DYNP_VALUES_READ.

    In case, if we fill the select option using the multiple selection button that comes with the select option, the values will be reflected in the select option field since the PAI takes place and we can use directly this field values to get the possible values of the other field.

    Hope you got it.

    Ram

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 06, 2007 at 08:52 AM

    Hi,

    Refer this following code..this will solve your problem...

    "Following code reads value entered in s_po select options and willprovide search 
    "help for s_item depending upon s_po value.
    
    REPORT TEST.
    TABLES : ekpo.
     
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
     
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
     
    INITIALIZATION.
     
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
     
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
     
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.
     
    
    

    Add comment
    10|10000 characters needed characters exceeded