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

Enhancement in MARC_LGPRO function module

Former Member
0 Likes
1,047

Dear Experts,

while changing/creating material through MM01/MM02, system is checking the Production storage location is maintained or not for the plant, but it is throwing as a warning. We want to change the warning to Error and should not allow the user to save the document. While debugging we found the error is triggering at the Function Module MARC_LGPRO. How can we restrict that one? Please help me.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,007

Hi Zakir

if you use ECC 6.0 you can put an enchancement in final of the FM and thow an message TYPE 'E' to stop the process if field LGPRO is INITIAL like this:

Hi Zakir

if you use ECC 6.0 you can put an enchancement in final of the FM and thow an message TYPE 'E' to stop the process if field LGPRO is INITIAL like this:

4 REPLIES 4
Read only

Former Member
0 Likes
1,008

Hi Zakir

if you use ECC 6.0 you can put an enchancement in final of the FM and thow an message TYPE 'E' to stop the process if field LGPRO is INITIAL like this:

Read only

0 Likes
1,007

Thanks Ribeiro.

We were not able to do the enhancement ther. Now it is working. 

Read only

0 Likes
1,007

Hi Ribeiro,

But still the warning message is coming before the error message. can we restrict that one?

Read only

0 Likes
1,007

put another enhancement in top of same function, export the value of P_KZ_NO_WARN to ABAP memory. then change the content of P_KZ_NO_WARN to N.

it will bypass the warning and in the final of function close to the error message import the value from ABAP MEMORY before execute your routine. in this form only the error will be executed.