I was having a requirement from my production department, They use ME2N report, now they want to see the user who has created the PO in output field.

I have checked the screen layout for the ME2N report (including the ME2L/ME2M), but didn't find the field User name which is containing the user ID who created the correspond PO.

In ME2N report, there are no field as "User name" in output field. This blog will describe how to add the field User Name in output section.
I've read a document Enhance purchasing reports with new fields written by Joao. Here, he has used a BADI. Then I've read another document from a different website Modify Standard Purchasing Report Output of ME2N. It can fulfil my requirement. Here, he has used explicit enhancement as I have described in my blog Explicit Enhancement for "Personal Settings" for an User. But here he has implemented a particular value for a field, but I need the PO creator name in this extra field.

Then I thought I can change the value by doing some coding in this explicit enhancement without using BADI. I have tried it with the help of our ABAPer and I've done it successfully. I want to share it. Here is the all configurations and coding.

Before giving the steps, I would like to suggest to read the post Modify Standard Purchasing Report Output of ME2N. It almost every settings are same as per this document. You just need to add different field in structure and you need to add your own logic/coding in this explicit enhancement. A good explanation with screen shot has given in this post.

I have taken help from our ABAPer as the code is not known to me as a functional consultant, but if you know the coding part, then you do not need to take help from anyone. You can do it yourself with the help of my this blog.

Note: This screen layout is applicable for ALV layout. You need to run the report ME2N/ME2L/ME2M with ALV as scope of list.


As we know the structure of purchase report's screen layout is used from MEREP_OUTTAB_PURCHDOC. So we need to create a new structure under this structure as ZUSER (you can use it different as per your requirement). To create the structure, you need to go to SE11, then enter the structure name in Data Type and then press Display.

Then you will find an option as append structure. A brief detail explanation you can find it in this Document.

You just need to use a different component type (as you want to show it as User name) as SYUNAME.

dev.jpg

Save your entry. You can save this into a TR, so that you can move it into another client if required.

Then you can see the field will be appeared in ME2N output screen layout. But it will come with blank value as we have just created the structure but didn't add any value or any coding for the newly created structure.

 

Now we need to create an explicit enhancement for this structure. When we run the report ME2N/ME3L/ME2M, system read the program LMEREPD02 (it is not the main program). In this program we can implement our enhancement and we need to do that under the methode build_base_list.

Go to SE38 and enter the program LMEREPD02, then click in the display, then find the method build_base_list in this program (you can find it in line item 76).

As this is a standard program, it will be same for every system (Note: I am not sure it can be different with different ECC/EHP release). Now double click on the method build_base_list.

Now click on the spiral symbol and follow the steps which I have already explained in this blog Explicit Enhancement for "Personal Settings" for an User.

Do these all steps from step 2 to step 5 in this blog. In step 6, you need to do some changes in coding.

Write the below code for this explicit enhancement. There are two way (code) you use for the same requirement.

 

SELECT SINGLE ernam

          FROM ekko

          INTO re_outtab_purchdoc-zuser

          WHERE ebeln = im_ekko-ebeln.

 

IF sy-subrc <> 0.

    clear: re_outtab_purchdoc-zuser.

ENDIF.


or


types : begin of ty_ekko,

         ebeln type ebeln,

         ernam type ernam,

         end of ty_ekko,

         ty_t_ekko type standard table of ty_ekko.

 

  data : wa_ekko type ty_ekko,

         it_ekko type ty_t_ekko.

 

  data : ename type ernam.

 

select ebeln ernam

   from ekko

    into table it_ekko

    where ebeln = im_ekko-ebeln.

 

   clear : wa_ekko , ename.

   LOOP AT it_ekko into wa_ekko.

   ename = wa_ekko-ernam.

   ENDLOOP.

 

   re_outtab_purchdoc-zuser = ename.


Remember, do not use both code in this enhancement, you can use only one of them.

(You can find attachment for both coding also with this blog)


If you will use a different Component for structure MEREP_OUTTAB_PURCHDOC, then you need to write the same component in the last line of this coding.

I have used the component as ZUSER, so that I have written the same component name in the last line as re_outtab_purchdoc-zuser = ename.

Now click on Enhancement as shown in this Blog.

Now our enhancement is ready to use. Now we need to test the same for reports ME2N/ME2L/ME2M. Go to ME2N and enter your selection data and press execute.

dev.jpg

Here you can see the new field with field value with correspond POs. If you are not able to see the field, then you need to choose the field from Change Layout. Now we can compare it with EKKO table, where you can found the same User name for these POs.

dev.jpg

You can see both are matched. You can also use this field in these below reports and t-codes :

ME28 - Release Purchase Order

ME2C - Purchase Orders by Material Group

ME2W - Purchase Orders for Supplying Plant

ME2N - Purchase Orders by PO Number

ME2L - Purchase Orders by Vendor

ME2M - Purchase Orders by Material

ME2K - Purch. Orders by Account Assignment

ME35 - Release Outline Agreement

ME35K - Release Contract

ME35L - Release Scheduling Agreement

ME45 - Release RFQ.

Try it in your system. It is quite simple and easy if you know the code of the enhancement. Even you do not need to take help from an ABAPer once you will get the code.

Yet again February 2nd and there is nothing i can do about IT.

 

That is from the Groundhog Day movie, which became a synonym for all the things that can be seen redundantly every single day throughout the whole year.

Yeah, even when you search Google for a nice picture, just redundancy.

 

groundhog.jpg

 

And nothing different in SCN.

Having the moderation box empty when going to sleep, it is filled up again in the morning.

 

Why should it be different? Every day new babies are born, every day we get new members in SCN.

Quite paradox,  if every day is February 2nd then the same baby should see the light of the world.

I guess it is even so we some members, they just have then a different user name.

Some have the same user name - and do not even imagine how dangerous this can be if another one with the same ID had annoyed the moderator recently.

Nevertheless, welcome SAP MM (do you know that you are number 135)

 

Please help me to get out of the Groundhog Day loop. Please try your best to not getting into this loop yourself.

 

Only a few hours ago a SAP Basis user (name S Basis - what else) posted "My  discussion threads is being deleted from scn.sap.com. This is happening with me for last 4-5 days".    Poor boy...the maelstrom of this Groundhog day is strong

 

 

Together we are strong too, let us try to get out of this.

 

 

Imagine ... the year 2003 ... where have you been? what was your age?  Imagine... all the things happened since then.

Quite a lot, right? By the way, it was the year when SCN (formerly SDN) was founded.

Imagine... how much questions have been asked since then. Imagine...could it be that someone else had the same issue like you before?

Or just look at the number in the content page of a space, here MM for example.

SCN MM number.PNG

Now try to imagine again. Can it be that someone had the same issue before you?

