Funktionsbaustein MESSAGE TEXT BUILD
Aus SAP-Wiki
Zur Navigation springenZur Suche springen
Mit dem Funktionsbaustein MESSAGE_TEXT_BUILD kann man recht schnell aus den Systemmeldung mit bis zu 4 Parametern einen String füllen.
Muster
CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING msgid = msgnr = * MSGV1 = ' ' * MSGV2 = ' ' * MSGV3 = ' ' * MSGV4 = ' ' * IMPORTING * MESSAGE_TEXT_OUTPUT = .
Projektbeispiel
DATA lv_bapi_result TYPE bapi_msg. CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING msgid = ls_msg-msgid msgnr = ls_msg-msgno msgv1 = ls_msg-msgv1 msgv2 = ls_msg-msgv2 msgv3 = ls_msg-msgv3 msgv4 = ls_msg-msgv4 IMPORTING message_text_output = lv_bapi_result.
MESSAGE lv_bapi_result TYPE 'I' DISPLAY LIKE 'E'.