on 04-20-2015 2:54 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.