06-29-2009 5:53 PM
Hi ABAP Gurus,
I need to provide a resolution urgently.
I need to stop IDocs from further processing if the Company Code segment is not there for CREMAS05 Message Type data when it is sent to the partner. IDOC_INPUT_CREDITOR is the funtion module
Also tell me the UserExit/BADI that I can use to stop the IDOCs and how to do that.
Thanks,
Micheal
06-30-2009 6:39 AM
Hi,
You can try to write a custom function module and pass as the in process code instead of using the standard function module IDOC_INPUT_CREDITOR, in which you can check the segment for the company code and pass it further only if the segment is filled or else you can stop proceeding the IDOC.
There won't be much coding also involved if you use a custom function module just call the IDOC_INPUT_CREDITOR in the custom function module with the same interface parameters as in the IDOC_INPUT_CREDITOR and map them accordingly. before passing the data just check the particular segment is filled or not.
Regards
Sarves
06-30-2009 6:39 AM
Hi,
You can try to write a custom function module and pass as the in process code instead of using the standard function module IDOC_INPUT_CREDITOR, in which you can check the segment for the company code and pass it further only if the segment is filled or else you can stop proceeding the IDOC.
There won't be much coding also involved if you use a custom function module just call the IDOC_INPUT_CREDITOR in the custom function module with the same interface parameters as in the IDOC_INPUT_CREDITOR and map them accordingly. before passing the data just check the particular segment is filled or not.
Regards
Sarves
06-30-2009 7:23 AM
I would recommend using Enhancment points(Implicit Enhancement point) instead of creating Z-FM. You can define an Enhancement point at the start of the form (Form : IDOC_POST in Include: LKD02F01 ) & perform your validations.
loop IDOC data for 'Company Code segment' if found, continue processing. Else Exit.
- SM