You only need to go through the forums on SDN to realise that there are people out there that actually write programs or develop LSMW’s to upload Planned Independent Requirements (PIR) into SAP. Whilst I am sure that there are many valid reasons for wanting to develop your own upload programs, it is a shame to do so especially in light of the fact that SAP offers standard methods for you to do this. I know of at least two:

  • You can use the BAPI BAPI_REQUIREMENTS_CREATE. This BAPI is RFC enabled so it is a good candidate if you are using an external application to perform your forecast and want to replicate them in SAP by making a remote function call.
  • Another option is to use the standard upload program RM60IN01 – which is a direct input program that reads a formatted file to create your PIRs in SAP’s demand management (the RM60IN01 program can also be used in LSMW in concert wth object 0180).

In this post, I shall explore the second option. The aim of this is to have PIR figures uploaded in SAP’s demand management – i.e data populated in the table below, such that it can be taken into account by the MRP run (or not if you do not set the active indicator):


To illustrate this scenario, I’ll work through a simple case but it should give you all the tools you need to do further exploration on your own. So I will show you here how you can upload PIR quantities for multiple schedule lines for multiples materials – all in one go. Also we will want for these requirements to be active such that they are immediately taken into account during the next MRP run.

To start of let’s try and execute the program to see how it presents itself. Using transaction SE38, execute the program RM60IN01.


In the next screen you will see this.


SAP defaults the sequential file name to PP_INDEP_REQMTS_DIRECT_INPUT. I.e that is the logical filename that SAP will read to upload your PIR’s. That logical filename is transparent to the user, but it is actually mapped to a specific location – the one where the physical file will need to reside if SAP is going to be able to read it.
By default PP_INDEP_REQMTS_DIRECT_INPUT maps to a filename called RM60IN00 in SAP’s DIR_TEMP directory. If that is not a convenient place for you, that is something that you can always change. To do so go into customizing (based on ECC6.0) and follow the path SAP NetWeaver / Application Server / System Administration / Platform Independent File Names / Cross-client Maintenance of file names and paths (the corresponding transaction code is conveniently called FILE).
So at this point what we are missing is the file format expected by SAP and in order to get that information, the easiest way is to let SAP do the work for us!
Go to transaction MD61 and create some demand for anyone of your products.


Add some requirements in your planning table and save your changes.


Now go to transaction SXDB. You will come to a screen that looks like the one below (maybe some projects will be there).


Select the menu entry Goto / DX tools. This will take you to the Data transfer – tools screen. In that screen type the information as it is indicated below.


From this screen we are going to generate a template upload file. You’ll be able to use that file to get a feel for what data has to be uploaded, where it fits in the file and how it has to be formatted if you want to successfully upload your planned independent requirements.
So the next step is to generate that file by populating it with some demo data. To do that, click the “From Test Program” button located at the top of the screen. In the next screen that comes up, type the data that corresponds to the material for which we created some requirements earlier on and just click execute.


What this has done, is to create a ready for upload file using the data we created earlier on. If all goes well, you should have a message coming up, such as the one below.


If we use transaction AL11 to navigate to the logical file name PP_INDEP_REQMTS_DIRECT_INPUT which is DIR_TEMP/RM60IN00) we have should see:


So there we have it – a template with live data!
If you go back to the DX tools screen and additional feature here, is that you can edit the file you just generated. To do so, go click on the “change” button.


SAP shows you the template file you generated in a different light.


What you can also do here is to edit existing segment as well as delete or add some – just double click on a segment to do so. Any changes you do can be saved to the template file.
I also suggest that you look at every segment so as to see what other information could be contained in them. Note that if you are using configurable materials additional segments can be used to populate characteristics and their associated values. If that is your case, use the B60C1 structure segment to hold that information (as shown below).


At this point, I would like to point what seems to be a bug. If you change a record B60BL (the one that contains the material number) and save your changes and then try to process that file you will get an error message saying Number :61262 ‘Project and/or WBS element does not exist’. If you run across that problem, apply OSS note 594774 and you should be right after that.
What you can now do, is to download your file onto your PC so as to further study the file structure.
To do so, from the transfer tools menu, click the “copy” button.


Indicate the source file (the template we generated) and the target file (the one we’ll save on the PC). Note that you can use the same method to upload your file onto the server (switching the target and the source of course).


There we go – we have our template file in notepad.


We’ll now try to upload a new file. This one will have two materials and for the second material, we’ll upload not monthly but weekly buckets.


So let’s upload our new file and process it.
Note that you can, execute the program in test mode first if you prefer.


If things work out without a hitch, you will just get an information message appear at the bottom of your screen:


You might also get warning messages (especially if requirements already existed).


So let’s see what has happened.
If we look at the first material Z127 this is the material we uploaded in monthly buckets.


And if we have a quick look at the stock and requirements list, we see the requirements are ready to be planned:


If we now look at the other material Z126, this was the material we uploaded in weekly buckets.



Privacy Preference Center