on 04-01-2009 9:26 AM
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.
Hi:
Instead of using nested loop, you can use for all entries.
Regards
shashi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.