cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Proxy to SAP PI Dynamic fields

0 Kudos

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?

0 Kudos

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?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member207703
Active Participant

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

0 Kudos

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?

former_member207703
Active Participant

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

0 Kudos

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?