Issue: Invoice Receipt output type triggering both Header and Item which is causing multiple duplicate Idocs with same data.
Solution: This is a standard SAP behavior.
- If you want to avoid more than one message generated during invoice creation, there is no standard way to achieve this requirement.
- As a workaround, a custom requirement routine for application MR can be created and then activated.(Select the requirement and go to the menu bar: Edit -> Activate)
E.g. routine 910: The following coding is just an example.
In the below example the system would not create a message on item level.
*&———————————————————————*
*& Form KOBED_700
*&———————————————————————*
* text
*———————————————————————-*
FORM kobed_700.
sy-subrc = 0.
ENDFORM. “KOBED_700
*&———————————————————————*
*& Form KOBEV_700
*&———————————————————————*
* text
*———————————————————————-*
FORM kobev_700.
IF pi_item = ‘X’.
sy-subrc = 4.
ENDIF.
ENDFORM. “KOBEV_700
Finally, the custom requirement needs to be assigned to the message schema ‘MR0002 Logistics Inv. Ver. (MR1M)’ and the condition type ZXXX.
Note: When you create new Routine, you must ask ABAP to include the running of the program RV80HGEN in the Transport Request otherwise the routine won’t work in Quality and Production system.
If it is not included in the TR, you must run in Quality and Production once the TR is moved.

For more such blogs and videos, you can follow Ganesh Padala on YouTube, Udemy and LinkedIn.
Happy learning and keep sharing.
Thanks, and Best Regards,
Ganesh Padala