cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy Scenario : How to get structure "CONTROLLER" populated ?

Former Member
0 Kudos

Dear experts,

I have a scenario File->XI->Proxy in PI 7.0 SP12.

In some cases, a field may not be available in the file, and I do not map it in my payload.

But how can I know this field is not present (which is not the same as empty !) on the proxy side in application system ?

I thought this was the goal of structure CONTROLLER which is provided as input parameter in method EXECUTE_ASYNCHRONOUS. But this structure is always empty...

Your help will be greatly appreciated !!!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Raj,

Thanks for your response !

I understand well the CONTROLLER structure,but in your explanation you are in a scenario where a proxy on application side throws a message to XI. I understand that I can populate the CONTROLLER structure myself in this case.

I'm not exactly in this kind of scenario. The proxy is called by XI on in SAP R/3 and we do not have to change the CONTROLLER content as we are in an asynchronous scenario. This structure should already be populated by XI itself !

Let's take an example...

My message can have this structure:

<Message>

<Customer>690000</Customer>

<Currency>USD</Currency>

<OrderAmount>5000</OrderAmount>

<CreditLimit>10000</CreditLimit>

</Message>

When creating the proxy in SAP R/3, a structure is created accordingly with fields CUSTOMER, CURRENCY, ORDERAMOUNT and CREDITLIMIT. We use the CREDITLIMIT content to update credit limit of the customer.

Now, if my message has following data:

<Message>

<Customer>690000</Customer>

<Currency>USD</Currency>

<OrderAmount>5000</OrderAmount>

</Message>

Here, CreditLimit is not specified, but it does not mean that we should change the credit limit of the customer to 0 ! It means credit limit should not be modified.

When XI calls the proxy, field CREDITLIMIT has value 0, and CONTROLLER structure does not contain anything... So we can not know if the field was specified or not in the XML...

So my question is: Why the CONTROLLER structure is not populated automatically by XI ?

Former Member
0 Kudos

Hi Anne,

I believe you can't populate a CONTROLLER segment from PI. It can be achieved by Dynamic Config, but in Proxy, we can't use that.

It completely depends on how you design your data structure and how you map it. If the XML tag of that field is not in the payload, it should create a null value in the R3.

I hope this info helps.

Cheers'

Neetesh

Former Member
0 Kudos

Hi,

Whenever you generate a proxy, the CONTROLLER table (PRXCTRLTAB) is created for each complex type.

It has always two fields - FIELD and VALUE.

You can use this table to define for each individual field whether is is to occur in the message and how. For a table line, you can set the field FIELD to the ABAP field name, the field VALUE to a value from the type pool SAI, and attach the line to the table.

But how can I know this field is not present (which is not the same as empty !) on the proxy side in application system ?

The ABAP proxy won't throw any error if the XML tag is not coming in for a field, as the ABAP program around the proxy populates the tables (and it has access to the Data structure created in PI).

So, it can validate whether the structure is correct or not.

Let us know if you have more questions.

Cheers'

Neetesh

Former Member
0 Kudos

Well

Are you use Message Mapping? if yes you can use mapwithdefault standar function.