Skip to Content

Design around Event message buffer concept

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Apr 07, 2016 at 10:39 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Rajesh,

      For your point 2, you need a wrapper as I mentioned which checks the control param condition and decide if you want to post or wait in buffer. Without wrapper ( zprogram) it will simply post and not go via pre-processing.

      Thanks,

      Vishnu

  • Apr 06, 2016 at 08:17 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 05, 2016 at 08:25 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    Apr 05, 2016 at 08:32 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Steffen Georg Butschbacher

      Hi Steffen,

      Yes we had an issue two months before for one of solution which we designed and moved to BADI. I have another solution which I am proposing for preprocessing and I will send your runtime trace of both.

      Regards


      GGOPII