Skip to Content
-1

ABAP Proxy to SAP PI Dynamic fields

Jan 04, 2017 at 10:25 AM

109

avatar image

Hi ABAP or PI Gurus,

I have a requirement wherein there is an 'any' field in the ABAP proxy. This 'any' field can take any segments or fields. It can store any data in runtime. So we have an original schema from the abap proxy, then there's this 'any field' that's not in the schema.

So, when the program is ran in the SAP system, the payload is generated along with segments that are unknown to PI since it's not part of the original schema. In PI, these segments are not recognized therefore generating an error. (The dynamic fields are required in the mapping)

Is there any way to read the dynamic fields even though it's not part of the external definition schema?

sample source:

<Header>

<Name>John</Name>

<AddedNode>

<Contact>9999999</Contact>

</AddedNode>

</Header>

But in PI, the message can be seen as:

<Header>

<Name>John</Name>

</Header>

How can I read the Contact field if it's not in my schema?

10 |10000 characters needed characters left characters exceeded

an added note for the sample above:

<xsd:complexType name="Header">

<xsd:element name="Name"/>

<xsd:any namespace="##other">

is this working in PI? the xsd:any?

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Jan 04, 2017 at 10:59 AM
1

Hi,

If <AddedNode><Contact/></AddedNode> is not part of source structure, then its not possible to get this data. And more than that, you are using Proxy as source system,that is written on schema maintained at PI end, and in that you cant able to add fields/nodes dynamically. As per my knowledge, there is no Dynamic Field there in XI Adapter to capture any such data.
Its better to maintain a field as <Dynamic> in your source DT and use it.

Regards,

Anoop Rai

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for the reply Anoop. Apologies but my source is the Ext Def from the schema. What did you mean by maintaining the field as dynamic using data type?

0
avatar image
Former Member Jan 05, 2017 at 04:21 AM
1

Hi,

I mean create an extra node with name <Dynamic> and then use it. If its external schema, then just export it, and add a field <Dynamic> in that. Or you may also go for a new DT, and just create a new MT and SI that include both External def schema and DT.

Regards,

Anoop Rai

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Anoop, thanks. So I'll just a field named Dynamic then I can dump there any segment or fields that are not in the schema?

0