Category Archives: API’s/Interfaces

Applying Holds Using OE_ORDER_PUB

Applying Holds on Sales Order Using Oe_order_pub.process_order

Find the existing Hold in oe_hold_definitions.

Tables Effected: oe_order_holds_all, oe_hold_sources_all

 Basic Information:

Following are the details of the requests used to apply hold to the sales Order Header or Line depending on the parameters passed to the Process_Order .
request_type –> OE_GLOBALS.G_APPLY_HOLD
Entity_code –> OE_GLOBALS.G_ENTITY_ORDER for order or OE_GLOBALS.G_ENTITY_LINE for line.
Entity_id –> ID of the order or line to be held
Param1 –> Hold ID to identify the type of hold that should be applied. (HOLD_ID from OE_HOLD_DEFINITIONS)
Param2 –> Hold entity code for the hold source to be created.

Hold Entity Code with Description:
C: Customer hold source
S: Bill To or Ship To hold source
I: Item hold source
O: Order hold source
W: Warehouse Hold Source
Param3 –> Hold entity ID
C, B, or S: for Org ID
O: Header ID
I: Inventory Item ID
param4 –> Hold comment
date_param1 –> Hold Until Date
parm6-param20 –> Attribute1-15 of the descriptive flex field associated with the hold source record.

–This is to create a hold on an order header
l_request_rec.entity_id := &Order Header ID;
l_request_rec.entity_code := OE_GLOBALS.G_ENTITY_HEADER;
l_request_rec.request_type := OE_GLOBALS.G_APPLY_HOLD;
— hold_id must be passed
l_request_rec.param1 := &Hold ID;
— indicator that it is an order hold
l_request_rec.param2 := ‘O’ ;
— Header ID of the order
l_request_rec.param3 := &Order Header ID;
l_action_request_tbl(l_line_tbl_index) := l_request_rec;

Sample API to Create Holds:

Result:

entity_id: 190411
param3: 190411
message is:
message index is:
l_return_status is: S
Process Order Success

Sample Script to test the API:

 

Related posts:

Importing Sales Order in Booked Status

Importing Sales Orders in Booked Status

Tables Effected: OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL, WSH_DELIVERY_DETAILS, MTL_DEMAND, MTL_RESERVATION

Sample Code for Creating Sales Orders in Booked status:

 Result:

START OF NEW DEBUG
Header_ID : 190406
message is: Order has been booked.
message index is: 1
Process Order Sucess

Scripts to verify the data from Backend:

 

Related posts:

TCA Important Messages

TCA Important Messages

