Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC

Former Member
0 Likes
577

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
560

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.

6 REPLIES 6
Read only

Former Member
0 Likes
561

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.

Read only

Former Member
0 Likes
560

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

Read only

Former Member
0 Likes
560

use rsbdcsub program.

Rgds

Umakanth

Read only

Former Member
0 Likes
560

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

Read only

Former Member
0 Likes
560

System will still try to process inspite of informative or warning message .

U can see that messages error log .

Read only

Former Member
0 Likes
560

Thanks,