API - Customer Additional Information (Price List , Payment Terms ,Sales Type

)
CREATE OR REPLACE procedure APPS.XX_CUSTOMER_ADDITIONAL_LOAD IS p_cust_site_use_rec HZ_CUST_ACCOUNT_SITE_V2PUB.CUST_SITE_USE_REC_TYPE; x_return_status VARCHAR2(2000); x_msg_count NUMBER; xio_p_object_version NUMBER; x_msg_data VARCHAR2(2000); v_site_use_id NUMBER; V_OBJECT_VERSION NUMBER; BEGIN -FND_GLOBAL.APPS_INITIALIZE(<user_id>,<resp_id>,<resp_applic arion_id>); -MO_GLOBAL.INIT('AR'); -MO_GLOBAL.SET_POLICY_CONTEXT('S', <org_id>); FND_GLOBAL.APPS_INITIALIZE(1535,50930,222); MO_GLOBAL.INIT('AR'); MO_GLOBAL.SET_POLICY_CONTEXT('S', 1210); BEGIN HCSU.SITE_USE_ID, HCSU.OBJECT_VERSION_NUMBER INTO V_SITE_USE_ID, V_OBJECT_VERSION FROM HZ_PARTIES HP, HZ_PARTY_SITES HPS, HZ_CUST_ACCT_SITES_ALL HCAS, HZ_CUST_SITE_USES_ALL HCSU WHERE HP.PARTY_ID = HPS.PARTY_ID AND HPS.PARTY_SITE_ID = HCAS.PARTY_SITE_ID AND HCAS.CUST_ACCT_SITE_ID =HCSU.CUST_ACCT_SITE_ID AND HCSU.SITE_USE_CODE = 'BILL_TO' AND ltrim(rtrim(upper(HP.PARTY_NAME)))= ltrim(rtrim(upper('SSE Test Customer'))); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('ERROR IS'|| SUBSTR(SQLERRM,1,150)); END; SELECT

p_cust_site_use_rec.site_use_id:= -- Site USe to be updated xio_p_object_version := --xio_p_object_version := 1;

V_SITE_USE_ID; V_OBJECT_VERSION;

p_cust_site_use_rec.price_list_id := 98202; -- SSE Standard p_cust_site_use_rec.payment_term_id := 1000 ; -- 90 Days p_cust_site_use_rec.order_type_id := 1193; --SSE Duabi Showroom Cash Sales hz_cust_account_site_v2pub.update_cust_site_use( 'T', p_cust_ site_use_rec, xio_p_o bject_version, x_retur n_status, x_msg_c ount, x_msg_d ata); dbms_output.put_line('***************************'); dbms_output.put_line('Output information ....'); dbms_output.put_line('x_return_status: '|| x_return_status); dbms_output.put_line('x_msg_count: '||x_msg_count); dbms_output.put_line('xio_p_object_version: '|| xio_p_object_version); dbms_output.put_line('x_msg_data: '||x_msg_data); dbms_output.put_line('***************************'); COMMIT; END; /
Posted by Sarfaraz at 12:04 PM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: Receivables (AR)

Reactions:

API - User Security Attribute Creation

declare x_return_status VARCHAR2(2000); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); x_vendor_site_id number; begin icx_user_sec_attr_pub.create_user_sec_attr( p_api_version_number => 1, p_return_status => x_return_status, p_msg_count => x_msg_count, p_msg_data => x_msg_data, p_web_user_id => 1394, p_attribute_code => 'ICX_SUPPLIER_ORG_ID', p_attribute_appl_id => 177, ----iSupplier Portal p_varchar2_value => '', p_date_value => '', p_number_value => 493, -- Vendor_ID for ICX_SUPPLIER_ORG_ID'and Vendor_site_id for ICX_SUPPLIER_SITE_ID' attribute code p_created_by => -1, p_creation_date => sysdate, p_last_updated_by => -1, p_last_update_date => sysdate, p_last_update_login => -1); if (x_return_status <> 'S') then dbms_output.put_line('Encountered ERROR in Attribute Creation!!!'); dbms_output.put_line('-------------------------------------'); dbms_output.put_line(x_msg_data); IF x_msg_count > 1 THEN FOR i IN 1..x_msg_count LOOP dbms_output.put_line(substr(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ),1,255)); END LOOP; END IF; ELSE dbms_output.put_line('Attribute has been attached !!!!!!');