Let us try something else. Are you working for a company which is front runner and always first when a new Release or only a new Enhancement package is out? Or is it more like: At home I have already  Internet Explorer 11 while it is just IE8 in the company?

You can imagine what I want to say with this? With something really new you are probably the first with a new issue. But if you are on a release that is out for a longer time, then you can almost relax since someone else had the issue already and the solution is often right there to pick it up.



I have put together some tips and information for SAP freshers, things which should be known and heed, as the help us to get out of this Groundhog day syndrome.



Some search tips


Make use of the search in SCN: How to use SCN search

If you like Google more, no problem, then see Getting the Most out of Google: Optimizing Your Search Queries

 

When you search, get used to the SAP terms, which are quite different between the formal SAP help and the informal language in SCN.

An example: if you are looking for help on purchase orders, then use the word "purchase order" when searching help.sap.com or service.sap.com (OSS). In SCN people are in a hurry, in SCN you will find more POs than purchase orders. But you can find purchase order in SCN too, but rarely a PO in help.sap.com.  And it becomes even worse if you search with Google for PO in German language and your boss is right behind you.

However a STO for a stock transfer order can be found in the official SAP pages. Looking for a TO  (transfer order) in whatever place is useless as the search engines make no difference between a capital TO and a small to.  Search not just once, vary the search terms and try it again.

 

If you search for step by step documentation in help.sap.com, then searching with a transaction code is quite good, the normal process documentation rarely uses transaction codes. This is also good when looking for SAP Notes. In SCN it can be helpful too, however, you have to ignore all the content where some comedians thought it is nice to list all transactions of a module (while those transactions are anyway available in SAP menu)

 

Searching for SAP notes in service.sap.com is challenging too. If you got an error message, then search with the message number, once concatenated, once with a space between message class and number. Log off and on again, maybe you get a different server which has totally different results (don't know how they make this) . Searching in English and in German may also get you different results (don't be afraid as a chicken - if you search with numbers - they are equal in both languages), hence it can be considered as an extended search functionality.

 

Also make use of the automated search ANST What is ANST....and why aren't you using it?

and the new PANKS Got an error message? The new tool PANKS is here to help you!

 

I am always curious how somebody could find something that I did not find, in such cases  I read the content and do then a search with other terms until I an find this content myself.

 

 

 


SAP talks with you

 

I  mean the software, the support desk is a different story.

You know, SAP does not like you, hence it does anything to annoy you from 9 to 5. What ever you enter it fires error messages, express messages, pop-ups and dumps. And because of all this torture SAP jobs were well paid. But since SCN the pain is no longer that big - so the compensation.

 

Error/warning/information messages, they can appear in the status bar, as a pop-up, or by calling them explicitly  via an icon in the screen. They are a designed communication between SAP and you. Important to know is that you only see the short version on first sight. There is usually a question mark in the pop-ups and the message containers. By clicking it you can get a more detailed information about this error, often along with an instruction for a solution.

Some tell you nicely that you shall contact the administrator, if you are not the end-user, then this message means you.

Other messages are unfortunately declared as self-explaining - some are - some not.

If the message appeared in the status bar, then just double click to see the long text.

What all messages have in common is that message class and number is listed above the long text.

 

If you need help in case of error messages, no matter if you help yourself by searching in SCN and OSS or post a question in SCN, then

Please do not free translate the messages, post it 1:1 exact, always post the message number too.

  • The message number makes a message unique. T100 table has all SAP messages, my IDES system has 525756 messages for english language only. What do you think how often the same text is used with different message numbers?
  • it gives  feedback that you had seen the long text of the message. You wont believe how many people are surprised that SAP has a long text to many of their messages.
  • the number can be used to check in SE91 which part is a variable
  • further you can enter the number in SE91 and click where-used icon to get to the programs and where you can read a few lines of code to see what fields are checked when the message is issued
  • the message number can be used to search content in SCN or  for OSS notes in SAP Marketplace
  • An Abaper can use  the message number to set a breakpoint to analyse the program in detail
  • message numbers with a Z in the beginning are usually homemade and you should ask your team instead posting in SCN

 

 

Express messages

SAP has an own email system, where users can send emails to another SAP user. And such messages can be marked as express messages. You get a pop-up when such messages arrive, but only if you are active. SAP will not disturb your sleep, it only bugs you when you do something.

Such express messages are as well used when the system is talking with the user about something important. E.g. when you believed to have a document saved and SAP didn't take it into the database. Unfortunately most times this pop-up for the express message has no understandable message for the user. But it should really not be ignored even it is talking moon lingo. Use SM13, it has all failed postings, select yours and click the header icon. There you can find a more clear message about the problem.

Don't just post "I got an express message" in SCN, first do your analysis in SM13, then search SCN based on the findings from SM13, and if you haven't found a discussion with a solution, then ask.

 

 

Dumps

Dumps are ABAP Run time errors. This communication is chosen if something unexpected happened which was not foreseen by the programmer.

They look complicated on first sight, but this should not be a reason that you just forward it to SCN.

Read this document ABAP Dumps , it explains how a Dump is structured and where you can find which information and what you can do.

If you receive a dump, read it, try to understand it, then do what the dump wants you to do.You can even directly search for SAP notes as you can read in Searching for SAP correction Notes from transaction ST22. If all this did not help, search in SCN for similar issues, ask if you didn't find any, but tell what you already did, and attach the dump

 

 

 

SAP offers help, almost everywhere

 

Yes they do, for almost any field. Even a German cartoonist knows already the magic:

http://home.datacomm.ch/willi.kielholz/images/uli-stein/uli008.jpg

Source: home.datacomm.ch

 

 

In many selection screens you can find a program documentation behind the blue info button.

blue info button.PNG

 

In IMG you find the docu in front of the activity

imgactivitydocu.PNG

 

From the menu HELP you jump directly into the application help in help.sap.com, sometimes even to the correct page. But no matter where you landed in help.sap.com, you have a search box there too.

 

 

 

Interested in Table names / field names?

Many fresher are. Solution: place the cursor into the field, hit F1, then click the icon for technical field help. Voila: in the pop-up you can usually see the table name and field name. In some cases it is just a structure name, then go to SE11 enter the field name and click the where-used icon and limit the search on tables. Details can be found in How to find Table name for a Field which is shown structure name on press F1.

 

 

OSS notes / SAP notes / KBA Knowledge Base Articles

I already mentioned above how to search for them. They are official bug fixes and consulting notes from SAP. You need a  user ID for Sap Service Marketplace to access the notes. It is usually your basis team that grands this access. Read more details in SAP Service Marketplace Overview and FAQ

 

 


Searching for Transaction codes and where they are in the menu?

Honestly, if your dream is to become a consultant, then you should know the menu of your chosen module, like you know your neighborhood.

Forget the favorites, they are making you blind for the rest. Get used to the menu structure, which is in most cases logical grouped, and you often see the same structure in IMG too.

