Application Development 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: 

Question : 'DYNP_VALUES_READ'

Former Member
0 Kudos

Hi All!!!

here is the code i'm using in a Field-Exit al the VF01 to test de FM 'DYNP_VALUES_READ'.

********************************************************

data : table like DYNPREAD occurs 0 .

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = 'SAPMV60A'

dynumb = '6105'

tables

dynpfields = table.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'c:\testfieldexit.txt'

filetype = 'ASC'

TABLES

data_tab = table.

output = 'E0001'.

*********************************************************

the download doesn't work. the file downloaded is 0 byte, so there are no info at the table 'Table'.

please if someone realise what i'm doing wrong, tell me!!!

points will be rewards for help as a gratefulness!!

thank in advance!

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You must add the specific field names to the TABLE before calling the function module, this will tell the FM which fields to get the values for. You must fill the fieldname into the TABLE that you want to get the value of.



data: table like DYNPREAD occurs 0 .
<b>data: wa like line of table.</b>


<b>wa-fieldname = 'A_FIELD'.
append wa to table.</b>

CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
     <b>DYNAME = sy-repid
        dynumb = sy-dynnr</b>
    tables
        dynpfields = table.


Regards,

Rich Heilman

Former Member
0 Kudos

HI RICH! when i put this sentences a DUMP appeared in the FM:

*********************************************************

wa-fieldname = 'FKDAT'.

append wa to table.

*********************************************************

the Dump description is "Invalid screen field specified".

<b>any suggest??what do you think?

<b></b></b>

thank you for your Help.

Message was edited by: Andrew83

0 Kudos

It would appear that the field name FKDAT is not valid for that screen, make sure that it is the valid name of the field on the screen and that it is in the right screen number, it could be that it is in a subscreen which would have a differnt screen number, in which case you may have to hardcode the screen number when calling function module as you have done to start with.

First, check that FKDAT is the valid field name. Check the screen number and program name that you are passing.

Regards,

Rich Heilman