Skip to Content
-1

ABAP Proxy to SAP PI Dynamic fields

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 04, 2017 at 10:59 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 05, 2017 at 04:21 AM

    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

    Add comment
    10|10000 characters needed characters exceeded