cancel
Showing results for 
Search instead for 
Did you mean: 

xMII PPPI Notifications

Former Member
0 Kudos

Hi all.

We are trying to notify a process order using process message of PPPI.

First of all, we download the control recipe's created from SAP ECC

using a xMII transaction that call's the BAPI_CONTROL_RECIPE_REQUEST.

After that we create several process messages (PI_CONS, PI_PROD,

PI_PHCON, for example) with a xMII transaction using

BAPI_PROCESS_MESSAGE_CREATEMLT, everythings works fine, the process

messages are created suscesfully and we can see them on the SAP

Transaction CO54.

The problem is that all the process messages has the status "to be

send" (a enviar "spanish") and we have to select them one by one and

click send buttom.

Is there any way or BAPI to do it automatically?

Are we doing something wrong?

Regards.

Thank's in advance

Steps for Reconstruction

Here we post the XMLRequest for a PI_CONS process message.

<?xml version="1.0" encoding="UTF-8"?>

<BAPI_PROCESS_MESSAGE_CREATEMLT>

<TABLES>

<PROCESSMESSAGENEW>

<item>

<PROC_MESS_ID_TMP/><PROC_MESS_ID/>

</item>

</PROCESSMESSAGENEW>

<PROCMESSCHARAC>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_PROCESS_ORDER</NAME_CHAR>

<CHAR_VALUE>000001000265</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_OPERATION</NAME_CHAR>

<CHAR_VALUE>0010</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_PHASE</NAME_CHAR>

<CHAR_VALUE>0011</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_MATERIAL</NAME_CHAR>

<CHAR_VALUE>000000000111000003</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_STORAGE_LOCATION</NAME_CHAR>

<CHAR_VALUE>C12A</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_RESERVATION</NAME_CHAR>

<CHAR_VALUE>0000031350</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_EVENT_DATE</NAME_CHAR>

<CHAR_VALUE>20080715</CHAR_VALUE>

<DATA_TYPE>DATE</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_EVENT_TIME</NAME_CHAR>

<CHAR_VALUE>084500</CHAR_VALUE>

<DATA_TYPE>TIME</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_MATERIAL_CONSUMED</NAME_CHAR>

<CHAR_VALUE>115</CHAR_VALUE>

<DATA_TYPE>NUM</DATA_TYPE>

</item>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<NAME_CHAR>PPPI_UNIT_OF_MEASURE</NAME_CHAR>

<CHAR_VALUE>t</CHAR_VALUE>

<DATA_TYPE>CHAR</DATA_TYPE>

</item>

</PROCMESSCHARAC>

<PROCMESSCHARACRETURN>

<item>

<PROC_MESS_ID_TMP/>

<NAME_CHAR/>

<RETURN_CODE/>

<TYPE/>

<ID/>

<NUMBER/>

<MESSAGE/>

<LOG_NO/>

<LOG_MSG_NO/>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

</item>

</PROCMESSCHARACRETURN>

<PROCMESSHEADER>

<item>

<PROC_MESS_ID_TMP>1</PROC_MESS_ID_TMP>

<PLANT>IRCA</PLANT>

<PROC_MESS_CATEGORY>PI_CONS</PROC_MESS_CATEGORY>

<TEST_FLAG></TEST_FLAG>

<SENDER_NAME>xMIIASM</SENDER_NAME>

</item>

</PROCMESSHEADER>

<PROCMESSHEADERRETURN>

<item>

<PROC_MESS_ID_TMP/>

<RETURN_CODE/>

<TYPE/>

<ID/>

<NUMBER/>

<MESSAGE/>

<LOG_NO/>

<LOG_MSG_NO/>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

</item>

</PROCMESSHEADERRETURN>

<PROCMESSTEXTLINES>

<item>

<PROC_MESS_ID_TMP/>

<NAME_CHAR/>

<TDFORMAT/>

<TDLINE/>

</item>

</PROCMESSTEXTLINES>

<RETURN>

<item>

<TYPE/>

<ID/>

<NUMBER/>

<MESSAGE/>

<LOG_NO/>

<LOG_MSG_NO/>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW/>

<FIELD/>

