2007 May 17 12:37 PM
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.
2007 May 17 12:39 PM
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
2007 May 17 12:42 PM
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.
2007 Nov 06 8: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
2007 Nov 06 8: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.