xx_create_new_item_category IS l_category_rec inv_item_category_pub. SEGMENT4 VARCHAR2(2000 BYTE).SEGMENT1||'.'|| M1.category_rec_type.'||M1.LANGUAGE = 'US' Table Structure CREATE TABLE XX_CREATE_NEW_CATEGORY ( STRUCTURE_ID NUMBER. VARCHAR2 (2000). end.CATEGORY_ID = M2. SEGMENT6 VARCHAR2(2000 BYTE) ) */ CURSOR c_cat IS SELECT * FROM xx_create_new_category.'|| M1. SEGMENT1 VARCHAR2(2000 BYTE).end if.Inventory Item Category Combination Creation CREATE OR REPLACE PROCEDURE APPS.SEGMENT4||'.SEGMENT2||'. SEGMENT5 VARCHAR2(2000 BYTE). .SEGMENT5||'.SEGMENT3||'.SEGMENT6 FROM MTL_CATEGORIES_B M1. MTL_CATEGORIES_TL M2 WHERE M1. SEGMENT3 VARCHAR2(2000 BYTE). l_api_version o_return_status o_msg_count o_msg_data NUMBER. Posted by Sarfaraz at 11:56 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: SYS ADMIN Reactions: API . SEGMENT2 VARCHAR2(2000 BYTE). /* Query to check results SELECT M1. VARCHAR2 (2000). NUMBER.CATEGORY_ID AND M2.'||M1.'||M1.

g_false.0.segment2).g_true. l_category_rec.segment6 := TO_CHAR (i.apps_initialize (1130. l_category_rec. l_category_rec.structure_id := i. FOR i IN c_cat LOOP l_category_rec := NULL.segment4).segment4 := TO_CHAR (i. x_errorcode => o_errorcode. (2000). 50634. p_init_msg_list => fnd_api. (2000). x_msg_count => o_msg_count.segment6). l_category_rec. (2000).segment1 := TO_CHAR (i. l_category_rec.enabled_flag := 'Y'.o_errorcode l_error_code l_error_desc l_conv_status v_category_id VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 NUMBER. inv_item_category_pub.create_category (p_api_version => 1.segment3). l_category_rec. l_category_rec.structure_id.summary_flag := 'N'. --. l_category_rec.After the category record is loaded. 401). BEGIN fnd_global.segment2 := TO_CHAR (i.structure_code := g_cat_flex_code. p_commit => fnd_api.segment1).segment5). x_return_status => o_return_status.create the new mtl_categories record. then call the create_category api to -. --l_api_version. l_category_rec. . x_msg_data => o_msg_data. -inventory super user > setup > items > categories > Query The Category Set > get the Struture id from Examine -l_category_rec. (2000).segment3 := TO_CHAR (i.segment5 := TO_CHAR (i.

IF o_return_status = 'S' THEN DBMS_OUTPUT.put_line ('API STATUS : ' || o_return_status).segment2|| '.get (p_encoded => fnd_api. DBMS_OUTPUT. '') || '#API Error while creating Category'.segment4|| '.segment3|| '.1.segment6|| SQLERRM). FOR i IN 1 . END IF. IF o_msg_count > 0 THEN DBMS_OUTPUT. END LOOP. '') || 'CATCONV005.'|| i.255)).segment3|| '. x_category_id => v_category_id ).'|| i. END.put_line ( 'Category successfully created.put_line ( 'Segment Combination = '|| i.'|| i.segment1|| '.'|| i.segment2|| '.'|| i. New Category Id = '|| v_category_id). ELSE l_error_code := NVL (l_error_code.g_false). DBMS_OUTPUT.'|| i. DBMS_OUTPUT. l_conv_status := 'ERROR'.'|| i.segment1|| '. DBMS_OUTPUT.put_line (o_msg_data). --l_category_rec.segment4|| '.put_line ( i|| '. / .put_line ('*****************'). END IF.put_line ('*****************').segment5|| '.segment5 || '.put_line ( 'Segment Combination = '|| i. l_error_desc := NVL (l_error_desc.put_line (o_errorcode).'|| i.'|| i. o_msg_count LOOP DBMS_OUTPUT.category_id). END LOOP..p_category_rec => l_category_rec.'|| SUBSTR(fnd_msg_pub. DBMS_OUTPUT.'|| i.segment6).'. DBMS_OUTPUT.

ORG_ID).101). end.Inventory Item Category Combination Creation.SET_POLICY_CONTEXT('S'. OCTOBER 21.init (<APPLICATION SHORT NAME>). S . Example : begin .Denotes that the current session will work for Single Org_id (101) M .SET_POLICY_CONTEXT(ACCESS_MODE.begin xx_create_new_item_category. end. end. Posted by Sarfaraz at 11:53 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: API .Denotes that the current session will work for Multiple Org_id METHOD 2: begin mo_global. end. Example: begin MO_GLOBAL. 2010 Setting Org Context Setting the Multi Org Context : METHOD 1: begin MO_GLOBAL. Inventory (INV) Reactions: THURSDAY.

51710). p_resp_appl_id).20004. resp_id => 20004. application_name from fnd_application fapp.APPS_INITIALIZE (user_id => 200131258.APPS_INITIALIZE(200131258. end. end.init ('AR'). . resp_appl_id and user_id select responsibility_id . end. upper('Application Developer' ) ) and language = 'US'. fnd_application_tl fappt where fapp. end. begin fnd_global.language = 'US' and application_name = 'General Ledger' ---------------------------------------------------------------- Setting the Application Context : METHOD 1: begin fnd_global. Query : select Application_short_name .responsibility_name from fnd_responsibility_tl where upper(responsibility_name) IN ( upper('Receivables Manager').mo_global.APPLICATION_ID = fappt. p_resp_id.application_id . resp_appl_id => 51710 ).application_id and fappt. Query to find resp_is . Example : begin fnd_global.apps_initialize(p_user_id.

Example begin dbms_application_info.GL Interface CREATE OR REPLACE PROCEDURE XX_GL_INTERFACE IS BEGIN .VALUE(‘USERNAME’) FROM dual SELECT FND_PROFILE.value (‘APPLICATION_ID’) FROM dual SELECT TO_NUMBER (FND_PROFILE. 2010 Open Interface .VALUE(‘ORG_ID’) FROM dual SELECT FND_PROFILE.VALUE(‘SO_ORGANIZATION_ID’) FROM dual SELECT FND_PROFILE.value (‘USER_ID’) FROM dual SELECT fnd_profile. OCTOBER 19.select user_id from fnd_user where upper(user_name) = 'SAIF'. SELECT fnd_profile. Posted by Sarfaraz at 12:50 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: Setting Org Context Reactions: TUESDAY.set_client_info('101').value (‘RESP_ID’) FROM dual SELECT fnd_profile.VALUE( ‘LOGIN_ID ‘)) FROM dual SELECT FND_PROFILE. end.set_client_info('<org id>'). end.VALUE(‘GL_SET_OF_BKS_ID’) FROM dual METHOD 2 : begin dbms_application_info.

CURRENCY_CONVERSION_DATE . USER_JE_CATEGORY_NAME . INSERT INTO GL_INTERFACE ( LEDGER_ID STATUS . -./* SELECT * FROM GL_INTERFACE MANDATORY FIELDS STATUS ACCOUNTING_DATE CURRENCY_CODE DATE_CREATED CREATED_BY ACTUAL_FLAG USER_JE_CATEGORY_NAME USER_JE_SOURCE_NAME */ -GL > JOURNALS > IMPORT > RUN . BUDGET_VERSION_ID ENCUMBRANCE_TYPE_ID . USER_JE_SOURCE_NAME . ACTUAL_FLAG . SET_OF_BOOKS_ID . ACCOUNTING_DATE . USER_CURRENCY_CONVERSION_TYPE . CURRENCY_CONVERSION_RATE . DATE_CREATED . CURRENCY_CODE . -. CREATED_BY .

