‎2008 May 20 7:17 AM
hi experts
while uploading data into the r/3 using call transaction or session method error occured in the middle of the processing then how these methods behaves it transfers next records or not?
‎2008 May 20 9:56 AM
hai
Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.
Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.
While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.
the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).
so the session method should not return any value.
In call transaction method data is directly pass to the SAP system.
So its compulsory return the value.
Because of the call transaction is the function.
A function should return the value mandatory
In session method errors stroed in SYSTEM GENRATED ERROR LOG.
IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.
‎2008 May 20 10:02 AM
Hi,
Incase of session method, once it completes the processing then only the data is updated in the database.
Incase of CALL TRANSACTION, it depends on the mode you are using. It will update record by record.
in "N" mode: it will skip the error records and update the database with successful records.
in "A" mode, it will stop when an error encounters. the previous records if successful are updated into the database.
in "E" mode, it will stop when the error encounters. the successful records upto that point are updated into the database.
Hope this is clear.
Reward points if helpful.
Thanks and Regards.
‎2008 May 20 10:12 AM
Hi Naresh,
Both Session and Call Transaction methods have their own ways of processing and updating.
In Session method, when we run our BDC prg,. the records are submitted for processing. If any errors occur, they are stored in the Error log in SM35. For updating the data present in the records through the session method, we need to process the corresponding GROUP created for the session method in order to UPDATE the transaction.
In CALL TRANSACTION Method, we need to handle the errors explicitly. There is no inbuilt way to handle the errors in this method, so we can use the standard strycture BDCMSGCOLL to explicitly handle the errors in the method. Here , the processing and updating of the records are carried out simultaneously, when we execute our BDC prg.
Hope this is helpful to you. If you need further information, revert back.
Reward all the helpful answers.
Regards
Nagaraj T
‎2008 May 20 10:19 AM
Hi Naresh,
Check below links. U will get all the info u need.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/09715a543b11d1898e0000e8322d00/frameset.htm
Thanks,
Vinod.