<SYSTEM/>

</item>

</RETURN>

</TABLES>

</BAPI_PROCESS_MESSAGE_CREATEMLT>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just to add to Poul's response, you can define the Background job using trx SM36. The transaction gives you an option of using the Job Wizard and you can define a job such that everytime R/3 recieves a new process message it automatically posts it as well.

Exploring SM36 and SAP help would give you a better idea.

I totally agree with Mike with the Asynchronous nature of the Proc Messages , because from an MII perspective all you can do is successfully/unsuccessfully create the process messages , what happens after that MII is oblivious to that.

I am sure there would be a good reason in your case to use process messages ,because if thats how the process is defined in SAP , you probably can't do much.

Former Member
0 Kudos

Ok, Thank's very much for your answers.

It's seem that the solution will be create a Job on the SAP side, and later check wether or not the process messages were ok; because of the asynchronous behavior of process messages.

But, can anybody explain us what are the diferences between doing it by process messages or by BAPI_GOODSMVT_CREATE, BAPI_PROCORDCONF_CREATE_TT, etc; what are the advantages and disadvantages?

In adition i post below the answer that we get from the oficial SAP Message.

"Dear Customer,

Its normal for messages to remain in 'to be sent' status

until they are sent from the process message monitor.

There are options available for sending process messages automatically

as a background job which is the normal process followed by

most customers.

Please refer to the online help which details how to set this

up-

help.sap.com

Production planning for process industries -> Process Managment

-> Process Messages -> Sending of Process Messages

-> Starting the send function for process messages

or (please add these lines together to create the link)

http://help.sap.com/erp2005_ehp_03/helpdata/EN

/89/a436b8461e11d182b50000e829fbfe/frameset.htm

You can create the messages using BAPI_PROCESS_MESSAGE_CREATEMLT

and then send them automatically following the instructions

from the online help, i believe the name for the plant dependant

background job is RCOCB004 and plant independant is RCOCB002.

If you wish you can also use the menu option Utilities ->

Start Send job from CO54.

I hope this information answers your questions and resolves this

issue for you

Have a nice day

Kind Regards

Eoin Donnelly

SAP Support Consultant (SCM/XMII)

SAP GSC Ireland"

agentry_src
Active Contributor
0 Kudos

Gerardo,

It is your choice. There are benefits to either approach, though my personal preference is to use the synchronous approach with the BAPI calls. That allows me to determine immediately and programmatically whether there are any errors which require further processing. Then error handling can be developed without involving any programming on the SAP side.

But if you have the skills and your experience is with Process Messages, that is a good way to go to. But there needs to be error handling for unsuccessful messages within SAP. Or some scheduled follow up from xMII, which requires some storage of the Process Message numbers. Or even some other method of following up.

Mike

Former Member
0 Kudos

Hello Michael.

I have been looking for some method to se the status of process messages, does you know of any bapi's to get this information back out ??

BR

Poul.

agentry_src
Active Contributor
0 Kudos

Poul,

I will be happy to research it (I am interested as well). But you really should open a new message since this one has been closed by its owner.

Thanks,

Mike

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Gerardo,

I am not sure how to fix your problem, but have a more basic question. Why are you using process messages?

Process Messages are asynchronous. So you will only get a response saying that SAP has received the process message successfully. You will not know whether it processed the message correctly without later on checking on the Process Message status. And the time required to process the message is indeterminate. I have seen it take less than a second or as much as a minute depending on the volume of traffic and transactions.

There are standard BAPIs which you can use to perform most functions which operate synchronously. BAPI_GOODSMVT_CREATE can be used to consume your materials and receive finished product into inventory. BAPI_PROCORDCONF_CREATE_TT can perform your confirmations and update time entries. There are many others which you may find useful for updating batch info, or inspection results, etc.

Mike

Former Member
0 Kudos

Hi.

We are also doing it by using Process Messages and have a job on the SAP side to retransmit the process messages, also in case of errors, DB locks etc.

I does not know more than that, but can probably find someone if necessary.

I an not an expert, but many sample transactions, handling shop floor integration, uses process messages. It is a clean interface to my knowledge.

BR

Poul.