But if you really need to search for something, just do it in your system, using the binocular icons or just enter search_sap_menu into the command field.

menusearch.PNG

 

If you already found the name of a customizing table and want to know where the customizing activity is, then go to SM30, enter the table name and click customizing.

 

 

What is the BAPI / User exit for ....?

Do you really want to ask this in SCN until you retire? Never asked yourself why others are able to answer this question?

There are ways to find them in SAP itself, e.g. with a transaction Would you like to SNIF?: All you enhancements at one blick or a small report  Looking for user exits for a specific transaction?

 

 

 

Wow, you made it till here. Looks like you really want to get to February 3rd.

You want to know where to search first? Hmm, I am not sure if there is a golden rule. If you are a beginner to SAP in general then really make use of F1 and help.sap.com and read SCN content. If you are a little more experienced and your issue has a taste of bug then start looking for OSS notes in service.sap.com. You are new in a company? Approach your colleagues! They know what special things they implemented.

 

 

That was it, what should be known and heed by all our freshers to reduce the amount of basic and redundant questions in MM and other spaces.

In case some experienced folks has read this too and want to add some tips, please do so in the comment section.

Jürgen L

LSMW Quiz

Posted by Jürgen L Dec 3, 2014

Many of you know from various LSMW blogs and documents and from my BIF  that Master Data Management and Data Migration is my main activity field for about 10 years now, and I expect it to continue for some years.

Looking at the number of views on my LSMW blogs and documents makes me feel like a teacher. And if you still remember your school days then you know what teachers are notorious for: A quiz to check what you remembered

 

Before you ask.

Yes, it is allowed to search SCN if you do not know the answer from your mind.

Some questions can have more than one correct answer.

No, there is no price to win, no T-shirt, no badge. It is just  for fun, and maybe to learn or refresh the one or other thing on LSMW



1) SCN celebrated its 10 years anniversary in 2013. How many LSMW questions got posted in SDN/SCN since its foundation?


 

¨ < 5000

¨ 5001 - 10000

¨ 10001 - 20000

¨ > 20000




2) What is the current version of LSMW (in ERP 6)?


 

¨ LSMW 1.0

¨ LSMW 1.6

¨ LSMW 1.8.0

¨ LSMW 4.0.0




3) Which statement is true?


 

¨ A LSMW project can have any number of subprojects

¨ LSMW can only be exported and imported but cannot be included into a transport request.

¨ SAP recommends to use recordings if no standard import objects are available.

¨ LSMW can be used to extract data from a legacy system

 

 

 

4) Which import methods are supported in LSMW?

 

¨ only recording

¨ Idoc

¨ Bapi

¨ Standard Batch Input/Direct Input




5) How many main steps does the BAPI import method have

 

¨ 14

¨ 16

¨ 18

¨ 20

 

 

 

6) Which statement about the maximum file name length is true?

 

¨ File name "Imported data" Max 45 characters

¨ File name "Converted data" Max 45 characters

¨ File name length is not limited

¨ File name "Exported data" Max 45 characters

 

 

 

7) Which authorization is needed to work with a LSMW project

 

¨ B_LSMW_EXEC

¨ B_LSMW_CHG

¨ B_LSMW_ALL

¨ B_LSMW_PRO

 

 

8) Is the authorization B_LSMW_ALL sufficient to post the transaction, e.g. to create a vendor master?

 

¨ Yes, B_LSMW_ALL is all I need to create a vendor

¨ No, the LSMW authorization is limited to the usage of LSMW but does not overrule the authorization needed to post a vendor master




9) You have to load 500000 spare parts. Business does not want new material numbers to avoid relabeling in the warehouse. Customizing is set to internal numbers only. Assumed that the numbers do not conflict with existing material number ranges. Is it possible to load the material masters without changing the customizing?


¨ Yes, it is possible with standard batch input/direct input import method

¨ Yes, it is possible with recording method

¨ Yes, it is possible with Idoc method

¨ No, it is not possible without changing the customizing




10) All recordings done in a project are visible if you click the Recordings Overview button in Step 1 Maintain Object Attributes. But can you use more than 1 recording per LSMW object?


¨ No, per 1 object you can only use 1 recording

¨ Yes, it is possible to run multiple recordings within 1 object




11) Which task do you need to do before you can create IDocs and when at the latest possible time?


¨ Post a discussion in SCN an hour before Go-Live

¨ Activate Idoc Inbound processing latest before you execute the "Convert data" step

¨ Activate Idoc Outbound processing right before "Start IDoc Generation"

¨ Activate Idoc Inbound processing right before "Start IDoc Generation"




12) What is a disadvantage of the recording import method?


¨ No simulation mode

¨ The target structure must be flat

¨ The target structure must not contain item structures with a variable number of items

¨ There is no disadvantage




13) Step 4 Maintain Structure Relations. Which of the following statements is true?


¨ A flat source structure can be assigned to multiple target structures

¨ A complex source structure (header level - item level - sub item level) can be assigned to a flat target structure

¨ A  source Idoc structure can be assigned to a target Idoc structure of the same message type

¨ A flat source structure can only be assigned to a flat target structure




14) Your client prepares the data in Excel, you save this as text file to read it with LSMW. You know that your Excel file has 1000 records, nevertheless LSMW read log says that it read 1002 records. What can be the root cause?


¨ Unknown bug in LSMW

¨ Hidden lines in Excel

¨ Deleted Excel cells

¨ Headline counts twice


 

 

15) You are using Idoc import method and 1 Idoc failed posting. You edit the IDOC and correct the wrong value. Then you execute  "try posting again" in step Start IDoc Follow-Up but you receive the message  "No data selected". What can be the reason for this message.

 

¨ An Idoc cannot be edited

¨ you missed to execute the step Start IDoc Generation

¨ The Idoc is no longer in status 51 and you need to switch the radio button to "Resubmit the edited IDoc:"

¨ You need to switch the radio button to "Reset status 62 Idoc passed to Application"



16) You did a recording for MM01 Create Material Master. When you run the batch input you receive the error  "Formatting error in the field xxxxx" . What can be causing this error?


¨ A field in Excel was maintained in bold letters

¨ Material master recording needs to be done with MMZ1 instead of MM01

¨ A mandatory field was not included in your recording

¨ LSMW object was created by a different user




17)  You did a recording for MM01 Create Material Master. When you run the batch input you receive the error  "Field MARA-EKWSL does not exist in screen SAPLMGMM 4000" . Why do you get this error?


¨ The screen in the batch input is not the same screen as currently processed

¨ EKWSL field is in table MARC

¨ You do not have authorization to create material masters

¨ The field is set to "display only" in material master field selection

 

 

 

18) How can you secure that you do not  process an incorrect file in LSMW (e.g. customers instead of vendors)?

 

