Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
manishaparulekar3
Discoverer

In this blog, I would like to explain how we built a custom FIORI to capture the Usage Probability values automatically in MD61(FIORI- Create PIR) and its advantages over the standard SAP FIORI-MAINTAIN PIRs.


The BOM's with huge number of components which have a Usage Probability value, it becomes difficult for the planners to enter these values manually in MD61 transaction. Hence it would reduce the laborious task for planners to enter these values manually whilst creating the PIRs.


To begin with, let me give an example of the Usage Probability or Planning Percentage value, the low-level components for a given sub-assembly (KMAT Material) can have varying demands, and the business meets these requirements by entering the Usage probabilities (Planning Percentages) in Create PIR or Tcode MD61. MRP plans the low level components with Usage Probability value as shown in below diagram.


A demand for the low level buy/make components must generate the Purchase Requisitions/Planned Orders as per the Usage Probability/Planning Percentage value post MRP run.



Usage Probability/Planning Percentage Business concept


Below diagram explains the 2 parts in the Custom FIORI_ZDTB_PIR_Upload



Part1 Upload the Excel file for the PIRs


These values maybe download from SAC as shown or any other Interface or may be built in Excel itself. Program designed for upload of 36 months data.


The Forecast file (Excel file) will be uploaded with Custom FIORI_ZDTB_PIR_UPLOAD. The Splitting of the Requirements from monthly to daily is carried out by the program, this can be changed to weekly/quarterly as per requirement.


Part 2 Capturing the Usage Probability/Planning Percentage Value. The logic in the Z-Program will help to capture the Usage Probability value stored in Characteristic field in the classification tab of Material Master. The Requirement type will be automatically captured in the program. If the material is not a KMAT material type, there will be no pop-up for Usage probability.


The Advantages of the Custom FIORI "Upload Planned Independent Requirement" over the Standard SAP FIORI "Maintain PIR" are as shown in below diagram.



Maintain PIR v/s ZDTB Upload PIR


Prerequisite & Process Flow




  1. Classic Mode Configuration Profile

  2. Planning Percentage Master data                                                                                               MDP1 - Create Planning Table                                                                                                MDP4 - Maintain Combinations                                                                                           MDP6 - Create Planning Profile                                                                                                    CT04 - Maintaining Planning Percentage Value in Characteristics using Classify Value Function

  3. Demand / Forecast Upload using Transaction – ZDTB_PIR_UPLOAD or FIORI “Upload Planned Independent Requirement.

  4. Evaluate Planning % Value on Dependent requirement demand.


1. Classic Mode Configuration Profile – FIORI – “Display Configuration Profile” (CU43)


The classic Mode Configuration Profile is a mandatory Master data for Usage Probability/Planning Percentage functionality.


If Advanced Variant Configuration  has been activated, then both Configuration profiles need to be created.


The Classic configuration profile for Usage Probability/Planning Percentage solution to work.


And the Advanced Variant Configuration profile for normal Made To Order (MTO) scenarios.


Hence 2 profiles as shown below





Similarly create AVC profile for the material as below


 

2.Planning Percentage Master data


1.MDP1-Create Planning Table/ FIORI -Create/Change/Display Combination structure              ID – MDP1, MDP2, MDP3



          2.MDP4 - Maintain Combinations / FIORI – Maintain Combination Structure


ID – MDP4




3. MDP6 – Create Planning Profile


FIORI – Modeling , Planning Profile


ID – MDP6, MDPH




Step by Step procedure to capture Planning % in SAP using SAP Feature “Classify Value”.


Below steps are one time process as Master data load.


Step 1: -


Create Class with Type -044,


Then, Assign Characteristic created to Class Type -044


Go to Transaction CL01,


Input “PLANNING_PERCENTAG” Class with Class Type - 044 and press enter below screen appears.



Assign, Characteristic “PLANNING_PERCENTAGE” created to Class “PLANNING_PERCENTAG” with Class Type – 044.





Step 2: -


Go to Transaction CT04, Input required characteristic, and press enter below screen appears.



Step 3: -


Go to Values Tab and select Option/Char. value as shown below.


Then, Go to EDIT -> Classify Value



Step 4: -


After we select Classify value system will populate new window, where we need to enter Planning % Class and Press Enter.


Enter the Planning % Value below window explain.


After entering planning % value as above, Press Back button, so that system will take us to initial screen to select next value.




 3. Demand / Forecast Upload using Transaction – ZDTB_PIR_UPLOAD or CUSTOM FIORI – “Upload Planned Independent Requirement”


Transaction / FIORI – ZDTB_PIR_UPLOAD



Pre-requisite –


