INV-API-Create Stock Locator By Using API(EBS R12)

摘自:https://www.cnblogs.com/benio/archive/2012/11/13/2768228.html

Create Stock Locator By Using API(EBS R12)

項目上對一期的採購接受接口導入程序進行更改,增加貨位信息,要求:貨位 = 子庫存 + 項目 + 任務。由於子庫啓用了動態貨位控制,所以需要在程序中動態創建貨位,所以周折了一番。

    1. 接口表: rcv_transactions_interface

       字段: locator_id

       API:    inv_loc_wms_pub.create_locator

    2. 注意點: 動態創建貨位時,首先會創建貨位彈性域。而創建貨位彈性域時,對子庫存會進行值集的驗證(INV_SRS_SUBINV),值集INV_SRS_SUBINV中,WHERE裏對PROFILE.MFG_ORGANIZATION_ID做了限制,所以,在併發請求中,需要進行fnd_profile.put('MFG_ORGANIZATION_ID',111)的處理。否則會報值集驗證不通過。

    3. 範例腳本

DECLARE
x_return_status         VARCHAR2(1000);
x_msg_count             NUMBER;
x_msg_data              VARCHAR2(1000);
x_inventory_location_id NUMBER;
x_locator_exists        VARCHAR2(100);
BEGIN
BEGIN
    fnd_global.apps_initialize(user_id      => 1192,
                               resp_id      => 51519,
                               resp_appl_id => 211);
    fnd_profile.put('MFG_ORGANIZATION_ID',111);
END;
inv_loc_wms_pub.create_locator(x_return_status            => x_return_status,
                                 x_msg_count                => x_msg_count,
                                 x_msg_data                 => x_msg_data,
                                 x_inventory_location_id    => x_inventory_location_id,
                                 x_locator_exists           => x_locator_exists,
                                 p_organization_id          => 111,
                                 p_organization_code        => 'T01',
                                 p_concatenated_segments    => '.1995.PJ_TEST_01.1..',
                                 p_description              => NULL,
                                 p_inventory_location_type => 3,
                                 p_picking_order            => NULL,
                                 p_location_maximum_units   => NULL,
                                 p_subinventory_code        => '1115',
                                 p_location_weight_uom_code => NULL,
                                 p_max_weight               => NULL,
                                 p_volume_uom_code          => NULL,
                                 p_max_cubic_area           => NULL,
                                 p_x_coordinate             => NULL,
                                 p_y_coordinate             => NULL,
                                 p_z_coordinate             => NULL,
                                 p_physical_location_id     => NULL,
                                 p_pick_uom_code            => NULL,
                                 p_dimension_uom_code       => NULL,
                                 p_length                   => NULL,
                                 p_width                    => NULL,
                                 p_height                   => NULL,
                                 p_status_id                => 1,
                                 p_dropping_order           => NULL);

COMMIT;
END;

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章