‎2008 Jun 17 11:29 AM
Hi All,
How to handle a situation in BDC if status messages occur in
background processing. ( In BDC if any information message or status message
occur in foreground then we press enter to continue the process, if it occurs
in background how to handle.)
Thanks,
Murali
‎2008 Jun 17 11:31 AM
Hi,
DATA: x_ctuprms TYPE ctu_params.
x_ctuprms-dismode = 'N'.
x_ctuprms-updmode = 'A'.
x_ctuprms-defsize = 'X'.
DATA: w_msg(100).
LOOP AT it_msgtab INTO wa_msgtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = wa_msgtab-msgid
lang = wa_msgtab-msgspra
no = wa_msgtab-msgnr
v1 = wa_msgtab-msgv1
v2 = wa_msgtab-msgv2
IMPORTING
msg = w_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CONDENSE w_msg.
CLEAR wa_messages.
wa_messages-msgtyp = wa_msgtab-msgtyp.
wa_messages-message = w_msg.
wa_messages-bmatn = wa_file-bmatn.
APPEND wa_messages TO it_messages .
ENDLOOP.
REFRESH it_msgtab.
‎2008 Jun 17 11:31 AM
Hi,
DATA: x_ctuprms TYPE ctu_params.
x_ctuprms-dismode = 'N'.
x_ctuprms-updmode = 'A'.
x_ctuprms-defsize = 'X'.
DATA: w_msg(100).
LOOP AT it_msgtab INTO wa_msgtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = wa_msgtab-msgid
lang = wa_msgtab-msgspra
no = wa_msgtab-msgnr
v1 = wa_msgtab-msgv1
v2 = wa_msgtab-msgv2
IMPORTING
msg = w_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CONDENSE w_msg.
CLEAR wa_messages.
wa_messages-msgtyp = wa_msgtab-msgtyp.
wa_messages-message = w_msg.
wa_messages-bmatn = wa_file-bmatn.
APPEND wa_messages TO it_messages .
ENDLOOP.
REFRESH it_msgtab.
‎2008 Jun 17 11:36 AM
if error occured occured in the program process in back ground then it will create a session in the sm35 and they will processed in foreground
‎2008 Jun 17 11:41 AM
‎2008 Jun 17 11:47 AM
Hi,
No need to handle in code when we are getting status messages, even the BDC executes in back ground. System automatically take care about that, only the process will stop when the message type is 'E' or 'A'.
Rgds,
Bujji
‎2008 Jun 17 12:02 PM
System will still try to process inspite of informative or warning message .
U can see that messages error log .
‎2008 Jun 19 7:53 AM