cancel
Showing results for 
Search instead for 
Did you mean: 

Root Node

former_member188791
Participant
0 Kudos

Hi Group,

In File to IDOC scenrio I am using to create single IDOC for multiple records based on some condition,my IDOC structure is:

Z_IDOC

  IDOC

Z_HDR

Z_ITEM

In my case Z_IDOC should create only once and Z_ITEM with multiple time, but when I am using creareif its creating multiple Z_IDOC root node, can any body suggest.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajiv ,

As I have understand , You map your "Header" node with to check the condition , if the condition satisfies then IDOC will create and you can map all the ITEM node with the incoming file data as required.

Source----> CreateIF--->remove Context--->CollapseContest---Target(Header)

Thanks,

Vijay Kumar

former_member188791
Participant
0 Kudos

Hi Vijay/Indrajit,

Thank you for your response, the above trick is not working in createIF queue if I am getting

SUPPRESS
true

after remove Context and Collapse Context it is taking only first one i.e SUPPRESS and its not creating Header

Harish
Active Contributor
0 Kudos

Hi Rajiv,

If you get the blue suppress at the top of queue then your node will not be created. try the below logic

record (I believe the output is boolean value trur or false) ---> remove context--collapse context---> if without else --> map the Z_IDOC with constant

regards,

Harish

former_member188791
Participant
0 Kudos

Hareesh,

its not working, after record output (true or false) when I am applying remove context and collapse context it is taking only first one from the queue

Harish
Active Contributor
0 Kudos

Hi Rajeev,

I believe you need to create Z_IDOC when you have atleast one true condition from record. so in this case i missed the sort function.

record (I believe the output is boolean value trur or false) ---> Sort (true in the start then false) ---> remove context--collapse context---> if without else --> map the Z_IDOC with constant

regards,

Harish

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rajiv

Map the root node 'Z_IDOC' with constant and 'Idoc' with  constant. Then for the Z_ITEM  use the create if condition.

former_member188791
Participant
0 Kudos

If I am passing costant to Z_IDOC for every record its creating IDOC, I want to create IDOC only when condition met

Former Member
0 Kudos

Hi Rajiv

As far I understood, your input file will have multiple records and you want to create one Idoc for all the records if a certain condition satisfied or else no idoc will be created for the whole file.

In that case map your root node as

record---> create if ---remove context--collapse context---Z_IDOC

contant----> Idoc