cancel
Showing results for 
Search instead for 
Did you mean: 

Outbound ABAP Proxy - default values not populated

0 Kudos

Structure RRC has default values set up in Enterprise Services Builder (the "Default" column in "Type Definition" view).

RRC is used in an ABAP Outbound Proxy.

According to http://help.sap.com/saphelp_nw74/helpdata/en/48/591b845e024bb9e10000000a42189b/content.htm

initial values must be replaced with default values when we send data to PI (Consumer Proxy section).

But it doesn't work.

Is there a way to make it work?

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

I can see default value in proxy structure: see screenshot

The attribute is optional for I cannot make it required and set default val at the same time.

When I test in sproxy with F8 i see something like srcId="String 4"

I send my example with abap code and check results with SXI_MONITOR.

Also tried SPROXY+F8 but with no success yet.

Harish
Active Contributor
0 Kudos

Hi Alexandr,

You can try by changing the type of element/attribute to Decimal from string.

regards,

Harish

former_member182412
Active Contributor
0 Kudos

Hi Alexandr,

By default if the field is optional and if the field contains initial values then the field will be removed from the xml, if you want to override this behavior you can use Extended XML Handling by setting the below values to the CONTROLLER for the complex type.

  • sai_ctrl_initial -  Send initial value
  • sai_ctrl_nil  -  Send xsi:nil='true'
  • sai_ctrl_none - Suppress Element

To enable extended XML handling in proxy program you need to call method SET_EXTENDED_XML_HANDLING of interface  IF_WSPROTOCOL_PAYLOAD before calling proxy like below.


*...get payload protocol to enable extended XML handling

         lr_payload_protocol ?= lr_client_proxy->get_protocol( if_wsprotocol=>payload ).

         call method lr_payload_protocol->set_extended_xml_handling( abap_true ).

To set which fields you need to activate this by using below code.


ls_prxctrl-field = 'FIELD1'.

ls_prxctrl-value = sai_ctrl_initial. " This will send initial value

append ls_prxctrl to ls_output-message_type-item-controller.

When proxy program convert the ABAP structure to XML in transformation program it reads these values and assign the values like below.

So it will not assign default values we set in XSD definition, it only sets the default values based on the data type. I hope it clarifies the question.

Regards,

Praveen.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Alexandr,

I know that this thread is a few months old now, but anyway. It works in our sproxy but not in an actual abap code. As you can see, there is also a default value for VHART field in message type.

Here is an sproxy screenshot with/without extended xml handling.

click Original Request

The screenshot above is what is sent to our PI system.

Regards,

Mark

Former Member
0 Kudos

Hi Praveen,

I have apply your recommendation and it fix my issue.

My requirement was to force initial value when calling the ABAP PROXY, and it was not working cause I have miss to enable extended XML handling in proxy program .

Thanks a lot for this information.

Regards,

Samuel

former_member182412
Active Contributor
0 Kudos

Hi Samuel,

Glad to hear that problem is resolved, can you please close the thread as per this blog

Regards,

Praveen.

Former Member
0 Kudos

Hi Praveen,

Unfortunately I am not the one who create this thread, so I am not authorized to close it 😞

even if for my issue, your answer was the good one 🙂

Regards,

Samuel

iaki_vila
Active Contributor
0 Kudos

Hi Alexandr,

The attribute is optional, may be is not populating the default values because the attribute is not being created, where are you getting the problem?, in the abap code or when you try to send an example from the sproxy transaction?

Regards.

Harish
Active Contributor
0 Kudos

Hi Alexandr,

Are you able to see the default value in proxy structure (domain of the element)? When you click on test (F8) from proxy did the default value is populated?

regards,

Harish