¨ Display read data and display each segment in detail to ensure that all fields are filled with the right content

¨ Run batch input session in foreground

¨ Have field names in source file identical to your source definition and remove the flag for "Field order matches Source structure definition"

¨ Let some from customer service run the batch input session for customers




19) In field mapping of a standard batch input/direct input you are missing some target fields. How can you solve this issue?

 

¨ Switch the import method to recording

¨ Adding the fields in the step 3 Maintain Source Fields

¨ Activate technical fields in Display variant in step 5 Field mapping

¨ Execute Auto-Field Mapping





20) You loaded purchase order long text to the material master in your logon language using the direct input method. However, you cannot see the long text in MM03. What can be the root cause to this issue?


¨ Characters are loaded in the same color as the background color

¨ Missing leading zeros for the material number

¨ Text longer than allowed

¨ Text ID wrong

 

 

 

I hope you had your fun with the questions, and got to know if you are ready for the real world of LSMW,  beyond the school exercises.

The answers to the questions are not far away . In any case you can find them in help.sap.com  and blogs, documents and discussions in SCN.

You can leave me your comments, your score, which question was easy or extra difficult, but please do not post answers in the comment section

 

 

 

 

 

 

 

1) 22455 discussions per  December 2nd 2014, use the SCN search and only enter LSMW and execute, you can see the number for discussions on the left

2) Goto LSMW, select from menu Extras > Display LSMW version

3) LSMW can have any number of subprojects assigned to it, and SAP recommends to use recordings only for own developments , see OSS note 554635

4) LSMW supports Standard Batch Input/Direct Input, Idoc, BAPI and recording. Only recording is a wrong answer.

5) 16 main steps -  Click the user menu button in LSMW and then the main steps button

6) file name "converted data" has a maximum of 45 characters

7) B_LSMW_PRO came with LSMW 1.8 version, without this authorization object you cannot open any Project

8) No, you need to have the authorization for vendor master creation too, otherwise your posting run will result in errors

9) Yes, it is possible with Idoc method. It is standard design that IDOCs ignore the settings for number ranges

10) Yes, it is possible to run multiple recordings within 1 object, there is a button for "more recordings" in step 1

11) Activate Idoc Inbound processing latest before you execute the "Convert data" step, because you need already Idoc specific header data in the converted data before you start creating the IDocs

12) The target structure must be flat, The target structure must not contain item structures with a variable number of items

13) A flat source structure can be assigned to multiple target structures. A  source Idoc structure can be assigned to a target Idoc structure of the same message type

14) Hidden lines in Excel. Deleted Excel cells. If only cells are emptied instead of lines deleted, then this space is still reserved in Excel and when you save it as text, then you have empty lines at the end of the text file

15) The Idoc is no longer in status 51 and you need to switch the radio button to "Resubmit the edited IDoc:"

16) A mandatory field was not included in your recording, this can happen if you record Spare parts and use this recording to load other material types too.

17) The screen in the batch input is not the same screen as currently processed, details see in my blog Explained issues with LSMW recording for material master

18) Display read data and display each segment in detail to ensure that all fields are filled with the right content. Have field names in source file identical to your source definition and remove the flag for "Field order matches Source structure definition"

19) Activate technical fields in Display variant in step 5 Field mapping

20) Missing leading zeros for the material number. Text ID wrong. The direct input does not validate your entries, you have to do this yourself, see my blog LSMW Long text load by Direct Input method



1. Context


Preliminary remarks :

a) it is assumed that the reader is familiar with the principle of MM valuation and account determination.

b) the scope of this discussion is restricted to the purchase order process with material groups.


In the accounts payable process, it is a common business practice to request that postings made to the GR/IR clearing account are split into different G/L accounts in order to meet internal accounting reporting requirements.

 

The purpose of the GR/IR clearing account is to keep track of the quantity differences for a purchase order between the goods received and the goods invoiced. At the time of the goods receipt or invoice receipt, the standard* SAP functionality for non-inventory procurement enables automatic account determination to be based on material group and valuation class when a link is setup between them.


However, the determination of the correct GR/IR account is not always covered by standard SAP functions, for instance, in a situation where for the same material group we would like to differentiate the G/L account posted, a system enhancement is necessary.

 

* : standard, considering which rules are configured for the transaction event key in the given chart of accounts (transaction OBYC/OMWB), example :

WRX.PNG

 

 

 

2. Enhancement description

 

In SAP standard account determination, the GR/IR account is identified via the transaction key WRX. The purpose of this enhancement is to pass to the standard function module MR_ACCOUNT_ASSIGNMENT an account modifier value (T030-KOMOK) which is linked to a different GR/IR account in the table T030. The enhancement available is LMR1M002, EXIT_SAPLKONT_011.

 

Capture.PNG


In addition, a specific table is required to map material groups to the account modifier. To build the specific table, it is important to consider which valuation levels play a role in the final account determination.


The valuation levels are : Chart of Accounts > Company Code > Valuation Area > Plant > Split valuation. For the non-inventory procurement and with a unique chart of accounts, we need only the company code and material group as table key and the account modifier as 'parameter'.


Table : Z_EXIT_GRIR

Capture.PNG

As explained in the referenced notes, the account determination for WRX is always carried out for with an empty valuation class (in standard). In other words the only influencing factor is the account modifier.


The next step is to update the table T030 (transaction OBYC/OMWB), the GR/IR account is set for transaction key ‘WRX’ with the account modifier ‘AAA’.

Capture.PNG


The final step is to write the program (sample code) :

 

Capture.PNG

 

Once, everything is in place, this is time to test the design.


User-exit:

Capture.PNG

Function Module:

Capture.PNG

The expected account is returned. The solution is considered tested when it has been checked at each step : GR/IR/Cancellations/Credit Memo/Return to vendors/etc...



3. Additional references

 

301477 - Accnt determintn for WRX for materl grp not possble

165692 - Documentation: Enhancement LMR1M002 (MM-IV)

523495 - FAQ: Account determination


4. Conclusion

 

Great!! The accountants are now happy !! This technique can handle in practice much more complex account determination procedures

Does the headline in this blog confuse you? Sorry, that is noit my intention. I just want to pint out a not-so-well-known fact.

 

 

When you set a safety stock level in the MRP2 screen of the material master it is subtracted from available inventory in the MD04 stock / requirements list. Therefore the MRP run ignores that part of the inventory. Imagine the following situation: There is a forecast of 50 pieces for next month and you have maintained a safety stock of 30 pieces. The system will plan to have an inventory of 80 pieces in stock at the beginning of next month. As we are approaching the next month and actual customer orders drop in, the forecast is replaced by actual orders. Should the actual order exceed the forecast - lets say that customers demand 60 pieces instead of 50 - the MRP run will generate a new replenishment proposal for an extra 10 (instead of using the safety stock) and you end up with 90 pieces in inventory, even though you only need 60.

 

