‎2009 Oct 28 8:03 PM
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.
‎2009 Oct 28 11:31 PM
Hi,
Alternatively, you can try using BAPI_ACC_DOCUMENT_POST.
Regards,
Subramanian
‎2009 Oct 28 8:09 PM
The simplest way would be to convert the program to use CALL TRANSACTION rather than submitting a batch input session.
Rob
‎2009 Oct 28 11:31 PM
Hi,
Alternatively, you can try using BAPI_ACC_DOCUMENT_POST.
Regards,
Subramanian
‎2009 Oct 29 12:48 AM
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
‎2009 Oct 29 1:09 PM
You would start by pressing F1 on CALL TRANSACTION and reading the USING BDC_TAB portion.
Rob
‎2009 Oct 30 5:34 PM
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
‎2009 Oct 30 5:59 PM
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
‎2009 Oct 30 7:06 PM
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
‎2009 Oct 30 7:14 PM
‎2009 Oct 30 7:32 PM
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
‎2009 Oct 30 7:50 PM
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
‎2009 Oct 30 9:59 PM
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
‎2009 Oct 31 7:37 PM
Well, I don't know what more I can tell you other than I've done things like this and it works.
Rob
‎2009 Nov 01 6:13 PM
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