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 call transaction

Former Member
0 Likes
1,287

Hi,

i am using call transaction in BDC :

here generenally for error messages we can handle through msgcol structure and continue the process, it is ok

but here we get the  Warning Messages and the execution process is going to be stop.

is there any kind of solution for this ?

plz give me suggestion

Thanks & regards

vsr

Hi,

i am using call transaction in BDC :

here generenally for error messages we can handle through msgcol structure and continue the process, it is ok

but here we get the  Warning Messages and the execution process is going to be stop.

is there any kind of solution for this ?

plz give me suggestion

Thanks & regards

vsr

10 REPLIES 10
Read only

Former Member
0 Likes
1,237

You can trap all the messages you get during the CALL TRANSACTION statement by the following code.

DATA:  GT_BDCDATA         LIKE BDCDATA     OCCURS  WITH  HEADER  LINE,
       GT_BDCMSG         
LIKE BDCMSGCOLL  OCCURS  WITH  HEADER  LINE,

       CTU_PARAMS         TYPE CTU_PARAMS.

*Also check about these three lines too.

    CTU_PARAMS-DISMODE = 'N'.
    CTU_PARAMS-UPDMODE =
'S'.
    CTU_PARAMS-DEFSIZE =
'X'.

CALL  TRANSACTION  'XXX'  USING GT_BDCDATA OPTIONS
                                    
FROM CTU_PARAMS
                                     MESSAGES 
INTO  GT_BDCMSG.

then you can.

LOOP AT GT_BDCMSG.

*Here you can manke use of the "format_message" FM.

ENDLOOP.

Read only

0 Likes
1,237

Hi,

Thanks for u r valuable replay , i will try this way

Read only

0 Likes
1,237

Hi, Thank u very much i will try this

Read only

Former Member
0 Likes
1,237

With using non batch mode you should add  "ENTER" bdc_okcode ( \00 )  for all possible warning message.

Check if you can use batch mode for call transaction

Read only

Former Member
0 Likes
1,237

Even warnings are captued in msgcol.

Simple way to handle warnings and process the transaction is have an extra 'Enter' .

We just need to make sure that all actions would be similar to what we do during manual process of the transaction.

Priya.

Read only

Former Member
0 Likes
1,237

This thread will help u

http://scn.sap.com/thread/770507

Read only

Former Member
0 Likes
1,237

Apart form all those that has been already mentioned above, you should also check for sy-subrc value after a bdc call transaction. Values can 0 and >1001. Sy-subrc 0 value is set for all kind of messages...including error and abends.

>1001 is set for input errors. input errors occur when there is a problem in BDC recording generally. If we have a problem in BDC recording, msgcol table returns success messages with the input errors. So only way of knowing that there is an input error is chk the sy-subrc value. For detailed help, see the documentation for call transaction. It is pretty much well explained there.

Read only

Former Member
0 Likes
1,237

Check on your BDC documentation.  If I remember correctly, only E, A, X would stop a BDC from continuing, e.g., message types I, W, S are IGNORED by BDC call transaction processing.

Read only

Former Member
0 Likes
1,237

Hi

put mode 'N'.

if u have any q's let me know

Regards

mahesh

Read only

0 Likes
1,237

Hi,

Thank u very much i will try it once