Second way to give message in sap abap
DATA lo_container TYPE REF TO /iwbep/if_message_container.
" get message container object
lo_container = me->mo_context->get_message_container( ).
lo_container->add_message(
exporting
iv_msg_type = 'E'
iv_msg_text = 'ROHAN PANDEY'
iv_msg_id = '1'
iv_msg_number = '100'
iv_add_to_response_header = abap_true " Flag is set to show msgs on header
).
lo_container->add_message(
exporting
iv_msg_type = 'S'
iv_msg_text = 'Sales Order Creation Sucessfully'
iv_msg_id = '2'
iv_msg_number = '99'
iv_add_to_response_header = abap_true " Flag is set to show msgs on header
).
" get message container object
lo_container = me->mo_context->get_message_container( ).
lo_container->add_message(
exporting
iv_msg_type = 'E'
iv_msg_text = 'ROHAN PANDEY'
iv_msg_id = '1'
iv_msg_number = '100'
iv_add_to_response_header = abap_true " Flag is set to show msgs on header
).
lo_container->add_message(
exporting
iv_msg_type = 'S'
iv_msg_text = 'Sales Order Creation Sucessfully'
iv_msg_id = '2'
iv_msg_number = '99'
iv_add_to_response_header = abap_true " Flag is set to show msgs on header
).
Comments
Post a Comment