Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Service Master Implementation

$
0
0

Hi Experts,

 

We are in Sourcing 10.0

 

We are implementing Service Master , from configurations side we have done the changes.

 

Now we have to write the script for -  to change the item type from Material to Service in the case where a service master is added.

 

 

I have tried the code but it's not working:

 

 

ma_line_items = doc.getLineItems();

 

iter = ma_line_items.iterator();

 

while(iter.hasNext())

{

 

     line_item = iter.next();

    mat_obj = line_item.getMaterialObjRef();

    matHome= IBeanHomeLocator.lookup(session, mat_obj).find(mat_obj);

 

          if(matHome.getExtensionField("Z_Is_Service").get())

       {

name=matHome.getDisplayName();

 

//line_item.setLineItemTypeEnum(LineItemTypeEnumType SERVICE);

              line_item.setLineItemTypeEnum(new LineItemTypeEnumType(2));

 

 

}}

 

 

Can anyone help me on this

Any leads would be of great help!!

 

 

 

I am getting the the below error

 

Capture.PNG

 

Regards,

Geetika


Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>