REFERENCE4 REFERENCE5 ) values ( 2021 SELECT * FROM GL_SETS_OF_BOOKS 'Y' i. ACCOUNTED_DR . ENTERED_CR . . -. -SELECT * FROM GL_JE_SOURCES WHERE JE_SOURCE_NAME LIKE 'Manual' 'SSE Manual' . . -.SEGMENT1 . ACCOUNTED_CR .STATUS . PERIOD_NAME . -SELECT USER_JE_CATEGORY_NAME FROM GL_JE_CATEGORIES WHERE . SEGMENT6 SEGMENT7 SEGMENT8 SEGMENT9 . 2021 . SEGMENT5 . REFERENCE1 . REFERENCE2 . SEGMENT3 . SEGMENT2 . ENTERED_DR . SEGMENT4 . . -SELECT * FROM GL_SETS_OF_BOOKS (Trading Companies SOB) 'Manual' .

'' i. B . -i.ENCUMBRANCE_TYPE_ID . -. -SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT6 = 00 '01' .CURRENCY_CODE sysdate . -i.BUDGET_VERSION_ID '05' . = -01 -01 i. = .Encumbrance -.ACCOUNTING_DATE 'AED' .CURRENCY_CONVERSION_RATE '02' SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT1 '01' SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT2 '01' SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT3 . -. -.ACTUAL_FLAG -.CURRENCY_CONVERSION_DATE '' i.USER_JE_CATEGORY_NAME LIKE 'SSE%' SYSDATE .A Actual .i.user_id 'A' . -SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT8 = 981100 '00' . -fnd_global. -i.Budget E . -. -SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT7 = 01 '981100' . -= 02 . -SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT5 = 00 '00' . -SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT9 = 00 . -DATE_CREATED 1090 . -SELECT * FROM GL_CODE_COMBINATIONS_KFV WHERE SEGMENT4 = 05 '00' .USER_CURRENCY_CONVERSION_TYPE '' i.

-) -- Reactions: API .P_ORGANIZATION_ID NUMBER. -.g_true.Allocate and Transact Orders (Transact Move Orders) create or replace procedure XX_ALOCATE_TRANSACT_MOVE_ORDER (P_REQUEST_NUMBER VARCHAR2 .REFERENCE2 i.2300 i. -.ENTERED_DR 2300 i.0.g_false. Posted by Sarfaraz at 9:39 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: General Ledger (GL) .REFERENCE4 i. . l_return_values VARCHAR2 (2) := fnd_api.ALLOCATE MOVE ORDER API REQUIREMENTS ------------------------l_api_version NUMBER := 1. begin XX_GL_INTERFACE.ACCOUNTED_CR i. -. -- 'INSERTED BY CUSTOM GL INT' . -. end.g_false. -'INSERT' ( REFERENCE4 it takes in JE NAME 'SSE' . -. l_init_msg_list VARCHAR2 (2) := fnd_api.ACCOUNTED_DR 2300 i.ENTERED_CR 2300 i.REFERENCE5 ). l_commit VARCHAR2 (2) := fnd_api.REFERENCE1 'JUN-10' (PERIOD SHOULD BE SYSDATE i.PERIOD_NAME OPEN ) i. END.P_TRANSACTION_DATE varchar2) as ----------------.

x_msg_count NUMBER := 0. l_trolin_val_tbl inv_move_order_pub.0. a_x_trolin_tbl inv_move_order_pub. a_l_init_msg_list VARCHAR2 (2) := fnd_api. a_l_appl_id NUMBER. l_resp_id NUMBER . x_transaction_temp_id NUMBER .trolin_tbl_type.g_false. l_user_id NUMBER . x_expiration_date DATE. a_x_msg_data VARCHAR2 (255).trolin_tbl_type. x_trohdr_rec inv_move_order_pub. a_x_msg_count NUMBER := 0. l_row_cnt NUMBER := 1.TRANSACT MOVE ORDER API REQUIREMENTS ------------------------a_l_api_version NUMBER := 1.trolin_tbl_type.trohdr_rec_type. a_l_commit VARCHAR2 (2) := fnd_api.x_return_status VARCHAR2 (2). x_number_of_rows NUMBER . x_msg_data VARCHAR2 (255).g_true. l_trohdr_rec inv_move_order_pub. a_l_resp_id NUMBER. x_trolin_val_tbl inv_move_order_pub.trohdr_val_rec_type. a_l_mold_tbl inv_mo_line_detail_util.trolin_val_tbl_type. x_transfer_to_location NUMBER . a_l_user_id NUMBER.trohdr_rec_type. . l_trolin_tbl inv_move_order_pub. l_appl_id NUMBER . a_l_transaction_mode NUMBER := 1. a_x_return_status VARCHAR2 (2).trolin_val_tbl_type. a_l_move_order_type NUMBER := 3. a_l_trolin_tbl inv_move_order_pub.g_mmtt_tbl_type. x_trolin_tbl inv_move_order_pub. a_x_mmtt_tbl inv_mo_line_detail_util.trohdr_val_rec_type. l_validation_flag VARCHAR2 (2) := inv_move_order_pub. x_trohdr_val_rec inv_move_order_pub.g_mmtt_tbl_type.g_validation_yes. l_trohdr_val_rec inv_move_order_pub.trolin_tbl_type. a_l_transaction_date DATE := SYSDATE. ----------------.

