Skip to Content
0

ABAP: 'DYNP_VALUES_UPDATE' is not working for VA01/VA02

Dec 16, 2016 at 06:09 AM

130

avatar image

Dear ABAP Experts,

I am trying to update value of KWMENG (Quantity Field in va01 / va02 ) by using the function DYNP_VALUES_UPDATE in the include MV45AOZZ but unable to see the changed value. I am using the following code.

DATA: dynpfields1 LIKE dynpread OCCURS 5 WITH HEADER LINE.

DATA: l_stepl LIKE sy-stepl.

REFRESH dynpfields1.

CLEAR dynpfields1.

dynpfields1-fieldname = 'RV45A-KWMENG'.

"Screen field name dynpfields1-fieldvalue = count1.

CONDENSE dynpfields1-fieldvalue.

dynpfields1-stepl = 1.

APPEND dynpfields1.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING dyname = 'SAPMV45A'

dynumb = '4001'

TABLES dynpfields = dynpfields1[]

EXCEPTIONS OTHERS = 0.

What can be the reason ? Any idea about this.?

Regads

Aneel

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Dec 16, 2016 at 06:37 AM
1

Where did you put this code (in some POV exit as this FM is intended for the event POV and only functions there and only for the current dynpro, also MV45AOZZ is provided for PBO modules.) why do you use stepl =1, usually stepl is dynamic and retrieved with FM DYNP_GET_STEPL in a POV module. So when and what are you actually trying to do, could you elaborate?

Regards,
Raymond

Share
10 |10000 characters needed characters left characters exceeded
Aneel Munawar Dec 16, 2016 at 06:53 AM
-1

Dear Raymond,

I am trying to assign the value to the sales order quantity in the va01/va02 items level in the first row. thats why I have put 1 in the step.

I have enterd the material but qty will be assigned on the base of some calculation.

I have created two fields in additionsl tab date1 and date2 and the dates difference will be populated in the qty field of that item. But when I put the vbap-kwmeng it greys out and blocked. Thats why I want to use the DYNP_VALUES_UPDATE function to assign the value but value is not being populated.

Regards,

Aneel

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Fm DYNP_VALUES_UPDATE is intended for POV, and by default wont override screen attributes as INPUT. Better find a suitable user-exit for update of XVBAP (LOOP AT XVBP, User Exits In Sales Document Processing) some rental days quantity?

Regards,
Raymond

0