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 performance.

ronaldo_aparecido
Contributor
0 Likes
951

Hi gurus.

I have a problem:

I change a program Z ,this program have update in table by modify command ,

But in some cases the modify dont´t work because time for responde of database.

I insert the after the modify :

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

         EXPORTING

           wait = 'X'.

And worked but:

Now the user says :the system is slow.

The basis says:its not possible change time for responde of database.

What do I can to solve this problem?

Thanks for help.

DATA:t_zcaixa_loja TYPE TABLE OF zcaixa_loja,

          w_zcaixa_loja TYPE zcaixa_loja.

     SELECT SINGLE *

                   FROM zcaixa_loja

                   INTO w_zcaixa_loja

                   WHERE vkbur  t_loja-vkbur.

     IF sy-subrc = 0.

       CLEAR w_zcaixa_loja-seqp2k.

       w_zcaixa_loja-seqp2k = t_header-numseq.

       APPEND w_zcaixa_loja TO t_zcaixa_loja.

     ENDIF.

     IF NOT t_zcaixa_loja[] IS INITIAL.

       MODIFY zcaixa_loja FROM TABLE t_zcaixa_loja[].

       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

         EXPORTING

           wait = 'X'.

     ENDIF.


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
919

If it is a ZTABLE please send file to your users and create a TMG for it..

Hope this would help..

7 REPLIES 7
Read only

Former Member
0 Likes
920

If it is a ZTABLE please send file to your users and create a TMG for it..

Hope this would help..

Read only

0 Likes
919

I not udesrtand you can be more especific?Please.TMG?

Read only

0 Likes
919

TMG, Table Maintaince Generator, SM30.

Read only

0 Likes
919

Please create table maintenance generator for this table and send the file to end users to upload the same

Read only

Former Member
0 Likes
919

hi Ronaldo

i dont think you should using this function 'BAPI_TRANSACTION_COMMIT'' here. it`s used to commit BAPI function within a LUW. In this function, only one statement is useful to you, 'COMMIT WORK'.

So you can directly using 'COMMIT WORK' after modify.

Regards,

Archer.

Read only

Former Member
0 Likes
919

I don't know if your code is incomplete, but seems that the internal table t_zcaixa_loja[] is useless

If you want to change only one record, you can try something like that:

SELECT SINGLE mandt

   FROM zcaixa_loja

   INTO v_mandt

   WHERE vkbur  =  t_loja-vkbur.

IF sy-subrc = 0.

  UPDATE zcaixa_loja

     SET seqp2k = t_header-numseq

     WHERE vkbur  =  t_loja-vkbur.    "all primary key fields..

ENDIF.

Read only

0 Likes
919

with update occurs the same problem.