cancel
Showing results for 
Search instead for 
Did you mean: 

How to loop through IDOC segment using UDF

Former Member
0 Kudos

Hi All,

I am working on IDOC to SOAP scenario.

But the target structure only two value. To one of the field we need to pass encoded XML with values.

here is my requirement. I need to loop through the segment and populate the row values according to the segment count in UDF.

Below is the target structure i need to create. The row should repeat as per the segments repeating.

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">

    <action name="create">

                <main>

                    <row>

                        <receiveh_id in_var="myVar" out_var="">in_var</receiveh_id>

                        <fr_company_id>SAP</fr_company_id>

                        <to_warehouse_id></to_warehouse_id>

                       

                       

                    </row>

                </main>

                <receivel>

                    <row>

                        <receiveh_id in_var="myVar" out_var="">in_var</receiveh_id>

                        <our_bpart_id></our_bpart_id>

                        <serial_no></serial_no>

                        <qty_received></qty_received>

                        <inv_type_id></inv_type_id>

                        <bin_code_id></bin_code_id>

                        <man_adj_reason_id></man_adj_reason_id>

                    </row>

                    <row>

                        <receiveh_id in_var="myVar" out_var="">in_var</receiveh_id>

                        <our_bpart_id></our_bpart_id>

                        <serial_no></serial_no>

                        <qty_received></qty_received>

                        <inv_type_id>good</inv_type_id>

                        <bin_code_id></bin_code_id>

                        <man_adj_reason_id></man_adj_reason_id>

                    </row>

               

                </receivel>

            </action>

        </state>

    </session>

</root>

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi Kevin,

the mapping rules might be clear for you - but not for me having just the infos from your thread. Please give us more details, can you provide as well the IDoc xml source for that example?

Regards,

Udo