Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
FMV_IT
Contributor III
Contributor III

tHMap tSAPIDOCOutput multiple loop

Dear community,

I'm actually trying to write an IDOC for purchase order from an XML file to be sent to a SAP S4 System. In my IDOC structure (PORDCR103) I've two Loops that need to be implemented. Attached you'll find an example of my XML file and a screenshot of IDOC structure.

Can you please help how to use tHMap to achieve what I need?

Loops mean:

- 1st loop on company (we can have 1 to n companies)

- 2nd loop on item (we can have 1 to n items)

I really don't know how to do that.

Best regards,

-Jacob0683p000009M7Vc.png

Labels (2)
5 Replies
Anonymous
Not applicable

Jacob,

 

If I look to the metadata of the IDOC I see 1 loop element and not 2.

You retrieved the metadata from SAP and SAP calls the segment "Loop-E2PORDCR101", but it is not a loop element otherwise it had the same information behind it "0:99999999".

 

I would recommend to build an intermediate step between input and output because if your input is completely different then your output, it is not possible to build your IDOC correctly.

 

If you have questions, let me know.

 

Kr,

Jvl

FMV_IT
Contributor III
Contributor III
Author

Hi JVL,

Thansk for your answer. According to my XML file you'll say it will work as it? (you could see it attached to my 1st post).

Regards,

-Jacob

Anonymous
Not applicable

Jacob,

 

It will work if you build an intermediate step between in and out.

Hope it works!

 

Kr,

Jvl7

FMV_IT
Contributor III
Contributor III
Author

Hi JVL,

 

I think I need more infos to fully understand the way to make it works. First step are perfectly run by my job but in the middle of the process it stops generating the IDoc with following error messages:

 

2: Warning - An element that loops is missing a loop expression. All mapping at and beneath this element is ignored. To avoid this warning, use the FixedLoop function with a number of times of zero (to omit) or one (to include once). (218) (OUTPUT)
Map Element: Maps/Jobs/Test_S4HANA_IDOC_GeCom/tHMap_2.xml - Map Element: out$/PORDCR103/Loop-E2PORDCR1001/E2BPMEPOITEMX009

3: Warning - An element that loops is missing a loop expression. All mapping at and beneath this element is ignored. To avoid this warning, use the FixedLoop function with a number of times of zero (to omit) or one (to include once). (218) (OUTPUT)
Map Element: Maps/Jobs/Test_S4HANA_IDOC_GeCom/tHMap_2.xml - Map Element: out$/PORDCR103/Loop-E2PORDCR1001/E2BPMEPOACCOUNT002

4: Warning - An element that loops is missing a loop expression. All mapping at and beneath this element is ignored. To avoid this warning, use the FixedLoop function with a number of times of zero (to omit) or one (to include once). (218) (OUTPUT)
Map Element: Maps/Jobs/Test_S4HANA_IDOC_GeCom/tHMap_2.xml - Map Element: out$/PORDCR103/Loop-E2PORDCR1001/E2BPMEPOACCOUNTX003

 

As they not loop elements why did I receive this messages?

Regards,

-Jacob

FMV_IT
Contributor III
Contributor III
Author

Hi JVL,

I'm still stucked with my IDOC. I've the following error messages when generating the message:

 

2: Warning - An element that loops is missing a loop expression. All mapping at and beneath this element is ignored. To avoid this warning, use the FixedLoop function with a number of times of zero (to omit) or one (to include once). (218) (OUTPUT)
Map Element: Maps/Jobs/Test_S4HANA_IDOC_GeCom/tHMap_2.xml - Map Element: out$/PORDCR103/Loop-E2PORDCR1001/E2BPMEPOITEMX009

3: Warning - An element that loops is missing a loop expression. All mapping at and beneath this element is ignored. To avoid this warning, use the FixedLoop function with a number of times of zero (to omit) or one (to include once). (218) (OUTPUT)
Map Element: Maps/Jobs/Test_S4HANA_IDOC_GeCom/tHMap_2.xml - Map Element: out$/PORDCR103/Loop-E2PORDCR1001/E2BPMEPOACCOUNT002

4: Warning - An element that loops is missing a loop expression. All mapping at and beneath this element is ignored. To avoid this warning, use the FixedLoop function with a number of times of zero (to omit) or one (to include once). (218) (OUTPUT)
Map Element: Maps/Jobs/Test_S4HANA_IDOC_GeCom/tHMap_2.xml - Map Element: out$/PORDCR103/Loop-E2PORDCR1001/E2BPMEPOACCOUNTX003

 

According to IDOC structure this 3 elements are not loop element. I don't understand why I get this error. Upper elements are all generated correctly (in part with my XML file).

 

Do you have any clue? I've tried the "Unroll from Loop" for this 3 elements but it still doesn't work.

 

Regards,

-Jacob