MESSAGES FOR THE TCA API
Messages play an important role in the effectiveness of API calls. The appropriate messages must be raised at the right points in the processing to accurately describe the error that has occurred. In the TCA APIs all error messages are put on the message stack during execution and can be retrieved by the caller.
Number
Code
Message
96273
HZ_API_ACCOUNT_NUMBER_AUTO_ON
User cannot pass the account number because account number auto-generation is enabled.
294227
HZ_API_ACCT_SITEUSE_MISMATCH
The site use must belong to the customer account.
294228
HZ_API_ACCT_SITE_MISSMATCH
The site must belong to the customer account.
294224
HZ_API_BILL_TO_SITE_USE_F
The site use referenced by this bill_to_site_use_id must be active bill-to
294225
HZ_API_BILL_TO_SITE_USE_S
User can only assign bill_to_site_use_id when the current account site use purpose is ship-to.
294015
HZ_API_CLA_CAT_WHERE
The &OWNER_TABLE_ID record ID from the &OWNER_TABLE owner table cannot be validated against the database. Most of the time
294220
HZ_API_COLUMN_SHOULD_BE_NULL
The &COLUMN column in the &TABLE table must be null. Please change the value of the column to null.
96274
HZ_API_DATE_GREATER
&DATE2 cannot be earlier than &DATE1.
96242
HZ_API_DUPLICATE_COLUMN
Value for &COLUMN must be unique.
294237
HZ_API_DUPLICATE_RECORD
The time range of this preference overlaps with the existing preference &COLUMN=&ID in the &TABLE table. Please enter a different preference or update the existing preference (&COLUMN=&ID).
96279
HZ_API_HOOK_ERROR
The following error occurred in procedure &PROCEDURE:
294115
HZ_API_INACTIVE_NOT_PRIMARY
An inactive contact point cannot be the primary contact point.
294219
HZ_API_INACTIVE_PROFILE_CLASS
The customer profile class &NAME is inactive. Please select another profile class for the customer profile.
294067
HZ_API_INVALID_COMBINATION
Backward relationship code must be the same for all records of a specified combination of forward relationship code
96249
HZ_API_INVALID_FK
Invalid value for &FK. Please enter &COLUMN value from &TABLE.
96244
HZ_API_INVALID_LOOKUP
Value for &COLUMN must be a value defined in lookup type &LOOKUP_TYPE.
294005
HZ_API_LEAF_ONLY_NOT_ALLOWED
One or more associations use the parent codes of &CLASS_CATEGORY class category.
96243
HZ_API_MISSING_COLUMN
Column &COLUMN must have a value.
294009
HZ_API_MULTI_PARENT_FORBID
The &CLASS_CODE3 class code cannot be a child of the &CLASS_CODE2 class code because the &CLASS_CATEGORY category does not allow multiple parents during a specific date range. The &CLASS_CODE2 class code is a child of the &CLASS_CODE1 class code in the &
294223
HZ_API_NEGATIVE_PROFILE_CLASS
The profile class ID must be positive. Please enter a positive number for the profile class ID.
96246
HZ_API_NONUPDATEABLE_COLUMN
User cannot update column &COLUMN.
96277
HZ_API_NONUPDATEABLE_TO_NULL
User cannot update column &COLUMN to null.
294218
HZ_API_NO_DEFAULT_PROF_CLASS
Cannot find the default customer profile class (profile class ID = 0). Please use a different profile class.
96247
HZ_API_NO_RECORD
No &RECORD was found for ID &VALUE.
294221
HZ_API_OBSOLETE_COLUMN
The &COLUMN column is obsolete. Users are not allowed to pass a value to this column.
294249
HZ_API_ONE_NATIVE_PER_PARTY
Each party can have only one native language. Please change any existing native language to non-native before making this the native language
96278
HZ_API_OTHERS_EXCEP
The following SQL error occurred:
96271
HZ_API_PARTY_NUMBER_AUTO_ON
User cannot pass the party number because the profile option HZ:Generate Party Number is either null or is set to Yes.
294222
HZ_API_PARTY_OBJECT_MISMATCH
For a contact, the party ID of the party site must be the same as the object ID of the relationship. Please change either the party site or the object ID.
96272
HZ_API_PARTY_SITE_NUM_AUTO_ON
Users cannot pass the party site number because the profile option HZ:Generate Party Site Number is either null or is set to Yes.
294250
HZ_API_PRIMARY_PER_ENTITY
Each &ENTITY2 can have only one primary &ENTITY1. Please change any existing primary &ENTITY1 to non-primary before making this record primary
294229
HZ_API_PROF_AMT_IDS_MISMATCH
The &ENTITY ID of the profile amount must be the same as the &ENTITY ID of the customer profile.
96245
HZ_API_RECORD_CHANGED
This record in table &TABLE cannot be locked as it has been updated by another user.
96821
HZ_API_SIC_CODE_TYPE_OTHER
This value for the column sic_code_type is allowed only if the column content_source_type has the value USER_ENTERED.
96820
HZ_API_SIC_CODE_TYPE_REQUIRED
Please set both the sic_code and sic_code_type columns if one of these columns already has a value.
294007
HZ_API_SIN_ASS_NOT_ALLOWED
Users cannot have any records with more than one class code from the &CLASS_CATEGORY category during a specific date range. The &OWNER_TABLE_ID ID from the &OWNER_TABLE table from the &CONTENT_SOURCE_TYPE source has class codes &CLASS_CODE1 from &START1 to
294006
HZ_API_SIN_PAR_NOT_ALLOWED
The &CLASS_CATEGORY category cannot update because the &CLASS_CODE3 class code in the &CLASS_CATEGORY category cannot have multipleparents during a specific date range. The &CLASS_CATEGORY category has parent class codes &CLASS_CODE1 from &START1 to &END
294251
HZ_API_SIZE_ERROR
The size of the &COLUMN column cannot be more than &SIZE characters. Please pass a value of &SIZE or fewer characters.
96248
HZ_API_START_DATE_GREATER
End date cannot be earlier than the start date.
96250
HZ_API_SUBJECT_OBJECT_IDS
Subject ID and object ID cannot refer to the same party ID.
96965
HZ_API_UNIQUE_PRIMARY_ORG_CONT
For this party, a primary contact is already defined for this type of role.
96291
HZ_API_UNIQUE_PRIMARY_ROLE
A Primary role is already defined for this org contact.
96292
HZ_API_UNIQUE_ROLE_TYPE
A role of this type is already defined for this org contact.
96695
HZ_API_UNIQUE_SITE_USE_TYPE
A site use of this type is already defined for this party site.
294014
HZ_API_USE_TAB_CAT
There is no association between &OWNER_TABLE owner table and &CLASS_CATEGORY class category in HZ_CLASS_CATEGORY_USES. Please contact the applications administrator.
96815
HZ_COUNTRY_CODE_NOT_DEFINED
User have passed a Raw Phone Number without a Country Code or the Country Code that does not exist.
294239
HZ_CP_REC_NOT_FOUND
Updates to this field require that an update be made to a corresponding record in the HZ_CONTACT_PREFERENCES table. This field cannot be updated because no record in the HZ_CONTACT_PREFERENCES table corresponds to record (&PRIMARY_KEY= &ID) in the &SOURC
294230
HZ_CUST_ACCT_ROLE_PRIMARY
A primary account role already exists for this &ENTITY. User cannot make this account role primary.
294233
HZ_INVALID_CONTACT_LEVEL_TABLE
The contact level table for the &CONTACT_TYPE type of contact can not be &CONTACT_LEVEL_TABLE. Please assign a valid contact level table to the &CONTACT_TYPE type of contact.
294232
HZ_INVALID_CONTACT_TYPE
The &INCORRECT_CONTACT_TYPE contact type can not be assigned to the contact point of type &CONTACT_POINT_TYPE.
294065
HZ_INVALID_DIRECTION_CODE
If the forward and backward relationship codes are the same, the direction code must be N which indicates a non-directional relationship.
294068
HZ_INVALID_DIRECTION_CODE1
If the forward relationship code and the backward relationship code are the same, then the direction code must be N (Non-directional).
294069
HZ_INVALID_DIRECTION_CODE2
If the forward relationship code and the backward relationship code are different, then the direction code must be either P (Parent) or C(Child).
96816
HZ_INVALID_PHONE_PARAMETER
Either a Raw Phone Number or the Area Code and Phone Number should be passed.
294112
HZ_MULTIPLE_PREFERENCES
User cannot pass multiple preference values. Please pass only one preference value from one of the VALUE_VARCHAR2
294238
HZ_NONUPDATEABLE_PREF_DATE
Dates cannot be updated to a time earlier than the current date. Please enter a date after &SYS_DATE.
294113
HZ_NO_PREFERENCE
User must pass at least one preference value. Please pass one preference value from one of the VALUE_VARCHAR2
294066
HZ_NO_REL_TYPE
This relationship type is not valid for the given subject type and object type.
96814
HZ_PHONE_FORMAT_NOT_DEFINED
User have passed a Raw Phone Number and the Country Code. No Phone Format could be found. Please check the Phone Format setup.
294072
HZ_RELATIONSHIP_DATE_OVERLAP
User cannot create a relationship for a time period that overlaps the time period of an existing relationship with the same subject id
294114
HZ_SINGLE_VALUE_PREFERENCE
User cannot create multiple preference values for a single-value preference code.
294070
HZ_VALUES_NOT_SUPPORTED
User cannot set the &FIELD to &VALUE. This option is not currently available.

Related posts:

Sales Order API with Credit Card Payment

Sales Order API with Credit Card Information

Tables Effected:

OE_ORDER_HEADERS_ALL,
OE_ORDER_LINES_ALL,
OE_PAYMENTS

Import Sales Order with importing Credit Card type payment. One Sales Order Header can have multiple prepayments.

Sample Script used to Create a Sales Order with credit card Payment:

 Result:

START OF NEW DEBUG
OM Debug file: /dbfiles/applcsf/log/l4038887.dbg
Header_ID : 204656
Process Order Sucess

Scripts to Verify the data:

 

Related posts:

Sales Order API

Create Sales Order Using OE_ORDER_PUB

Create Sales Order Using OE_ORDER_PUB.PROCESS_ORDER.

Result:

START OF NEW DEBUG
OM Debug file: /dbfiles/applcsf/log/l0038873.dbg
Header_ID : 204640
Process Order Sucess

Scripts to Verify the Data from Back end:

Select * from oe_order_headers_all where header_id = 204640;

Select * from oe_order_lines_all where header_id = 204640;

 

Related posts: