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: 

Gender Radio button Validation in Info type 0021

0 Kudos

Dear Experts,

I want to set radio button in info type 0021 based on subtype.

for eg : If the Sub type is 11 – Father then the Gender should be Male and if the Sub type is 12 – Mother, then the Gender should be Female.

Thanks and Regards,

Shardul Tendulkar

1 ACCEPTED SOLUTION

0 Kudos

Hello Shardul:

Maybe you can try this way: 

Tcode: CMOD --> Create new project(Z*) --> Assignments enhancements:PBAS0001

                     -->  EXIT_SAPFP50M_001 -->  ZXPADU01,

Add below code:

  IF INNNN-INFTY = '0021'.

    IF INNNN-SUBTY = '11'.

      INNNN-DATA1+18(1) = '1'.

    ELSEIF INNNN-SUBTY = '12'.

      INNNN-DATA1+18(1) = '2'.

    ENDIF.

  ENDIF.

4 REPLIES 4

Former Member
0 Kudos

Check this thread

Default gender based on subtype in infotype 0021 | SCN

you've got to implement a BADI Z* in reference to HRPAD00INFTY, then implement a class in order to implement if method in HRPAD00INFTY, these are:

BEFORE_OUTPUT

AFTER_INPUT

IN_UPDATE

Google "HRPAD00INFTY implementation", you should find some help to do it.

Regards

0 Kudos

Hello,

I tried using HRPAD00INFTY badi.

I am not getting variables / values in global and local parameters in PBO for applying validation

Thanks,

shardul.

0 Kudos

Take as example BEFORE_OUTPUT method

There are some parameters:

TCLAS

IPSYST

I001P

I503

INNNN

IPREF

In INNNN parameter you should be able to check the infotype you are running.

With a CASE new_innnn-infty you can then focus on the Infotype 0021 with WHEN '0021'


Then you could implement your logic there to check the field SUBTY content and to force field FASEX when applicable.


In method  AFTER_INPUT you have NEW_INNN and OLD_INNN.


Let me know.

Thanks.

0 Kudos

Hello Shardul:

Maybe you can try this way: 

Tcode: CMOD --> Create new project(Z*) --> Assignments enhancements:PBAS0001

                     -->  EXIT_SAPFP50M_001 -->  ZXPADU01,

Add below code:

  IF INNNN-INFTY = '0021'.

    IF INNNN-SUBTY = '11'.

      INNNN-DATA1+18(1) = '1'.

    ELSEIF INNNN-SUBTY = '12'.

      INNNN-DATA1+18(1) = '2'.

    ENDIF.

  ENDIF.