The planning Percentage value should be captured using SAP Feature “CLASSIFY VALUE” in Characteristic level for each individual Characteristic Value as explained in earlier section.


Input – 




  1. Upload the file as shown below


Test template with test data file must be in below format. (36 months can be uploaded.)





Create some Log file – and select file to capture Logs.


Press Execute.


After this system will load the PIR values and given Output as below.


Output – 



Results –


Follow Below Steps to validate the results.


Step 1 –


Go to MD63 – Display PIRs Fiori


Provide below inputs


Requirement Plan  , Plant , select Planning Horizon as per Input file.



Press Continue, below screen will appear



Now Go to Items and select the Material for which, we want to validate Planning Percentage/Usage Probability values.



Now go to Schedule lines – and Press Config. Supporting Point button to validate Planning Percentage results.




We can see Planning Percentage / Usage probability value automatically captured in PIR upload screen for VC material.


Step 2 –


We can validate Planning Percentage value using (ONLY DISPLAY) Change or Update must done using Classify value feature in Characteristics value level.


Transaction / FIORI– ZDTB_PLAN_PERC



 




  1. Evaluate Planning % Value or Dependent requirement demand.


After Upload Demand Via Above FIORI, validate demand with Transaction–MD63_Display PIR.  Thus Planning % values captured as Usage Probability calculated as per required quantity.





Now validate These Planning % stored in Transaction – ZDTB_PLAN_PERC or FIORI – Percentage Planning.



After this we can validate Dependent requirements generated as per planning %.


Using Transaction – MD04 or FIORI – Monitor Stock/Requirement List



To validate Planning % and Its demand double click on ‘VP Planned Order’ Which is non-convertible.
Click on Configuration Button to view Planning % data.




If No Stock available for Lower-level components system will generate Purchase requisitions for Buy items and Planned Orders for In-house manufactured items.


To validate Dependent requirements generated and Its demand double click on ‘VP Planned Order’ Which is non-convertible.
Click on Order Report to view Dependent requirements generated data.



Note :To validate Individual component demand–Please go individual MD04 screen or double click on Report component.





Custom logic to upload mass independent requirement, Splitting functionality and Auto capture Usage probability.


PART 1. UPLOAD PIR


Use BAPI to upload PIR


BAPI: BAPI_REQUIREMENTS_CREATE
 
Get the following fields from excel templates
Requirement Item
1.     Material => Material
2.     Plan       => Plant
3.     Version  => '00' - (From selection screen)




Requirement_Schedule_In


1.     😧 'M' (must not be Hardcoded)
2.     Req_Date => From date
3.     Req_Qty => Requirement Quantity




Then Requirements_Char_in
REQU_DATE => From Date from Template



 CH_QTY => Logic explained in section PART2 LOGIC (Capture Usage Probability/Plng % Value)


BAPI: BAPI_REQUIREMENTS_CHANGE




  1. Material => Material

  2. Plan        => Plant

  3. Version => '00' - (From selection screen)


Requirement_Schedule_In


1.     😧 'M' (must not be Hardcoded)
2.     Req_Date => From date
3.     Req_Qty => Requirement Quantity


Standard SAP functionality to Deactivate or Delete previous months PIR


Use transaction MD74 for this functionality, as explain below


Old Forecast Requirement Plan Inactivated prior to uploading New Forecast, with new name for New Requirement Plan


