cancel
Showing results for 
Search instead for 
Did you mean: 

performance tuning

Former Member
0 Kudos

Hi

How can we apply performnce tuning on this code so as to improve execution time.

LOOP AT it_sel_rows INTO wa_output.

LOOP AT it_rel_acc_itm INTO wa_rel_acc_itm

WHERE claim = wa_output-claim.

LOOP AT it_bsid INTO wa_bsid WHERE bukrs = '3000'

AND gjahr = wa_rel_acc_itm-gjahr

AND belnr = wa_rel_acc_itm-vbeln

AND buzei = wa_rel_acc_itm-buzei.

PERFORM change-assignment USING wa_bsid-kunnr

wa_bsid-belnr

wa_bsid-gjahr

wa_bsid-buzei

l_tmp_zuonr

'X'

SPACE.

ENDLOOP.

ENDLOOP.

ENDLOOP.

Please help me on this.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi:

Instead of using nested loop, you can use for all entries.

Regards

shashi

Former Member
0 Kudos

Work with field-symbols. It`s much better and faster with assign.

And you have to check the types of your tables (sorted for loop and hashed for read).

Regards,

Sabine

Former Member
0 Kudos

First sort all your internal tables.

LOOP AT it_sel_rows INTO wa_output.

Read table it_rel_acc_itm INTO wa_rel_acc_itm

With key claim = wa_output-claim

BINARY SEARCH TRANSPORTING NO FIELDS

LOOP AT it_rel_acc_itm INTO wa_rel_acc_itm from sy-tabix.

If wa_rel_acc_itm-claim NE wa_output-claim

Exit.

Endif.

Do the same kind of read and loop for the next loop also.

Regards,

Chakravarti.

Edited by: PSS Chakravarti on Apr 1, 2009 11:49 AM

Former Member
0 Kudos

Can u please explain this to me in more detail by applying perfromance tuning to the following code.

LOOP AT it_rel_acc INTO wa_rel_acc WHERE claim = wa_output-claim.

LOOP AT it_rel_acc_itm INTO wa_rel_acc_itm

WHERE claim = wa_rel_acc-claim

AND vbtyp = wa_rel_acc-vbtyp

AND vbeln = wa_rel_acc-vbeln

AND gjahr = wa_rel_acc-gjahr.

SY-SUBRC = 4.

CLEAR: l_shkzg,

l_pswbt,

l_budat.

and.

2nd code

LOOP AT it_sel_rows INTO wa_output.

LOOP AT it_rel_acc_itm INTO wa_rel_acc_itm

WHERE claim = wa_output-claim.

LOOP AT it_bsid INTO wa_bsid WHERE bukrs = '3000'

AND gjahr = wa_rel_acc_itm-gjahr

AND belnr = wa_rel_acc_itm-vbeln

AND buzei = wa_rel_acc_itm-buzei.

PERFORM change-assignment USING wa_bsid-kunnr

wa_bsid-belnr

wa_bsid-gjahr

wa_bsid-buzei

l_tmp_zuonr

'X'

SPACE.

ENDLOOP.

ENDLOOP.

ENDLOOP.

if anybody could help me in letting me know about this as iam a beginner.

tahnks in advance

Former Member
0 Kudos

If anybody could guide to implement the below mentioned logic

We need Idoc segment E1EDP30 to be filled with qualf. 048 & 078, using following logic:

If invoice type = ZFW1 & company code = 1200 (fixed values to be defined in table ZPARC)

. . . then read values from table: CE01000 field: PRCTR and place the value into Idoc segment E1EDP30 Qualf: 078 Field: IVKON and read values from table: CE01000 field: PPRCTR and place the value into Idoc segment E1EDP30 Qualf: 048 Field: IVKON.

Thanks in advance