Skip to Content

Is there an FM for creating Purchase Information Records?.

Feb 20 at 05:44 PM


avatar image
Former Member

There seems to be no BAPI's or FM's to create Purchase Information Records, although there are FM's to create information records, like FM ME_POST_INFORECORD, for example. I was informed that I could use this FM to create a PIR, but this can not be true as it only uses table EINA, and PIR's require to populate both EINA and EINE tables.There are a number of FM's that will read PIR data though, but I need to create a PIR.

I wanted to avoid using LSMW, SM35, BDC records to create PIR's due to the slow time it takes, especially populating SM35 tables in readiness. I have a program that takes details from a third-part product and creates/updates materials in SAP, as well as creating PIR's and List prices, so did not want to utilise LSMW or SM35, and my CALL TRANSACTION statements ( in background) are cauing me so much grief that I'm driven to find a function module or BAPI.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Pratik Kasralikar Feb 20 at 08:25 PM

Hi Gary,

You can use below function modules in sequence.





Also you can use ME_MAINTAIN_INFORECORD to change info record.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for this example Pratik. Very much appreciated.

I noticed that ME_POST_INFORECORD only accepts a material number as input, whereas PIR's in our business are set up by Vendor/Material/Purch Org and I assume that when we execute ME_DIRECT_INPUT_INFORECORD we'll provde all that info in the EINA/EINE import tables, but, I was a little confused as to why FM ME_POST_INFORECORD only takes a material No. as input.

Do I assume that FM ME_DIRECT_INPUT_INFORECORD will export both the EINA and EINE structure if all is okay?. In other words, how do I know for sure that the PIR process was successful, or whether a PIR already exists?.

I could check beforehand whether a PIR exists, I guess, and that would get around that issue, using the three FM's for just Creating PIR's.

We're replacing a BDC recording that we used to use via CALL TRANSACTION 'ME11', and with that process we used to get a returns table indicating a message status, ID and Number, but we will not get that when using these three FM's, and hence the reason I was unsure of how I can detect that all has been created successfully. ;)



this SAP note explains: "The ME_DIRECT_INPUT_INFORECORD and ME_MAINTAIN_INFORECORD should not be used for info record creation / maintenance. These function modules are not intended for customer use, they are not released for customers. "

Former Member
Jürgen L

Thanks Jurgen.

I can see that SAP have created a wrapper (cl_msi_pir_interface->pir_api_wrapper) which uses these FM's, and having looked at them, I can see potentially how dangerous they could be if incorrectly used.

Having said that, if SAP do not provide suitable tools for PIR creation/updating then I would not be to surprised if customer either wrote their own, or used the available FM's.

If only I could get the CALL TRANSACTION 'ME11' to work in background successfully. I have even re-created the records in SHDB and choose the option to consider background processing. But the recording is the same as before, and the issue still exists, it works perfectly in foreground but not in background.

Pavankumar Hukkeri Feb 20 at 08:42 PM

the ME_INFORECORD_MAINTAIN function module enables you to create and maintain the Info Record data.


General data related to Info Record are passed in the parameter I_EINA and purchasing organisation in data are passed in the parameter I_EINE.

Info Memo or Purchase order text are passed in the parameter TXT_LINES.

Condition validity details are passed in the table parameter COND_VALIDITY.

Basic condition details are passed in the table parameter CONDITION.

Condition scales based on value and quantity are passed in the table parameter COND_SCALE_VALUE and COND_SCALE_QUAN respectively.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Pavankumar, Much appreciated for this extra info.

I'll have a look through those FM's.

Former Member

There is no FM:


but there is FM


you means is the same you mention Pavankumar Hukkeri ...?

* I_EINE =
* I_OKCODE = ' '
* I_SCREEN = ' '
* O_EINA =
* O_EINE =
* I_MT06E =
* E_EINA =
* E_EINE =
* E_F11 =

if so I did not see any Condition parameter in the FM . Could you please suggest where I can check.

Thanks in advance.