Adding output message to a quotation/order/delivery/invoice

If there is a requirement for adding output message to a quotation/order/delivery/invoice automatically (not through configuration), it can be achieved by calling SAP function modules RV_MESSAGES_INSERT followed by RV_MESSAGES_UPDATE. These two FMs should be called in the same sequence, with insert followed by update. If the output message is not being added at the desired location, you may need to include a commit work, depending on where you are writing your piece of code.

VA03, VL03N, VF03

Normal issue looked while utilizing RV_MESSAGES_INSERT and RV_MESSAGES_UPDATE.

* You would have the option to see the result message just in Show mode (ex VA23/VA03/VL03N/VF03) yet NOT in Change mode (for example VA22/VA02/VL02N and so forth).
Solution: Pass NAST-MANUE = ‘X’. ” Message processed manually

Test code to put Result Message to Conveyance Header:

wa_nast-kappl = ‘V2’.
wa_nast-objky = wa_likp-vbeln.
wa_nast-mandt = wa_likp-mandt.
wa_nast-kschl = ‘ZINV’.
wa_nast-spras = ‘E’.
wa_nast-parnr = wa_likp-kunnr.
wa_nast-parvw = ‘SH’.
wa_nast-erdat = sy-datum.
wa_nast-eruhr = sy-uzeit.
wa_nast-nacha = ‘8’.
wa_nast-vsztp = ‘1’.
wa_nast-manue = ‘X’. ” Message processed manually (This is important)

APPEND wa_nast TO i_nast.

CALL FUNCTION ‘RV_MESSAGES_INSERT
TABLES
tab_xnast = i_nast.

CALL FUNCTION ‘RV_MESSAGES_UPDATE
EXPORTING
msg_kappl = wa_nast-kappl
msg_objky = wa_nast-objky.

COMMIT WORK.

To get updates about our new tips and tricks, including adding output message to a quotation/order/delivery/invoice, please subscribe. We respect your privacy and take its protection seriously. If you found this helpful, feel free to share it. Thank you so much for your time!

 

YOU MAY BE INTERESTED IN

Do all ABAPers know Fixed Point Arithmetic?

SAP ABAP on HANA

SAP ABAP CRM Tips

X
WhatsApp WhatsApp us