mtl_txn_request_lines mtrl WHERE mtrh.request_number = P_REQUEST_NUMBER OR P_REQUEST_NUMBER IS NULL )--'8007' AND (mtrh. i.header_id = mtrl.mtrl.APPS_INITIALIZE(1130.header_id. CURSOR c_mo_details IS SELECT mtrh.put_line ('Calling INV_REPLENISH_DETAIL_PUB to Allocate MO'). BEGIN FND_GLOBAL. mtrl. mtrl. revision. mtrh. 50632.inventory_item_id.755.lot_number.line_id.header_id. mtrl. -. SELECT INTO FROM WHERE COUNT (*) x_number_of_rows mtl_txn_request_lines header_id = i.line_number.P_ORGANIZATION_ID)).mo_global.org_id). mtrl.from_locator_id.init ('INV').organization_id = P_ORGANIZATION_ID OR P_ORGANIZATION_ID IS NULL ). mtrl.organization_id) org_id FROM mtl_txn_request_headers mtrh. mtrh. (select distinct operating_unit from org_organization_definitions where organization_id = mtrh.quantity.header_id AND (mtrh.v_transaction_date date. -. FOR i IN c_mo_details LOOP mo_global.Allocate each line of the Move Order . mtrh.set_org_id (NVL(i.request_number.move_order_type. -.set_policy_context ('S'. inv_globals.organization_id.organization_id. DBMS_OUTPUT. 401).

move_order_type.line_id. DBMS_OUTPUT. x_locat or_id => i. x_retur n_status => x_return_status.lot_number. DBMS_OUTPUT. x_detai led_qty => i.put_line('================= ========================================='). x_numbe r_of_rows => x_number_of_rows. x_revis ion => i. x_lot_n umber => i. x_trans action_temp_id => x_transaction_temp_id. x_msg_c ount => x_msg_count. p_move_ order_type => i.from_locator_id. p_auto_ pick_confirm => FALSE.line_details_pub( p_line_ id => i. p_plan_ tasks => FALSE.revision. DBMS_OUTPUT.quantity. .put_line (x_msg_data). DBMS_OUTPUT. p_trans action_header_id => NULL. x_trans fer_to_location => x_transfer_to_location.put_line (x_return_status).inv_replenish_detail_pub. p_seria l_flag => fnd_api. x_msg_d ata => x_msg_data.put_line (x_msg_count).g_false. p_trans action_mode => NULL. x_expir ation_date => x_expiration_date. p_commi t => FALSE ).

put_line (x_transaction_temp_id).set_org_id (i. END IF.pick_confirm (p_api_vers ion_number => a_l_api_version.line_id := i.organization_id).line_id.IF (x_return_status <> fnd_api. DBMS_OUTPUT.put_line ('ALLOCATE API SUCCESSFUL WITH . -- FND_GLOBAL. mo_global. DBMS_OUTPUT. END IF. select to_date (P_TRANSACTION_DATE) ('31-AUG-2010') into from 401).Trx temp ID: '). .init ('INV').put_line('========================= =================================').APPS_INITIALIZE(1130. IF x_transaction_temp_id IS NOT NULL OR x_transaction_temp_id <> 0 THEN mo_global. inv_globals.org_id). i.g_ret_sts_success) THEN DBMS_OUTPUT.put_line (x_msg_data).set_policy_context ('S'. IF (x_return_status = fnd_api. 50632. p_init_msg_ list => a_l_init_msg_list.g_ret_sts_success) THEN DBMS_OUTPUT. a_l_trolin_tbl (1). inv_pick_wave_pick_confirm_pub. v_transaction_date dual.

p_mold_tbl => a_l_mold_tbl.put_line ('Return Message . x_return_st atus => a_x_return_status.put_line (a_x_msg_data).g_ret_sts_success) THEN DBMS_OUTPUT.'|| a_x_msg_data).put_line (a_x_msg_count). END IF.put_line('===================== =================================='). p_trolin_tb l => a_l_trolin_tbl.put_line ('TRANSACT API SUCCESSFULLY PROCESSED').put_line ('Return Status . x_mmtt_tbl => a_x_mmtt_tbl. IF (a_x_return_status <> fnd_api. . DBMS_OUTPUT. END IF. p_transacti on_mode => a_l_transaction_mode.l_transaction_date ). p_transacti on_date => v_transaction_date -.move_order_type. IF (a_x_return_status = fnd_api. DBMS_OUTPUT. p_move_orde r_type => i.'|| a_x_return_status||' '||sqlerrm).g_ret_sts_success) THEN DBMS_OUTPUT. DBMS_OUTPUT. x_msg_data => a_x_msg_data. x_msg_count => a_x_msg_count. x_trolin_tb l => a_x_trolin_tbl. DBMS_OUTPUT.p_commit => a_l_commit.

EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT. V_msg_summary VARCHAR2(3000). DBMS_OUTPUT. p_delivery_id NUMBER . p_init_msg_list VARCHAR2(2000). V_msg_data VARCHAR2(2000). END LOOP. V_return_status VARCHAR2(2000). V_init_msg_list VARCHAR(2000).DBMS_OUTPUT.put_line ('======================================================='). DBMS_OUTPUT. END.Ship Confirm of the Deliveries declare p_api_version_number NUMBER. begin .'31-AUG-2010'). Posted by Sarfaraz at 9:34 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: Order Management (ONT) Reactions: API .put_line (SQLCODE||':'||SQLERRM). V_trip_id VARCHAR2(30). V_trip_name VARCHAR2(30). END.put_line('===================== ==================================').763. p_action_code VARCHAR2(2000). begin XX_ALOCATE_TRANSACT_MOVE_ORDER(''. END IF.put_line ('OUTER Exception Occured :'). end. V_msg_count NUMBER. V_msg_details VARCHAR2(3000).

put_line(V_msg_details).Inventory Item Creation DECLARE X_INVENTORY_ITEM_ID X_ORGANIZATION_ID X_RETURN_STATUS X_MSG_DATA X_MSG_COUNT LX_MSG_INDEX_OUT BEGIN NUMBER. TRANSACTION SCREEN p_action_code :='CONFIRM'. NUMBER. NUMBER. V_msg_summary. V_msg_count). x_return_status => V_return_status. x_msg_count => V_msg_count. NUMBER. END IF. dbms_output. V_msg_details. x_msg_data => V_msg_data. x_trip_id => V_trip_id. Posted by Sarfaraz at 9:07 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: Order Management (ONT) Reactions: API . IF (V_return_status <> WSH_UTIL_CORE.get_messages('Y'. end. VARCHAR2(4000).Delivery_Action( p_api_version_number => 1. x_trip_name => V_trip_name).p_delivery_id := 7102. p_action_code => p_action_code.G_RET_STS_SUCCESS) THEN WSH_UTIL_CORE. p_delivery_id => p_delivery_id.dELIVERY ID FROM SALES WSH_DELIVERIES_PUB. VARCHAR2(4000).0. p_init_msg_list => V_init_msg_list. -. .

RESP _APPL_ID=>NULL).WAREHOUSE ORGANIZATION ID --. p_Inventory_Item_Status_Code => 'Active' . p_Transaction_Type -. dbms_output. p_long_description -.. x_msg_data => x_msg_data ). p_commit => 'T' => 'CREATE' => 'XYZABC' => 'CREATED BY API' => 'CREATED FOR LONG' => 755 => 2 .FND_GLOBAL. p_segment1 -. p_approval_status => 'A' . p_data => x_msg_data. FOR j in 1 . x_return_status => x_return_status . p_encoded => 'F'.Get(p_msg_index => j. dbms_output. p_msg_index_out => lx_msg_index_out).ITEM LONG DESCRIPTION . x_inventory_item_id => x_inventory_item_id . x_msg_count LOOP FND_MSG_PUB. .put_line(x_msg_data). x_organization_id => x_organization_id .process_item ( => 1. p_organization_id -.put_line(x_msg_data). p_description -.ITEM CODE . x_msg_count => x_msg_count . P_TEMPLATE_ID p_api_version .RESP_ID=>NULL. p_init_msg_list .UPDATE FOR Updating item . ego_item_pub.APPS_INITIALIZE(USER_ID=>1832.0 => 'T' .ITEM DESCRIPTION . end loop.

CREATE_CATEGORY_ASSIGNMENT ( P_API_VERSION P_INIT_MSG_LIST P_COMMIT X_RETURN_STATUS X_ERRORCODE X_MSG_COUNT X_MSG_DATA P_CATEGORY_ID 1355. BEGIN --Apps Initialization is available in another section. id to be assigned => 1. Use the below link to know in detail -Apps_Initialize. => X_MSG_COUNT.G_FALSE. => X_ERRORCODE.G_FALSE. end. => FND_API.if x_return_status = 'S' dbms_output. => FND_API. X_MSG_COUNT NUMBER.Assign Categries to Inventory Items DECLARE X_RETURN_STATUS VARCHAR2(1000).put_line('ITEM CREATION SUCCESSFUL').Category . X_MSG_DATA VARCHAR2(1000).0. L_ERROR_MESSAGE VARCHAR2(2000). => -. X_MSG_INDEX_OUT VARCHAR2(2000). end if. X_ERRORCODE NUMBER. INV_ITEM_CATEGORY_PUB. => X_MSG_DATA. Posted by Sarfaraz at 9:00 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: Inventory (INV) Reactions: API . => X_RETURN_STATUS.

. END LOOP.g_ret_sts_success THEN COMMIT. END IF. Id P_ORGANIZATION_ID 755). => x_msg_data. DBMS_OUTPUT. => -.Warehouse IF x_return_status = fnd_api.get (p_msg_index p_encoded p_data p_msg_index_out => 'F'.PUT_LINE('x_msg_data:= ' || x_msg_data).get (p_msg_index p_encoded p_data => 'F'. ELSE --Only one error fnd_msg_pub.count_msg > 1) THEN FOR k IN 1 . ELSE BEGIN IF (fnd_msg_pub. fnd_msg_pub.put_line ('Item Category Assignment using API is Successful'). IF x_msg_data IS NOT NULL THEN l_error_message := l_error_message || '-' || x_msg_data. P_INVENTORY_ITEM_ID 25803.P_CATEGORY_SET_ID 1100000043. => x_msg_index_out ). DBMS_OUTPUT.Category Set id => -. => k. => 1.count_msg LOOP fnd_msg_pub. => x_msg_data.Inventory Item => -..

trans_rec_type.asset_fin_rec_type. l_asset_hdr_rec FA_API_TYPES. l_asset_fin_mrc_tbl_new FA_API_TYPES.inv_rate_tbl_type. DBMS_OUTPUT. END. ROLLBACK. END.asset_fin_rec_type. Posted by Sarfaraz at 8:56 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: Inventory (INV) 'Error encountered by the Reactions: API .asset_hdr_rec_type. -.inv_trans_rec_type. l_error_message := x_msg_data. l_asset_fin_rec_new FA_API_TYPES.put_line ( API is ' || l_error_message ).1.put_line ( 'Error encountered by the API is ' || l_error_message ). l_asset_fin_rec_adj FA_API_TYPES.200)). .alter trigger JAI_FA_MA_BRIUD_T1 enable. END IF. EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT. END IF.put_line('Error in Assigning Category to an Item and error is '||SUBSTR(SQLERRM.p_msg_index_out => x_msg_index_out ). l_inv_trans_rec FA_API_TYPES. l_inv_tbl FA_API_TYPES.asset_fin_tbl_type.Update Cost and Life (in months) of an ASSET declare -. l_inv_rate_tbl FA_API_TYPES.alter trigger JAI_FA_MA_ARIUD_T1 enable. EXCEPTION WHEN OTHERS THEN l_error_message := SQLERRM.inv_tbl_type. l_trans_rec FA_API_TYPES. DBMS_OUTPUT.

book_type_code := 'SSE FA REGISTER'. dbms_output.group_reclass_options_rec_type.fin info --l_asset_fin_rec_adj.asset_deprn_rec_type. from FA_METHODS FA_ADJUSTMENT_PUB.asset_hr_attr_rec_type.G_FALSE. -Book Name from FA_BOOKS -. --l_new_life FA_API_TYPES.cost := 500000.Initialize. p_init_msg_list => FND_API.life_in_months := 35. l_mesg_count number := 0.inv_rec_type. l_inv_rec FA_API_TYPES. -Asset Id from fa_additions l_asset_hdr_rec.put('PRINT_DEBUG'. ---should be a value : life_in_months from : select METHOD_CODE . l_asset_deprn_rec_new FA_API_TYPES.do_adjustment (p_api_version => 1. l_group_reclass_options_rec FA_API_TYPES. 5 year 60 l_asset_fin_rec_adj. FA_SRVR_MSG.l_asset_deprn_rec_adj FA_API_TYPES.0. LIFE_IN_MONTHS from fa_methods where method_code like 'STL' ---should be in the denomination of years if oracle standard used like 1 year = 12 .asset_deprn_tbl_type.asset_deprn_rec_type. 4 year = 48.asset_id := 1326. --asset header info l_asset_hdr_rec. 'Y'). l_mesg varchar2(4000). begin fnd_profile. -- .enable(1000000). -. l_return_status VARCHAR2(1). l_asset_deprn_mrc_tbl_new FA_API_TYPES.Init_Server_Message.IF YOU WANT TO UPDATE COST l_asset_fin_rec_adj. 3 year = 36 . l_mesg_len number. FA_DEBUG_PKG. 2 year = 24 .deprn_method_code:= 'STL'.

p_commit => FND_API. dbms_output. x_msg_data => l_mesg.count_msg. p_calling_fn => 'ADJ_TEST_SCRIPT'. px_trans_rec => l_trans_rec. if (l_return_status <> FND_API. px_inv_tbl => l_inv_tbl. x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new. -=> l_inv_rate_tbl. x_msg_count => l_mesg_count.G_VALID_LEVEL_FULL. p_asset_fin_rec_adj => l_asset_fin_rec_adj. p_group_reclass_options_rec=> l_group_reclass_options_rec ). x_asset_fin_mrc_tbl_new => l_asset_fin_mrc_tbl_new. p_validation_level =>FND_API.dump_debug_messages(max_mesgs=>0). l_mesg_count := fnd_msg_pub. px_inv_trans_rec => l_inv_trans_rec. x_return_status => l_return_status.G_RET_STS_SUCCESS) then fa_debug_pkg. px_asset_hdr_rec => l_asset_hdr_rec. x_asset_fin_rec_new => l_asset_fin_rec_new. p_asset_deprn_rec_adj => l_asset_deprn_rec_adj. x_asset_deprn_rec_new => l_asset_deprn_rec_new. if l_mesg_count > 0 then px_inv_rate_tbl .G_FALSE.put_line(sqlerrm||' STATUS : '|| l_return_status).

fnd_api.inv_tbl_type. l_asset_deprn_rec_new FA_API_TYPES. l_asset_hdr_rec FA_API_TYPES.put_line('THID' || to_char(l_trans_rec.asset_fin_tbl_type.inv_rate_tbl_type. Posted by Sarfaraz at 7:03 AM 0 comments Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Labels: API .put_line(substr(l_mesg. dbms_output. l_inv_trans_rec FA_API_TYPES.transaction_header_id)).Update Cost and Life of Asset.asset_hdr_rec_type. . fnd_msg_pub.G_FALSE). l_asset_deprn_rec_adj FA_API_TYPES. Fixed Assets (FA) Reactions: API -Update Fixed Asset Cost declare l_trans_rec FA_API_TYPES. end loop. commit. 1.asset_deprn_rec_type.inv_trans_rec_type.1.asset_deprn_tbl_type. dbms_output. 512).l_mesg_count . end if. l_asset_fin_mrc_tbl_new FA_API_TYPES. 1.fnd_api. l_inv_tbl FA_API_TYPES.get(fnd_msg_pub. 1.get(fnd_msg_pub. l_inv_rate_tbl FA_API_TYPES. 512). l_asset_fin_rec_new FA_API_TYPES.1 loop l_mesg := substr(fnd_msg_pub.delete_msg(). 255)).put_line(substr(l_mesg. else dbms_output.asset_deprn_rec_type.. l_asset_fin_rec_adj FA_API_TYPES. for i in 1. l_asset_deprn_mrc_tbl_new FA_API_TYPES.G_NEXT.asset_fin_rec_type.l_mesg := substr(fnd_msg_pub. 255)).put_line('SUCCESS'). end.G_FALSE) .G_FIRST. end if. dbms_output.trans_rec_type.asset_fin_rec_type.

x_return_status => l_return_status. p_init_msg_list => FND_API. p_calling_fn => 'ADJ_TEST_SCRIPT'.life_in_months:=100.Init_Server_Message.asset_hr_attr_rec_type. --l_new_life FA_API_TYPES.book_type_code := 'SSE FA REGISTER'. l_return_status VARCHAR2(1).do_adjustment (p_api_version => 1. 'Y').0.enable(1000000). l_group_reclass_options_rec FA_API_TYPES.put('PRINT_DEBUG'. FA_SRVR_MSG. -.group_reclass_options_rec_type.cost := 500000. l_mesg_count number := 0.fin info l_asset_fin_rec_adj. l_mesg varchar2(4000). FA_ADJUSTMENT_PUB. x_msg_data => l_mesg. dbms_output.G_FALSE. . --asset header info l_asset_hdr_rec.inv_rec_type. px_trans_rec => l_trans_rec.G_VALID_LEVEL_FULL.asset_id := 317. x_msg_count => l_mesg_count. FA_DEBUG_PKG. l_mesg_len number. p_asset_fin_rec_adj => l_asset_fin_rec_adj. begin fnd_profile. px_asset_hdr_rec => l_asset_hdr_rec. x_asset_fin_rec_new => l_asset_fin_rec_new.l_inv_rec FA_API_TYPES. l_asset_hdr_rec. x_asset_fin_mrc_tbl_new => l_asset_fin_mrc_tbl_new.Initialize.G_FALSE. p_commit => FND_API. --l_new_life. p_validation_level =>FND_API.

transaction_header_id)).dump_debug_messages(max_mesgs=>0). 255)).count_msg. -l_inv_rate_tbl.get (fnd_msg_pub. commit. end loop.1.put_line('THID' || to_char(l_trans_rec. 1. else dbms_output. px_inv_tbl => l_inv_tbl. if l_mesg_count > 0 then l_mesg := substr(fnd_msg_pub. px_inv_rate_tbl => . 512). x_asset_deprn_rec_new => l_asset_deprn_rec_new.get (fnd_msg_pub.G_FALSE). p_group_reclass_options_rec => l_group_reclass_options_rec ).G_FIRST.put_line(l_return_status). end if.G_RET_STS_SUCCESS) then fa_debug_pkg. dbms_output. dbms_output. 512). 1. end.1 loop l_mesg := substr(fnd_msg_pub. fnd_api.delete_msg(). dbms_output.put_line(substr(l_mesg. x_asset_deprn_mrc_tbl_new => l_asset_deprn_mrc_tbl_new. for i in 1..put_line('SUCCESS').px_inv_trans_rec => l_inv_trans_rec. p_asset_deprn_rec_adj => l_asset_deprn_rec_adj.put_line(substr(l_mesg. fnd_msg_pub.G_FALSE). if (l_return_status <> FND_API. 255)). l_mesg_count := fnd_msg_pub.G_NEXT.l_mesg_count . 1.fnd_api. end if. dbms_output.

Sign up to vote on this title
UsefulNot useful