0% found this document useful (0 votes)
229 views1 page

How To Process BDC Session Programmatically and Capture Errors Instead of Manual sm35

This document provides a code sample for programmatically processing a BDC session that was created in a program, capturing any errors, instead of manually using transaction SM35. The code sample shows how to post the BDC session programmatically using function module SUBMIT with parameters to specify the session. It then selects the queue ID for the session log and submits another function module to display the session's error log if a queue ID was found.

Uploaded by

Chris Bailey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
229 views1 page

How To Process BDC Session Programmatically and Capture Errors Instead of Manual sm35

This document provides a code sample for programmatically processing a BDC session that was created in a program, capturing any errors, instead of manually using transaction SM35. The code sample shows how to post the BDC session programmatically using function module SUBMIT with parameters to specify the session. It then selects the queue ID for the session log and submits another function module to display the session's error log if a queue ID was found.

Uploaded by

Chris Bailey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

How to process BDC session programmatically and

capture errors instead of manual sm35


You can create BDC session through your program... and then process it using transaction
SM35. You can now check the error log for errors if any. After you have created BDC
code to create session, the code sample below enables you to process the session you
have created in your program, and captures errors if any programatically.

* Post BDC session programatically


SUBMIT rsbdcsub WITH mappe EQ v_session "v_session contains the session name
you have created in your program
WITH von EQ sy-datum
WITH bis EQ sy-datum
AND RETURN.

* Displaying session for errors


* selection for qid to display session log
SELECT SINGLE qid
INTO v_qid FROM
apqi WHERE
datatyp = 'BDC'
AND groupid = v_session
AND progid = sy-repid
AND userid = sy-uname
AND credate = sy-datum.
IF v_qid IS NOT INITIAL.
* submit the program for BDC session error log
SUBMIT rsbdc_protocol
WITH session EQ v_session
WITH user EQ sy-uname
WITH queue_id EQ v_qid
AND RETURN.

You might also like