07-13-2012 7:53 PM
Hi,
I am calling FM ABAP4_CALL_TRANSACTION from MS-Excel. This FM works perfectly for me except the system messages that SAP returns are not always understandable or intituative. My question is there another FM or Table that I can use to convert the data from MESS_TAB to a more meaningful message for the users?
Examples listed below:
Normal T-Code Message | FM Message in MESS_TAB | Real Meaning |
---|---|---|
Fill in all required entry fields | COBL-RMVCT | Field COBL-RMVCT is a required field |
Document 400000000 was posted in 130 | 4000000000 130 | Document 400000000 was posted successfully |
Thanks for your Help
07-13-2012 9:53 PM
Hi Karim,
when you have the parameter to generate the message, you can use the following RFC function module:
BAPI_MESSAGE_GETDETAIL
The module has the following interface:
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(ID) LIKE BAPIRET2-ID
*" VALUE(NUMBER) LIKE BAPIRET2-NUMBER
*" VALUE(LANGUAGE) LIKE BAPITGA-LANGU DEFAULT SY-LANGU
*" VALUE(TEXTFORMAT) LIKE BAPITGA-TEXTFORMAT
*" VALUE(LINKPATTERN) LIKE BAPITGA-LINKMASK OPTIONAL
*" VALUE(MESSAGE_V1) LIKE BAPIRET2-MESSAGE_V1 OPTIONAL
*" VALUE(MESSAGE_V2) LIKE BAPIRET2-MESSAGE_V2 OPTIONAL
*" VALUE(MESSAGE_V3) LIKE BAPIRET2-MESSAGE_V3 OPTIONAL
*" VALUE(MESSAGE_V4) LIKE BAPIRET2-MESSAGE_V4 OPTIONAL
*" EXPORTING
*" VALUE(MESSAGE) LIKE BAPIRET2-MESSAGE
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" TEXT STRUCTURE BAPITGB OPTIONAL
Best regards
Thomas
07-13-2012 8:01 PM
Hi Karim,
Create a wrapper RFC which calls your RFC, and there you can add your logic to transform certain messages.
Regards,
Shravan
07-13-2012 8:16 PM
Hi Karim,
Did you try with the function module
FORMAT_MESSAGE.
Regards,
Ramya R
07-13-2012 8:26 PM
Thanks Ramya,
Do you know if there is a Remote enabled version of FM FORMAT_MESSAGE? If it is not remote enabled I will not be able to use it and I am unable to have any new development made to our system. I can possibly look up the message in table T100.
07-13-2012 8:43 PM
Hi Karim,
I thought that you need to transform the messages completely. That is why I suggested a wrapper RFC. FORMAT_MESSAGE is a normal FM. You can mimic it pretty easily though.
Regards,
Shravan
07-13-2012 9:53 PM
Hi Karim,
when you have the parameter to generate the message, you can use the following RFC function module:
BAPI_MESSAGE_GETDETAIL
The module has the following interface:
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(ID) LIKE BAPIRET2-ID
*" VALUE(NUMBER) LIKE BAPIRET2-NUMBER
*" VALUE(LANGUAGE) LIKE BAPITGA-LANGU DEFAULT SY-LANGU
*" VALUE(TEXTFORMAT) LIKE BAPITGA-TEXTFORMAT
*" VALUE(LINKPATTERN) LIKE BAPITGA-LINKMASK OPTIONAL
*" VALUE(MESSAGE_V1) LIKE BAPIRET2-MESSAGE_V1 OPTIONAL
*" VALUE(MESSAGE_V2) LIKE BAPIRET2-MESSAGE_V2 OPTIONAL
*" VALUE(MESSAGE_V3) LIKE BAPIRET2-MESSAGE_V3 OPTIONAL
*" VALUE(MESSAGE_V4) LIKE BAPIRET2-MESSAGE_V4 OPTIONAL
*" EXPORTING
*" VALUE(MESSAGE) LIKE BAPIRET2-MESSAGE
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" TEXT STRUCTURE BAPITGB OPTIONAL
Best regards
Thomas
07-14-2012 9:04 PM