Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem of function module 'DYNP_VALUES_READ'

Former Member
0 Likes
1,386

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
776

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.

2 REPLIES 2
Read only

Former Member
0 Likes
777

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.

Read only

Former Member
0 Likes
776

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