Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP HR custom infotype query

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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.

0 Kudos

Hi Thilotham,

I am sure, there is a way to do it as I have seen a senior HR ABAPer doing it once.

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

That's right, so at least efforts will be reduced

Thanks & Regards,

GauravPA