Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in call transaction method/session method

Former Member
0 Likes
338

Hi all,

suppose we are uploading 10,000 records to SAP through call transaction or session. suppose we found from 3000 -5000 records contain errors how do we process them with out manual interaction (modification) in both methods.

2>why do we use session method for large data processing and why do we use call transaction method for small amount of data .

please let me know the differences

thanks in advance.

1 REPLY 1
Read only

Former Member
0 Likes
297

Hi u need to do this..

BDC_OPEN_GROUP

session name = <name>

..........

..........

CALL TRANSACTION 'TFCA' USING BDCDATA

MODE 'A'

UPDATE 'S'.

MESSAGES INTO MESSTAB.

IF SY-SUBRC <> 0.

<Error_handling>.

BDC_INSERT

............

ENDIF.

BDC_CLOSE_GROUP.

<b>Now all the erronous transactions will be stored in A SESSION..

Now go to SM35 and there u will find ur session..

Now check that session and press PROCESS .. Now u select the foreground processing ... Now u can give correct values for the faulty fields...</b>

Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures. ( But the advantage of CALL TRANSACTION IS FASTER THAN ANY OTHER bdc METHOD , So we have to use this.. for time considerations )

You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0 (SY-SUBRC , Call transactions sets sy-subrc to zero if the transactions is successfull ) , then you should do the following:

write out or save the message table ..

use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction ( Here u need to use the FM BDC_INSERT to create a session onli for the erronous transactions ). You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

This is the best way for a BDC program to get executed successfully and more efficiently....

<b>

reward if it helps u...</b>

sai ramesh