Skip to Content
author's profile photo Former Member
Former Member

zz_ucounter(Counter - delivery date changes by users) from ekpo table is not updating even though i change the delivery date

Hi All,

I am trying to capture the number of user updates done to the delivery date for the PO line item in the ME22N. ZZ_COUNTER(Counter for system moves) is capturing right but the ZZ_UCOUNTER(counter for user moves) is not updating. Can any one of you help me how to resolve this issue?

Thanks,

Uday.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2012 at 03:08 PM

    Thank you all for your quick and helpful suggestions. I dont know how i missed the fact that those two are custom fields. 😊

    But i wrote a below logic to get the usermoves for the PO

    SELECT objectclas objectid changenr
    FROM cdhdr
    INTO TABLE gt_usermov
    WHERE objectclas = 'EINKBELEG'
    AND objectid = <fs_items>-ebeln
    AND username NE 'BATCH_MGR' " not the auto moves
    AND change_ind = 'U'.

    (FYI: I got to join CDPOS as i need to count only the changes done to EINDT field for that particular PO)

    IF NOT gt_usermov[] IS INITIAL.
    SELECT objectclas objectid changenr
    INTO TABLE gt_userpos
    FROM cdpos
    FOR ALL ENTRIES IN gt_usermov
    WHERE objectid = gt_usermov-objectid
    AND objectclas = 'EINKBELEG'
    AND changenr = gt_usermov-changenr
    AND fname = 'EINDT' "need to fetch the changes made only to the delivery date field
    AND chngind = 'U'.

    IF sy-subrc = 0.
    DELETE ADJACENT DUPLICATES FROM gt_userpos COMPARING ALL FIELDS.
    ENDIF.

    DESCRIBE TABLE gt_userpos LINES lv_usercount.

    ENDIF.

    it has impacted the performance little bit due to the size and type of CDHDR and CDPOS(cluster) tables. Any other better way you can think of.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2012 at 05:48 AM

    Hello Uday,

    I guess zz_ucounter and zz_counter are your custom fields to track the system moves and user update.

    Check in delivery program, may be someone has put logic in exit/badi for ZZ_COUNTER (system moves) and same you need to write this for your counter zz_ucounter.

    Regards,

    Deepti

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2012 at 06:09 AM

    Hi ,
    These are custom fields , so there logic would be written in a BADI/User-exit (for e.g. ME_PROCESS_PO_CUST) . Just check what has been implemented for these fields and then you can debug and find out why zzucounter is not working as it is supposed to.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2012 at 06:16 AM

    Hi ,

    If you do not need the information immediately why not write a report based on the change documents.

    Have a look at Transaction VL22N (Program WSCDSHOW_ALV).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.