Monday, August 31, 2009

Oracle Inventory Item Category Creation In R12

The following api creates the new category for an item.
These are the minimum parameter required for item category upload
Note that the segment provided is flexfield segments and has to be predefined.
The API further creates the new category with the segment provided.


L_CATEGORY_REC := NULL;
L_CATEGORY_REC.STRUCTURE_ID := 99
L_CATEGORY_REC.STRUCTURE_CODE := 'ITEM_CATEGORIES';
L_CATEGORY_REC.SUMMARY_FLAG := 'N';
L_CATEGORY_REC.ENABLED_FLAG := 'Y';
L_CATEGORY_REC.SEGMENT1 := I.SEGMENT1;
L_CATEGORY_REC.SEGMENT2 := I.SEGMENT2;
INV_ITEM_CATEGORY_PUB.CREATE_CATEGORY
(
P_API_VERSION => 1.0,
P_INIT_MSG_LIST => FND_API.G_FALSE,
P_COMMIT => FND_API.G_TRUE,
X_RETURN_STATUS => O_RETURN_STATUS,
X_ERRORCODE => O_ERRORCODE,
X_MSG_COUNT => O_MSG_COUNT,
X_MSG_DATA => O_MSG_DATA,
P_CATEGORY_REC => L_CATEGORY_REC,
X_CATEGORY_ID => X_CATEGORY_ID --returns category id
);

No comments:

Post a Comment