cancel
Showing results for 
Search instead for 
Did you mean: 

Serialize IDOCs PI to SAP Backend

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

HI,

I need to serialize IDocs thats PI send to a sap backend system.

rigth now we have one CC with max connection = 1 but it is not enough.

but something is not clear at all for me.

I need to send IDocs with QoS EOIO so, i asume that checking the parameter "Queue Processing" in the IDoc Receiver Channel the IDocs will sen them to SAP in EOIO, but that means --> One queue will be defined(in backend) for each IDoc that use this Channel?.

If i set this functionality could i increase the parameter max connection to 10( for example) and the channel should know which queue was defined for each IDoc in the backend or it is not possible and I am thinking crazy things.

Is it possible also to configure the transaction IDXQUEUE in SAP Backend?

Best Regards.

Accepted Solutions (0)

Answers (3)

Answers (3)

gerald_kilgus
Explorer
0 Kudos

My first statement was too general and thus not true.

As long as you preserve the message sequence you might as well change the queue name.

If you rename from a generic name to something more specific (e.g. with that content based serialization that you have found)

like from "JDBCqueue" to "JQ_content1", "JQcontent2", .... in a 1:n fashion, that should be ok.

The reverse renaming from specfic to generic will in general destroy the message sequence.

Cheers

Gerald

Message was edited by: Gerald Kilgus

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

are you sure about this? AFAIK the EOIO will not be affected no matter if the queue name was changed

gerald_kilgus
Explorer
0 Kudos

Thinking about it again, I realize that you are right!

(and my initial post was actually correct).

So you can change the queue name without affecting the sequence.

Cheers

Gerald

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

But the problem is how.

i dont have an http url to add the specific queue name, i have SOAP,JDBC,FILE adapters. that is why i was thinking about add a handler to the engine service or something else. i dont know how to do this and what could be the best approach/solution for this requirement.

best regards

gerald_kilgus
Explorer
0 Kudos

Hi Rodrigo,

If you're application cannot create the HTTP URL, then couldn't you use
JDBD -> HTTP
File -> HTTP

SOAP -> HTTP

scenarios as some kind of "feeding" scenarios to feed the "final"

HTTP -> idoc scenario.

In the feeding scenarios you could set the queue name via changing the dynamic configuration like it was done here:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/07/21/generate-dynamic-queue-in-pi-java...

Cheers

Gerald

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Searching for othar alternatives y found that is possible to change the QoS or the Queue id values in a Messager Mapping.

http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/frameset.htm

but as i can see, there is not possible to access the variables QUEUE_ID and QUALITY_OF_SERVICE since those are ReliableMessaging's variables(help.sap link above)

so i can access all Main's variables like SENDER_SERVICE, MESSAGE_ID, etc etc)

How can i get access to this ReliableMessaging's variables from UDF or Adapter Module?

In the thread above someone mentions that was not able to modify those values in a UDF but in a Adapter Module (i asume using the same code below) what could be the difference accessing frmo UDF o Adapter Module?

UDF Code

-------------------------------------------------------------------------------------------------------

java.util.Map map;

DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey qos = DynamicConfigurationKey.create("http://sap.com/xi/XI/System","QUALITY_OF_SERVICE");

conf.put(qos,"EOIO");

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System","QUEUE_ID");

conf.put(key,queueName);

return "";

-------------------------------------------------------------------------------------------------------

gerald_kilgus
Explorer
0 Kudos

I think the idea is not to dynamically change the queueID, but to dynamically generate the entire URL of the HTTP receiver. Since this includes the queue-ID, the result would be the same: You have the queue ID changed.

gerald_kilgus
Explorer
0 Kudos

The QoS EOIO is determined at the sending side, i.e.  you need to define the QoS in the Sender Communication Channel.
If your messages enter PI as EO, there no way to serialize them afterwards. (it also does not make sense, because the message sequence may already have changed).

The sender channel also defines the queue name, which is static.

But I understand that you want dynamic queue names which depend on the content, which is sent.

Now this may be a challenge for some adapter types.

I know that you can define dynamic queue names if you send the message via plain http, because there you can define the queue as a parameter in the URL.

You can also dynamically define the queue if your sending system would be able to use ABAP proxy.

What the technical sender channel that you want to use?

Cheers

Gerald

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

actually a have differents scenarios running with IDocs.

some client system could be: JDBC,SOAP,FILE.

i have one doubt about using http adapter. it is rigth that Queue name is an optional parameter but in case a set it the same queue name will be used as inbound/outbound in PI and also in backend?

the PI system use queues for inbound and queues for outbound and also the ECC system has their own queues.

so as far i understand you if i send a queueid in the URL that queue name will persist in PI and also in ECC, isnt it?

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

searching i found two promised blog

but none of them provide the snipped code used in the ENGINE and ADAPTER_PLAIN service.

does anyone could help me  to create my custom one, it think the one that match my issue is the first blog.

CALL METHOD lv_xms_main_ref->get_message_properties

         EXPORTING

           im_message             = moint

         IMPORTING

           ex_trace               = to

           ex_system_error        = eo

           ex_message_header      = ho

           ex_reliable_messaging  = rm

           ex_diagnostics         = dg

           ex_internal_attributes = io

           ex_run_time_env        = ro.

I should read a variable ¿¿XX?? and get the idoc name, read the payload Server->request-> GET_CDATA (will give the payload in Character format) and later on set the value for QUEUE_ID depending of the two values obtained before.

something like that

I am in PI 7.1.1

Message was edited by: Rodrigo Alejandro Pertierra

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

nobody?

Former Member
0 Kudos

Hi,

With regards to your first question, I suggest you can use a target structure which uses multiple idoc structures (may be 10 for example)  (This can be done by keeping root target node occurrence 1..unbounded). This structure can be passed through a BPM which will split it into 10 parallel idocs getting processed paralelly with your QoS remaining EOIO with one queue for each idoc.

Regards,

Souvik

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi,

that is not posibble since the ccBPM is not allowed to be used, also consider that i should create a ccBPM for each IDoc interface and is not an option.

thaks for your help.

Former Member
0 Kudos

Hi,

This time my suggestion might seem to be a bit ridiculous, but if strictly followed this might be helpful.

What you can do is by contacting with Basis team, you can reduce the time parameter for the queues getting processed. Hence effectively these queues should get stuck in SMQ2 of ECC system. You can then unlock the queue by using the button "unlock without activation". I think this will then deregister the queue and finally all the idocs will get posted into ECC system at a time.

Caution : But please dont try too many idocs at a time. It can be helpful for some quantitative idocs.

Hope this helps.

Thanks and Regards.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi, thanks for your response, but my problem is not the delivery time. What i need is to create separate queues for some interfaces that send IDocs to ECCu using values in the payload.

for example, i have some plants that send novelty to SAP. In case a novelty from plant 1 fails should not be mandatory to stuck others novelty from others plants.

so i need to create sinlge queue by plant to send the IDocs:

XBQI_PLANT1

XBQI_PLANT2

XBQI_PLANT3

...

...

...

Rgds

Rodrigo