Skip to main content

 

Hi, im tyring to create a query for a quick report to easily export a list of characteristic values for variable part number, i cannot see how this report connects the object key from this view with the object key from the  technical_specification_both  table where the values are stored. i looked at this once before a long time ago and i recall i used an API  could anyone help ?

 

 

I was same problem for last 1 week i can search every ware but no result found can you find solution?.

If yes please share with me.

GTA Portal

Best regard,
Hayden


@Hayden87  i didn't yet find a solution, if i do i will report back on this thread. 


Please have a look to the following queries. 

Please run the 1st and insert the result in the 2nd query.

The 3rd one is shorter reduced to one Attribute.

I found your question because I’m searching how to get the ,
Enigneering Part Master Main Characteristic_Attributes_Summary value by sql and api. 
Finally I found it by the fetched SQL query and included in the 3rd query.

If the attribute on the Technical Class Template has the summary option defined as include, the attribute is shown in the summary.

Hopefully you can use it to solve your needs.
 

 

 

 

 

***  
LU name: EngPartMaster
Element name: AttributesGroup
Entity set:
Entity: EngPartMaster
View: ENG_PART_MASTER_MAIN

Element content:
...

Name: CharacteristicAttributesSummary, Mandatory: false, Translation Path: EngineeringPartNavigator.group.AttributesGroup.groupcontent.field.CharacteristicAttributesSummary
...

***
With TECH_ATTRIB_CNT AS (Select  TAS.Attribute, TAS.Attrib_Desc, CNT.Cnt_Attrib 
From IFSAPP.TECHNICAL_ATTRIB_STD TAS
LEFT JOIN
(Select Attribute, Count(*) as Cnt_Attrib FROM IFSAPP.TECHNICAL_ATTRIB_ALPHANUM GROUP BY Attribute
UNION ALL
SELECT Attribute, Count(*) as Cnt_Attrib FROM IFSAPP.TECHNICAL_ATTRIB_NUMERIC GROUP BY Attribute
) CNT ON CNT.Attribute = TAS.Attribute
ORDER BY NVL(CNT.Cnt_Attrib,0) DESC, Attribute)

SELECT '(''' || LISTAGG ( Attribute|| '''',',''') WITHIN GROUP (ORDER BY NVL(Cnt_Attrib,0) DESC, Attribute) || ')' as Pivot_In
FROM TECH_ATTRIB_CNT

 

With ENG_PART_TECH_CLS_ATTRIB as (
SELECT* FROM
(Select TSB.Technical_Spec_No, TSB.Technical_Class, TSB.Attribute
, REPLACE(TSB.Objtype,'TechnicalSpec',' ') || '; ' || TO_CHAR(NVL(TSB.Attrib_Number,'')) || '; ' || NVL(TSB.Attribute,'') || '; ' || CASE WHEN TSB.Objtype = 'TechnicalSpecNumeric' THEN NVL(TO_CHAR(TSB.Value_No),'') ELSE NVL(TSB.Value_Text,'') END as No_Attrib_Ref
FROM IFSAPP.TECHNICAL_SPECIFICATION_BOTH TSB)
ORDER BY Technical_Spec_No)

, -- new With
ENG_PART_TECH_CLS_ATTRIB_PIVOT AS (SELECT * FROM (

SELECT * FROM ENG_PART_TECH_CLS_ATTRIB )
PIVOT(
MIN(No_Attrib_Ref) FOR Attribute IN (

!!! ADD THE RESULT OF THE 1ST QUERY HERE !!!

)
)
)

SELECT PC.Part_No
, PC.Description
, PMP.Manufacturer_Name
, PMP.Manu_Part_No
--, TOR.Technical_Spec_No
, TCPV.*

FROM IFSAPP.PART_CATALOG PC
LEFT JOIN IFSAPP.ENG_PART_MASTER_MAIN EPM ON EPM.Part_No = PC.Part_No
LEFT JOIN IFSAPP.ENG_PART_REVISION EPR on EPM.Part_No = EPR.Part_No AND EPM.First_Revision = EPR.Part_Rev

LEFT JOIN IFSAPP.TECHNICAL_OBJECT_REFERENCE TOR on TOR.Key_Ref = 'PART_NO=' || EPM.Part_No || '^'
LEFT JOIN ENG_PART_TECH_CLS_ATTRIB_PIVOT TCPV on TCPV.Technical_Spec_No = TOR.Technical_Spec_No
LEFT JOIN (
SELECT MI.NAME as Manufacturer_Name, PMP.*
FROM IFSAPP.PART_MANU_PART_NO PMP
INNER JOIN IFSAPP.PART_MANUFACTURER PM ON PM.Manufacturer_No = PMP.Manufacturer_No AND PM.Part_No = PMP.Part_No
INNER JOIN IFSAPP.MANUFACTURER_INFO MI ON MI.Manufacturer_Id = PM.Manufacturer_No
WHERE PMP.Preferred_Manu_Part_Db = 'TRUE'
) PMP on PMP.Part_No = PC.Part_No

ORDER BY PC.Part_No

 

SELECT EPMM.Part_No
, CASE WHEN EPMM.Part_Main_Group is null THEN '' ELSE EPMM.Part_Main_Group ||' - '|| EPMG.Description END as Main_Group
, CASE WHEN TOR.Technical_Class is null THEN '' ELSE TOR.Technical_Class ||' - '|| NVL(TC.Description,'') END as TC
, TSB.Value_Text AS TYPE
, CASE WHEN TSB.Technical_Spec_No IS NOT NULL THEN Technical_Specification_API.Get_Summary1(TSB.Technical_Spec_No) ELSE '' END Characteristic_Attributes_Summary

FROM IFSAPP.ENG_PART_MASTER_MAIN EPMM
LEFT JOIN IFSAPP.ENG_PART_MAIN_GROUP EPMG ON EPMG.Part_Main_Group = EPMM.Part_Main_Group

LEFT JOIN IFSAPP.TECHNICAL_OBJECT_REFERENCE TOR ON TOR.Key_Ref = 'PART_NO='||EPMM.Part_No||'^'
LEFT JOIN IFSAPP.TECHNICAL_CLASS TC ON TC.Technical_Class = TOR.Technical_Class

LEFT JOIN (Select * FROM IFSAPP.TECHNICAL_SPECIFICATION_BOTH WHERE Attribute ='TYPE' AND Value_Text is not null) TSB ON TSB.Technical_Spec_No = TOR.Technical_Spec_No

 

 


Reply