06-19-2009 5:04 AM
Hi,
I created a custom infotype. After creation, I added my custom code to the system generated infotype code.
Due to some reason, I need to regenerate all the infotype objects again from TCode PM01. May I know, how can I prevent my custom written code from being overwritten by system generated code?
07-07-2009 8:04 AM
Hi Amit,
What you can do is you can write include for your code.
So whenever you will be regenerating the infotype, your code without include will over right include your other screens will remain as it it.
It can be working solution, which I use. so atleast efforts of writing again will be avoided atleast.
Thanks & Regards,
GauravPa
06-19-2009 5:25 AM
Hi,
If u regenerate the custom infotype again, all the code will be overwritten(the code you have written will be lost). So, better to copy the code in text file and regenerate the custom infotype, then add the copied code in include. You cannot prevent the overwrite of the code( i have done like this only).
Regards,
Thilotham.
06-19-2009 6:48 AM
Hi Thilotham,
I am sure, there is a way to do it as I have seen a senior HR ABAPer doing it once.
06-19-2009 9:40 AM
Hi Amit,
You can keep same code as is it. When system ask to replace the inlcude(PBO, PAI,etc), if u say no, then code will not be overwritten. But the problem is, if u have added new fields then those fields are not reflected in the includes. So, it is better to copy the text and then generate the infotype.
Regards,
Thilotham.
07-07-2009 8:04 AM
Hi Amit,
What you can do is you can write include for your code.
So whenever you will be regenerating the infotype, your code without include will over right include your other screens will remain as it it.
It can be working solution, which I use. so atleast efforts of writing again will be avoided atleast.
Thanks & Regards,
GauravPa
07-10-2009 5:57 AM
Hi GauravPa,
This is the way even I am doing it. But again in this we have to write PBO and PAI code for screens again manually.
09-08-2009 10:59 AM
That's right, so at least efforts will be reduced
Thanks & Regards,
GauravPA