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: 

BADI's in ME21N

Former Member
0 Kudos

Hi experts,

I need to validate the (Purchasing Document Number)EBELN number in me21n while saving the transaction.

i have tried with so many BADI's which is triggering while saving the transaction.

but i faced the problem(EBELN number is not present in the BADI's parameter structure but the remaining values are present like INFNR, WERKS etc).

which means the EBELN number is generated dynamically. i need to fetch the Purchasing Document Number(EBELN) through BADI's or USER EXIT for my validation purpose.

Can anybody knows the BADI or USER EXIT which is triggered after saving the transaction me21n (after the EBELN number is created, after saved).

1 ACCEPTED SOLUTION

joginder_singh
Active Participant
0 Kudos

Hi

Try this if it works.

Implement Badi for PO_DELIVERY_CONFIRM .

And in the method PUBLISH_BEFORE_COMMIT Export the value of IT_CHANGED_DATA-vgbel into memory.

And then in the method PUBLISH_AFTER_SAVE Use the value .

If The Abouve method po_delivery_confirm doest not work .Then in debug check the po number may be placed in some memory ,so check the memory name in runtime after purchase order number is generated.

Hope this give you some hint to proceed further.

Cheers

Joginder

6 REPLIES 6

joginder_singh
Active Participant
0 Kudos

Hi

Try this if it works.

Implement Badi for PO_DELIVERY_CONFIRM .

And in the method PUBLISH_BEFORE_COMMIT Export the value of IT_CHANGED_DATA-vgbel into memory.

And then in the method PUBLISH_AFTER_SAVE Use the value .

If The Abouve method po_delivery_confirm doest not work .Then in debug check the po number may be placed in some memory ,so check the memory name in runtime after purchase order number is generated.

Hope this give you some hint to proceed further.

Cheers

Joginder

0 Kudos

sorry jigi,

This BADI is not existing (i got the message).. whether it is a version problem..

mine is ECC 6.0..

i found these BADI's are triggering

ME_COMMTMNT_PO_RELEV

ME_COMMTMNT_PO_REL_C

ME_COMMITMENT_STO_CH

ADJUST_NET_DAYS

BUAVC_CHECK_RESTRICT

WB2_ADD_DATA_INT

ME_INFOREC_SEND

ME_CHECK_SOURCES

ADDRESS_UPDATE

ME_PURCHDOC_POSTED

but all the parameter's inside the method (EBELN number is missing)..

These BADI's are triggered before generating the EBELN number..

please suggest me..

Thanks in advance..

Vijay.R

0 Kudos

Hi,

If you implement the BADI ME_PURCHDOC_POSTED

in the structure IM_EKKO, you will get the EBELN value, just check again keeping a break point inside the Method POSTED

Regards

Bala Krishna

0 Kudos

Thank you Bala,

It is working fine..

this BADI si triggered after the generation of the EBELN number..

former_member585060
Active Contributor
0 Kudos

Hi,

This are all the BADI's triggered while saving PO

WB2_ADD_DATA_INT

REFERENCE_SITE

CACL_CHARACTER_INPUT

ME_COMMTMNT_PO_RELEV

ME_COMMTMNT_PO_REL_C

ME_COMMITMENT_STO_CH

ADJUST_NET_DAYS

EAPS_HRKFT_EXTENSION

BUAVC_CHECK_RESTRICT

ME_INFOREC_SEND

ADDRESS_UPDATE

ME_PURCHDOC_POSTED

In the above the last one triggered is ME_PURCHDOC_POSTED, try to Implement this one and check

Regards

Bala Krishna

Former Member
0 Kudos

Hello,

I have found 2 BADIs which will be useful to you I think.

Thse two BADis are called once you press the save button in ME21n screen.

BADIs are given below.

BADI name

1. ME_COMMTMNT_PO_RELEV Method: CHECK_RELEV parameter:IM_HEADER

2. ME_COMMTMNT_PO_REL_C Method: CHECK_RELEV parameter:IM_HEADER

In the Importing parameter IM_HEADER you will find EBELN (Purchasing Document Number) as its associated type is EKKO.

Regards

Arindam