IDENT_DESC - Intergraph Smart Materials - Version 2020 (10.0) - Customization & Programming - Hexagon PPM

Intergraph Smart Materials Customization (2020)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Customization & Programming
Smart Materials/Smart Reference Data Version
2020 (10.0)

Description:

This function returns the description of an ident.

Type:

Function

Usage:

AS.10.02, AS.30.01, B.20.01, B.20.01.55, B.20.03, B.40.23, B.40.24, C.10.19, C.20.01, C.20.01.01, C.20.01.02, C.20.03, C.20.04, C.20.08, C.20.09.01, C.20.09.05, C.20.11, C.20.12, C.20.13, C.20.14, C.20.14LOV, C.20.15, C.20.15.01, C.20.16, C.20.17, C.20.17.01, C.20.17.02, C.20.19, C.20.20, C.20.20.02, C.20.21, C.20.21.01, C.20.22, C.20.22.02, C.20.23, C.20.23.02, C.20.25, C.20.25.02, C.20.26, C.20.27, C.20.29, C.20.34, C.20.35, C.30.03, C.30.31, C.40.01, E.10.02, J.30.03, P.10.43, P.30.03, P.30.04, P.30.05, P.30.21, P.30.22, P.30.23, P.30.24, P.30.35, P.30.27, P.30.R.12, P.50.07, P.50.16, P.60.11, P.60.52, P.70.21, P.70.31, P.70.51, P.70.72, P.70.74, P.70.75, P.80.01, P.80.11, P.80.21, P.80.22, P.80.51, P.90.11, PT.20.01, PT.20.21, PT.30.03, R.20.01, R.30.01, S.01.01, S.50.R.07, S.70.03, S.70.04, S.80.01, S.80.13, S.80.21, S.80.22, S.80.31

Event:

Default:

ident_desc(p_ident, mpck_login.nls_id)

Find below sample code for ident_desc.

FUNCTION IDENT_DESC

(p_ident IN NUMBER,

p_nls_id IN NUMBER)

RETURN VARCHAR2

IS

p_add_on VARCHAR2(2000);

RETURN_DESC VARCHAR2(2000);

CURSOR C IS

SELECT ltrim(decode(inn.short_desc,'-',null,inn.short_desc)

||' '|| SUBSTR ( ccn.layout_short, 1, 1744 ))

FROM m_commodity_code_layouts Ccn

,M_IDENT_nls Inn

,M_IDENTS I

WHERE I.IDENT = p_IDENT

AND i.ident = inn.ident(+)

AND inn.nls_id (+) = p_nls_id

AND i.commodity_id = ccn.commodity_id(+)

AND ccn.nls_id (+) = p_nls_id

;

cursor c_ident_values is

select ' '||attr_code||':'||attr_value

from m_attrs a,

m_ident_values iv

where iv.ident=p_ident

and iv.attr_id=a.attr_id

order by a.attr_code

;

BEGIN

OPEN C;

FETCH C INTO return_Desc;

CLOSE C;

open c_ident_values

Loop

fetch c_ident_values into p_add_on;

exit when c_ident_values%notfound;

return_desc:=substr(return_desc||p_add_on,1,2000);

end loop;

close c_ident_values;

RETURN return_desc;

END IDENT_DESC;

To use this CIP, you must define at least one attribute, assign it to the idents and specify values for this attribute.

For example, define the CATALOG# attribute on A.50.01 Attributes. Next, assign this attribute to idents on the S.80.12 OII – Imported Idents screen as shown below.

S8012Attribute

In our example, the ident description will now be displayed in all above mentioned screens as shown below.

R3001IdentDesc