2011 Mar 08 8:32 PM
Hi,
i'm sending an outbound 856(IDOC type DELVRY03).
In this,
if the E1EDL26 - PSTYV = ZPAR,
I need to delete the entire information related to that particular line item meaning.. all child segments under the segment E1EDL24.. (because I don't want the material with this item category to go to the customer.)
but I'm confused on how to do it as.. by the time I read the E1EDL26 - PSTYV, i would already have the E1EDL24 segment in my IDOC_DATA. So I need to go back and delete it..
Can someone help me with this.
<promise removed by moderator>
Thanks for all for your help!
Edited by: Thomas Zloch on Mar 8, 2011 9:44 PM
2011 Mar 09 6:45 AM
Hi Sachin,
Could do it for all the Segments above E1EDL26 in the IDOC Structure.
This did not work for the segments after this.
Please advise.
Thanks for your help!
Hi,
i'm sending an outbound 856(IDOC type DELVRY03).
In this,
if the E1EDL26 - PSTYV = ZPAR,
I need to delete the entire information related to that particular line item meaning.. all child segments under the segment E1EDL24.. (because I don't want the material with this item category to go to the customer.)
but I'm confused on how to do it as.. by the time I read the E1EDL26 - PSTYV, i would already have the E1EDL24 segment in my IDOC_DATA. So I need to go back and delete it..
Can someone help me with this.
<promise removed by moderator>
Thanks for all for your help!
Edited by: Thomas Zloch on Mar 8, 2011 9:44 PM
2011 Mar 08 8:47 PM
what is the FM that you are using? Standard FM or Custom Function module ? Why don't you delete the content related to raw delivery data rather than removing it from your segments?
If you are using standard FM like IDOC_OUTPUT_DELVRY, there is a BADI BADI_V56K where you can manipulate your raw data (tab_lips), which will ensure that IDOC_DATA is not even filled...
2011 Mar 09 6:47 AM
Hi Kris,
Thanks for the reply.
I'm using 002 exit to do this change in the function module IDOC_OUTPUT_DELVRY.
Please advise.
Thanks for your help.
2011 Mar 09 3:12 PM
Hi Ravindra,
In IDOC_OUTPUT_DELVRY, check out the subroutine EXIT_BADI_V56K (In this subroutine, there is a call to BADI BADI_V56k)... you need to implement method (RAW_DATA_MANIPULATION)... You can play with the raw data (and remove the rows that you don't want from here (TAB_LIPS)... This is probably the cleanest way to do it and this BADI is provided only for that purpose.
2011 Mar 09 5:04 AM
Hi Ravindra,
In the user exit where you check E1EDL26 - PSTYV, put follwing logic.
loop at Idoc data where sname = 'E1EDL24'.
v_index = sy-tabix.
endloop.
This index will be the line number of Idoc data internal table with E1EDL24.
delete idoc_data index v_index .
do the same thing for E1EDL25 segment.
Regards
Sachin
2011 Mar 09 6:45 AM
Hi Sachin,
Could do it for all the Segments above E1EDL26 in the IDOC Structure.
This did not work for the segments after this.
Please advise.
Thanks for your help!
2011 Mar 09 8:25 AM
Hi Ravindra,
Define one global variable for flag. When your condition get satisfied set this flag = X.
Then in your user-exit in for segname = E1EDL20 delete other segments when flag = X.
case sgname.
when E1EDL20
if flag = X.
loop idoc_data and delete the segments which you would like to delete.
endcase.
Regards
Sachin
Edited by: sachin G patil on Mar 9, 2011 1:55 PM
2011 Mar 09 9:31 AM
Hi Sachin,
I tried with this option.
When I tried with delete idoc_data where segnam eq XXX
it removes all the segments from the IDoc_data with that segment name.
I only want to delete the segments under the item which has the PSTYV as ZPAR.
Is there any way that I can have a delete statement with index and but still check for the segment name?
Please advise.
Thanks for your help!
2011 Mar 09 10:44 AM
Hi Ravindra,
In user exit EXIT_SAPLV56K_002 when SEGNAM = 'FINAL_RUN_DELVRY'. This time the Idoc is fully filled in.
loop at idoc_data.
check the required condition.
then change the name of the segment as 'X' which you want to delete.
endloop.
delete idoc_data where segnam = 'X'.
Regards
Sachin
2011 Mar 09 4:53 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |