cancel
Showing results for 
Search instead for 
Did you mean: 

ItemUpdateRequest can not handle multiple item groups

Former Member
0 Kudos

Hi All,

apparently it is not possible to attach an item to multiple item groups using ItemUpdateRequest webservice.

With multiple item groups in the request the attached item group in ME will always be the last item group of the request message.

So it will be always only on item group the item is attached to.

But in ME it is possible to attach more than one item group using material maintance POD.

Can anybody help with this issue?

Is there a way to attach an item to more than one item group using the webservice?

Thanks in advance and best regards

Jörn

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The default webservices tend to overwrite rather than append (as you're experiencing.)  We are working around this one of two ways...

1) query to see what material groups are already associated to the material, then re-attach them when you do your webservice call.  (ie. the Item is already attached to A and B, and you'd like to attach it C... your webservice call would attach it A, B, and C)

2) create a custom webservice to append rather than overwrite

Former Member
0 Kudos

Thank you very much for your answer.

I actually tried way 1) but this is exactly what does not seem to work.

This my request I sent via webservice:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:gdt="http://sap.com/xi/SAPGlobal/GDT"
xmlns:me="http://sap.com/xi/ME"
xmlns:sch="http://sap.com/xi/ME"> 
<soapenv:Header/>
<soapenv:Body>  
<sch:ItemUpdateRequest_sync>

  <sch:Item>         
    <sch:SiteRef>            
      <sch:Site>4510</sch:Site>          
    </sch:SiteRef>          
    <sch:Item>TEST</sch:Item>          
    <sch:AssyDataTypeRef>             
      <sch:AssyDataType>EXTERNAL_SERIAL</sch:AssyDataType>          
    </sch:AssyDataTypeRef>         
    <sch:Revision>A</sch:Revision>          
    <sch:CurrentRevision>true</sch:CurrentRevision>

    <sch:Description>Test</sch:Description>         
    <sch:StatusRef>   
      <sch:Status>201</sch:Status>         
    </sch:StatusRef>         
    <sch:UnitOfMeasure>ST</sch:UnitOfMeasure>          
    <sch:EffectivityControl>R</sch:EffectivityControl>          
    <sch:ItemType>B</sch:ItemType>         
    <me:ItemGroupRef>             
      <me:ItemGroup>TESTMATERIAL</me:ItemGroup>             
      <me:ItemGroup>TESTMATERIAL2</me:ItemGroup>          
    </me:ItemGroupRef>          
    <sch:LotSize>1</sch:LotSize>          
    <sch:QuantityRestriction>A</sch:QuantityRestriction>
    <sch:IncrementBatchNumber>N</sch:IncrementBatchNumber>          
    <sch:CustomFieldList>             
      <sch:CustomField>               
        <sch:Attribute>STORAGE_LOCATION</sch:Attribute>                
        <sch:Value/>             
      </sch:CustomField>          
    </sch:CustomFieldList>  

  </sch:Item>

</sch:ItemUpdateRequest_sync>

</soapenv:Body>

</soapenv:Envelope>

and this is the result in ME:

I understood in your answer, that this should be possible. Material TEST should be attached to TESTMATERIAL and TESTMATERIAL2.

Am I missing something or doing something wrong?

Thanks in advance and best regards

Jörn

Former Member
0 Kudos

Hi Jörn,

I separated the material groups into their own <itemgroupref> tags and it seems to work ok for me.

Like this:

     <me:ItemGroupRef>

          <me:ItemGroup>TESTMATERIAL</me:ItemGroup>

     </me:ItemGroupRef>

     <me:ItemGroupRef>

          <me:ItemGroup>TESTMATERIAL2</me:ItemGroup>

     </me:ItemGroupRef>

     <me:ItemGroupRef>

              <me:ItemGroup>TESTMATERIAL3</me:ItemGroup>

     </me:ItemGroupRef>

See if that works!

Alli

Former Member
0 Kudos

Hi Alli,

thank you for the idea.

I tried this scenario as well.

Unfortunately it did not work out for me.

I still had the same behaviour in ME and only the last material group was attached.

I'm running ME 5.2.6.6 Counter 4 Build 138958.

Maybe the reason for the different behaviour is in the version.

Jörn

0 Kudos

Hi Jörn,

ItemUpdateRequest bahaves the same way in ME 6.0.3.4 - last material group is attached only. However, I do not think it will be enhanced. Please note that in ME 6.0 you will be able to access PAPI methods through custom webservices created by means of ME SDK, so you'll be able to make it work as you want.

As a 'workaround' you can try to send several requests with a new material group each time or try to do the same via Data Exchange interface.

Regards,

Alex.

tim_drury
Active Participant
0 Kudos

ME 6.0.4, I believe, is the target release for shipping the public API (PAPI) wrapped as web services. 

Answers (0)