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: 

PA0021 How to CLEAR/REMOVE the Defaulted PA0021-FANAM

Former Member
0 Kudos

Hi,

Please help me on how to CLEAR/REMOVE the Defaulted PA0021-FANAM.when creating a record in PA30.

I can't apply Implicit User Exit because there is no exit point in MP002120 in MP002100.

Hope to have step by step instructions and code how to implement the requirement as am an newbie... 

12 REPLIES 12

Former Member
0 Kudos

hi,

use the exit PBAS0001

THERE EXIT_001

WRITE THE CODE IN THE INCLUDE

any doubt please reply back

REGARDS,

vijay SR

0 Kudos

Thank you, I'll let you know the result 🙂

Former Member
0 Kudos

hi,

issue solved???

rgds,

Vijay SR

0 Kudos

Hello ViJay,

Am still waiting for my sap access and prbbly tomorrow ill happy to follow ur instructions i do appreciate it so much:')

0 Kudos

Hello ViJay,

It seems like it didn't work because after the enhancement on ZXPADU01 in EXIT_SAPFP50M_001 was read, the

MP002120 in MP002100 is called hence the assignment has been done populating the PA0021-FANAM.

Would u know other alternatives?

0 Kudos

Hi Vijay,

Hold on, I think it works...let me check again...

0 Kudos

Hi Vijay,

Yeah, it didn't work...

It seems like it didn't work because after the enhancement on ZXPADU01 in EXIT_SAPFP50M_001 was read, the

MP002120 in MP002100 is called hence the assignment has been done populating the PA0021-FANAM.

Would u know other alternatives?

0 Kudos

Hi,

What is the code u written in the EXIT???

Rgds,

Vijay SR

0 Kudos

Hi Vijay,

I haven't written the clearing but try to get the value on the message but it doesn't have any value because initially it has no really value, the assignment happens after ZXPADU01 been called...

*IF INNNN-INFTY EQ '0021'.

*

*  DATA: wa_P0021 LIKE P0021.

*

*  CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN

*  EXPORTING

*  PRELP = INNNN

*  IMPORTING

*  PNNNN = wa_P0021.

*

*  MESSAGE I002(C5) WITH wa_P0021-FANAM.   -----> This is the testing (no value yet)

*

*  CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP

*  EXPORTING

*  PNNNN = wa_P0021

*  IMPORTING

*  PRELP = INNNN.

*

*  ENDIF.


After this the MP002120 will be called and the assignment happens on


IF P0021-FANAM EQ SPACE AND PSYST-IOPER EQ 'INS'.    "note 1083523

       MOVE P0002-NACHN TO P0021-FANAM. --- This is the code that gives default value...

       MOVE P0002-VORSW TO P0021-FVRSW.

     ENDIF.

0 Kudos

Please do one enchancement after this code. Click the Spiral in the menu bar

Clear P0021-FANAM.

It will works.

i already did like same for some other infotype....

Thanks,

Vijay SR

0 Kudos

Hi Vijay,

But there is no exit point on MP002120 😞

Am wondering how to enhance this in one of the Subroutine...

Hope u can help me...

kmoore007
Active Contributor
0 Kudos

PBAS0001 has two exits.  One for defaults (EXIT_SAPFP50M_001) and one for when saving (EXIT_SAPFP50M_002).  Can you use the exit for saving to clear?