I want to create a BDC(session Method).
This program should have the following things-
1.Should Create and run the session instead of processing it from transaction SM35.
2.The output of the program should display the error log of the session.
3. This error log should be sent to concerned persons as mail.
Is it possible to do it in a single program.
Thanks in advance.
If you want to do all this from one program why don't you use CALL TRANSACTION and then if it fails add the session to the SM35 queue?
With this you can:
1 Create and run the transaction from the program using CALL TRANSACTION
2 Display the error log (by looping through the messages table issued from CALL TRANSACTION)
3 Issue an email with the error messages (again by using the messages table).
Then, if you want to keep a BDC session in SM35 for later processing you could <b>submit it to the queue only in the event that the CALL TRANSACTION failed </b>. If you wanted to leave this in error status you could then submit the program RSBDCSUB to process the session.
Hope that helps.