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: 

Uploading BDC in 12 lakhs records in Background mode

former_member209900
Participant
0 Kudos

Dear all,

I am uploading 12 lakhs records in BDC ( through selection screen via) using session method. Since before session will created, i am getting " Time limit exceed " error message.

Then , i am executing in background mode. Since executing in background mode lase one hour.

Please suggest, if any problem in my program or normally it's taking how much to execute the 12 lakhs records.

Regards,

Ganapathi Raman P

1 ACCEPTED SOLUTION

former_member182550
Active Contributor
0 Kudos

12 Lakhs ??

Bear in mind that Lakh is not a unit in general use worldwide.  For all I know a Lakh is 23.75 Bloits... (without looking at google).... however.

If possible break your input file down into smaller chunks.

10 REPLIES 10

former_member182550
Active Contributor
0 Kudos

12 Lakhs ??

Bear in mind that Lakh is not a unit in general use worldwide.  For all I know a Lakh is 23.75 Bloits... (without looking at google).... however.

If possible break your input file down into smaller chunks.

JL23
Active Contributor
0 Kudos

how can somebody know how long it takes to process 1.2 million transactions if we neither know about what object you talk  and without knowing about your system sizing.

0 Kudos

Ok. Have look with my exact code here,

perform open_group.

     LOOP AT IT1 INTO WA1 WHERE KTOKD <> '0002'.

       perform bdc_dynpro      using 'SAPMF02D' '0101'.

       perform bdc_field       using 'BDC_CURSOR'

                                     'RF02D-D0320'.

       perform bdc_field       using 'BDC_OKCODE'

                                     '/00'.

       perform bdc_field       using 'RF02D-KUNNR'

                                      WA1-KUNNR. "'81126'. " customer code

       perform bdc_field       using 'RF02D-BUKRS'

                                      WA1-BUKRS. "'eid'. " plant

       perform bdc_field       using 'RF02D-VKORG'

                                      WA1-VKORG. "'sug'. " so

       perform bdc_field       using 'RF02D-VTWEG'

                                      WA1-VTWEG." 'bu'. "dc

       perform bdc_field       using 'RF02D-SPART'

                                      WA1-SPART. "'SZ'. "dv

       perform bdc_field       using 'RF02D-D0320'

                                     'X'. " sales - billing

*      SELECT SINGLE BOKRE PERFK INCO1 INCO2 ZTERM KKBER KTGRD INTO BILL_SCN FROM KNVV

*                WHERE KUNNR = WA1-KUNNR AND VKORG = WA1-VKORG AND VTWEG = WA1-VTWEG AND SPART = WA1-SPART.

       perform bdc_dynpro      using 'SAPMF02D' '0320'.

       perform bdc_field       using 'BDC_CURSOR'

                                     'TFACT-LTEXT'.

       perform bdc_field       using 'BDC_OKCODE'

                                     '=ENTS'.

*      perform bdc_field       using 'KNVV-BOKRE'

*                                     BILL_SCN-BOKRE. "'X'.

*      perform bdc_field       using 'KNVV-PERFK'

*                                     BILL_SCN-PERFK. "'Z1'.

*      perform bdc_field       using 'KNVV-INCO1'

*                                     BILL_SCN-INCO1."'EXW'.

*      perform bdc_field       using 'KNVV-INCO2'

*                                     BILL_SCN-INCO2."'PLANT'.

*      perform bdc_field       using 'KNVV-ZTERM'

*                                     BILL_SCN-ZTERM."'SF09'.

*      perform bdc_field       using 'KNVV-KKBER'

*                                     BILL_SCN-KKBER."'4010'.

*      perform bdc_field       using 'KNVV-KTGRD'

*                                     BILL_SCN-KTGRD."'01'.

       SELECT SINGLE TAXKD INTO TAXCODE FROM KNVI

           WHERE KUNNR = WA1-KUNNR AND TATYP = 'UTXJ' AND ALAND ='IN'.

    IF TAXCODE = '2'.

         perform bdc_dynpro      using 'SAPMF02D' '1350'.

         perform bdc_field       using 'BDC_CURSOR'

                                       'KNVI-TAXKD(02)'.

         perform bdc_field       using 'BDC_OKCODE'

                                       'ENTR'.

         perform bdc_field       using 'KNVI-TAXKD(01)'

                                       '1'. " JIN6 "JIN6

         perform bdc_field       using 'KNVI-TAXKD(02)'

                                       '2'. " JIN7

    ELSEIF TAXCODE = '4'.

         perform bdc_dynpro      using 'SAPMF02D' '1350'.

         perform bdc_field       using 'BDC_CURSOR'

                                       'KNVI-TAXKD(02)'.

         perform bdc_field       using 'BDC_OKCODE'

                                       'ENTR'.

         perform bdc_field       using 'KNVI-TAXKD(01)'

                                        '1'. " JIN6

         perform bdc_field       using 'KNVI-TAXKD(02)'

                                        '1'. " JIN7

    ELSE.

         perform bdc_dynpro      using 'SAPMF02D' '1350'.

         perform bdc_field       using 'BDC_CURSOR'

                                       'KNVI-TAXKD(02)'.

         perform bdc_field       using 'BDC_OKCODE'

                                       'ENTR'.

         perform bdc_field       using 'KNVI-TAXKD(01)'

                                        TAXCODE. "'3'. " JIN6

         perform bdc_field       using 'KNVI-TAXKD(02)'

                                        TAXCODE. "'2'. " JIN7

   ENDIF.