This type of behavior creates dead stock and misses the purpose of using a safety stock as a buffering strategy. The situation worsens if you have a rounding value or a fixed lot size.

 

 

So what can you do? Use a range of coverage profile that drives a dynamic safety stock if the situation allows for it. In a range of coverage profile you have a target safety coverage and a minimum safety coverage (in days of coverage). The MRP run can 'see' the safety levels and ONLY generates a replenishment order when the minimum safety coverage is broken. Therefore you have to make sure that the minimum safety coverage is set to 1 day and the target is higher. In that case the MRP planning run uses all the days in the target coverage as a buffer to counter demand variability.

 

 

By the way... the range of coverage also has a maximum safety coverage to keep the inventory from blowing up, should the forecast be too high.

Business Requirement:


We know we can get all types of purchase report from ME2N/ME2M/ME2L etc. But these all reports are considering as per line item. These reports will show you result line item wise when you run with your criteria (like as Selection parameter).


When you want to get a report for completed POs with consider all line items. When you want a report only for these PO numbers, whose are having delivery complete for all line items. You will not consider these POs as complete if GR will be pending (or partial GR) for any line item.


In short, you want a report with the indicator as “Fully Delivered” in Header – Status tab.


As an example,


You have a PO with 2 line items, GR has fully completed for first line item but your second line item has the partial GR. So when you will consider this PO as incomplete PO as second line item has some GR pending.


You will find more information in this discussion List of completed POs with compare all line items. I had posted the query but didn’t find any standard solution. Experts says, I have to go with development. Somehow, I’ve prepared this report with the field delivery complete indicator (EKPO) and Ms Excel.


I want to share my experience so that it can be helpful for others.


Actually my boss had given the task to me. We have one vendor and we are doing invoice when the PO for this vendor will be totally completed. My boss asked me to give the all completed PO numbers with open invoices, so that he can calculate the quantity for open invoices.


But before doing this you might have to know some important notes:


You will need to make this report when you will agree to pay invoices only when all line items of a single PO number are totally completed.

As you can see the report will be made by some work which is outside from SAP (as MS excel), so if you are agreed with to do an extra work analysis outside SAP.


If your PO is containing multiple line items, since if your some data (like as material, plant etc) are not same for multiple line items, then you can’t combine these lines into one.


You can’t do this when your vendor will give you invoice as per line item and vendor says you will not get rest material until you pay his sent invoices for another line item (which has completed).


You can’t do this when your vendor says he will give you some discount if you pay him for another line item which has completed and you will not able to get this discount if you will wait for the whole PO complete (all line items). Then it is suggestible to make the invoice and payment as per line item.



Scenario:


PO number 4500013608 contains 3 line items.

PO number 4500013609 contains 2 line items.

GR pending only for 3rd line item for PO number 4500013608. Hence I just need the report which will contain only PO number 4500013609 because only this PO number get fully completed.

 

 

Steps:


Create a selection parameter as delivery complete tick indicator and delivered = Ordered. So that we can get all these line items whose are having filly GR completed.

IMG path : SPRO-IMG-Materials Management-Purchasing-Reporting-Maintain Purchasing Lists-Selection Parameters-Define Selection Parameters.

It will be much better to create your own selection parameter. You can create by coping a standard, then you have to make the changes as below:

dev.jpg

 

Save the selection parameter.


Then take the all completed PO numbers (completed as per line item) with from ME2N with selection parameter ZDEV and ALV layout. It brings 4 entries (2 line items for PO number 4500013608 and 2 line items for PO number 4500013609)

dev.jpg

 

Export it to excel.

 

Then copy these PO numbers and take the DCI indicator from EKPO table (DCI will be flagged only for these line items which has GR completed and also be sure your system has the option set delivery indicator automatically activated).

dev.jpg

 

Export it into another excel sheet and replace the blank with value A (You can use A to W - alphabetically below than X). Then sort the DCI field. You can see the A will be appeared first.

dev.jpg

 

You can see my one PO number has two DCI indicator as A and X. I have sorted this because we know excel will take the first value for formula V-Lookup when source contain different value.

Now I have two excel sheets. First is exported from ME2N and second is exported from EKPO table. I've done V-Lookup and take the DCI indicator from second excel to first excel.

Now our first excel will look like as below:

dev.jpg

 

Now here, delete the line item which will contain the value A in DCI field.

After delete the line items, you will get the line item which will contain only value X for the field DCI.

It is the report for all PO numbers which has completed GR in header status.

dev.jpg

 

It means I get the PO number which are having GR as fully cleared for all line item.

I can compare this PO in SAP system as Header – Status as “Fully Delivered”

dev.jpg

 

Here, in your excel sheet, you've got these PO numbers which are having GR fully delivered.

Now if you want to check the Invoice has already done yet or not for these PO numbers, then just go to ME2N report and filter these PO numbers with selection parameter “RECHNUNG”. You will get the result for all PO numbers with header status as “Fully Delivered” and “Not yet invoice”.

From some for us yet unknown reason, suddenly, all the quick views (SQVI) from one of our productive system disappeared. Hundreds of quick views (3400 in total).

 

After short investigation we found a strange phenomenon. SQVI Usergroups were recreated. Before the incident the Usergroups were from the range SYSTQV000001 - SYSTQV000852. And now the range started at SYSTQV000853:

capture_20140627_174750_006.png

What we could get in the first moment, at least, was a list of reports (table TRDIR), that were generated out of all the quick views:

Clipboard09.png

By searching the table AQLQCAT (Query Catalog) for the query name (right side of the program name from the 17th character), we could find the name of the Infoset:

capture_20140627_174603_004.png

We went to SQ03 to check, whether the Infoset is still known to the system, and whether we could re-assign the abandoned Infoset (authorization) to the new QV Usergroup of the given user:

capture_20140627_174625_005.png

Apparently it was possible :-):

capture_20140627_174750_006.png

capture_20140627_174750_006.png

 

Still the quick view did not appear for the user in SQVI.

 

After a bit of testing we found a way: to copy the query from the old user group into the new one.

First in the SQ01 we selected the new user's Usergroup: How to find and execute or work with other users quick views (or quick views created with old user-id)?

Then in the menu select Query => Copy. Here we put the old usergroup and the query name twice:

capture_20140627_174830_008.png

After the copy, the query appeared again in the SQVI:

capture_20140627_174834_009.png

And this we may repeat (in our case) 3400 times :-)


To default the GL account while creating the Service PO's, we need to follow the below configuration’s.

 

1. Create a Service Material Group in T-code OMSF.

 

MSG 1.png

 

2. Create a Valuation class by using T-code OMSK and then link to Account Category reference of service.

 

MSG2.png

 

3. Use the T-code OMQW to map the Service Material Group  (STEST) to Valuation Class (STES).

 

