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

DYNP_VALUES_READ Problem

Former Member
0 Likes
1,037

Hi All,

I am facing problem in DYNP_VALUES_READ functional module. It is not returning any values in interanal table .

What i am doing is in ME51n ( Create Purchase Requisition ) based on purchase requisition type ( drop down / combo box )

i want to restrict account assign category search help values.

Here i want to read the values in pur. requistion type using DYNP_VALUES_READ, but it is not returning any values.

Please guide me.

Points will be rewarded.

by

GLADIATOR

2 REPLIES 2
Read only

Former Member
0 Likes
482

Hi

Where are you using DYNP_VALUES_READ and how are transfering the screen parameters?

U should use a code like this:

DATA: BEGIN OF TB_DYNPFIELDS OCCURS 0.
          INCLUDE STRUCTURE DYNPREAD.
  DATA: END OF TB_DYNPFIELDS.

  DATA: PROGNAME LIKE D020S-PROG.

  MOVE <SCREEN FIELD> TO TB_DYNPFIELDS-FIELDNAME.
  APPEND TB_DYNPFIELDS.

  MOVE SY-CPROG TO PROGNAME.

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            DYNAME     = PROGNAME
            DYNUMB     = SY-DYNNR
       TABLES
            DYNPFIELDS = TB_DYNPFIELDS

but you make sure the screen is active when u use that fm

Max

Read only

Former Member
0 Likes
482

Hi,

Try like this..

wa_dynpro_values-fieldname = Fieldname of te field whose values to be read'.

APPEND wa_dynpro_values TO i_dynpro_values.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = '0402'

translate_to_upper = c_x

TABLES

dynpfields = i_dynpro_values

EXCEPTIONS

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

invalid_parameter = 7

undefind_error = 8

double_conversion = 9

stepl_not_found = 10

OTHERS = 11.

Thanks,

Rajinikanth