Skip to Content
0

CDHDR update via VA42 when VBAK-KTEXT chagnes

Oct 28, 2016 at 09:38 AM

99

avatar image

Hi Team,

We have requirement to have an entry in CDHDR when the Contract header status is changed to 'APPR' status. (As you know already when we change the status this will not get updated in CDHDR)

We have written a code in Userexit_prepare_document in MV54AFZZ to check when the status is APPR then we are updating the VBAK-KTEXT field with some text and allow for save. now the changed value is getting displayed in VA42 but we are not able to see the change log history for that field under the Environment menu. Could you please let us know if there is any other option or anything we are missing here.

Please let us know for any questions

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

8 Answers

Best Answer
avatar image
Former Member Oct 28, 2016 at 12:00 PM
0

Hi

The change document should be created in form CHANGE_DOCUMENT_CREATE (include MV45AF0C_CHANGE_DOCUMENT_CREAT), try to check what happens here

Max

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 28, 2016 at 10:09 AM
1

Hi

You should post your code or explain how you update the field VBAK-KTEXT

Anyway it needs to consider:

- the internal structure having old data should be filled (YVBAK)

- the flag XVBAK_UPDKZ should be equal to U

Max

Share
10 |10000 characters needed characters left characters exceeded
Balajisha T V Oct 28, 2016 at 10:31 AM
0

Hi Max,

Thanks for your reply,

First we get the XVBAK-OBJNR value which is already present in the user exit, then we get in to JEST table using the OBJNR and get the latest status if it is E0011(APPR) then we put in

lv_temp = Xvbak-ktext.

clear Xvbak-ktext.

Concatenate lv_Temp '.' in to XVBAK-KTEXT.

Xvbak-updkz = 'U'.

The text is getting updated with a dot at the end but the change log is not getting updated.

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

YVBAK is filled?

XVBAK_UPDKZ is filled?

0
Balajisha T V Oct 28, 2016 at 11:30 AM
0

Hi Max,

Yes all the YVBAK is filled inn and we manually enter the XVBAK_UPDKZ = 'U' through the user exit code.

if lv_appr eq lc_appr1.
lv_temp = xvbak-ktext.
clear xvbak-ktext.
concatenate lv_Temp '.' into xvbak-ktext.
xvbak_UPDKZ = 'U'.
endif.

Share
10 |10000 characters needed characters left characters exceeded
G Lakshmipathi
Oct 28, 2016 at 11:36 AM
0

Check in AUT10 whether you were able to see the required changes

Share
10 |10000 characters needed characters left characters exceeded
Balajisha T V Oct 28, 2016 at 11:52 AM
0

Hi Laksh

Sorry AUT10 is not accessible through the present development system, tried multiple ways to by-pass but we cant

Share
10 |10000 characters needed characters left characters exceeded
Balajisha T V Nov 01, 2016 at 09:58 AM
0

Thanks Max,

your suggestion really helped to crack this,

Share
10 |10000 characters needed characters left characters exceeded
Balajisha T V Jan 17, 2017 at 12:50 PM
0

if lv_appr eq lc_appr1.

lv_temp = xvbak-ktext.
clear xvbak-ktext.
concatenate lv_Temp '.' into xvbak-ktext.
xvbak_UPDKZ = 'U'.
endif.

Share
10 |10000 characters needed characters left characters exceeded