CALL TRANSACTION USING statement
Example
CALL TRANSACTION TCODE USING BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO MESSTAB.
CALL TRANSACTION USING, faster than with batch input sessions. In CALL TRANSACTION USING there is no automatic support of interactive correction or logging functions.
The program prepares the data to be transferred once the data is prepared the desired transaction is called and then the data is immediately transferred to SAP database.
CALL TRANSACTION USING supports
Synchronous processing
Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called
You can update the database both synchronously and asynchronously
The program specifies the update type
Separate LUW (logical units of work) for the transaction
The system executes a database commit immediately before and after the CALL TRANSACTION USING statement
No batch input processing log
Session Method
In this method sessions are created in a queue and they are managed. There is support for playing back and correcting sessions that have errors also a detailed log is generated automatically.
The program prepares data and stores in in a batch input session. The session thus created can be for more than one transaction. And this session is maintained in the batch input queue. The sessions thus created can be maintained in a queue and processed either in the back ground or in the fore ground.
Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function module calls from the ABAP program.
The program to create sessions must make calls to SAP function modules for example
BDC_OPEN_GROUP
BDC_CLOSE_GROUP
BDC_INSERT
Session Method Supports the following
Asynchronous processing
Transfers data for multiple transactions
Synchronous database update
During processing, no transaction is started until the previous transaction has been written to the database.
A batch input processing log is generated for each session
Sessions cannot be generated in parallel
The batch input program must not open a session until it has closed the preceding session.
Showing posts with label Call transaction and BDC session method. Show all posts
Showing posts with label Call transaction and BDC session method. Show all posts
Friday, March 7, 2008
Call Transaction VS Session Method
Thursday, March 6, 2008
Creating a BDC session
Creating a BDC session
In the earlier post Recording BDC we had seen how to do a BDC recording using transaction SHDB. We had also created an ABAP program from the BDC recording. In this post we will create a BDC session and run it in foreground. We will also see the log to see if there are any errors.
Once the BDC recording is complete, we can then fine tune the program and use it to upload the data to SAP database.
Once the program is generated from the BDC recording, execute the program and the following screen will appear.

Since we are interested in creating a BDC session will will not select the option 'Call Transaction'

Select 'Generate Session' and execute. The following screen appears. Now we need to go to transaction SM35.

Here we can see the session that we have generated.

We will now process the session.

Click on extended log and process the session in foreground.

The first screen will appear

Second screen

We see message on the following screen that say customer found with the same address. we will later check the log if this messaged has been logged.

linking the vendor

The vendor has also been linked previously to another customer.

Proceed furhter and after a couple of screen you should see the following message.

Click on session overview.

Click on log

Select Analyze session

You can see that both the error messages have been logged.
In the earlier post Recording BDC we had seen how to do a BDC recording using transaction SHDB. We had also created an ABAP program from the BDC recording. In this post we will create a BDC session and run it in foreground. We will also see the log to see if there are any errors.
Once the BDC recording is complete, we can then fine tune the program and use it to upload the data to SAP database.
Once the program is generated from the BDC recording, execute the program and the following screen will appear.
Since we are interested in creating a BDC session will will not select the option 'Call Transaction'
Select 'Generate Session' and execute. The following screen appears. Now we need to go to transaction SM35.
Here we can see the session that we have generated.
We will now process the session.
Click on extended log and process the session in foreground.
The first screen will appear
Second screen
We see message on the following screen that say customer found with the same address. we will later check the log if this messaged has been logged.
linking the vendor
The vendor has also been linked previously to another customer.
Proceed furhter and after a couple of screen you should see the following message.
Click on session overview.
Click on log
Select Analyze session
You can see that both the error messages have been logged.
Subscribe to:
Posts (Atom)
ABAP TIPS
|
Always use Pretty Printer and Extended Program Check before releasing the code. Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive. |