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

Changes are not reflecting in CDHDR and CDPOS tables when Superior work order is attached to a sub order

Former Member
0 Kudos
1,336

Hello Experts,

Please help me resolving the below issue.

When I am trying to link a sub order to a superior work order using transaction IW40, change documents in CDHDR and CDPOS tables are not getting updated even if data element MAUFNR is checked for tracking changes. Please provide your pointers how to update CDHDR and CDPOS tables when ever a sub order is attached or detached to a superior order.

Thanks & Regards,

Tulasi

7 REPLIES 7
Read only

Former Member
0 Kudos
947

Hi Tulasi,

Which Change Document are you expecting to be updated?  And is the table which contains MAUFNR part of this Change Document?

regards,

Nick

Read only

0 Kudos
947

Hello Nick,

Presently the current behaviour is like when i am updating any thing related to work order a change record is being created in CDHDR table. But when i am trying to link a sub order to a superior order, that particular change history is not getting updated in CDHDR table. Any pointers related to this will be very useful and highly appreciated.

Thanks & Regards,

Tulasi

Read only

0 Kudos
947

Hi Tulasi,

So, the standard transaction is not creating a change document?  Simply checking the 'Change Document' box on the data element will not on its own make that happen.

The whole concept of change documents is pretty well documented, I found this link for example by searching this site using the term 'Change documents';

SAP Community Network Wiki - Code Gallery - Steps to enable logging of changes in change documents

Regards,

Nick

Read only

0 Kudos
947

Hello Nick,

MAFUNR is the field for superior order number and the change document box on the data element is checked. But still standard trasaction is not creating change document when i am attaching or detaching a sub order for it. Not sure why?

Thanks & Regards,

Tulasi

Read only

0 Kudos
947

Hi,

I'm not sure what more I can add. 

A data element with the Change Document box flagged will only create a change document if it is used in a table which is used in a change document which is called from the ABAP code when the table is updated.  Data element MAFUNR does not do this.

The link I included earlier covers this step by step.

Regards,

Nick

Read only

0 Kudos
947

Tulasi, might be you can try to debug FM - "CHANGEDOCUMENT_OPEN", please note this will be called in an update task

Read only

0 Kudos
947

Hi,

ORDER_WRITE_DOCUMENT FM is used to update change documents related to order which will be called in update task. The tables used in the FM contains AUFNR(order) and MAUFNR(Superior order) fields which are both filled with the superior order as we are assigning sub order to superior order from superior order itself. As a result no change documents are getting updated in CDHDR table.

Any alternative to this to get change documents when suborder is attached or dettached to superior order would be very helpful

Thanks & Regards,

Shruthi.