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: 

Set default values in ME41

Former Member
0 Kudos

Hi Experts,

I want to set two field values as default. Please check the following screenshot:

Please guide.

Regards

Purnand

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Purnand,

For PR BADI ME_PROCESS_REQ_CUST is available

In PROCESS_ITEM method is there you can use that one.

there is sample code also check it for usage...

Check if the field value is initial if yes default them...

Note : this will always run so if the users blanks them it will default again.

So in your implementation class create a new table and put the items in that for first process.

Regards

8 REPLIES 8

Former Member
0 Kudos

Hi Purnand,

For PR BADI ME_PROCESS_REQ_CUST is available

In PROCESS_ITEM method is there you can use that one.

there is sample code also check it for usage...

Check if the field value is initial if yes default them...

Note : this will always run so if the users blanks them it will default again.

So in your implementation class create a new table and put the items in that for first process.

Regards

0 Kudos

Hi Yakub,

I appreciate your reply. I have few questions. I first tried to find BADI of it, BADI_MATN1 is the first and the only BADI I found. Does ME_PROCESS_REQ_CUST comes after it?

And how should I use  ekpo-lgort and ekpo-werks. Please check the following screenshot:

Please guide.

Thanking in advance

Purnand

0 Kudos

Hi,

Please note that for a particular user(s), the values of plant and storage location will always be same for any items.

Regards

Purnand

0 Kudos

Hi Purnand,

Sorry for the delay.. but this BADI work only for Z Fields I suppose....

But ..... Implicit enhancement....

Put it in the begining of the FORMit will set defaults for all lines...

Regards

arindam_m
Active Contributor
0 Kudos

Hi,

Check this wiki. should help you

http://wiki.sdn.sap.com/wiki/display/ABAP/Purchase+Req.+Line+item+Data+manipulation+using+BADI+-+ME_...

Check the signature of the method ie. what parameters are passed into the method for processing. You will have those and public variables of the class in scope. For the rest you will have to do it via local variables.

Cheers,

Arindam

venkateswaran_k
Active Contributor
0 Kudos

Hi Purand

Can you put the default values for the plant and storage location for the user - default parameters using SU01.

Go to SU01  -->  Select your user id --> Edit -->  Parameters tab

Insert the records for WRK  and LAG  with your values.

Save

Now go to ME41 and see the values now.

Regards,

Venkat

0 Kudos

This will set the defaults in all T-Code that share that parameter id I suppose... be it PO/SO/Delivery anything for that matter

0 Kudos

Yes, Mohammed,

This is across the system for the user id.  I was just asking him on how about doing this?

Regards,

Venkat