Skip to Content

CDHDR update via VA42 when VBAK-KTEXT chagnes

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

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

    Hi

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

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 28, 2016 at 10:09 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 10:31 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 11:30 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 11:36 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 11:52 AM

    Hi Laksh

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

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2016 at 09:58 AM

    Thanks Max,

    your suggestion really helped to crack this,

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 17, 2017 at 12:50 PM

    if lv_appr eq lc_appr1.

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

    Add comment
    10|10000 characters needed characters exceeded