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: 

User Exits

Former Member
0 Kudos

Hi Group.

i want to implement a user exit but i dont know how to do this and which user exit will serve my purpose.

i am here giving the required info on which i have to work.

please help me out its really urgebt for me.

The table should be checked while executing transaction

1. Creation / Saving a purchase order – ME21n

For every purchase order created, check the value of the field ‘EKKN – VBELN’ and ‘EKKN –VBELP’ and compare this value with the sales order no. in the internal table (column 1) and the sales order item number in the internal table (column 2).

If there is match, check the Purchase order number in the field EBELN and use this value in the table EKPO to identify the Purchase order items.

5 REPLIES 5

Former Member
0 Kudos

Hi ujjwal

try using this user exit. You can use this user exit for exporting and importing the customers fields for purchase order creation

MM06E005

Goto to smod and view the attributes of the user exit

regards

kishore

Former Member
0 Kudos

Hello Ujjwal,

It may not be difficult to suggest which exit u may require but trying to understand ur req. While creating or saving the PO in ME21N, this user exit will be fired, in which u want to check ekkn-vbeln & vbelp fields and check with the internal table fields. Not sure which or how this internal table is populated.and if it matches then get the PO number item number for which PO as u are already in creation mode. Sorry if I have missed something. If u can clarify then some solution can be provided.

0 Kudos

Hi Abhijit

we first created a ztable in database which i am updating , in which i have an SO(sales order) no. and its item number and correponding to that BOM Components.

1st column = so

2 = item no

3 matnr

4 description

.

.

.

8 = po number

Now my requirement is to check this ztable and

case :

Creation / Saving a purchase order – ME21n

For every purchase order created, check the value of the field ‘EKKN – VBELN’ and ‘EKKN –VBELP’ and compare this value with the sales order no. in the table (column 1) and the sales order item number (column 2)

If there is match, check the Purchase order number in the field EBELN and use this value in the table EKPO to identify the Purchase order items.

Item code: EKPO – MATNR (match this with the 3rd column of the table)

Check the balance budget for this material. If the balance budget is greater than the Purchase order value in the table EKPO – NETWR’, than save the Purchase order and update the order number in the 8th column of the above table.

This is the case

please help me out i am in a real need.

and the main problem is that i dont know how to use it.

i am waiting for your response.

Former Member
0 Kudos

Hello Ujjwal,

Let us try this.

1. Create a project and add component MM06E005. within this use the enhancement EXIT_SAPMM06E_013. This is called before posting is done. All the necessary structures are available.

2. Use ur logic to check and then update your custome table. The std PO program will commit it in normal process.

Former Member
0 Kudos

Hi ,

I am not sure about how the user exit will be useful because you want to use EBELN value to select items from EKPO. EBELN value is populated only when PO is commited to database. All the exits I am aware are called before commit so the PO number will not be available to you .

Please correct me if wrong .