2013 Jan 16 2:23 PM
Hi everyone,
I have to delete a segment from an incoming idoc. (I can't use filters, because there is a special precondition for that)
I implemented the HRALE00INBOUND_IDOC BAdI (PROCESS_IDOC method), and I delete the records from the idoc_data, but when I check it after the processing in BD84 everything is there.
Can you please tell me, how to delete segments from an inbound idoc? I did a search but every topic is about the outbound idoc processing.
Thanks
N.
2013 Jan 17 8:29 AM
Hi everyone,
The iDoc can be filtered in the inboud plug. The mentioned badi is perfect for this: HRALE00INBOUND_IDOC~PROCESS_IDOC method. My solution was perfect for the first time, the only mistake I made, was that in BD87 the full idoc is visible (even if I deleted the idoc_data) But when it was processed the actual data is correctly filtered.(in this case, If I deleted one pernr's data from the idoc, the data was not inserted to the HR masterdata, even if it was in BD87)
Bye
N.
2013 Jan 16 2:41 PM
Hi Nandor,
it is not the sense of this BAdI to change the IDoc structures with DB commit on Inbound processing. The only reason to allow changes on idoc_data itab in the BAdI is to modify the Idoc data at runtime for inbound processing.
You can check the program behaviour in the FM IDOC_INPUT_HRMD. After the BAdI you"ll find only reading acess to idoc_data.
Generally: If an IDoc comes into SAP system via port, the idoc data will be write to database (EDIDD) If you want to change the IDoc (Segments or fields) it should take place always before inbound. Eighter at outbound procesing or due to EDI Converter.
Kind Regards
Robert
2013 Jan 16 2:56 PM
Hi Robert,
Thanks for the answer. the full requirement is: If an HRMD_A type iDoc comes into our system, the system should not process some personnel numbers, and completely skip the segments related to a specific personnel number.
Can you tell me where to remove that unwanted segments? Is there a BAdI, or anything where I can remove the unnecessary segments? Or the only way is to delete it from the database?
Thanks
Nandor
2013 Jan 16 3:07 PM
Hi Nandor,
I suppose that you can avoid to process some personal no. if you just make the affected segments empty in the BAdI. This seems to be a possibillity but it will not looks very konsistant if you still have data in incoming idoc they are not been posted.
An other option, who are more transparent could be to take all relevant idoc segments in the BAdI to create a new valid IDoc at inbound processing and set the proper idoc to the status 68 (not relevant, but can be archived).
Kind Regards
Robert
2013 Jan 16 2:41 PM
2013 Jan 16 2:47 PM
2013 Jan 16 2:52 PM
2013 Jan 17 8:29 AM
Hi everyone,
The iDoc can be filtered in the inboud plug. The mentioned badi is perfect for this: HRALE00INBOUND_IDOC~PROCESS_IDOC method. My solution was perfect for the first time, the only mistake I made, was that in BD87 the full idoc is visible (even if I deleted the idoc_data) But when it was processed the actual data is correctly filtered.(in this case, If I deleted one pernr's data from the idoc, the data was not inserted to the HR masterdata, even if it was in BD87)
Bye
N.
2016 Mar 14 8:59 AM
Hi Nandor,
Is there a specific function module or method you can use to delete a whole segment?
Kind Regards
Deon