cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid - Values missing in queue context

suwandi_cahyadi
Contributor
0 Kudos

Dear PI experts,

I have one interface scenario where I validate the mapping at the top most node of the target message.

When the condition is not met, no mapping will be generated. But the message in the integration engine will be marked as error with the "Values missing in queue context" error message.

The solution actually works, but then we hardly differ the "true" error message and the one that we intended to be error (those with "values missing in queue context" error).

Is there any work around that I can use to remove this specific error? But still I want to keep the condition if it is not met than do not generate output message.

Any advice will be appreciated,

Thank you

Accepted Solutions (0)

Answers (5)

Answers (5)

suwandi_cahyadi
Contributor
0 Kudos

Dear All,

I've tried to add another condition at the interface determination to block the messages that do not met the conditions.

The condition is actually works, but then the error now is "Unable to find an inbound interface"

Seems like there should be an output at the interface.

Is it possible to receive a message in PI but then if the content of the message does not meet requirement no output will be generated?

Thank you,

Suwandi C.

ambrish_mishra
Active Contributor
0 Kudos

Hi Suwandi,

A message has to either pass or fail.As stated earlier, you will have to create a dummy interface (or a dummy message in mapping) to avoid a failure.

Hope it helps!

Ambrish

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

The condition is defined in the Receiver Determination Rigth?

The condition is actually works, but then the error now is "Unable to find an inbound interface"

Seems like there should be an output at the interface.

this happens when the input message structure is different from that configured in the Service Interface....just take the payload from SXMB_MONI and compare it with the message structure i.e. MT / IDOC / etc

Also I assume that your Service interface is activated...

Rgds

Rodrigo

Message was edited by: Rodrigo Alejandro Pertierra

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Also check if the Interface Determination if an operation  is not properly cofigured (Operation Mapping). This error is related to this too.

zameerf
Contributor
0 Kudos

One way to avoid this error in Interface Determination is, may be you can try to make a condition in Receiver Determination as well.

Do an OR for all the individual conditions in the Int Det step in Rec Det.

And select one of the option for If No Receiver is found.

suwandi_cahyadi
Contributor
0 Kudos

Dear All,

I've been thinking if changing the Multiplicity (Occurence) of the message at the Message Mapping and the Operation Mapping would help?

If I change the occurence to 0..1 would PI generates an error when the Context for the Value is missing?

Thank you,

Suwandi C.

ambrish_mishra
Active Contributor
0 Kudos

Suwandi,

that won't help ... 

One way (I will call it dirty solution) you can avoid the error is do multi-mapping and create another message which you create when the filter returns no valid record and create a dummy file on the application server.

Hope it helps!

Ambrish

PS: you can alternatively also add Mail package API and send an email to the process team that the filter returned no valid items to be sent to third party for delivery number XXXX

Present it as an value addition to client.

Message was edited by: Ambrish Mishra

suwandi_cahyadi
Contributor
0 Kudos

Hi Ambrish,

What do you mean by adding Mail package API (SMTP adapter engine)? Does it also include muti-mapping?

Thank you,

Suwandi C.

ambrish_mishra
Active Contributor
0 Kudos

Yes.. it involves multi-mapping (1:n). add Mail API as second message and create mail when no valid record is found.

ambrish_mishra
Active Contributor
0 Kudos

Hi Suwandi,

In case you are putting a filter on the root node and the filter does not return a value, the mapping is bound to fail.

Ideally such filters should be applied in Sender system.

For example, filter conditions put in Distribution model for IDocs header fields so that the IDocs are not triggered outside filter criteria outbound from SAP.

Hope it clarifies!

Ambrish

Message was edited by: Ambrish Mishra

suwandi_cahyadi
Contributor
0 Kudos

Hi Ambrish,

Yes, actually we have considered to validate it from the sender (which is the ECC). But from the timeline given for the development and other task given, we validate it at the PI mapping.

what do you mean by filter the distributions model for IDocs? Is it done at the ECC part?

Thank you.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

did you analyse the posibility to validate he document before the mapping, i mean at Receiver Determination level of Sender Agreement (schema Validation)

