cancel
Showing results for 
Search instead for 
Did you mean: 

Userexit or BADI suggestions for Change PO condition net price using ME21N or ME22N

former_member526582
Participant
0 Kudos

Hi SAP Experts,

Do you have any userexits/BADI suggestions for auto changing the Purchase Order Net Price by a specific Condition Type(ex. ZPBZ) via ME21N(Create PO) and ME22N(Change PO)?

Thanks and Regards,

Luiz Carlos

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

Did you look at BAdI ME_PROCESS_PO_CUST (many many threads/discussions are available)

e.g. in method PROCESS_ITEM use of methods GET/SET_CONDITIONS and GET/SET_DATA on imported parameter IM_ITEM.

But did functionals check if the requirement could be solved by some Cusomizing of price conditions, or is actually code required to execute their rules?

former_member526582
Participant
0 Kudos

Hi Raymond,

As you suggested, I used the get/set_conditions, then I got the message "Data from Business Add-In ME_PROCESS_PO_CUST not adopted "? is there something missing with my code? I just changed the kbetr(Amount) value

Thanks and Regards,

Luiz Carlos

raymond_giuseppi
Active Contributor
0 Kudos

Check the current Customizing of your pricing conditions, seems you are not allowed to change this value, can it be changed manually on transaction or is the field greyed out?

Answers (1)

Answers (1)

former_member526582
Participant
0 Kudos

Hi Raymond,

Yup I'm currently checking on the said BADI. The functionals want to auto change the net price of the specific condition type not the rule though. once in create and edit, the price will be changed. Or is it better to change it when clicking the Save button? If yes, is there any identifier if it is in save/change/edit/display mode?

raymond_giuseppi
Active Contributor
0 Kudos

Yes

  • in the OPEN method you receive (and should save in some attribute) the transaction type
  • in the PROCESS* or CHECK method of the BAdI compare results provided by methods GET_DATA, GET_PREVIOUS_DATA and GET_PERSISTENT_DATA (data in database) also IS_PERSISTENT to check if current item exists on database. For