MSG 3.png

 

4. Once the above steps are completed , we need to use T-code :OBYC to map the valuation class STES to GL in Transaction Key GBB- Offsetting entry for inventory posting to the Account Modifier VAX,VBR and VKP. Also similarly to Transaction Key WRK-GR/IR clearing account with respect to your chart of account.

 

MSG 4.png

 

MSG 5.png

 

5. After that we have try to create a PO for the new service material group and it is defaulting the GL account which we have mapped in T-code: OBYC.

 

MSG 6.png

 

FYI

 

We can use the table T023 for Material Group mapping to Valuation Class and T030 for Valuation class mapping to GL account based on the Transaction Key and account modifier.

 

I believe this document is useful those who are new to SAP MM.

 

Regards,

Sada

During the Implementation we come across many requirements around free goods, minor consumable, one time purchase items etc. Many of the time Client does not want to follow the whole SAP procurement process or does not want either value or quantity or both to be updated. Many of the time these requirements come in very vague terms, complicated terminologies ,or sometime using many legal/confusing terms. At the end MM Consultant ends up creating customized material times or other workaround custom solutions for the same.

However SAP has provided 2 Standard Material Types to cover many of these requirements,

 

SAP provides two options for Non Valuated Materials

     1. NLAG - neither quantity nor value is updated (non-stock material)

 

     2. UNBW - only quantity updated and not value.(non-valuated materials)

 

During Procurement they behave as below:

 

1)NLAG is material that is not held in stock because it is consumed immediately. (Office supplies such as stationary. You need to create purchase order and accounting document for payment but the stock balance is always zero as it is issued out immediately to the various department.)

 

2) If the material is set to quantity update but no value update and it is included in a Purchase Order with account assignment, a goods receipt will increase the stock.

 

3) For UNBW, accounting documents are created only at the time of goods receipt, i.e where we are liable to pay the vendor. However when we issue this material for consumption or any other transaction accounting documents are not generated.Important feature of UNBW is that it can't be expensed without receiving in stock.

 

4) All non-stock  material  will be immediately consumed upon goods receipt. These are charged to a cost element such as Account Assignment, Work Order, or Work Breakdown Structure. As a result, the non-stock will not be charged to inventory.

one of the critical success factors in supply chain management is the correct translation of a supply chain strategy into materials planning policies. Take as an example a directive to provide a certain service level to the customers. Management might say "we want to achieve a 98% fill rate on our most valuable products" (usually A items).

 

What usually happens then, is that every materials planner figures out how much inventory they need to hold and what replenishment policy to use to achieve that. If you want to standardize this kind of directive and develop a system to have everybody use the same calculation, I suggest you use the field 'service level' in MRP2 and calculate the safety stock setting for each material using the variables lead time, mean absolute deviation and a safety factor.

 

You can do this on the forecasting screen of the material master. Depending on how you configured your MRP type, the forecast run can calculate  safety stock level for you. However, you have to kind of doing this for every material and you can only simulate exactly one service level.

 

A better solution is the SAP Add-On Tool 'Safety Stock and Reorder Point Simulator'. With it you;re also getting a new KPI: safety stock value! You can also simulate many service levels and compare the results in terms of quantity and value. On top of everything else, the safety stock calculation gives you two more - very important - parameters: the variation in replenishment lead time and a variation in demand.

 

Let's say management desires a service level to the customer of 95%. In that case you would pull all those materials into the simulator, set 95% nd your variation in lead time demand and click the 'calculate button. The simulator then calculates all safety stock individually for each materials and totals the value. This way you can determine what a 95% service levels means compared to your current master data settings or to other service levels. In our example, all materials currently have a service level of 96% which, with the manual calculation the materials planner was using, produced a value of $7,342 in safety stocks. However, the safty stock simulator produces a value that's higher with a lesser service level... and that calculation is using the same variables for each material across the board and therefore probably much more accurate than what the planner ever can come up with - possibly applying different methods and being totally overwhelmed doing this for hundreds, if not thousands of materials.

 

 

In the end, you push the save button and safety stock and service level are being updated into the MRP2 screen for each and every material in the list.

 

 

Management changes their mind tomorrow? no problem!

Are you missing a functionality in SAP ERP MM & SD joint process and functions, and you think it should be included in the standard product?

 

Do you want to improve SAP MM directly and influence the SAP Development?

 

Now is your chance!

 

 

SAP.JPG

Influence.SAP.com

 


Currently we are running the Customer Connection Program in SAP, and I would like to have you - our customers - to be part of our brain for innovation and improvement!


Customer Connection is directed at incrementally enhancing and improving products and solutions in mainstream maintenance. It offers you, our customers, the opportunity to suggest small enhancements and improvements to those products and solutions (“Improvement Requests”). The Improvement Requests selected for development will be delivered through SAP support notes or support packages.


This is a unique opportunity for you to influence development at SAP, and to submit requests for functionality which you have been waiting for. If you are interested, the following is our working scope:


 

 

Link: SAP SD and MM joint process and functions


 

 

Scope of project:

Improvement of functions and processes that are integrative between ERP SD Sales and ERP MM Purchasing or are commonly used cross industries and regions.For more details of the Project Scope, you can find it in the above SAP SD and MM joing process and functions link!

 

 

 

 

 

 

 

You can navigate to the THE REQUEST PAGE and submit the improvement request, or contact me at Bradley.Liou@sap.com if you have any question.

 

 

For more information, please visit: OUR Customer Connection SCN PAGE and SAP Improvement Finder

 


NOTE: THE COLLECTION PHASE WILL ONLY RUN UNTIL Sept 30th, 2014. SUBMIT YOUR IMPROVEMENT REQUEST BEFORE IT IS TOO LATE!

Sometimes I wonder how many implementations you completed, one needs to brush up on designing of material master before getting into a new implementation project, no matter his/her of experience level.


Background:

Every time a transaction run with financial postings, financial account determined based on valuation class in material master, triggered by a movement type with automatic account determination process.


So, here's a simple explanation -Who is the owner of material master in spite of the same material number/code used by business in a module/in all modules.
Who is the owner 1.jpg


Concept:
Material Master!!!!!!!!!!!
Very well in default attracted to Material Management module where it is comprises with other modules data too as required by business scenarios ie….Finance  & Controlling , Sales & Distribution, Quality Management, Production Planning and Warehouse Management etc. Based on material properties with different characteristics and how material behave to business on inventory and accounting, the material type determined to use with standard material type or custom material type.


Precisely material master available with user departments like Basic data , Purchasing, Sales, Work scheduling, Accounting, Classification, MRP(For Materials planning and control), Production resources/tools, Costing, Storage, Forecasting, Quality management, Warehouse management, Plant stocks, Storage location stocks  and based on material properties to business these user departments on material type and later material are created.


