cancel
Showing results for 
Search instead for 
Did you mean: 

How to Delete Parent Segment and its child segments in IDOC

former_member604516
Discoverer
0 Kudos

HI Experts,

We have a requirement where we have to drop the Parent segment E1EDL24 and its child segments from idoc if qty field LFIMG = 0.000

I am facing issue for deleting/dropping child segment.

I have tried the below logic to delete the Child segments:

When PGNUM of Segments in IDOC_DATA = E1EDL24-SEGNUM,

Then it will fetch all the respective segments and marked as deletion.

But here the issue with Child’s Child Segment as the PGNUM which is ‘423’ is different from E1EDL24-SEGNUM ‘421‘.

So it is not able to delete the E1EDL27 segment.

Can anyone please suggest how to delete the Child’s child segment of a Parent Segment in IDOC.

Thanks in Advance!!!

Thanks & Regards,

Priyabrat Pattanayak

Accepted Solutions (0)

Answers (2)

Answers (2)

DominikTylczyn
Active Contributor

You may try to use IDoc Views

You haven't said how you generate your IDocs so I'm not able to tell if IDoc Views are supported in your scenario - excerpt from SAP Help:

Integration

The application must support this function: The program which writes the application data in the IDocs must carry out the following tasks:

  • Determine from the partner profiles whether a view exists. To determine this, the function module EDI_PARTNER_READ_OUTGOING is called.
  • Query, which segments belong to the view. The function module EDI_VIEW_READ is called once, which returns the segments in a table.
  • Query, whether the current segment should be maintained in the current view. The table returned by EDI_VIEW_READ is used. For a list of IDoc Interfaces that support IDoc views, see SAPNet Note 185445.

Best regards

Dominik

former_member806700
Discoverer
0 Kudos

Hi priyabrat_sapk

Were you able to implement this, I have a similar requirement. Can you provide inputs? Thanks