Input Parameter:




  1. Plant

  2. Requirement Plant Number

  3. Key date (Enter the maximum date till which you want to deactivate the plan

  4. You can either deactivate or you can delete the plan, according to you have to select the radio button.

  5. Create list: to see the result

  6. Then execute


You will see result like this



PART 2. Capture Usage Probability/Planning % Value


Technical Details
Requirement:


During PIR upload, the variant config material system will pop up the Usage Probability field, this field must automatically populate the Planning Percentage maintained in the Characteristic Value field in Material Master Characteristics for Planning Percentage in the background.


Prerequisite Configuration required:


Input Screen




  1. First Radio Button: Create PIR (The Planning Percentage

  2. Second Radio Button: Change existing PIR

  3. Selection option for Upload template (Excel format)


Processing Logic:


PIR to be uploaded using ZDTB_PIR_UPLOAD transaction
If the Material is a VC material automatically system will pop up the Usage Probability screen In this screen the Value for Usage Probability to be called using below logic


Create Characteristic(CT04) Planning Percentage
Create Class(CL01) type 300: Planning_Percentag
Assign this characteristic to the above Class in the Respective Material Master Classification view.
The field EWAHR (Usage Probability ), needs to be populated from the classification
Pass the MATNR and WERKS  into table INOB.
Pass the MATNR in the INOB_OBJEK to get INOB_CUOBJEK(Int Object Number) for KLART=300
Pass the CUOBJEK with Leading Zeros into AUSP_OBJEK and for ATINN=Planning Percentage, check the value in AUSP_ATFLV.
Convert this value to a Numeric Value.


Only For VC (KMAT material type) material system should populate configurable option and enter numeric values(EWAHR value) against particular component(characteristic values). To achieve this we will be considering MD62 recording.


LOGIC to capture Usage Probability stored in CT04 in Classification view in Material Master in Demand/PIR Upload transaction “ZDTB_PIR_UPLOAD” transaction.


Class type – 044 Logic.


Go to SE16N


Pass MATNR into Table MARA, check material is ZKMA – (MTART) or KZKFG field is "X",


Then. Pass MATNR into Table CUVTAB Field VTNAM fetch VTINT


Then, Pass VTINT into Table CUVTAB_FLD, Field VTINT, Fetch – ATINN sort SLNID in ascending Order.


Then, Pass VTINT and ATINN into Table CUVTAB_VALC, Fetch – VALC, Sort in ascending order – VTPOS & ATINN


Then. Pass ATNAM (MATNR) into Table CABN, and fetch ATINN.


Then. Pass ATINN(PLANNING_PERCENTAG) & KLART (044) into Table AUSP, Fetch ATWRTOBJEK


need to compare Table CUVTAB_VALC and AUSP with Field VALC OBJEK


Sort/Compare OBJEK value as per Char. Value and get the substring with matches OBJEK into the Char. Vale VALC from Table CUVTAB_VALC.


Value “ATWRT” should flow into the MD61/MD62 transaction Configuration Supporting Point Button.


field EWAHR (Usage Probability), as below.


The below Function module will be used to Transfer the ATWRT value into EWAHR the (Usage Probability) field in the MD61/MD62 transaction.


BAPI_REQUIREMENT_CREATE for creation of PIR


BAPI_REQUIREMENT_CREATE for Change of PIR.


Pass below Input below - Requirement date should be same at the level.


REQU_DATE => From Date from Template


2. CH_QTY => We will be Using Z table data and Z table data is accessible via TMG Logic For TMG is :
Z table Name :  ZDTB_PLAN_PERC
Z table and TMG should have the following fields












Material/Class Characteristics/Feature Characteristics Value/Options Planning Percentage

Logic for PT_NUMBER


First Pass material: as OBJECT and select profile name; then pass Profile name in TPSVP Int. tab is PT_Number and Row will be PT_LINE




  1. PT_Numberand PT_LIPass Material No from excel upload template to TPHVP table in OBJEKT filed
    TPHVP-OBJEKT => MATERIAL NO FROM EXCEL TEMPLATE
    Select PROFILID from Table
    Pass PROFILID to TPLVP table
    TPLVP-PROFILEID => TPHVP=>PROFILID
    Select CLINT (internal table no) from TPLVP
    Then pass CLINT and PROFILID to TPSVP table in CLINT AND PROFILID respectively
    Select CLINT and LNPOS from TPSVPPT_NUMBER = TPSVP-CLINT
    PT_LI = TPSVP-LNPOSPass CLINT from TPLVP to CUVTAB_FLD TABLE in VTINT filed
    CUVTAB_FLD-VTINT => TPLVP-CLINT4. Characteristics and Characteristics ValueCUVTAB_VALC -VTINT => TPLVP-CLINT


Characteristics => CUVTAB_VALC – ATINN
Characteristics Value => CUVTAB_VALC-VALC


ZTABLE Logic:


Create Z table with Transaction : ZDTB_PLAN_PERC










































Material/Class Characteristics/Feature Characteristics Value/Options Planning Percentage
HM10 HM10_XX HM10-XX-VARIANT-01 40
HM10 HM10_XX HM10-XX-VARIANT-02 60
HM10 HM10_YY HM10_YY_VARIANT_01 70
HM10 HM10_YY HM10_YY_VARIANT_01 30

Where table should get updated as soon as PIR Load Program is executed and store values for future reference.


SUMMARY:
The above development and code we have not considered a Nested KMAT scenario as there was no requirement. But we can have code changed if the case has to be mapped for Nested KMAT scenario also.
Usage Probability/Planning Percentage is used in niche industries, hence would like to hear from all those who have had such requirements and have mapped or are using the functionality in their businesses/Projects.


Thanks to Technical Contributors below:
1. Rushikesh Pawale:https://www.linkedin.com/in/rushikesh-pawale-a768081b7
2. Pravin Bapat : http://www.linkedin.com/in/pravin-bapat-b40a5b80

 
Labels in this area