cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP-HR(Technical)

Former Member
0 Kudos

Hi All,

I need to validate a field INITS of 0002 infotype. Can you please tell me how to do that...

Thanks in advance,

Kranthi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use Enhancement PBAS0001.

user exits -EXIT_SAPFP50M_001

EXIT_SAPFP50M_002.

Regards,

Manoj.

Former Member
0 Kudos

Hi,

Thank you for providing the user-exit. but i could not find the field INITS (IT0002) , in the importing, changing etc. of that particular user-exit so that i can do validation.

Can you please tell me how to do if i can't find the field in user-exit.

Thanx in advance.

Regards,

Kranthi

Former Member
0 Kudos

Hi,

Do the code like this.

IF sy-tcode = 'PA30'.

CASE innnn-infty.

  • Check if infotype is 0002.

WHEN '0002'.

<b>do your validation here.</b>

endcase.

Hope this helps you.

Regards,

Subbu.

Former Member
0 Kudos

Hi,

i understood the code what you have written but how can i get(hold) the data of the particular field entered in 0002 infotype. ( for ex. var1 = P0002-INITS. in the code. But during runtime, value in P0002-inits is not populationg in var1 bcoz there is no such field in the importing or changing parameters in the exit.

So kindly please tell me how to hold the value entered in the infotype in the exit.

It's urgent.

Thanx in advance,

Kranthi

Former Member
0 Kudos

Hi,

I would like to clarify the below to you.

For validating the field Pa0002-inits,

Check the component EXIT_SAPFP50M_002 of the exit PBAS0001.

Here you will have a Z include. Double click on it and system will ask for creation of the include if it is not created yet.

In the include as i initially said,

Code the below.

IF sy-tcode = 'PA30'.

CASE innnn-infty.

  • Check if infotype is 0002.

WHEN '0002'.

*Get the Screen realtime data

CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn

EXPORTING

prelp = innnn

IMPORTING

pnnnn = lw_0002.

if lw_0002-inits is initial. " Do your validation here

message e999(message class) with 'Validatio nmessage'.

endif.

endcase.

Hope this helps you.

Regards,

Subbu.