Fonction SAP BAPI_PROCESS_MESSAGE_CREATEMLT - Create process messages

Paramètre Reférence Long. Facultatif Description
PROCESSMESSAGENEW BAPI_RCOMH 36 X Export: Key of Process Messages Created
PROCMESSCHARAC BAPI_RCOMEAPI 82 Import: Process Message Characteristics
PROCMESSCHARACRETURN BAPI_RCOMERTC 520 Export: System Messages on Message Characteristics
PROCMESSHEADER BAPI_RCOMHAPI 63 Import: Header Data of Process Messages
PROCMESSHEADERRETURN BAPI_RCOMHRTC 490 Export: System Messages for Process Messages
PROCMESSTEXTLINES BAPI_RCOMSTXT 182 X Import: Long Texts of Message Characteristics
RETURN BAPIRET2 548 Export: System Messages on Method Call

Functionality
Using this method, you create one or several processmessages in the SAP system.
You can, for example, use the method to transfer process messages from aprocess control system to process management
in the SAP system. These messages are processed in exactly the sameway as manually created process messages or messages fromSAP PI sheets.

Notes
Authorizations
You need the following authorization to carry out the method:
Authorization object,,Field ,,Value
C_MESS_WRK ,,Plant ,,Plant of the process message
,,Activity ,,01 (Create process message)
Message Data
In parameters ProcMessHeader, ProcMessCharac, andProcMessTextlines, you pass on the data of the process messagesto be created to the SAP system.
The keys of the messages created are returned in parameterProcessMessageNew.
System Messages
System messages issued during method processing are returned in thefollowing parameters:
ProcMessHeaderReturn ,,Messages on process messages
ProcMessCharacReturn ,,Messages on message characteristics
Return ,,General messages
For more information, see the parameter documentation.
Updating
To update the process messages in the SAP system, you must carry out thestandard method for the commit work after the current method has beencompleted. You will find this standard method and the documentation inthe Business Object Repository, section Cross-Application Components
-> Business Framework Architecture.
If the commit work terminates, you can use methodProcessMessagePI.ExistenceCheck (Check existence of a processmessage) to determine whether the update was carried out.

Further information
For more information on how process messages are processed, see the SAPLibrary, section PP - Production Planning - Process Industries ->Process Management -> Process Messages.

Description
In this table, the SAP system passes on the final keys of the processmessages created. For information on the meaning of the table fields,see the documentation of the corresponding data elements.
Table Structure
PROC_MESS_ID_TMP ,,Temporary message key
PROC_MESS_ID ,,Final message key
PROC_MESS_ID_TMP ,,Message key assigned by system calling the function
,,according to parameter ProcMessHeader
PROC_MESS_ID ,,See ABAP Dictionary

Description
In this table, you pass on the characteristics of the process messagesto be created. For information on the meaning of the table fields, seethe documentation of the corresponding data elements.
Structure of the Table
PROC_MESS_ID_TMP ,,Temporary message key
NAME_CHAR ,,Name of a message characteristic
CHAR_VALUE ,,Value of the message characteristic
DATA_TYPE ,,Format of the characteristic value
PROC_MESS_ID_TMP ,,Message key according to parameter ProcMessHeader

NAME_CHAR ,,Message characteristics defined in SAP Customizing
,,(see IMG for Process Management, section
,,Define characteristics for processmessages)
CHAR_VALUE ,,Values specified in characteristic definition.
,,(For information on value display, see below.)
,,Note:
,,Characteristic values are not checked during method
,,call. However, errors may occur in message
,,processing due to incorrect values. If necessary,
,,check the values by carrying out method
,,(ProcessCharacteristic.GetHelpvalues) for
,,business object Process characteristic
,,(BUS2114).
DATA_TYPE ,,Format assigned in the characteristic definition
Display Format of Characteristic Values
Depending on the characteristic format (DATA_TYPE) you must present thecharacteristic value (CHAR_VALUE) as follows:
Format ,,Display format of characteristic values
CHAR ,,As a string
NUM ,,E
,, consisting of an arithmetical sign (+/, -
),
,,one character before the decimal point, a decimal point (
,/.),
,,and up to 15 decimal digits. However, if you use many decimal
,,digits, rounding errors may occur depending on the platform.
,, consisting of the arithmetical sign and up to two
,,decimal digits
DATE ,,yyyymmdd
TIME ,,hhmmss

