cancel
Showing results for 
Search instead for 
Did you mean: 

what is the importance of "CONTROLLER" in proxy structures generated

former_member450736
Active Participant
0 Kudos

Hi,

i have created a proxy for service interface in ESR. i can see one field "CONTROLLER" of type PRXCTRLTAB (Control Flags for Fields of a Structure ) in all of structures generated for proxy.

i have given functional specification where in one of the XML strucutes is

<GeneralId>

<IdValue name=u2018ClientIdu2019>ABCDEF</IdValue>

<IdValue name=u2018Empidu2019>12345</IdValue>

</GeneralId>

now my requirement is to extract clientid or empid based on its name as it is given above and get the value correspondingly.

for this in the generated structure i have one field "Generalid" inside that one more field "value", where i think i will have some value ( could be client id or empid i guess)

now please suggest me how can i find that value is empid or general id, i suspect that "controller" field which contain one field called "NAME" will actually tells us this?

my question may be complex, please suggest

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> for this in the generated structure i have one field "Generalid" inside that one more field "value", where i think i will have some value ( could be client id or empid i guess)

When value is a simple type, then your generated structure does not match your requested XML.

Check ESR if the interface definition is correct.

When value is a complex type, you find your requested fields in sub-structure.

> now please suggest me how can i find that value is empid or general id, i suspect that "controller" field which contain one field called "NAME" will actually tells us this?

No, controller has only internal information of proxy runtime.

Edited by: Stefan Grube on Jul 27, 2010 10:47 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The ABAP proxy generation functions generate control tables of type PRXCTRLTAB (line type PRXCTRL) for each complex type.

Using this table you can define for each individual field whether it is to occur in the message, and how.

Former Member
0 Kudos

Hi Kranthi

The filed Value is a repeating structure with different contents(values empidetc).

I think whenever we have such a repeating structure the proxy generator add a CONTROLLER component of type PRXCTRLTAB to the Idvalue field assuming it is a table structure.

how can i find that value is empid or general id, i suspect that "controller" field which contain one field called "NAME" will actually tells us this?

Please check with you abap team, i guess controller is to take care of looping to fill data in structure.

Also as you know that there will be two values in the field "Idvalue" ,instead of using attributes, you can do the

check in mapping using a constant and determine which value you have to populate to the target.

Regards,

$rinivas

VijayKonam
Active Contributor
0 Kudos

I did not understand your question, but CONTROLLER is created by the proxy framework for its own usage.

I see that you must have created an element and then an attribute under it with 0..u occurrence. This would be converted to two separate elements in the proxy structure. Proxy would not differentiate between element and attribute. Instead it creates two elements, one for element and one for attribute.

Hope that helps.

VJ