on 2006 Dec 01 3:56 PM
hi all,
I am developing a report but i m facing some performance issues.
1. I have used logical database PNP and i am using loop at P0001 to get data after Get Pernr. Now i m having an internal table, itab_CSKS, that contains a list of cost centers. I want to fetch only those records from PA0001 that have the value of cost centre in itab_CSKS. That means all the values that i fetch should have cost centre equals to one if entry of itab_CSKS. I am providing you with the code i m having rite now. Please see if you can help writing me this code.
Get pernr.
loop at P0001 where bukrs = Pnpbukrs-low.
Move P0001-pernr to itab_hr-pernr.
*Move P0000-stat2 to itab_hr-stat2.
Move P0001-Kostl to itab_hr-kostl.
Move P0001-begda to itab_hr-begda.
Move P0001-endda to itab_hr-endda.
Move P0001-bukrs to itab_hr-bukrs.
append itab_hr.
*endif.
*EndProvide.
endloop.
end-of-selection.
thanks and regards,
Reeena.
Pl Make these changes to ur code..
sort itab_CSKS by kostl.
Get pernr.
loop at P0001 where bukrs = Pnpbukrs-low.
read table itab_CSKS with key kostl = p0001-kostl
binary search.
check sy-subrc eq 0.
Move P0001-pernr to itab_hr-pernr.
Move P0001-Kostl to itab_hr-kostl.
Move P0001-begda to itab_hr-begda.
Move P0001-endda to itab_hr-endda.
Move P0001-bukrs to itab_hr-bukrs.
append itab_hr.
endloop.
end-of-selection
~Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
9 | |
8 | |
8 | |
6 | |
5 | |
5 | |
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.