cancel
Showing results for 
Search instead for 
Did you mean: 

BPEM EMMA log generation

dhiraj_kathet
Explorer
0 Kudos

Hi Experts,

My requirement is to generate a BPEM case for a custom warning/information message. I understand I'll have to pick it in EMMA log while job preparation. Can someone suggest a Function module to write this custom information message to EMMA log?

Thanks,

Dhiraj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This can be done just with customizing and no programming is necessary .reate log messages for the start and end of each business .The system generated RUNID can be obtained by calling function module ' EMMA_NONMASSACT_RUNID'. ... via EMMA must write messages in the system.

Update table EMMA_HDR As soon as the business process is executed the application should update thetable EMMA_HDR by providing all the necessary technical information about theexecuted process. When updating or inserting the entry the following informationshould be provided:a. RUNID: A unique job number has to be assigned to every executedbusiness process in the system. The system generated RUNID can beobtained by calling function module u2018EMMA_NONMASSACT_RUNIDu2019.For a mass activity/parallel processing framework, specially designedfunction module (EMMA_MASS_ACTIVITY_RUNID) has already beenimplemented in the frame work and user do not have to do this.b. BPCODE: This is the main business process code that you have setupabove.c. EXTRUNID: Assign a preferably unique ID (50 character text to give amore meaningful text to the executed business process, in order to help theusers to select the job).d. LOGTCODE: The transaction code via which the business process isexecuted.e. XSIMU: check the flag if the business process is executed in simulationmode (not every application offers this functionality).f. XPRUN: define how the business process was executed i.e. either in testmode = 0 or in production mode = 1.g. LOGUSER: System user name of person who executed the processh. LOGDATE: System date of process executioni. LOGTIME: System time of process executionYou can also use the function module u2018EMMA_NONMASSACT_RUNIDu2019 to updatethe EMMA_HDR record.

Message for every processed business object Every application should write a message to identify the processed businessobject. The most recommended way would be to use the message EMMA-011(for start of processing of business object) and EMMA-012 (for end of processingof business object). You can also use your own defined message (for this youhave to do the customizing, follow the cook book chapter 4). You can create thestandard messages by using the standard methodsu2018CL_EMMA_BPC->STARTu2019 and u2018CL_EMMA_BPC->ENDu2019and write these messages into the application logor any other DB the way you want.

CALL METHOD u2018CL_EMMA_BPC->STARTu2019EXPORTINGIV_MAIN_BUS_OBJTYPE = Object TypeIV_MAIN_BUS_OBJKEY = Object KeyIV_TCODE = Transaction CodeIV_START_TIME = UTC Time Stamp in Short Form(YYYYMMDDhhmmss)IV_NO_TIME_MEAS = u2018 u2019 No Time Measurement(Suppress user time measurement)IS_BUSOBJECTS = Business Objects in ProcessIMPORTINGES_MSG = Application Log: Message DataEV_BPGUID_C = GUID of Transaction/Process inCharacter Format

EXCEPTIONBPAREA_INACTIVE = Measurement of Processes of this Process

Area Not ActiveMAIN_BUS_OBJTYPE_INCOMPATIBLE = Process code for processarea not foundCALL METHOD u2018CL_EMMA_BPC->ENDu2019EXPORTINGIV_MAIN_BUS_OBJTYPE = Object TypeIV_MAIN_BUS_OBJKEY Object KeyIV_END_TIME = UTC Time Stamp in Short Form(YYYYMMDDhhmmss)IMPORTINGES_MSG = Application Log: Message

Regards,

Saju.S

dhiraj_kathet
Explorer
0 Kudos

Hi Saju,

Thanks for reply,

However, I am not able to get it exactly. Do you mean that only customizing and adding the message to customer defined mesage and adding a business object should solve the purpose?

My business process "billing" is already active and generating cases for standard messages. For a custom message, do I need to include code to update EMMA_HDR using the FM you have suggested(EMMA_MASS_ACTIVITY_RUNID)?

Can you please explain in more detail explaining the process flow?

Thanks,

Dhiraj

dhiraj_kathet
Explorer
0 Kudos

Hi Experts,

I am still looking for this fix, can some one please guide?

Thanks,

Dhiraj