In our day to day business consulting, materials are created with standard transaction code MM01 or materials are created through uploading tools by business. I refer back with my previous involvement for a large project where material creations have following process
1. Business end user search material list or catalog for his/her daily usage for transaction.
2. If material not available, then he /she fill the material request form
3. Material request form sends to central material creation officer with his/her manager approval.
4. On appropriate check and verification by central material creation officer and if he is happy, then he /she can new material code or upload file with custom transaction code for new material code.
5. Once new material code created in system, central material creation officer convey message to business end user.

 

Since different departments in a business work with the same material, but each department uses different information on the material, the data in a material master record is subdivided by user department. As we all know, material created by a user and material used by all different department users but, the question is who is the material owner in business – those who created material or those who use material on department wise or MRP controller or Buyer (purchaser).

Who is the owner 2.jpg

 

History of this blog:
In the last few years I happened to meet project managers, procurement business heads & business users of different organizations and tried to find the answer “who is the material owner” in your business. There is no satisfactory answer, so this blog is the result and inspiration for not getting the real answer. The few answers are:
I am SCM lead, so I am the material owner
I am creating material master, so I am the material owner
I am managing material procurement, so I am the material owner
I am managing material inventory, so I am the material owner
I am managing sales of material, so I am the material owner
I am managing payment for material, so I am the material owner

 

I tried and explained on the how business can deal to work by deciding material owner by using field 
“Lab/Office (MARA-LABOR)” in material master in Basis data-1 view. Individuals are blinking with this concept and difficult to believe by them, unless one is to work and use this field!

 

Decision process in an organization to find the owner of a material:
Every department in the business has a stake in one or more processes for a material. Groups of individuals for each department usually share in—and "own"—the activities for each department which make up a process. Single individual who is ultimately responsible and accountable for the effective working of the process is known as the process owner but not material owner. The process owner is the immediate supervisor or leader who has control over the assigned process to his/her but entire processes from beginning to end are controlled by material owner.


Is the owner of a raw material different to an owner of a spare part-different to a finished material? Why is it different?
It is the organization question and decision who own the material master. It may be depends material types where a material are stored in a physical location with significant naming conversion or based on a particular process where all materials go through it. To complete a particular process, business may needs all material in one physical place/plant where raw material required for production process, spare part required for maintainace for equipment’s and finished material obtained. Later to complete the process, business needs packaging materials. So material owner decides based on to complete a process or material stored in stored in a physical destination.


What is the benefit of having a data owner?
Master data is an organization's lifeblood, flowing through all vital departments. Bad master data is poison and managing bad master data without ownership creates poisonous environment with clogging operations, confusion on handling, prompting poor decisions and in the worst-case scenario, leading to jail time for business leads/business executives/end users. To avoid poisonous environment, a material master data owner is required for effective management of material master.


What does the data owner do?
Data owner will design and plan the approach with the activities which are necessary to attain the desired organizational objectives where business can have science of managing material flow including procurement, production, marketing, transporting, processing, handling, storing and distributing the materials.

 

Scope:
With referring to the above information’s, business system can deal to work  by deciding material owner by creating  “Lab/Office(MARA-LABOR)” and assigning to material master in Basis data-1 view. The field Lab/Office in material master is known as Laboratory/design (engineering) office where this Key represents for the design office, laboratory or laboratory worker responsible.

Who is the owner 3.jpg

For certain case, the field “Lab/Office “in the material master record is used if the material is a chemical component but also the same field can be used for design and engineering purpose defining ownership of material master.

 

We have remarkable products like MDM and MDG - why just reduced a conclusion with one single field?

Universally, MDM (SAP Enterprise MDM) or MDG(SAP MDG/ECC or ECC-integrated MDG)  is an integrated data management tool for the maintenance, validation and distribution of master data where SAP MDG best suited for central master data management of SAP standard objects and fields which need to be distributed to SAP ERP, SCM& other systems of the SAP Business Suite and SAP MDM best suited for highly flexible data modeling capabilities allow for creating various data consolidation, harmonization and central data management scenarios within a heterogeneous system landscape.


Master Data Management is a technology/ application packages/tools enabled discipline of actively 'Managing' or ‘Staging” the data rather than 'Maintaining' it in each transactional system across the business organization where no individual carry the ownership of material master data!


Reference:
http://scn.sap.com/thread/3414912
http://scn.sap.com/thread/3449752
http://scn.sap.com/community/erp/logistics-mm/blog/2013/10/31/account-category-reference-acr--grandfather-of-automatic-account-determination-process


Conclusion fiction:

Before concluding, the “Lab/Office “field will be used on the Material Master to identify the ownership of the material. The ‘Lab/Office’ field will be used for this purpose only and this is at Client level. If new ‘Lab/Office’ field values will be identified by Business Lead Users and given to the Supply Chain Team. The Supply Chain Team will add the new values to the system and may delete previous entries which are not required by business.

 

Thanks for your time to read my 3rd Blog. Also I would like to thank all my present project team members for their great encouragement and strong motivation.


Regards,
Biju K

It is time to clear up a widely mistaken belief, although it became almost established as truth due to the massive wrong answers given in a high disproportion when someone failed to search or is seeking for a new answer to the question "How to make error message & a warning?" or "Changing warning message to error not working" 


It is really interesting to see how attractive such questions are. Within a few minutes several answers are pointing to the customizing. Some mention the IMG path others are giving the transaction code to the same customizing. I wonder from where these suggestions are taken. Did they look up older questions and just repeat the answer? Or do they just believe that any system message can be customized, one only has to know the right customizing transaction.


So the typical discussion goes like this:

"I want to make message MM 081 to become an error"

"no problem - execute OMT4 and add this message and maintain an E for error"


oops2.PNG

 

Why was he shocked?

 

OMT4 does not even have a "New Entry"-Button

 

omt4.PNG

 

No issue at all, now the Techies jump in and inform that this is all stored in table T160M and suggest to maintain this table directly with SM30 transaction

 

: not possible  I get and error "The maintenance dialog for T160M is incomplete or not defined"

 

: Click the message, it takes you to the long text. Here you have the option to generate a maintenance dialog

 

: Thank you.

 

: Hi, I have one more question. I added the message as said. But it does not work, can you help me.

 

All are going now, leaving a desert with an unanswered question, and one more thread about how and where to maintain flexible system messages

nurweg.PNG

 



Have you ever tried to start a car that you see in a parking space with your own keys? Why not? Probably because you know that you cannot use any key to drive any car. Why are you assuming it for any message in SAP?


Just imagine the car is transaction where you expect the warning or error according to your entry (the key) in table T160M (ignition lock). You already smashed the window to open the door (SM30, because OMT4 did not let you in)

Still the motor does not start. Are you disappointed?


Like the ignition lock needs the right key, your SAP transaction needs the right ABAP that recognize your entry.

