Application Development 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: 

In Call Transaction

Former Member
0 Kudos

Hi experts,

In call transaction if their are 100 records to be uploaded and if their is error in 31 st record then what happens.

mean does the uploading stops at 30 records are it will leave 31st record upload all reaming record.

Please explain more elaborately.

Thank you.

4 REPLIES 4

naveen_inuganti2
Active Contributor
0 Kudos

Hi Praveen....

You hav to upload 100 records.

Upto 30 records no errors.

But you are having error in 31 st records...

So call transaction method stops data assigning to SAP Layout at that record.

And it will updates remaining records.

Example program with VA41 transaction.. with 3rd record as error.

Prepare one flat file with following entreis.... and separeator as TAB....and file name AAA.

>>ZVAL US01 DS 00

>>ZVAL US01 DS 00

>>ZVAR US01 DS 00 <----error record

>>ZVAL US01 DS 00

And in SE38, write following code.

>include bdcrecx1.

>

>data: begin of record OCCURS 0,

> AUART_001(004),

> VKORG_002(004),

> VTWEG_003(002),

> SPART_004(002),

> end of record.

>

>start-of-selection.

>call function 'GUI_UPLOAD'

> exporting

> FILENAME = 'C:\File path\AAA.TXT '

> FILETYPE = 'ASC'

> HAS_FIELD_SEPARATOR = 'X'

> TABLES

> DATA_TAB = RECORD.

>

>

>loop at record.

>perform bdc_dynpro using 'SAPMV45A' '0101'.

>perform bdc_field using 'BDC_CURSOR'

> 'VBAK-SPART'.

>perform bdc_field using 'BDC_OKCODE'

> '/00'.

>perform bdc_field using 'VBAK-AUART'

> record-AUART_001.

>perform bdc_field using 'VBAK-VKORG'

> record-VKORG_002.

>perform bdc_field using 'VBAK-VTWEG'

> record-VTWEG_003.

>perform bdc_field using 'VBAK-SPART'

> record-SPART_004.

>perform bdc_dynpro using 'SAPMV45A' '4001'.

>perform bdc_field using 'BDC_OKCODE'

> '/EBAC1'.

>perform bdc_transaction using 'VA41'.

>endloop.

OUTPUT:

>CALL_TRANSACTION VA41 Return code = 0 RECORD: 0

>

>CALL_TRANSACTION VA41 Return code = 0 RECORD: 0

>

>CALL_TRANSACTION VA41 Return code = 1,001 RECORD: 0

>E Formatting error in the field VBAK-AUART ; see next message

>E Entry ZVAR does not exist in TVAK 4 (check entry)

>

>CALL_TRANSACTION VA41 Return code = 0 RECORD: 0

So in your case 99 records will be updates.

Thanks,

Naveen.I

bpawanchand
Active Contributor
0 Kudos

Hi

[Check This Thread|;

Regards

pavan

naveen_inuganti2
Active Contributor
0 Kudos

Hi Praveen ....

Here you hav to get overview on updating types...Go thorugh following...

>With the parameter UPDATE you can control how database updates arising from a transaction are

>carried out. There are three options:

> A (asynchronous updating) The called transaction does not wait until the database has been

>updated, it simply forward the updates to the SAP update service. This usually speeds up the CT

>program. This processing mode is NOT recommended for large data sets as the called transaction

>does not receive a completion message from the update module.

>The calling CT program therefore cannot tell if the transaction has been successfully completed. You

>should use the updating administration function (transaction SM13) to determine whether updating

>was terminated early. The error analysis /correction functions for are less helpful than with

>synchronous updating.

>

> S (synchronous updating) With synchronous updating the called transaction waits until all the

>updates have been completed. So processing is slower than with synchronous updating. The called

>transaction can however report any updating errors to the program, which makes error

>analysis/correction easier.

>

> L (local updating) with local updating the database is not updated in a separate process , it is

>updated in the calleru2018s process (see application help documentation for the ABAP keyword SET

>UPDATE TASK LOCAL)

Thanks,

Naveen Inuganti.

Former Member
0 Kudos

>

> Hi experts,

>

> In call transaction if their are 100 records to be uploaded and if their is error in 31 st record then what happens.

>

> mean does the uploading stops at 30 records are it will leave 31st record upload all reaming record.

>

> Please explain more elaborately.

>

> Thank you.

Call transaction process transactional data asynchronously, i.e. even if there is an error in a record, it will leave and update the next record. I hope you find this informationusefull.

Regards,

Prashant.