cancel
Showing results for 
Search instead for 
Did you mean: 

grouping itemdts

former_member452321
Participant
0 Kudos

Hi I need help on grouping of above in the target group by PONR,slno,blno . For the same value of three values it should create one E1EDl24 .If any of these changes it should create another E1EDl24 .attached source screen shot E1EDL24   1   E1EDL43   10   2000 E1EDL11 SR124 E1EDL11 SR124 E1EDL11 SR124

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
former_member452321
Participant
0 Kudos

Here is the udf based on that example but not getting as expected E1EDl37 created correctly but E1EDl44 . for ( int i = 0;i< pono_in.length; i++ ) {                   if ( i == 0 ) { e1edpl37.addValue("");           aLicenseno_out.addValue( aLicenseno_in[i]); e1edpl44.addValue(""); } if ( i > 0 && ( aPkgId_in[i] != (aPkgId_in[i-1] ) ) ) { e1edpl37.addValue("");           aLicenseno_out.addValue( aLicenseno_in[i]); } if ( i > 0 && ( pono_in[i] != pono_in[i-1] || blno_in[i] != blno_in[i-1] || slno_in[i] != slno_in[i-1] )  ) e1edpl44.addValue(""); }

former_member452321
Participant
0 Kudos

expected target structure

<E1EDL37 SEGMENT="1">

       <EXIDV>ABCD1</EXIDV>

            <E1EDL44 SEGMENT="1">

                 <POSNR>1</POSNR>

                      <E1EDL46 SEGMENT="1">

                           <SERNR>1</SERNR>

                         </E1EDL46>

                        <E1EDL46 SEGMENT="1">

                        <SERNR>2</SERNR>

                          </E1EDL46>

                 </E1EDL44>

                 </E1EDL37>

   <E1EDL37 SEGMENT="1">

            <EXIDV>ABCD2</EXIDV>

                  <E1EDL44 SEGMENT="1">

                      <POSNR>3</POSNR>

                      <E1EDL46 SEGMENT="1">

                           <SERNR>6</SERNR>

                           </E1EDL46>

                           </E1EDL44>

          </E1EDL37>

But I am getting two E1EDl44 under first E1EDL37 .

JaySchwendemann
Active Contributor
0 Kudos

ok, so the last XML was indeed well formed.

So your desired target is:


<E1EDL37 SEGMENT="1">

    <EXIDV>ABCD1</EXIDV>

    <E1EDL44 SEGMENT="1">

        <POSNR>1</POSNR>

        <E1EDL46 SEGMENT="1">

            <SERNR>1</SERNR>

        </E1EDL46>

        <E1EDL46 SEGMENT="1">

            <SERNR>2</SERNR>

        </E1EDL46>

    </E1EDL44>

</E1EDL37>

<E1EDL37 SEGMENT="1">

    <EXIDV>ABCD2</EXIDV>

    <E1EDL44 SEGMENT="1">

        <POSNR>3</POSNR>

        <E1EDL46 SEGMENT="1">

            <SERNR>6</SERNR>

        </E1EDL46>

    </E1EDL44>

</E1EDL37>

But you you're getting this:


<E1EDL37 SEGMENT="1">

    <EXIDV>ABCD1</EXIDV>

    <E1EDL44 SEGMENT="1">

        <POSNR>1</POSNR>

        <E1EDL46 SEGMENT="1">

            <SERNR>1</SERNR>

        </E1EDL46>

        <E1EDL46 SEGMENT="1">

            <SERNR>2</SERNR>

        </E1EDL46>

    </E1EDL44>

    <E1EDL44 SEGMENT="1">

        <POSNR>3</POSNR>

        <E1EDL46 SEGMENT="1">

            <SERNR>6</SERNR>

        </E1EDL46>

    </E1EDL44>

</E1EDL37>

<E1EDL37 SEGMENT="1">

    <EXIDV>ABCD2</EXIDV>

</E1EDL37>

Now, please answer / do the following:

1. Is above assumption correct? If not, poste corrected versions of "desired target" and "actual target".

2. Please now give us again the example input again, using the advanced editor and "plain text" syntax highlighting (click in "insert") like so


