Question

INVENTORY_PART_API to get PART STATUS

  • 17 May 2022
  • 7 replies
  • 263 views

Userlevel 7
Badge +16
  • Hero (Customer)
  • 554 replies

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.


7 replies

Userlevel 5
Badge +11

Inventory_Part_API.Get_Part_Status(contract_, part_no_)

Userlevel 7
Badge +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!

Userlevel 7
Badge +16

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

Userlevel 7
Badge +16

@Technical Outlaws Thank you very much.

Userlevel 7
Badge +16

@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.

Userlevel 4
Badge +8

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

Userlevel 7
Badge +16

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

Reply