*      perform bdc_dynpro      using 'SAPMF02D' '1350'.

*      perform bdc_field       using 'BDC_CURSOR'

*                                    'KNVI-TAXKD(02)'.

*      perform bdc_field       using 'BDC_OKCODE'

*                                    '=ENTR'.

*      perform bdc_field       using 'KNVI-TAXKD(02)'

*                                    '3'.

       perform bdc_dynpro      using 'SAPMF02D' '1350'.

       perform bdc_field       using 'BDC_CURSOR'

                                     'KNVI-TAXKD(02)'.

       perform bdc_field       using 'BDC_OKCODE'

                                     '=ENTR'.

    IF SESSION = 'X'.

       perform bdc_transaction using 'XD02'.

*          CALL FUNCTION 'BDC_INSERT'

*               EXPORTING TCODE     = 'XD02'

*               TABLES    DYNPROTAB = BDCDATA.

*          IF SMALLLOG <> 'X'.

*            WRITE: / 'BDC_INSERT'(I03),

*                     'XD02',

*                     'returncode:'(I05),

*                     SY-SUBRC,

*                     'RECORD:',

*                     SY-INDEX.

*          ENDIF.

         ELSE.

REFRESH MESSTAB.

       CALL TRANSACTION 'XD02'  USING BDCDATA MESSAGES INTO MESSTAB MODE 'E' UPDATE 'S'.

       REFRESH : BDCDATA. CLEAR: BDCDATA.

       READ TABLE MESSTAB WITH KEY MSGTYP = 'E'.

       IF SY-SUBRC = 0.

         WA2-STATUS = 'FAILED'.

       ELSEIF SY-SUBRC <> 0.

         WA2-STATUS = 'SUCCESS'.

       ENDIF.

       WA2-KUNNR = WA1-KUNNR.

       WA2-BUKRS = WA1-BUKRS.

       WA2-VKORG = WA1-VKORG.

       WA2-VTWEG = WA1-VTWEG.

       WA2-SPART = WA1-SPART.

       WA2-VKBUR = WA1-VKBUR.

       WA2-ALAND = WA1-ALAND.

       WA2-TATYP = WA1-TATYP.

       WA2-TAXKD = TAXCODE.

       APPEND WA2 TO IT2.

       CLEAR : WA2.

*      DELETE IT2 WHERE TATYP = 'UTXJ'.

       ENDIF.

     ENDLOOP.

perform close_group.




Here I am using session method to update the records and internal table contains 1200000 and it's taking 15 hours to update.


Please suggest

JL23
Active Contributor
0 Kudos

You just could have said: I am loading tax classification and a few other fields of customer master.

15 hours is not a bad number, especially not for a more or less one-time-event. create sessions with 20000 customers each and process them in parallel, but think a bit about others who might also need some batch time for their jobs, so don't start to many in parallel.

former_member186746
Active Contributor
0 Kudos

Hi,

We don't know what your program does so we can't say anything sensible about this if it has to process 1.2M records.

You can use performance analysis tools to find out if there is a bottle neck and if that can be reprogrammed more efficiently.

Kind regards, Rob Dielemans

0 Kudos

Just one hour for 12 lakhs records sounds extremely fast - just 0,003 seconds per record. What do you expect?

Normal is 0.3 to 0.7 seconds per transaction for orders or master data.

Regards Clemens

0 Kudos

Hi,

Job is finished.

Finally, it's taking 15 hours for updating 1200000 !!!

is this correct ....

Sandra_Rossi
Active Contributor
0 Kudos

If you mean "background mode" = call transaction ... dismode = 'N', and you run in dialog mode (not in a background job), then there's a time limit. You should run it in a background job (and you should better run it in parallel background jobs, because 1.2 M is huge for BDC !)

raymond_giuseppi
Active Contributor
0 Kudos

If there are no lock problem betseen transactions, consider building multiple sessions of some thousands of records, so they could be executed in parallel. Only the initial step (upload some data) cannot usually be parallel processed. There is no unique answer as it depends on the transaction and sizing of your servers.

Regards,

Raymond

Clemenss
Active Contributor
0 Kudos

Still 22 records per second. Most of them failed?

Why call XD02 update mode S?

Use LOOP ASSIGNING <field-symbol>. It runs faster.

Regards Clemens