ORACLE EBS 物料事务处理分配行可以使用哪个API创建,提供一个完整的DECLARE示例
时间: 2024-03-28 17:39:51 浏览: 88
您可以使用以下 API 创建 ORACLE EBS 物料事务处理分配行:
API 名称:INV_MATERIAL_TXN_PUB.CREATE_TRANSACTION
下面是一个完整的 DECLARE 示例:
DECLARE
l_calling_module VARCHAR2(240) := 'API Test';
l_transaction_source_name VARCHAR2(30) := 'API Test';
l_transaction_type_name VARCHAR2(30) := 'Miscellaneous Receipt';
l_organization_id NUMBER := 204;
l_subinventory_code VARCHAR2(10) := 'FG';
l_locator_id NUMBER := NULL;
l_item_code VARCHAR2(240) := 'TEST_ITEM';
l_lot_number VARCHAR2(80) := '1234';
l_transaction_quantity NUMBER := 1;
l_uom_code VARCHAR2(3) := 'EA';
l_transaction_date DATE := SYSDATE;
l_source_document_type VARCHAR2(30) := NULL;
l_source_document_number VARCHAR2(60) := NULL;
l_transaction_reference VARCHAR2(240) := 'API Test Reference';
l_error_code NUMBER;
l_error_message VARCHAR2(240);
BEGIN
INV_MATERIAL_TXN_PUB.CREATE_TRANSACTION(
p_api_version => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_FALSE,
p_validation_level => 5,
p_calling_module => l_calling_module,
p_transaction_source_name=> l_transaction_source_name,
p_transaction_type_name => l_transaction_type_name,
p_organization_id => l_organization_id,
p_subinventory_code => l_subinventory_code,
p_locator_id => l_locator_id,
p_item_code => l_item_code,
p_lot_number => l_lot_number,
p_transaction_quantity => l_transaction_quantity,
p_uom_code => l_uom_code,
p_transaction_date => l_transaction_date,
p_source_document_type => l_source_document_type,
p_source_document_number => l_source_document_number,
p_transaction_reference => l_transaction_reference,
p_error_code => l_error_code,
p_error_message => l_error_message
);
IF l_error_code = 0 THEN
COMMIT;
dbms_output.put_line('Transaction created successfully');
ELSE
dbms_output.put_line('Error creating transaction: ' || l_error_message);
END IF;
END;
阅读全文