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: 

Exit in Me21N

Former Member
0 Kudos
547

Hello Experts,

I want ot find out an exit in Me2xN where when the user added a new Item for an order, I have to set the flag: EKPO-WEUNB = 'X' for certain suppliers.

This is a checkbox in the ME2xN screen in Item details->Delivery tab-> Checkbox "GR non-valuated".

Can anybody help me regarding this.

Regards,

Vasanth

1 ACCEPTED SOLUTION

Former Member
0 Kudos
262

Hi,

Check this,

Enhancement:MELAB001

FM: EXIT_RM06ELAB_001

TABLES Parameter: XEKPO[].

Loop this table XEKPO[] and set the field WEUNB

as 'X' for all/specified records.

Regs,

Venkat Ramanan N

Message was edited by: Venkat Ramanan Natarajan

19 REPLIES 19

Former Member
0 Kudos
263

Hi,

Check this,

Enhancement:MELAB001

FM: EXIT_RM06ELAB_001

TABLES Parameter: XEKPO[].

Loop this table XEKPO[] and set the field WEUNB

as 'X' for all/specified records.

Regs,

Venkat Ramanan N

Message was edited by: Venkat Ramanan Natarajan

0 Kudos
262

Hello Venkat,

When I am saving the order is not trigerred

0 Kudos
262

Hello Sarath,

Can you please tell me where should I include this logic. Since I haven't worked in BADI.

Regards,

Vasanth

Former Member
0 Kudos
262

you can use the BADI : ME_PROCESS_PO_CUST, METHOD: PROCESS_ITEM.

Call the method GET_DATA and store the value of item data in an internal table of structure MEPOITEM.

Modify the field MEPOITEM-WEUNB according to your logic and now call mehtod SET_DATA and pass the same itab.

Thats it.

Former Member
0 Kudos
262

you have to create an implementation through SE19, give the definition name ME_PROCESS_PO_CUST and give Z* implementation name. double click on method PROCESS_ITEM which will take you to an editor where you can incorporate your logic.

0 Kudos
262

Hello Sarath,

I went to the Tcode SE19 and gave Ztest and the system asked for the definition in which I gave the ME_PROCESS_PO_CUST.

I am getting the message that <b>Definition does not exist. Do you want to create it?</b>

Can please explain why I am getting this message

Regards,

Vasanth

Former Member
0 Kudos
262

Hi,

Put the statement BREAK-POINT in the FM EXIT_RM06ELAB_001 and check.

If this doesn't work go for BADI as suggested by Sharath.

Regs,

Venkat Ramanan

Former Member
0 Kudos
262

are you on 4.7?

s0003140493
Explorer
0 Kudos
262

Dear Vasanth,

BADI ME_PROCESS_PO_CUST only exist from version 4.7 onward, if you are still in 4.6C or below, my suggestion is to use userexit MM06E005 FM EXIT_SAPMM06E_012 to force the user to fill WEUNB.

To know which are new item you can compare the internal table TEKPO with the database EKPO.

I think that is standard solution, because SAP doesn't provide userexit that can change the value of EKKO,EKPO in ME2xN.

I hope this can help

Regards

Mahendro

0 Kudos
262

Hello Mahendro,

When I am saving the order the control stop at this exit. Can u tell me which table I have to do the modification.

Since I have modified the TEKPO-WEUNB = 'X' in the debug mode. But this is not reflecting in the database.

Can u suggest a solution for this.

Regards,

Vasanth

0 Kudos
262

Dear Vasanth,

My suggestion is not to modify the TEKPO-WEUNB, but

In the exit you check the value of TEKPO-WEUNB (for new item off course) if blank than you show a message to the user to tick field GR non valuated.

Regards

Mahendro

Former Member
0 Kudos
262

hi,

you can use userexit EXIT_SAPMM06E_013 to change the data of EKPO, you can change the internal table YEKPO to change item data.

0 Kudos
262

Hello Sarath,

I have changed the XEKPO and YEKPO table in the debug mode.But these chages are not reflecting in the database

Regards,

Vasanth

0 Kudos
262

What version of SAP are u running ?

You cannot modify any Purchase order fields (Header and

Line)with these function exits EXIT_SAPMM06E_XXX in 4.6C. They can only be used for validations or outbound scenarios such as updating a custom table.

The BADI ME_PROCSS_CUST appears to allow for updating PO values however this also does not exist in 4.6c.

BAR

0 Kudos
262

Hello Bar,

I am working in 4.6C System. So I can't able to use the BADI ME_PROCESS_PO_CUST . Is it possible to modify the EKPO-WEUNB field when a new item is added to the order.

Please this is little urgent.

Regards,

Vasanth

0 Kudos
262

Unfortunately... you cannot modify any fields from EKPO or EKKO through the user exits in 4.6.c

I have had this problem myself ...

BAR

0 Kudos
262

So what would be the solution.

0 Kudos
262

You cannot modify any purchase order header or item fields in 4.6c through the use of exits and the BADI does not exist.

BAR

0 Kudos
262

There is no way to modify PO items or header through exits or BADI's in 4.6c.

BAR