cancel
Showing results for 
Search instead for 
Did you mean: 

how to get only active materials from webservice?

resmi_v
Participant
0 Kudos
263

Dear experts ,

I have blocked some products from Purchasing block.How can I exclude this products in the response of while querying the MaterialIn webservice.

Thanks,

Resmi

Accepted Solutions (0)

Answers (2)

Answers (2)

knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Resmi,

unfortunately you can't filter by the ProcurementLifeCycleStatusCode using web service API QueryMaterialIn.

However using Custom OData services it is possible to get materials and filter by the ProcurementLifeCycleStatusCode. You find sample custom OData services and Postman collections in our GitHub repository SAP Business ByDesign - OData API Examples.

Best regards,
Knut

HarshalVakil
Active Contributor
0 Kudos

Hello Resmi,

Check the Service : QueryMaterialIn

Purchasing

The Purchasing node element is organization independent. Therefore, there can be just one Purchasing node within one material.

Purchasing information contains the PurchasingMeasureUnitCode, LifecycleStatusCode, and the purchasing text.

LifeCycleStatusCode

The LifeCycleStatus is a status that indicates the current stage in the life cycle of a material.

Three LifeCycleStatusCodes can exist, InPreparation, Active and Blocked.

When a material is created and exists in the system the status is InPreparation.

When the material is ready to be procured by the customers then the status is Active.

If the customer can no longer use the material the status is Blocked.

<Purchasing>
    <LifeCycleStatusCode>2</LifeCycleStatusCode>
    <PurchasingMeasureUnitCode>EA</PurchasingMeasureUnitCode>
    <PurchasingNote>
        <ContentText languageCode="EN">Purchase Note</ContentText>
    </PurchasingNote>
</Purchasing>