Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Purpose

Describes how to solve the issues of dates in MRP.

 

Overview

In MRP, e.g. the planning transactions like MD01 or stock requirement list like MD04, sometimes the date errors of factory
calendar below occur.
Error  61060: The date & is not convertible (please correct)
           61061: & date lies before start of factory calendar. (Please correct)
           61062: & date comes after end of valid factory calendar. (Please correct)

Solution

 Those are generally caused because the dates calculated internally in the programs do not exist in the factory calendar, but it  is not clear which calendar is involved and what the date is, so here is the solution to correct the error with an example of MD04.

As you can see there is an error 61060 (The date 6172 is not convertible....) while trying to display the stock/requirement list, it means

that the date 6172 calculated internally in program can not be found in the related factory calendar.

Now, we can correct the error through debugging as below.   Please input /h in the command window and enter to trigger the debugging.
 
 
The system will go to the debugging screen as below after clicking the enter again.

Now, please go to the menu Breakpoints > Breakpoints at > Statement, input 'message' as above and enter,  then the system

will stop at each statement of message which raise error/warning/information. (If the debugger screen is different than the one

above, you can go to the menu Debugger > Switch to classic debugger.) Click the button F8 till you stop at the exact statement

MESSAGE for the error you want to correct as below.

Scroll up in the screen until you can see the function module 'FACTORYDATE_CONVERT_TO_DATE'. Please bear in mind that the

function is used widely in SAP to check the date in factory calendar, so the key point is to find out the function module just before

the error while debugging, generally it is right before the error. But if you can not find the function in the same program, then you

need to click the button 'Call stack' to see the call hierarchy and go to the upper programs to look for the function as below.
 

Now, once you find out the function module as below, please check the value of importing parameters FKDAY and FABKL of the

function. Here the values are 6172 (The date) and 01 (Factory calendar id).

Then, please go to customization transaction SCAL for factory calendar as below. Tick on the 'Factory calendar' and click 'Display'.

Select the calendar 01, click the button 'Calendar'.

It shows the years of the calendar, please see the last year 2010, the initial number of days is 5016 and it has 253 work days,so the number of days at the end of this year would be 5016 + 253 = 5269, obviously the date 6172 is greater than that and out of the range, this is the reason why the error come up. Actually, calculating the number of days is not so accurate as I did because the system use either working days or calendar days depend on the MRP element, however we can obviously get the idea that the years of factory calendar is not enough. Thus, you can solve the issue by extending the years for this calendar in SCAL.

If you have question on how the date of 6172 is calculated, you can debug further to check, of course, this needs the knowledge of ABAP programming and of debugging.If you are not able to find the statements which calculate the date in the same program where the function modules is located please go to the 'Call stack' as below to check in the upper programs.

Here, we can see the date is calculated in the upper program BERECHNEN_CM61M_WZTER_ENDWZ, the value ofAF61X-FKDAY, which is transferred to the function is calculated by the field MDKP-MTWZT.

 
 

Now you may ask what the field MDKP-MTWZT is, please go to SE11 as below.

 
You can see its description is 'Material replenishment lead time', generally the lead time of MRP includes the 'In-house production time'

or 'planned delivery time'/'Good processing time'/'Purchase processing time' in the master data.
 
After checking, we found out that the 'In-house production' time of the material master is set as 999 as below,  then the issue also can

be solved by changing the value lower.
 
 



 

3 Comments

  1.  It is very helpful.

    Thank you very much!!

  2. Former Member

    Good. Great work

    Regards,

    Madhu.

  3. Former Member

    Thanks For u Such i Nice Post Its Really Helpful