Description
In this table, the SAP system returns system messages issued on themessage characteristics.
Depending on the type of system messages issued, a corresponding returncode is set in the RETURN_CODE table field. The process message willonly be created if the return code is 00.
RETURN_CODE ,,00 ,,No errors found when checking thecharacteristic
,,01 ,,The characteristic is not created
,, ,,(NAME_CHAR field in parameterProcMessCharac)
,,02 ,,Invalid characteristic format
,, ,,(DATA_TYPE field in parameterProcMessCharac)
,,03 ,,Long text for characteristic not found in
,, ,,table ProcMessTextlines
,,04 ,,No value assigned to characteristic
,, ,,(CHAR_VALUE field in parameterProcMessCharac)
,,05 ,,Characteristic not unique within the message
,, ,,(NAME_CHAR field in parameterProcMessCharac)

Description
In this table, you pass on the header data of the process messages tobe created. For information on the meaning of the table fields, see thedocumentation of the corresponding data elements.
Table Structure
PROC_MESS_ID_TMP ,,Temporary message key
PLANT ,,Plant of the process message
PROC_MESS_CATEGORY ,,Message category
TEST_FLAG ,,Ind.: Message for test purposes
SENDER_NAME ,,Process message sender
,,This information serves documentation purposes.
PROC_MESS_ID_TMP ,,Any number that is unique within the method call
,,or in the table
TEST_FLAG ,,X ,,Test message
,,' ' (blank) ,,Productive message
SENDER_NAME ,,Any
For information on the allowed values for the other table fields, seethe ABAP Dictionary.

Description
In this table, the R/3 System returns system messages issued on theprocess messages.
Depending on the type of system messages issued, a corresponding returncode is set in the RETURN_CODE table field. The process message willonly be created if the return code is 00.
RETURN_CODE ,,00 ,,Message was processed correctly
,,01 ,,The specified plant does not exist
,, ,,(PLANT field in parameterProcMessHeader)
,,02 ,,The message category has not been created in
,, ,,the plant (PROC_MESS_CATEGORY field in
,, ,,parameter ProcMessHeader)
,,03 ,,Invalid test indicator
,, ,,(TEST_FLAG field in parameterProcMessHeader)
,,04 ,,No authorization to create messages in the
,, ,,specified plant
,,99 ,,The message could not be processed due to an
,, ,,error in the characteristic data (see details in
,, ,,parameter ProcMessCharacReturn)

Description
In this table, you pass on long texts for the message characteristics tothe SAP system. You use this table for characteristics whose value is along text as specified in SAP Customizing. For information on themeaning of the table fields, see the documentation of the correspondingdata element
Table Structure
PROC_MESS_ID_TMP ,,Temporary message key
NAME_CHAR ,,Name of the message characteristic/>
TDFORMAT ,,Format key of the text line/>
TDLINE ,,Text line
PROC_MESS_ID_TMP ,,Message key according to parameterProcMessHeader
NAME_CHAR ,,Message characteristics defined in SAP Customizing
,,(see IMG for Process Management, section
,,Define characteristics for processmessages)
TDFORMAT ,,Format key defined in thestandard system
,,Depending on the message destination, however, all
,,formats may be interpreted as raw lines.
TDLINE ,,Any

Description
In this table, the SAP system returns general messages issued during themethod call.

Value range
System Messages on Authorizations
Type,,ID ,,Number,,System message
E ,,CB ,,050 ,,No authorization to create messages
E ,,CB ,,060 ,,No authorization to create messages in plant &
System Messages on Message Header
Type,,ID ,,Number,,System message
E ,,CB1,,303 ,,Errors occurred during message creation
,, ,, ,,(see parameter ProcMessHeaderReturn)
E ,,CB1,,200 ,,Plant & does not exist (Enter valid plant)
E ,,CB1,,201 ,,Process message category &1 not defined in plant &2
E ,,CB1,,202 ,,Enter a valid test indicator
E ,,CB ,,201 ,,Further processing not possible (contact system
,, ,, ,,administrator)
E ,,CB1,,206 ,,Unable to create message
S ,,CB1,,308 ,,Message(s) created successfully
System Messages on Message Characteristics
Type,,ID ,,Number,,System message
E ,,CB1,,304 ,,Errors occurred in characteristics during message
,, ,, ,,creation (see parameter ProcMessCharacReturn)
E ,,CB ,,023 ,,No characteristic found with internal number &
E ,,CB1,,207 ,,Characteristic & not created in system
E ,,CB1,,204 ,,Check characteristic format
,,CB1,,301 ,,Error when converting value to format &
E ,,CB1,,205 ,,Enter long text for characteristic
E ,,CB1,,302 ,,No value assigned to message characteristic &
E ,,CB1,,203 ,,Characteristic & has been assigned to message
,, ,, ,,more than once