Skip to main content
Question

INVENTORY_PART_API to get PART STATUS

  • May 17, 2022
  • 7 replies
  • 383 views

Forum|alt.badge.img+16
  • Hero (Customer)
  • 671 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

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
  • Ultimate Hero (Employee)
  • 1094 replies
  • May 17, 2022

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
  • Author
  • Hero (Customer)
  • 671 replies
  • May 17, 2022

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


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

@Technical Outlaws Thank you very much.


Forum|alt.badge.img+16
  • Author
  • Hero (Customer)
  • 671 replies
  • 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)
  • 102 replies
  • 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
  • Author
  • Hero (Customer)
  • 671 replies
  • May 20, 2022

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