Skip to Content
0
Former Member
Jul 31, 2008 at 09:02 AM

INVALID_DYNPRONAME runtime error

9 Views

Hai all!

i am trying 2 implement a selection screen with two paramerers , purchasing organization & plant.. i want 2 get f4 help for plant based upon the value of purchasing organization tht v will give at runtime.. but while running my program i am getting an runtime error "INVALID_DYNPRONAME"..

plz help me to findout the solution..

this is my code..

REPORT zcheck.

TYPES: BEGIN OF values,

werks TYPE t024w-werks,

ekorg TYPE t024w-ekorg,

END OF values.

DATA: purchasing(3) TYPE c,

plant(4) TYPE c.

DATA: progname TYPE sy-repid,

dynnum TYPE sy-dynnr,

dynpro_values TYPE TABLE OF dynpread,

field_value LIKE LINE OF dynpro_values,

values_tab TYPE TABLE OF values.

progname = sy-repid.

dynnum = sy-dynnr.

CLEAR: field_value, dynpro_values.

field_value-fieldname = 'PLANT'.

APPEND field_value TO dynpro_values.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'DEMOF4HELP'

fieldname = 'PURCHASING ORGANIZATION'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'PURCHASING ORGANIZATION'.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = progname

dynumb = dynnum

translate_to_upper = 'X'

TABLES

dynpfields = dynpro_values.

READ TABLE dynpro_values INDEX 1 INTO field_value.

SELECT werks ekorg

FROM t024w

INTO CORRESPONDING FIELDS OF TABLE values_tab

WHERE ekorg = field_value-fieldvalue.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'PLANT'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'PLANT'

value_org = 'S'

TABLES

value_tab = values_tab.