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
725

1. can we use both At line-selection and At user-command at a time in program if yes? pls give one example?

2. when executing call transaction if error occurs that error will be shown at that time or after completion?

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
697

Hi,

2.If call transaction is used for mode 'N',then you need to use i_msg(call transaction tcode using itab Mode 'N' update 'S' messages into i_msg.) to handle message.

DATA: W_TEXTOUT LIKE T100-TEXT.

LOOP AT I_MSG.

IF I_MSG-MSGTYP = 'E'.

CALL FUNCTION 'MESSAGE_TEXT_BUILD'

EXPORTING

MSGID = I_MSG-MSGID

MSGNR = I_MSG-MSGNR

MSGV1 = I_MSG-MSGV1

MSGV2 = I_MSG-MSGV2

MSGV3 = I_MSG-MSGV3

MSGV4 = I_MSG-MSGV4

IMPORTING

MESSAGE_TEXT_OUTPUT = W_TEXTOUT.

endloop.

8 REPLIES 8
Read only

gopi_narendra
Active Contributor
0 Likes
697

1. No supposed to be not used

2. Errors are shown at the end. Messages are collected into BDCMSGCOLL and displayed on ending the transaction

Regards

- Gopi

Read only

0 Likes
697

session method also same

Read only

0 Likes
697

session metod sm35 it show the error log.

kishan negi

Read only

0 Likes
697

For session methods SM35 shows the log of errors, from where we can know the error and reprocess the session

Regards

- Gopi

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
698

Hi,

2.If call transaction is used for mode 'N',then you need to use i_msg(call transaction tcode using itab Mode 'N' update 'S' messages into i_msg.) to handle message.

DATA: W_TEXTOUT LIKE T100-TEXT.

LOOP AT I_MSG.

IF I_MSG-MSGTYP = 'E'.

CALL FUNCTION 'MESSAGE_TEXT_BUILD'

EXPORTING

MSGID = I_MSG-MSGID

MSGNR = I_MSG-MSGNR

MSGV1 = I_MSG-MSGV1

MSGV2 = I_MSG-MSGV2

MSGV3 = I_MSG-MSGV3

MSGV4 = I_MSG-MSGV4

IMPORTING

MESSAGE_TEXT_OUTPUT = W_TEXTOUT.

endloop.

Read only

Former Member
0 Likes
697

Hi

1. u cant use those two events at a time in ordinary reports.

but u can use in ALV reports.

2. If u want collect errors in call transaction.

Create an internal table(I_MSG) like BDCMSGCOLL and .

call transaction 'XK01' using (internal table name)

update 'A/S'

mode 'A/E/N'

messages into I_MSG.

then after that print I_MSG.(see the fields in BDCMSGCOLL).

regards,

srinivas

Read only

Former Member
0 Likes
697

Hi

1. u cant use those two events at a time in ordinary reports.

but u can use in ALV reports.

2. If u want collect errors in call transaction.

Create an internal table(I_MSG) like BDCMSGCOLL and .

call transaction 'XK01' using (internal table name)

update 'A/S'

mode 'A/E/N'

messages into I_MSG.

then after that print I_MSG.(see the fields in BDCMSGCOLL).

regards,

srinivas

Read only

Former Member
0 Likes
697

hi madhav,

we are not supposed to use both at a time.

in case of call transaction we have to query messages with that using i_msg call.It will be shown after u process and stops when error occurs

in case of session method it will produce error logs. u can see that in sm35.

thanks®ards

magesh

Message was edited by:

magesh anandan