on 04-05-2016 7:55 PM
Hi Expert ,
I am designing a process around event message buffer concept .
I have a requirement where event should not be posted in EM if a specific indicator is not set in control parameter . In this case , event message should be saved in buffer and a batch job should be set which will try to process buffer event message .
These buffer event message should be processed if specific indicator is set otherwise message should again be stored in buffer .
There is a configuration where you can define the condition when event message should be buffered . However required field are fixed and there is no possibility to check specific indicator (control parameter ) .
Do you any idea how can I make use of above mentioned configuration for buffering event message .
Otherwise I do not think we have possibility to write a code in preprocessing function module to buffer message based on condition . Do we ?
Regards,
Rajesh Dwivedi
My requirement is that I should be able to check a condition to decide buffering event message at both point of time .
1) At the time of BAPI trigger (event message processing )
2) At the time when process buffer event message run .
Regards,
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steffan , Hi Vishnu ,
It seems I have 2 option .
1) Wrapper around Event message BAPI (As per Steffan)
2) Wrapper around /SAPTRX/PROC_BUFF_MSG_02 (As per Vishnu )
We are facing issue for EDI carrier and EDI message is directly mapped to WEBSERVICE in EM through PI . So i believe it will be more complicated if i go for option 1 . It seems option 2 works better considering the scenario .
Regards,
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
yes if you can live with the fact that you then buffer all incoming messages and check them later with the Report option 2 would be easier to implement.
In PI you could also create an RFC Adapter and map the messages to it. If you refer with WEBSERVICE to the EM ESA Service you should keep in mind that it can handle only one message per call.
Best regards,
Steffen
Hi ,
I was going through event message processing BAPI and understood that first preprocessing function module gets triggered and then buffering condition is triggered .
If I check specific control parameter field during preprocessing function module , then the program can decide if it has to be buffered and set buffer_mode = A .
Is there any possibility I can decide buffer mode=A in preprocessing function module and pass it to BAPI so that in next step , it buffer the event message .
If this solution do not work , I can change tracking code set to X in prepreocessing FM (when specific control parameter is not available )
I can configure in buffering screen of customization that if tracking code set is X then buffer the message .
if specific control parameter is not available then tracking code set will be changed to Y and it will not go to buffer mode .
Will this solution work ?
In this way , I need not write any wrapper program .
Regards,
Rajesh
Hi ,
If I am able to do as mentioned above , then my worry is does "process buffered event message " work in the same way .
Does process buffer event message will run preprocessing FM first and then buffering ?
If it does not execute in this way then my requirement will not be achieved .
Regards,
Rajesh
Hi Rajesh,
Once you buffer a message, it will not flow through pre-processing again as you pre-processed it already in your first attempt of posting.
The buffered message when run through buffer posting program will directly proceed to rulesets and not go through /SAPTRX/BAPI_EH_ADDEVENTMSG_02.
Thanks,
Vishnu
You have mentioned /SAPTRX/BAPI_EH_ADDEVENTMSG_02. When you post buffer message, it doesn't go via /SAPTRX/BAPI_EH_ADDEVENTMSG_02.
Thanks,
Vishnu
Hi Rajesh,
Standard buffering config would not allow to check specific field and post it.
1. You can use preprocessing function to achieve this or
2. Try to implement and check in /SAPTRX/BADI_MESSAGE -> /SAPTRX/IF_EX_BADI_MESSAGE -> BEFORE_PROCESSING to post event with your check.
Check /SAPTRX/BAPI_EHADDEVENTMSG_02 - BUFFER_MODE
Regards
GGOPII
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gopi ,
As far as i know , EM has following process of sequennce .
1) Check if event can be buffered
2) Trigger Preprocessing function module
There is no input field in preprocessing function module which can put event message in buffer save mode .
I think same case is with /SAPTRX/BADI_MESSAGE -> /SAPTRX/IF_EX_BADI_MESSAGE -> BEFORE_PROCESSING .
Please suggest .
Regards,
Rajesh
Hi Rajesh,
I just debugged and could see CALL BADI l_badi_message->before_processing calls after CALL FUNCTION '/SAPTRX/SPLIT_MESSAGE_TABLE_O2' in /SAPTRX/BAPI_EHADDEVENTMSG_02.
You need to tweak on the code to achieve this (I didn't try this) but can be achievable.
Check this call function /SAPTRX/SPLIT_MESSAGE_TABLE_O2 and check how code checks validation.
Regards
GGOPII
Hi Vishnu,
Could you explain in detail about OBSOLETE of BADI /SAPTRX/BADI_MESSAGE? Are you talking in generic or specific to buffer?
I checked in SAP service marketplace too but I can't find says like OBSOLETE. I have done different solutions in previous and current projects based on this BADI.
Check these threads and Location Codes and descriptions | SCN
Regards
GGOPII
Hi Rajesh,
only way i see would be:
You create a wrapper for the Event Message BAPI.
First you check your condition based on the Control Parameter.
The BAPI has an importing parameter BUFFER_MODE that also allows to switch on the buffer mode.
The Parameter has the following options:
SPACE Check Messages for Buffering (customizing settings)
A All Messages Buffered (no check)
N No Messages Buffered (no check)
Based on your check you could set it and enable buffering.
Set it to A All Messages Buffered (no check) i.e. all messages are buffered -> customizing for buffering won't be checked.
-> see function module /SAPTRX/SPLIT_MESSAGE_TABLE_O2
If you have buffered and not buffered message in one call you have to call the BAPI twice one time with Buffer mode A and one time for the buffered buffer_mode = N.
Best regards,
Steffen
Not sure if you can send the message back to buffering from pre-processing but you can create a wrapper(zprogram) which checks if indicator is set and then only calls the standard buffer processing program.
Like Zprogram will SUBMIT the standard program /SAPTRX/PROC_BUFF_MSG_02 for each message which has indicator set.
Thanks,
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
I meant to say, create ZPROC_BUFF_MSG_02 instead of /SAPTRX/PROC_BUFF_MSG_02 which you can run in the background.
In this Zprogram, for every message which is in buffer, check if your indicator is set in the control parameter, then submit the standard program /SAPTRX/PROC_BUFF_MSG_02 which will post the event. If no indicator is set, do nothing and the event will stay in the buffer until the condition is met.
Thanks,
Vishnu
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.