Application Development and Automation 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: 
Read only

validations during PO Creation/Change

Former Member
1,777

Hi I want to do three validations during PO Creation/Change

1) After entering each item Quantity,a custom validation should be done

2) When Save Button is pressed in PO, custom values should get updated in custom table.

3) During save a validation is required.

So can anyone let me know,how this can be dealt with like with which user-exits / badi.

Kind Regards

Sajid

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,336

Hello Sajid,

Your requirements can be achieved by the BADI ME_PURCHDOC_POSTED as this BADI is called after user presses the save button.

Now if you want to check quantity after the quantity is entered and before the save button is pressed then you can use BADI ME_PO_PRICING use method PROCESS_KOMP and parameter IM_EKPO.

Hope this is helpful to you.

Regards

Arindam

Hi I want to do three validations during PO Creation/Change

1) After entering each item Quantity,a custom validation should be done

2) When Save Button is pressed in PO, custom values should get updated in custom table.

3) During save a validation is required.

So can anyone let me know,how this can be dealt with like with which user-exits / badi.

Kind Regards

Sajid

4 REPLIES 4
Read only

former_member585060
Active Contributor
0 Likes
1,336

Hi,

Regarding the PO values to get updated into custom table and Validations when save button is clicked.

The BADI ME_PURCHDOC_POSTED can be used, as this BADI is gets triggered last when save button clicked.

It consists of Method POSTED , in that the structures IM_EKKO, IM_EKPO etc holds all the data while creating or changing of PO, so the data from that structures can be moved to custom tables.

Regards

Bala Krishna

Read only

Former Member
0 Likes
1,337

Hello Sajid,

Your requirements can be achieved by the BADI ME_PURCHDOC_POSTED as this BADI is called after user presses the save button.

Now if you want to check quantity after the quantity is entered and before the save button is pressed then you can use BADI ME_PO_PRICING use method PROCESS_KOMP and parameter IM_EKPO.

Hope this is helpful to you.

Regards

Arindam

Read only

0 Likes
1,336

Dear Arindham

thanx for ur reply but still it did not help me out,

my requirement is before saving when user gives quantity for an item,a badi needs to get called up in which all the items internal table (not one item but all items) should be passed up.

Please reply soon as my deadline is today evening.

kind Regards Sajid

Read only

JoffyJohn
Active Contributor
0 Likes
1,336

Hi!

Custom table updation code you can write in function module exit

EXIT_SAPLEINS_001

Userexit :LEINS001