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 with DYNP_VALUES_READ - ME21N

Former Member
0 Likes
1,468

Hello Gurus,

I have this problem:

In transction ME21N and ME22N:

I have used function DYNP_VALUES_READ to read the fields that user has filled on the main screen of Purchase order, but the function does not give any result (table empty...).

I have used both SAPLMEGUI 1211

and SAPLMEGUI 0014

as program / dynpro in the function interface.

Could you help me?

Thanks

Hello Gurus,

I have this problem:

In transction ME21N and ME22N:

I have used function DYNP_VALUES_READ to read the fields that user has filled on the main screen of Purchase order, but the function does not give any result (table empty...).

I have used both SAPLMEGUI 1211

and SAPLMEGUI 0014

as program / dynpro in the function interface.

Could you help me?

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
1,183

hi,

Which fields u want to read specify fields ? check tat fields r in the main screen or r in the sub-screen...

Read only

Former Member
0 Likes
1,183

I want to read EBELP and INFNR.

Below is code that i'm using:

----


MOVE 'MEPO1211-EBELP' TO t_campos-fieldname.

APPEND t_campos.

MOVE 'MEPO1211-INFNR' TO t_campos-fieldname.

APPEND t_campos.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = 'SAPLMEGUI'

DYNUMB = '1211'

TABLES

DYNPFIELDS = t_campos

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.

READ TABLE t_campos INDEX 1.

l_ebelp = t_campos-fieldvalue.

READ TABLE t_campos INDEX 2.

l_infnr = t_campos-fieldvalue.

----


The sy-subrc = 0, but the FM didn't bring the values of the screen fields. Is there some wrong with the filed name?

Thanks.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,183

Hello,

Where are you writing your code ?

This FM will read the values only if the screen is under processing. So if you can code in an enhancement.

Regards,

Tarun

Read only

0 Likes
1,183

I wrote at enhancement MM06E005 - FM EXIT_SAPMM06E_006.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,183

In the exit EXIT_SAPMM06E_006, you can access the line item details using table TEKPO.

Hope this helps you.

Regards,

Tarun

Read only

0 Likes
1,183

Hi,

Your code

MOVE 'MEPO1211-EBELP' TO t_campos-fieldname.
APPEND t_campos.

MOVE 'MEPO1211-INFNR' TO t_campos-fieldname.
APPEND t_campos.

CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = 'SAPLMEGUI'
DYNUMB = '1211'
TABLES
DYNPFIELDS = t_campos
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.

READ TABLE t_campos INDEX 1.
l_ebelp = t_campos-fieldvalue.

READ TABLE t_campos INDEX 2.
l_infnr = t_campos-fieldvalue.

Instead you can do this.

READ TABLE t_campos INDEX 1. -


Remove Index and replace with Fieldname condtion.

l_ebelp = t_campos-fieldvalue.

READ TABLE t_campos INDEX 2.----


Remove Index and replace with Fieldname condtion.

l_infnr = t_campos-fieldvalue.{

Read Table t_campus with key fieldname = 'MEPO1211-EBELP' .

<Now fetch the Field value>

Similarly do for the next screen field also.

If required debug the FM output and check the dynpro table.

Regards,

Santosh Kumar Mukka.

Read only

0 Likes
1,183

hi rsely82 /all,

did you solve your problem?

Because i'm trying to get the value of KNTTP field from grid, just before press the SAVE buttom.. and i'm coding my request inside:

badi: CACL_CHARACTER_INPUT

method if_ex_cacl_character_input~set_character_input.

thank you so much for your help!

ps: one more answer: the table t_campos, what is the type for it? Or how is defined?

Edited by: pampeano on Sep 20, 2010 8:45 PM