Skip to main content
Question

INVENTORY_PART_API to get PART STATUS


Forum|alt.badge.img+16

Hi,

This is a technical question.

I am writing a SQL report, and I need API to retrieve the inventory part status. can anyone assist to get the code for this API? it suppose to be the API is INVENTORY_PART_API.

 

Thank you.

Technical Outlaws
Hero (Employee)
Forum|alt.badge.img+11

Inventory_Part_API.Get_Part_Status(contract_, part_no_)


Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31

Hi @ronhu,

The method is Inventory_Part_API.Get_Part_Status.

FUNCTION Get_Part_Status (
   contract_ IN VARCHAR2,
   part_no_ IN VARCHAR2 ) RETURN VARCHAR2

Hope this helps!


Forum|alt.badge.img+16
  • Hero (Customer)
  • May 17, 2022

@Charith Epitawatta Cool! I believe it will work. Thank you.


Forum|alt.badge.img+16
  • Hero (Customer)
  • May 17, 2022

@Technical Outlaws Thank you very much.


Forum|alt.badge.img+16
  • Hero (Customer)
  • May 20, 2022

@Charith Epitawatta 

@Technical Outlaws 

would you be able to do me a favor, the Inventory_Part_API.Get_Part_Status(contract_, part_no_) API is returning only the status code, for example “A”, but I need description, “A”= “Active”.  what is the code for fetching the description? 

Thank you.


Forum|alt.badge.img+10
  • Hero (Customer)
  • May 20, 2022

Hello,

 

I think Inventory_Part_Status_Par_API.Get_Description(part_status)  will work

 

OR

 

You can use CASE clause in your queries like;

 

SELECT  PART_STATUS ,     

(CASE

            WHEN PART_STATUS = 'A' THEN 'Active'
             WHEN PART_STATUS = 'P' THEN 'Pasive'

END) PART_STATUS_DESC

FROM INVENTORY_PART

 

Kind Regards

Ozgun Bal


Forum|alt.badge.img+16
  • Hero (Customer)
  • May 20, 2022

@Ozgun BAL Wonderful, it’s working. Thank you.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings