I need to rewrite my SQL command to expression command, for examle like this one: IFSAPP.Inventory_Part_Api.Get_Part_Product_Family(contract, part_no) Where can I find this API? In Oracle SQL Developer I cant find it, or should i download PL/SQL Developer and find it there?
Page 1 / 1
Hi @Ed22 ,
If you have oracle developer open, under the connection you should have a menu called “other users”.
Find the IFSAPP user and expand this, then you should be able to find the package you're looking for:
Thanks, I find it.
When I want to rewrite this sql in expression, how can I achieve this? SELECT a.QTY_RESERVED FROM DETAIL_PLANNING a, because I cannot find DETAIL_PLANNING_API
Hi Ed,
You're refering to a PL/SQL expression.
It might not exist, but I'm unsure in this case as I'm not familiar myself to regards of this view.
You don't HAVE to use PL/SQL statements. You can also use select queries which might also perform better than PL/SQL statements. You just need to know the keys and add the necessary criteria.
Best thing to do is to check the entity as to which the keys are.
Hello,
thanks for response. How can I find out this column, if this columns (qty_demand) is located in entity OrderSupplyDemandDetailPlanning and in view DETAIL_PLANNING? Should I look for the entity name in Packages folder? Like OrderSupplyDemandDetailPlanning_API or something like this?
In this case I used a query to find out the Entity. I can explain how you can find the entity, but from my end the view does not state which are the keys so it won't help you a lot there.
In this case you will need to have some process knowledge and compare that with the view columns to determine what you need to retrieve a unique record.
Normally you'd go:
To the entity screen and look up the entity
Find the view
Look at the bottom for columns with P/K attribute.
However in this case I found that this is not set in this view. You could take a look at the base view to see what the keys are there and then compare with your specific view.
Hi,
just an idea :-) We start with the IFS mask, open system info, note the view. Research the view name - sometimes through - more views and go down to tables.
Use debug console to enhance your research for the APIs.
Now: As mentioned above, research for the API. Learn from the code. Do your own SQL...
From our work for several years now I can only recommend the following. If it is a “lookup” API - like your examle “ IFSAPP.Inventory_Part_Api.Get_Part_Product_Family(contract, part_no) “ go for a left outer join by finding the basis data table LEFT OUTER JOIN INVENTORY_PRODUCT_FAMILY_TAB AS IPF ON IP.PART_PRODUCT_FAMILY = IPF.PART_PRODUCT_FAMILY (AND IP.CONTRACT = IPF.CONTRACT) we found that you don’t have to use this join.
Other API are quite sophisticated and in this case we use the API while fetching data into the DWH.