Get the App
SLTechnology News&Howtos  ›  Database  › 

EBS uses API to update material properties Inv_Item_Grp

Shulou Source: shulou.com Published: 2022-06-01 17:33:17 10月02日 Update

Use the standard API Inv_Item_Grp to update item attributes. You can modify most fields, including item code, item description and other attributes.

Unmodifiable fields:PRIMARY_UNIT_OF_MEASURE, TRACKING_QUANTITY_IND, ONT_PRICING_QTY_SOURCE, SECONDARY_UNIT_CODE, SECONDARY_DEFAULT_IND, DUAL_UNIT_DEVIATION_HIGH, DUAL_UNIT_DEVIATION_LOW and ENGINEERING_ITEM_FLAG.

The script is as follows:

DECLARE l_Item_Rec Inv_Item_Grp.Item_Rec_Type; x_Item_Rec Inv_Item_Grp.Item_Rec_Type; x_Error_Tbl Inv_Item_Grp.Error_Tbl_Type; x_Return_Status VARCHAR2(1);BEGIN Fnd_Global.Apps_Initialize(User_Id => 0, Resp_Id => 20634, Resp_Appl_Id => 401); --Item l_Item_Rec.Inventory_Item_Id := 3374628; l_Item_Rec.Organization_Id := 176; --Modifiable: l_Item_Rec.Segment1 := 'CCITSpeed001-1'; --Non-modifiable fields:PRIMARY_UNIT_OF_MEASURE, TRACKING_QUANTITY_IND, ONT_PRICING_QTY_SOURCE, SECONDARY_UNIT_CODE, SECONDARY_DEFAULT_IND, DUAL_UNIT_DEVIATION_HIGH, DUAL_UNIT_DEVIATION_LOW and ENGINEERING_ITEM_FLAG --API Inv_Item_Grp.Update_Item(p_Commit => Fnd_Api.g_False, p_Item_Rec => l_Item_Rec, x_Item_Rec => x_Item_Rec, x_Return_Status => x_Return_Status, x_Error_Tbl => x_Error_Tbl); Dbms_Output.Put_Line('x_Return_Status:' || x_Return_Status); --Result IF x_Return_Status Fnd_Api.g_Ret_Sts_Success THEN -- ROLLBACK; FOR i IN 1 .. x_Error_Tbl.Count LOOP Dbms_Output.Put_Line('Transaction ID :' || x_Error_Tbl(i) .Transaction_Id); Dbms_Output.Put_Line('Unique ID :' || x_Error_Tbl(i) .Unique_Id); Dbms_Output.Put_Line('Message Name :' || x_Error_Tbl(i) .Message_Name); Dbms_Output.Put_Line('Message Text: :' || x_Error_Tbl(i) .Message_Text); Dbms_Output.Put_Line('Table Name :' || x_Error_Tbl(i) .Table_Name); Dbms_Output.Put_Line('Column Name :' || x_Error_Tbl(i) .Column_Name); Dbms_Output.Put_Line('Organization ID :' || x_Error_Tbl(i) .Organization_Id); END LOOP; IF (x_Return_Status = Fnd_Api.g_Ret_Sts_Unexp_Error) THEN RAISE Fnd_Api.g_Exc_Unexpected_Error; ELSIF (x_Return_Status = Fnd_Api.g_Ret_Sts_Error) THEN RAISE Fnd_Api.g_Exc_Error; END IF; ELSE -- COMMIT; Dbms_Output.Put_Line('ok:' || x_Item_Rec.Item_Number); END IF;END;

Tested.

Tags: Items fields properties updates most standards coding scripts tests Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia OPPO Reno Docker vpn