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 direct processing (SM35) within the program with error log

Former Member
0 Likes
2,418

Hi Gurus!

I have created a BDC program to upload the transcation FB01

froma a tab delimited file .My program works fine

and updating the FB01 screens correctly . What I ahve done in the

program is that as soon as the file name is entered in the

selection screen and executed it shows the message

"Check Session FB01UPLOAD in SM35 for processing job".

Then we have to goto SM35 and either manually process or in background

processing and then only its uploaded.

What I would like to do is , as it would be used by the user and they wont be able to

gotoSM35transaction , I would like my program to

directly do the processing also within the program itself and instead of

giving the above message should give me error log

saying that these were the records that were not uploaded with the list of

data that were not uploaded , in the output.

Could anyone please tell me how to or what would I ahve to add to my proram

so that this can happen , I mean the processing is done within the BDC

program and error message is created with a lit of all error data?

Thanks a lot in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,114

Hi,

Alternatively, you can try using BAPI_ACC_DOCUMENT_POST.

Regards,

Subramanian

13 REPLIES 13
Read only

Former Member
0 Likes
2,114

The simplest way would be to convert the program to use CALL TRANSACTION rather than submitting a batch input session.

Rob

Read only

Former Member
0 Likes
2,115

Hi,

Alternatively, you can try using BAPI_ACC_DOCUMENT_POST.

Regards,

Subramanian

Read only

0 Likes
2,114

How do I convert my DBI Bdc program into Call transaction . I ahve alreday coded for it , just want to chnage to call transaction if that will solve the problem.

Thanks

Read only

0 Likes
2,114

You would start by pressing F1 on CALL TRANSACTION and reading the USING BDC_TAB portion.

Rob

Read only

0 Likes
2,114

Hi !

I have been able to create the BDC program with CALL transaction method with it showing the wrror messages in the output.

Presently when I run a file with teh program what it does is uploads the the file and shows the error or success messages in the output.

If teh fiule entered has few data which is correct and few records that are incorrect , what it does is it uploads the correct daat onto FB01 and dosent upload the records that are incorrect and displays it in the output the success records and the ones which failed. Is it possible to execute the program in such a way that the error handling is done in a way that if there is even one record which is incoorect , the entire file is not uploaded , I mean no record is uploaded and the error messge given saying that this particular record or the line number of teh record is incorrect so the entire file dosent get uploaded. Later that record can be updated correctly and thenthe program can be run agaian for teh entire file to be uploaded. Right now the correct records are getting uploaded and the invorrect ones not , but I want the program to not upload any record even if there is one wrong entry in teh file?

Thanks and help will be greatly appreciated.

Thanks

Aarav

Read only

0 Likes
2,114

I would do it the opposite way - let the CALL TRANSACTION take care of updating the correct transactions and then checking the return table after each call. The rejects can then be put into a batch input session that the users can run and correct.

Alternatively, FB01 has a "simulate" function. You could have a radiobutton on the selection screen - Test and Update. If the test button is pressed, the program uses the "simulate" function; otherwise, it uses save. Be aware that not all errors may be captured in simulate.

Rob

Read only

0 Likes
2,114

Yes , thats right , presently as I said Im doing the same thing , letting the call transcation do it , update if the record is correct and if wrong give the errro message with error , but I would like to do it the other way , like if theer is even one entry wrong in the file , it should not update any record from the file into FB01 giving the errro location or the error line or lines on teh file.

Thanks

Read only

0 Likes
2,114

Then, like I said - use the "simulate" button.

Rob

Read only

0 Likes
2,114

Hi1

And how do we go about doing that , I am not aware as to how to do it. I ahve all my program working as I said , but where exactly do I put a check such that as soon as it finds an error record in the file it just gives the error ed file with its error and dosent update any record from that file unlike now.

Thanks

Read only

0 Likes
2,114

Like I said, when creating the batch input session, you have to press "simulate" rather than "save". Then check the return table to see if there are any errors. When there are no errors, process using "save".

Rob

Read only

0 Likes
2,114

Sorry but I still am having problem and I am not able to get all the errored file show up in output and file with successful records still getting updated and success and error msgs showing up .

Thanks

Read only

0 Likes
2,114

Well, I don't know what more I can tell you other than I've done things like this and it works.

Rob

Read only

0 Likes
2,114

Hi!

<< Please respect the 2,500 character limit in individual posts. Post only the relevant portion of code >>

Edited by: Rob Burbank on Nov 1, 2009 5:30 PM