If SAP has not foreseen a variable message in its ABAP coding, then you enter as much as you want in T160M, it will just not work.


SAP's system messages are all stored in table T100, a small subset is foreseen to be customized, these are stored in table T160M.

T160M entries are delivered by SAP. Some more messages can be added because the programs have been prepared for this. Those new entries are usually communicated via OSS notes.


How to know if a message is customizable which is not yet in T160M?

  • Search SCN, if you find a "Hooray, it works" then you got already a good indication.
  • search SAP Support Portal
  • Check it from transaction SE91 Message Maintenance, you should know some basics in ABAP language.
    • In SE91 enter your message class and message number and click the Where-used button. SAP gives you a list of programs. double click the description on the right and SAP takes you into the ABAP directly to the place where the message is processed. Here you can see whether it is just a message with a hardcoded message attribute, like this
      • IF OFFENER_RG_WERT NE 0.

      •    MESSAGE W388(11).

      • ENDIF.

    • or if there is some coding which is looking into T160M table to get your customized attribute:
      • PERFORM enaco_2 USING 'ME' '040'.

      •               CASE sy-subrc.

      •                 WHEN 1.

      •                   MESSAGE w040 INTO gl_dummy.

      •                   mmpur_message 'W' 'ME' '040' '' '' '' ''.

      •                 WHEN 2.

      •                   MESSAGE e040 INTO gl_dummy.

      •                   mmpur_message 'E' 'ME' '040' '' '' '' ''.

      •                 WHEN 3.

      •                   MESSAGE w040 INTO gl_dummy.

      •                   mmpur_message 'W' 'ME' '040' '' '' '' ''.

      •               ENDCASE.



By the way, there are message customizing where you can add new entries, still the above said is valid for them too.


Sorry for killing a dream


Trigger to this story can be read in Application area MM and Changing warning message to error message - Entry Sheet and many many more discussions in SCN and elsewhere.

Yes, you can use a reorder point procedure for inter-plant stock transports, but be careful what you put into the lead time.

 

When you source materials from one of your own plants, your lead time (in the field Planned Delivery Time  (in the delivering plant) should be the time it takes from the issue in the delivering plant until it arrives at the receiving plant. The only question is: Can the delivering plant issue right out of available stock?

 

If the delivering plant does not keep the product in stock but has to procure it also, then the total lead time until it arrives in the receiving plant will increase dramatically. But if you put that total time into the PDT, you will ask the delivering plant to issue way too early. Unfortunately the TLRT in MRP3 does not work with procurement indicator 'F', so what can you do?

 

I know people have played around with source lists and info records but if you want to use an automatic reorder point calculation (VM or V2) you need to put the total replenishment lead time into the PDT, because that is what the reorder point calculation uses. So you are stuck with a manual reorder procedure (VB or V1) and you will have to include the entire total replenishment lead time in your spread sheet calculation.

 

The SAP Add-On Tools (MRP Monitor and Reorder Point Simulation) give you added possibilities: Since the MRP Monitor also performs an EFG classification for lead time - and lets you pick the TRLT from the MRP3 screen - you can build a list of items which are feasible for an auto-reorder procedure (X - consistent consumption, C - low consumption value, E - short lead times). The Safety Stock and Reorder Point Simulator then lets you calculate and simulate various service levels for optimized reorder points and safety stock settings... and allows for a mass update of the policy.

 

for more info on the SAP Add-On Tools refer to the www.bigbytesoftware.com website or check out my YouTube channel.

Driving through the long road of MM world, I heard similar questions many times from consultants, customer and colleagues asking how to overcome error of
unrealistic stock value at SAP System.

 

Well, different customers, different business scenarios, different behaviours. But, I would say that in most of cases we can use some workarounds to avoid errors from this nature.

 

Especially talking about error messages 'M7 304' and 'M7 308'.
M7304 - Stock value and quantity unrealistic: & / &
M7308 - Stock value and qty are unrealistic: & / & -> see long text

 

Let's talk about these above errors in details:

 

M7304

 

This error is raised in the following piece of code:

.
SAPLMBGB LMBGBFST
FORM     WERT_SIMULIEREN
...
     IF ( w-salk3 < 0 AND NOT w-lbkum < 0 ) OR
         ( w-salk3 > 0 AND NOT w-lbkum > 0 ).
        WRITE w-salk3 CURRENCY i_waers TO l_salk3_message.
        WRITE w-lbkum UNIT i_meins TO l_lbkum_message.
        MESSAGE e304 WITH l_salk3_message l_lbkum_message.
      ENDIF.
...
If the field MBEW-SALK3 (Total value on stock) is becoming lower than zero and then error is raised.

 

- Common reason:
If the Tax condition is customized as non-deductible taxes, then the amounts are added to the material value and - during goods movement -
and subtracted from the stock value. If the same material was previously posted to the stock with deductible taxes, a negative balance can result.

 

- Comment:
A negative stock balance cannot be prevented by allowing negative stock in the material master. A negative stock value is only tolerated in
conjunction with negative stock quantity but not with zero stock quantity.

 

- General solution:
A withdrawal of stock material should be posted with the same tax settings as the placement of material into the stock, i.e., in both cases 'deductible' or in both cases 'non-deductible'. The non-deduct. taxes that are due are to be added to the material value on the receiving-plant side, at goods receipt thus.

 

- Workaround:
A possible way to overcome the error in this particular case is to increase the stock temporarily (movement type 561), so the stock amount is not zero after goods issue, and to correct for the stock increase after the goods issue (movement type 562).

 

- Another possibility is MR22 transaction.
Use the function "Debit/credit material" (contained in Valuation menu) to post a correspondingly high material debit (if value is negative) or
material credit (if value is positive) for the material. Then carry out the goods movement. When you use this procedure, the system creates a
revaluation document.

 

M7308

 

Error 'M7 308' is usually caused by a rounding issue.
In case, it is because the total quantity on stock is not matching to the total value on stock.

In order to solve this error we should recalculate the total value.

And to do that we have to post and re-post a price change in transaction MR21.

 

Solution:
- go to MM03 transaction and check the price in Accounting 1 view.

-  then, go to MR21 transaction and post a price change by increasing the price in 0,01. For example, if price is 100,00 USD change to 100,01
USD.

- open MR21 transaction once again and then post a price change by reducing the price in 0,01. For example, from 100,01 USD to 100,00.

 

Once these price changes have been posted the total value on stock will be adjusted and then you should be able to make any necessary goods
movements for this material.

 

See the following notes as reference:
1026379 - MB5K: Misleading error message 045 due to rounding
1708261 - Error 'M7 308' is raised when trying to post a goods movement

 

Best Regards,
Fábio Almeida
SAP Consultant - ERP MM

Actions

Filter Blog

By author:
By date:
By tag: