Application Development 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: 

BDC comit Work

Former Member
0 Kudos

Hi Folks

I have a task in BDC, I have to be perform either by using of "Call Transaction" or by "Session Input".

Here I am facing a problem. As per my func. Spec. If the conversion volume 200 records, in the processing or all the records, if there is any errors, I have to be display to user all the errors. But correcr records donot take the upload to transaction. It means the correct records are also dont take the place in the database.

Regarding to this please help me out with good suggestions and piece of code.

Awaiting for your responce

Regards

Praveen

4 REPLIES 4

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

Use include bdcrecx1 in your program (or generate an example program with batch input recorder).

Then you have all the error handling already done by SAP. It's possible to show the transaction during exection or generate a new session just with the error entries, write logs,...

Regards,

Christian

Former Member
0 Kudos

Hi praveen,

When you run a BDC program and the end of the process a log file is generated. It shows how many errors

are generated in the process.

Usually, the errors during the BDC Process are logged. This is for the users to know that at what part of transaction process error has actually occured.

To view the log files transaction code : <b>sm35p</b>

For more information. Click this link...

http://help.sap.com/saphelp_erp2005/helpdata/en/ec/cdaa78d

7f311d3a3ca080009ac98aa/frameset.htm

Hope it helps.

Regards,

Maheswaran.B

Former Member
0 Kudos

Hi Praveen,

I had faced similar issues many times with BDCs. First of all I am assuming that you are running a Call transaction for every record.

If you have the above scenario, then it totally depends upon which transaction are you calling and do you have a simulation mode for it. If not then check if you ever have any simulation FM for this functionality. If you have it then you can simulate it first before the actual upload.

Hope this helps.

Regards,

Srikanth

Former Member
0 Kudos

Hi Praveen,

I think what you need to do is use the call Transaction method and declare a BDC messages table.

DATA : IT_MESSAGES TYPE TABLE OF BDCMSGCOLL OCCURS 0.

...........

....

CALL TRANSACTION 'transaction name' USING BDCDATA MODE 'N' MESSAGES INTO IT_MESSAGES.

READ TABLE IT_MESSAGES WITH KEY TYPE = 'E'.

IF SY-SUBRC <> 0.

COMMIT WORK.

ENDIF.

LOOP AT IT_MESSAGES WHERE TYPE = 'E'.

WRITE : DYNAME, DYNUMB, MSGV1, MSGV2.

WRITE : FLDNAME.

ENDLOOP.

This will display all the records with errors in the form of a list.

Hope it helps....

Lokesh

Pls. reward appropriate points

Message was edited by: Lokesh Aggarwal