2009 Jun 24 10:18 AM
Hi friends.
a)
read table it_zsat into wa_zsat with key matnr = '5003' binary search.
if sy-subrc = 0.
wa_zsat-ERNAM = 'FERT'.
modify it_zsat from wa_zsat index sy-tabix .
endif.
b) read table it_zsat into wa_zsat with key matnr = '5003' binary search.
if sy-subrc = 0.
wa_zsat-ERNAM = 'FERT'.
modify it_zsat from wa_zsat index sy-tabix transporting ernam.
endif.
performance wise which one should i use in my program and why.
Regards
Satish
2009 Jun 24 10:24 AM
Hi,
I suggest use Field-SYmbols instead of using MODIFY... Performanace wise it is very good.
FIELD-symbols : <f2s1> TYPE wa_zsat.
read table it_zsat assigning <fs1> with key...
if sy-subrc eq 0.
assign the value.
endif.
regarding to ur question: using Tranporting will perform good. (2nd Modify)
Hope it helps!!
Rgds,
Pavan
Hello
Yes.
In first case the complete line is moved.
In second case only selected component is moved.
2009 Jun 24 10:24 AM
Hi,
I suggest use Field-SYmbols instead of using MODIFY... Performanace wise it is very good.
FIELD-symbols : <f2s1> TYPE wa_zsat.
read table it_zsat assigning <fs1> with key...
if sy-subrc eq 0.
assign the value.
endif.
regarding to ur question: using Tranporting will perform good. (2nd Modify)
Hope it helps!!
Rgds,
Pavan
2009 Jun 24 10:26 AM
Hello Pavan,
Can you share the source for your claim?
BR,
Suhas
2009 Jun 24 10:27 AM
i mean if we use transaporting field name ie : transporting ernam it will only modify that particular field and if i dont use transporting then it will try to modify all the fields of work area even though if i dont chnage the value... is that correct....?
2009 Jun 24 10:30 AM
Yes, u r correct, it will modify only the values only for those u assign a new value after READ...
2009 Jun 24 10:31 AM
Hello
Yes.
In first case the complete line is moved.
In second case only selected component is moved.
2009 Jun 24 10:32 AM
2009 Jun 24 10:33 AM
Hello Satish,
An F1 on MODIFY stmt will answer these queries.
Your question is answered by that explanation 😮
BR,
Suhas
2009 Jun 24 10:36 AM
Hi,
read table itab assigning <fs1> with key ...
binary search..
if sy-subrc EQ 0.
ASSIGN 'FERT' to <fs1>-matnr.
endif.
I think if u take F1 help from SAP, u ill more understand with an example...
Rgds,
Pavan
2009 Jun 24 10:39 AM
2009 Jun 24 10:51 AM
Thats the reason i have posted here.
if i was just using forum then the question would not have been on performance based.
just checked the F1 help then later i posted it here guys...
Regards
Satish
2009 Jun 24 10:27 AM
Hi Satish,
2nd statement is better in performance, when u have a complex structure....
so,its better to go for the modify statement with transporting rather than modifying alone..
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |