cancel
Showing results for 
Search instead for 
Did you mean: 

Header data with multiple items and each item have multiple sub items.

Former Member
0 Kudos

Hi Pi experts,

SOURCE STRUCTURE: TARGET STRUCTURE

JDBC Receiver

HEADERRECORD STATEMENT

FIELD1 dbTableName

FIELD2 action

FIELD3 access(0--unbound)

FIELD4

FIELD5

ITEMRECORD( 0 TO UNBOUND)

ITEM1

ITEM2

-


-


SUBITEMRECORD(0 TO UNBOUND)

SUBITEM1

SUBITEM2

I NEED OUTPUT TO BE DISPLAY

ACCESS NODE

<FIELD1>

<FIELD2>

<FIELD3>

<FIELD4>

<FIELD5>

<ITEM1>

<SUBITEM1>

ACCESSNODE

<FIELD1>

<FIELD2>

<FIELD3>

<FIELD4>

<FIELD5>

<ITEM2>

<SUBITEM2>

I have the input structure from sap side the header data with multiple items and each item have multiple sub items.based on the number of sub items the access node of target jdbc document standard structure should be generated with same number of times.

for example if the number of subitems on the itemlevel are two then I need the access node to be populated two times.

Has any one of our SAP PI friends come across this type of requirement please help ?

Best Regards,

Ram.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ram,

Map like below

Map ItemRecord node to Access Node (Direct map)

For Field1,Field2 .... Field5 fields you can use UseOneAsMany node function.

Mapping to UseOneAsMany node function as

Field1 for field1 map, field2 for field2 map.....

map Itemrecord node for 2nd and 3rd inputs

After UseOneAsMany function use SplitByValu then map to target field

Item1 and Subitem1 fields are direct map.

Regards,

Venkata Ramesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi friends,

I did not typed properly my source and target structures in my question...my apologies for that.

I have done the mapping in this way :

SUBITEM(node) ---> SPLITBYVALUE ---> COLLAPSECONTEXT -


>ACCESS

cheers,

Ram.

former_member191435
Contributor
0 Kudos

Map by using

SUBITEMRECORD---> removecontext-----> Access

Then u will get

Thanks,

Rohini

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

SubItem>removeContext>Target access

Regards,

Priyanka