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

performance tuning

Rushikesh_Yeole
Contributor
0 Likes
866

Please use more informative subject in future

IF NOT l_lock IS INITIAL.
  UPDATE marc FROM TABLE lt_marc.
  IF sy-subrc = 0.
* creation of change document - ZZACT
    PERFORM cd_call_mat_full.
    COMMIT WORK.
  ELSE.
    ROLLBACK WORK.
    CLEAR gt_return.
    gt_return-type = 'E'.
    gt_return-message = 'Problem with update entries in MARC !'(011).
    PERFORM log_message TABLES gt_mess_list
           USING gt_return gt_todo_list.
  ENDIF.

How can we improve the performance of program?? Any other better query which will replace UPDATE statement???

Edited by: Matt on Mar 26, 2009 9:54 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Hi,

if you are changing the MARC(standard table )....use the FMs instead of the MODIFY or update.

tyr to look with the FM CM_FV_MARC_UPDATE

or else try with

MODIFY marc FROM TABLE lt_marc.

Thanks!

Edited by: Prasanth on Mar 26, 2009 12:02 PM

5 REPLIES 5
Read only

Former Member
0 Likes
817

Hi,

if you are changing the MARC(standard table )....use the FMs instead of the MODIFY or update.

tyr to look with the FM CM_FV_MARC_UPDATE

or else try with

MODIFY marc FROM TABLE lt_marc.

Thanks!

Edited by: Prasanth on Mar 26, 2009 12:02 PM

Read only

Former Member
0 Likes
816

HI,

Try to use modify statement instead of update.

Thanks.

Read only

Sm1tje
Active Contributor
0 Likes
816

First of all NEVER EVER update these standard tables yourself (See comment Prashant). So change that first and use the proper function modules (BAPI's) for this. Then, and only then see how to improve performance, if still necessary.

Edited by: Micky Oestreich on Mar 26, 2009 7:50 AM

Read only

Former Member
0 Likes
816

Hi,

Do not commit work, the LUW will automatically commited at the run time. Use Commit only if you are reusing the table later in your program.

Regards,

Prashant.

Read only

matt
Active Contributor
0 Likes
816

Please use more informative subject in future

And don't update SAP tables directly. It's a good way of of invalidating your support agreement with SAP.