Application Development and Automation 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: 
Read only

BADI HRPAD00INFTY

Former Member
0 Likes
969

Hi,

I am trying to Default IT0002 PersonalID number to 999999999 using the BADI HRPAD00INFTY method IF_EX_HRPAD00INFTY~BEFORE_OUTPUT.

DATA: I0002 LIKE P0002.

CLASS CL_HR_PNNNN_TYPE_CAST DEFINITION LOAD.

CASE INNNN-INFTY.

WHEN '0002'.

CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN

EXPORTING

PRELP = INNNN

IMPORTING

PNNNN = I0002.

MOVE '999999999' TO I0002-PERID.

CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP

EXPORTING

PNNNN = I0002

IMPORTING

PRELP = INNNN.

ENDCASE.

But when i executed this ,it is not getting Defaulted . I implemented the same code in UserExit PBAS0001 and able to get it . Can Anybody help me why this doesnt work in the BADI

Thanks & Regards,

Subhash.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
858

Subhash,

BADI still cannot return a changed record back to the screen. User exits can but not BADI's.

Check the exporting or returning parameters of the method that you implemented. Does it have any?

Kshitij

Hi,

I am trying to Default IT0002 PersonalID number to 999999999 using the BADI HRPAD00INFTY method IF_EX_HRPAD00INFTY~BEFORE_OUTPUT.

DATA: I0002 LIKE P0002.

CLASS CL_HR_PNNNN_TYPE_CAST DEFINITION LOAD.

CASE INNNN-INFTY.

WHEN '0002'.

CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN

EXPORTING

PRELP = INNNN

IMPORTING

PNNNN = I0002.

MOVE '999999999' TO I0002-PERID.

CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP

EXPORTING

PNNNN = I0002

IMPORTING

PRELP = INNNN.

ENDCASE.

But when i executed this ,it is not getting Defaulted . I implemented the same code in UserExit PBAS0001 and able to get it . Can Anybody help me why this doesnt work in the BADI

Thanks & Regards,

Subhash.

6 REPLIES 6
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
858

HI,

Try and debug the place where you are trying to get the active implementtion of the BADI and see if you are able to get your implementation as the active implementation if this is not the case make your implementation as the active.

Regards,

Sesh

Read only

Former Member
0 Likes
858

Thank u Sesh for Replying .

The Implementation and the method both are Active and when i put a break point in my code , i am able to get into there . But i still dont know why it doesn't work .

Regards,

Subhash.

Read only

Former Member
0 Likes
859

Subhash,

BADI still cannot return a changed record back to the screen. User exits can but not BADI's.

Check the exporting or returning parameters of the method that you implemented. Does it have any?

Kshitij

Read only

0 Likes
858

Kshitij , thanks for Replying.

I checked the exporting parameters and as u said , it doesnt return anything .

So do i need to add the parameter INNNN as exporting to the Standard Interface ?

As far as i know , standard Interface shouldn't be changed from Upgradation point of view.

Is their any other solution ?

With Regards,

Subhash N .

Read only

0 Likes
858

Yes, like Kshitij mentioned, this is known limitation of the BAdI.. is this reqt for a select few or across the board? you might as well think of making the p0002-perid field, display only or even hide it using v_t588M.

~Suresh

Read only

0 Likes
858

This BAdI has no exporting parms. It is only for providing check/validations and sending a message back.