‎2008 Jun 16 4:42 AM
Hi buddies,
I used the FM 'DYNP_VALUES_READ' to catch the value of one screen control at the event 'AT SELECTION-SCREEN ON VALUE-REQEUST'.After I inputed value in the control 'P_WERKS' and triggered the event, there is no values in the internal table 'lt_fields' which should be stored the values of all the screen controls.
REPORT zdyntest001.
PARAMETERS: p_werks TYPE werks_d,
p_lgnum TYPE lgnum.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lgnum.
DATA: lt_fields TYPE TABLE OF dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = lt_fields.
IF sy-subrc = 0.
BREAK-POINT.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
‎2008 Jun 16 4:58 AM
Hi,
You have created table without header line.
Do like
data : wa like dynpread.
wa-fieldname = 'P_LGNUM'.
append wa to lt_fields.
clear wa.
now call function module.
read table lt_fields into wa with key fieldname = 'P_LGNUM.
Assign wa-fieldvalue to variable.
‎2008 Jun 16 4:58 AM
Hi,
You have created table without header line.
Do like
data : wa like dynpread.
wa-fieldname = 'P_LGNUM'.
append wa to lt_fields.
clear wa.
now call function module.
read table lt_fields into wa with key fieldname = 'P_LGNUM.
Assign wa-fieldvalue to variable.
‎2008 Jun 16 7:12 AM
Hi Vincent,
There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
Kindly find the link below.
http://www.sapfans.com/forums/viewtopic.php?t=251328&highlight=alvlayoutcopy
Dont forget to reward points if found useful.
Thanks,
Satyesh