This is a Syntax highlighting for plain text.This should not wrap around.

Cheers

Jens

former_member452321
Participant
0 Kudos

Thanks for looking into it .yes. That is the expected format. How do we get the advanced tab editor

<xs:Item>

               <xs:ItemDetail>

                    

<<xs1:Sellerno>1</<xs1:sellerno> 

   <xs:Pkgdtls>

                       <xs:PkgID>6</ns0:PkgID>                           

                                              

        <xs:Licenseno>ABCD</ns0:Licenseno>

                        <xs:Srlno>A1</ns0:srlno>

                     </ns0:Pkgdtls>

               </xs0:ItemDetail>

  </xs0:Item>

             

<xs:Item>

               <xs:ItemDetail>

                                  

                    <<xs1:Sellerno>2</<xs1:sellerno>

                   xs:Pkgdtls>

                     <xs:PkgID>6</ns0:PkgID>

                       <xs:Srlno>A2</ns0:srlno>       

        <xs:Licenseno>ABCD</ns0:Licenseno>

                     </ns0:Pkgdtls>

               </ns0:ItemDetail>

  </xs0:Item>

<xs:Item>

               <xs:ItemDetail>

                                  

     <<xs1:Sellerno>3</<xs1:sellerno>               

      <xs:Pkgdtls>

                      <xs:PkgID>7</ns0:PkgID>

                           <xs:Srlno>A3</ns0:srlno>           

    <xs:Licenseno>ABCD1</ns0:Licenseno>

                      </xs0:Pkgdtls>

               </xs0:ItemDetail>

  </xs0:Item>

JaySchwendemann
Active Contributor
0 Kudos

1. You can open advanced editor on the right upper side (link in blue font color) of the input area.

2. The xml in your the last post... Is that the original input?

3. That last xml is not well formed. See http://www.w3schools.com/xml/xml_validator.asp  Especially the line "<<xs1:Sellerno>1</<xs1:sellerno>"... seems wrong. Also there are numerous namespace conflicts. Please provide a well formed example.

Cheers

former_member452321
Participant
0 Kudos

Thanks . I fixed . It is working now .

JaySchwendemann
Active Contributor
0 Kudos

lol, what a great thread

At least...

former_member452321
Participant
0 Kudos

Here is sample data                                 <10   <1   12345                                      6                    Serial                    ABCD1                    A1                                                                                <10   <2   12345                                      6                      A2                        ABCD1                                                    <10   ❤️   12345                                      7                        ABCD2                          A3                                              Target ZDELVRY05 E1EDP20   E1EDL37   ABCD1     E1EDL44 Sellerno1     E1EDL44 Sellerno2  E1EDL46         SrlnoA1 E1EDL46 SrlnoA2   E1EDL37     ABCD2       E1EDL44 Sellerno3       E1EDL46         SrlnoA3 If the pkgid changes it should create new E1EDL37. Under that E1edl44 .For each unique sellerno/buyerno/pono one E1EDl44 Under one E1EDl44 multiple E1EDl46 with srlnos Thanks

former_member452321
Participant
0 Kudos

The format is not coming correct .Don see any option to upload text file

JaySchwendemann
Active Contributor
0 Kudos

Sorry, but unfortunatelly it's a little hard to follow.

Please provide...

  • Your PI / PO Version (Dual Stack / Single Stack)
  • Your  Integration Scenario, like so: 3rd Party (FTP - Flat file) --> PI --> ERP (IDoc)
  • Example of Input message (I suppose given data.png is not your real input message format)
  • Example of desired output message (if an IDoc, give IDoc Messagetype)

Thx

Cheers

Jens

former_member452321
Participant
0 Kudos

&.4 and single stack. Source xml and Target ZDELVRY05 idoc. expected for diff srnos but getting E1EDL24 for each sr no . E1EDL24   1   E1EDL43   10   2000 E1EDL11 SR124 E1EDL11 SR124 E1EDL11 SR125

JaySchwendemann
Active Contributor
0 Kudos

Still don't understand most of your requirement, maybe it's just me, but since you are reluctant to share your source xml and only seem to give information piece by piece, I suppose others, too find it hard to help.

Cheers

Jens