2007 May 01 6:33 AM
Hi ,
I have requirement something like that:
-Select of releavant Items
-Process MB04 on the selected items
-Collect errorneous records in batch input file
-Display results
Can you please let me know that <i>Collect errorneous records <b>in batch input file</b></i>
I don't understand <b>what is batch input file</b> and how here I ensure that I have to do Call transaction or Session method.
As per my understanding I should do <b>Call transaction MB04</b> to post the data and if there is error record <b>create the session</b> and do the<b> bdc_Insert</b> so all error records will be stored in the session.But i not sure about this.
Thanks
PK
Hi ,
I have requirement something like that:
-Select of releavant Items
-Process MB04 on the selected items
-Collect errorneous records in batch input file
-Display results
Can you please let me know that <i>Collect errorneous records <b>in batch input file</b></i>
I don't understand <b>what is batch input file</b> and how here I ensure that I have to do Call transaction or Session method.
As per my understanding I should do <b>Call transaction MB04</b> to post the data and if there is error record <b>create the session</b> and do the<b> bdc_Insert</b> so all error records will be stored in the session.But i not sure about this.
Thanks
PK
2007 May 01 4:57 PM
Hi PK,
As per your requirement you need to run call transaction on MB04 for the selected fields and save the error records in a message table using BDCMSGCOLL and display those records as output.
Regards,
Jayaram..
2007 May 01 9:04 PM
Hi,
In Sesssion method, u no need to worry about the error records in the input file SM35 will take care of it,so u have to run the BDC by Call Transaction Only to display the errors in the output at SE38 level.
First Declare an internal table of the same structure as ur input file to capture Error records (eg.IT_ERROR)
In the Call transaction, when the Sy-Subrc is NE 0 mean the record is an Error record, so simply append that record to IT_ERROR.
at last u display IT_ERROR data as error records, better if u maintain the index of the record also which give more accurate error record in the input file,
regards
ganesh
2007 May 01 9:49 PM
Hi,
After inserting the erroneous data in the internal table (like bdcmsgcoll) you need to pick the text of the message, which u can do wither by using Fm format_message or by using table t100 and take that text into some other itab and show it at the end for checking the exact problem for the creation of MB04 record.
regards
gaurav
Message was edited by:
gaurav gupta
Message was edited by:
gaurav gupta
2007 May 02 4:19 AM
Hi Pk
After calling a transaction . You can use the standard function module to store the success and error message.
MESSAGE_TEXT_BUILD' use this function module. with that you can get the info of succesfully posted and error document.
Reward if its helpfull
Manoj
2007 May 02 5:22 AM
hi,
your view is right,but you have to Down load error records into file even you have to use BDCMSGCOLL for erro hadlling.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |