cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent infotype 0416 from being created under certain conditions

Former Member
0 Kudos

Hi,

Based on an advanced leave formula I can determine at runtime whether or not the infotype 416 record should be created or not. The formula is working.

What is not working is that I need to find a way to prevent the 416 record from being created when the formula returns certain values. I have looked at ZXPADU02 and various other user exits and badi's but to no avail. The ZXPADU02 does not have the field which needs to be checked i.e. PA04160-NUMBR.

Regards,

Warren.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sarika,

The ZXPADU02 exit imports the following structures:

VALUE(TCLAS) LIKE PSPAR-TCLAS

VALUE(INNNN) LIKE PRELP STRUCTURE PRELP

VALUE(PSAVE) LIKE PRELP STRUCTURE PRELP

VALUE(IPSYST) LIKE PSYST STRUCTURE PSYST

VALUE(I001P) LIKE T001P STRUCTURE T001P

VALUE(I503) LIKE T503 STRUCTURE T503

None of these structures have the NUMBR field, so how is it accessible?

Regards,

Warren.

Former Member
0 Kudos

Hi,

The data is in INNNN structure.

Write this code in include ZXPADU02 & set a break-point & check the value.

case innnn-infty.

when '0416' .

perform validate_it0416

using innnn

ipsyst.

*****************

FORM validate_it0416 USING p_innnn

p_ipsyst.

DATA: i_psyst LIKE psyst.

DATA: i_nnnn LIKE prelp.

DATA: ps0416 LIKE ps0416.

i_psyst = p_ipsyst.

i_nnnn = p_innnn.

ps0416 = i_nnnn-data1

if ps0416-numbr = ' ' "<b> check ur ondition here</b> endif.

*****************

Hope this helps & solve your problem.

Thanks,

Sarika.

Former Member
0 Kudos

Hi Sarika,

This works, thank you.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I had checked ZXPADU01 but don't have the required field available in that user exit i.e. the NUMBR field of infotype 0416.

Former Member
0 Kudos

If you want to validate any fields in infotype 416, then u have to use other include ZXPADU02. This should work. You should get access to field NUMBR. Check your code properly once again or else send me the code, the will check & let you know.

Former Member
0 Kudos

make use of BADI - HRPAD00INFTY

and create a implementation in transaction Se19 for this BADi.

amit

Former Member
0 Kudos

Check this include ZXPADU01 to validate whether to create IT416 or not. You can give some error messages also.