ambrish_mishra
Active Contributor
0 Kudos

yes it is done in ECC and ideal approach. If you have a similar scenario, please work with your functional owner to set the filters in ECC so that the IDoc itself is not generated beyond the filter criteria.

Ambrish

suwandi_cahyadi
Contributor
0 Kudos

Hi Rodrigo,

I do the validation at the item level for the Delivery IDoc. So at the PI mapping I check all of the item if they are valid to be interfaced or not. If at least there's 1 item is valid, then generete the output, If none is valid then do not generate.

I have a custom field at the item level structure of the IDoc to indicate this. If the custom field has a value of 'X', then the item is valid.

The problem to check in receiver determination is that, how to create the logic to find if at least 1 of the custom field in the item has the value 'X' then the message is valid? because the number of the item is dynamic and also if there are 3 items, 2 is not valid and 1 is valid, the message is considered valid.

For the schema validation, is it possible to check this kind of validation? please enlighten.

Thank you,

Suwandi C.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

in the receiver determination define a rule with this sentences

/IDOC/SEGMENT//FLAG (with double //) the system will check all the fields FLAG in the XML no mather they are

take a look to W3CHOOL web page

http://www.w3schools.com/xpath/xpath_syntax.asp

//bookSelects all book elements no matter where they are in the document

by the way, the best solution is filter at  client  side.

Regards

zameerf
Contributor
0 Kudos

Hi,

Can you share the display queue of the intended error message from mapping?

What is the logic used to stop creating the message?

Also, is it not possible to do the condition check in Receiver Determination to stop the message even before calling the mapping step?

Regards,

Zameer

suwandi_cahyadi
Contributor
0 Kudos

Hi Zameer,

Actually the validation is to validate if there's any item to be interfaced.

The data comes from SAP as IDoc, and we have extended the IDoc to put custom fields in it. We put a custom field at the Item structure to indicate if the item is valid to be interfaced or not, if it has the value 'X' then it is valid (valid storage location, movement type)

So, the condition that is put at the root node of the PI Mapping is that we check all of the custom field for all of the items, if none of the does not have the value of 'X' then do not interface the message. As the result will be only Delivery header data without item.

Since the number of item is dynamic in the Delivery document, I don't really know how to implement the condition at the Receiver Determination.

The additional problem is that the IDoc is created at the Delivery creation time. We have an output requirement to really check if the IDoc output should be generated or not. But since the output is triggered automatically when it is saved, the data has not been saved at the Delivery table (LIPS) so we cannot really get the Delivery item's data from the output requirement since this is a header output not an item output.

     So, I think another effort is to find a user exit to extend the KOMKBV3 (if i'm not mistaken is the output requirement structure for delivery) to put an indicator field there by checking the all of the delivery's item in creation time to check if all items are excluded or not. But I haven't explored this if this is feasible or not..

Thank you,

Suwandi C.

ambrish_mishra
Active Contributor
0 Kudos

Hi Suwandi,

SAP allows creation of a delivery without a line item. Having said that, you are doing custom filtration so filter through distribution model is not possible. You can extend the code in ECC itself to check if delivery has at least one valid line as per the receiver and not send the IDoc in case there is no valid line for the receiver.

There is another way to automatically cancel this message in case the filter returns null.

http://scn.sap.com/people/ravi.gupta4/blog/2010/02/04/automating-cancellation-of-a-failed-message-in...

Hope it helps!

Ambrish

zameerf
Contributor
0 Kudos

Hi Suwandi,

when you say custom fields, are they different fields like A1, A2,etc in the Item level and each will carry a value like 'X'? or there is only one custom field like A1?

Still you can give a try with Receiver Determination filters, refer the below blog to check out the possibilities.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/06/07/customise-your-xpath-expressions-...

Regards,

Zameer

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

i assume that the condition is made in a segment which occurance is 0.N. in this case to solve the issue you should

  1. change the mapping and use the funtion INDEX under contant functions (if i not wrong), leave the ID 0 for index and try.

if its not the case, please paste and example of the sender structure.