06-08-2011 2:02 AM
Hello experts!
I've been having problems with regard to posting in cost center fields in Infotype 0027. The first condition is that whatever cost center is provided, I should change this to SAP_DUMMY which is fairly easy. Second, when a cost center already exists for a record in a give BEGDA and ENDDA range, I should post the cost center which is SAP_DUMMY to the next cost center meaning if KST01 has a value then the values will be posted in KST02 keeping the old KST01 values. Can anyone please help me how to do this? During foreground creation, I see that no record can have more than 1 cost center? Thanks in advance for your help guys
06-08-2011 5:37 AM
Hi,
If you don't have more than one cost center for a given record , then it's quiet easy to fill in the SAP_DUMMY to the next field.
select single * from pa0027 into p_0027.
if p_0027-kst01 is not initial.
p_0027-kst02 = 'SAP_DUMMY'.
*Modify the internal table with work area .
endif.
If you want to post the SAP_DUMMY to the field dynamically then the below link will work for you.
Regards,
Srini.