Hello experts ,
I am a ABAPer , this struck me when i was receiving loads of XML message from PI ( in ECC ) which had QOS as EO and they were placed in dynamic queues for processing .
Due to dynamic queues 2 Message which had to process same document ( Say a Purchase Req. ) were processed simultaneously . Consequently locking it due to simultaneous operation on same PR i.e. while one was being processed the other xml message got error ‘Document is already being processed by user....’
To avoid this we changed the QOS to EOIO so that the message will be processed one by one in order …after ..which new issue popped up which was that the Message started getting piled up in the dedicated queue which was set up for EOIO Resulting into long waiting queues …so the messages were in scheduled state most of the time / this was case with the message which were potentially good which had to wait without any reason …........to over come all such problem here is a proposal …..
I have done similar to what The Guarneri has written in his blog
(Assume their is nothing much you can do at PI Side )
Your Service is : engine ( Can be checked in SICF Tcode -> Services - >default_host - > sap- > xi-> engine )
Check for handler class for the service ‘engine’ it will be engine CL_XMS_HTTP_HANDLER
Your path will be : /default_host/sap/xi/
Real Time scenario :
Landscape : NON SAP System → PI → ECC System
Interface is simple Purchase Requisition Create and Change Using i.e ( PR present in ECC Change it or else create )
You have set QOS to EOIO with a Static queue name ‘PRCREATECHANGE’ .
Case 1 :
Now say at certain moment of time your queue contains 100 XML message and the queue is processing and suddenly during execution of certain XML message there is a exception , This will block the queue and subsequently all the potentially good message will be in scheduled state Unless one one frees the queue by fishing out the faulty message from the queue and restart the queue again .
Case 2
Take ideal condition that your queue free flowing but contains 1000 Message in the case the execution is from 1 message to 1000th message the Last message has to wait in the queue un-neccesserly for 999 messages to pass from the queue thus increasing the Scheduled state time of the message which may be was functionally independent of other messages .
Proposed Solution goes like this :
1. Make a ZEE copy of CL_XMS_HTTP_HANDLER say ZZCL_XMS_HTTP_HANDLER
2. In the method IF_HTTP_EXTENSION~HANDLE_REQUEST of class ZZCL_XMS_HTTP_HANDLER line no 577 ( just after call of CALL METHOD lv_xms_main_ref->get_message_properties ) write the code desired using the below hints
SET_QOS
GET_QOS
SET_QUEUE_ID
GET_QUEUE_ID
i.e. Server->request-> GET_CDATA will give the payload in Character format.
Finally What you have to is to set the Newly created zee handler class instead of a standard on the service as mentioned above
So after you have written the code and all is set...
For Cases we have taken : The queue name will be set dynamically by our code say a Reference or say Purchase req. number or say document type so on and so as per your wish forth thus routing the documents/payload to Dynamically set queus avoiding the long waiting queues and locking and scheduled message solving our purpose as explained above .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3143 | |
| 1916 | |
| 1916 | |
| 1213 | |
| 1079 | |
| 757 | |
| 755 | |
| 742 |