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 Session

Former Member
0 Likes
423

Hi,

I am dealing with session method. Suppose I am processing for one customer no. While calling the transaction is it

possible that in for a single entry internal table JTAB( internal table for error handling like BDCMSGCOLL) having multiple value??

i.e.

loop at i_kunnr.

call transaction 'ZXY' using ITAB messages JTAB.

endloop.

*suppose in i_kunnr = 2129 then is it possible JTAB having 2 entries??

3 REPLIES 3
Read only

Former Member
0 Likes
395

Yes, it is possible that error handling table might be containing multiple entries.

Read only

Former Member
0 Likes
395

Hi..,

Yes , it holds all the messages ...i mean multiple messages also it can hold for a single transaction...

and the syntax is ...

<b>loop at i_kunnr.

call transaction 'ZXY' using ITAB messages into JTAB.

endloop. </b>

But to collect all those messages in the loop itself u need to again loop at the messages table ,,, then onli u can get all the messages regarding that particular transaction... if u are clearing the Messages table, at the end of the loop .

Observe this code ...

This code is for displaying the messages of a particular material <b>fs_material-matnr</b>.. i am using loop at t_messages tab.. to get all the multiple messages collected while updating this material..

<b> loop at t_messages into fs_messages.

call function 'FORMAT_MESSAGE'

exporting

id = fs_messages-msgid

lang = sy-langu

v1 = fs_messages-msgv1

v2 = fs_messages-msgv2

v3 = fs_messages-msgv3

v4 = fs_messages-msgv4

importing

msg = lw_mesg_text

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.

if fs_messages-msgtyp eq 'S'.

fs_out_tab-icon = '@08@'.

elseif fs_messages-msgtyp eq 'W'.

fs_out_tab-icon = '@09@'.

elseif fs_messages-msgtyp eq 'E'.

fs_out_tab-icon = '@0A@'.

endif.

fs_out_tab-msgtyp = fs_messages-msgtyp.

fs_out_tab-matnr = fs_material-matnr.

fs_out_tab-msgtxt = lw_mesg_text.

fs_out_tab-werks = fs_material-werks.

append fs_out_tab to t_out_tab.

clear : fs_out_tab, lw_mesg_text, fs_messages.

endloop. " Loop at</b>

regards,

sai ramesh

Read only

Former Member
0 Likes
395

Hi,

While doing the BDC, transaction might through the Warning message Success massage Information message and the Error message, except the error message BDC will ignore all the messages, but all the messages will be stored in the JTAB internal table

Regards

Sudheer