‎2010 Jun 10 7:15 AM
Hi,
We have a transaction which creates delivery for certain type of purchase orders. I wrote a piece of code in a BADI to move some data from Purchase Order to Delivery. An IDoc is getting created once delivery is created. One segment is missing from IDoc if the code written for this enhancment is activated. IDoc is not giving any problem if this code is commented. Can anyone tell me why this problem is coming up? Need your help as this is a serious issue.
Any help will be deeply appreciated.
Thanks,
Ibrahim
‎2010 Jun 10 7:41 AM
Hi,
Generally, the segment wont appear if it is defined as a required segment in the IDoc type, but was not filled when the actual IDoc was generated. For this reason, the relevant IDoc does not contain this required segment .
Can you please tell how are you generating idoc or process which you are following .
Thanks and Regards,
P.Bharadwaj
‎2010 Jun 10 8:59 AM
Hi,
If all the fields in the segment are initial, the segment will not appear, check if you have clear the segment or its fields in that enhancement...
good luck
Richard
‎2010 Jun 10 9:10 AM
Yesterday I faced similar kind of problem. Sharing with you if you get any clues.
I wanted to insert a segment in the idoc. The structure of the idoc was getting changed that is , it was changing the parent child relationship of some of the segments. If I commented my code , it was working fine. Then I realised that I was inserting at a wrong place , I corrected it and it worked fine.
I would suggest if you could post your code and the idoc type etc. that would help to help you.