Mar
2
2014

Satış Siparişi Durdurma ve Durdurmayı Kaldırma API

Merhabalar,

Satış siparişine durdurma uygulamak ve uygulanmış durdurmayı kaldırabilmek için aşağıdaki script’i kullabilirsiniz.

 

CREATE OR REPLACE PROCEDURE APPS.xxxt_durdur (
p_line_id      IN   NUMBER,
p_header_id    IN   NUMBER,
p_status       IN   VARCHAR2,
p_durdurma_adi   IN   VARCHAR2
)
IS
l_file                  VARCHAR2 (100);
l_return_status         VARCHAR2 (30);
l_msg_data              VARCHAR2 (256);
l_msg_count             NUMBER;
l_msg_index             NUMBER;
l_data                  VARCHAR2 (2000);
l_hold_source_rec       oe_holds_pvt.hold_source_rec_type;
d_order_tbl             oe_holds_pvt.order_tbl_type;
d_release_reason_code   VARCHAR2 (30);
d_release_comment       VARCHAR2 (150);
h_return_status         VARCHAR2 (50);
h_msg_count             NUMBER;
h_msg_data              VARCHAR2 (150);
BEGIN
fnd_global.apps_initialize (1111, 50365, 660);
— pass in user_id, responsibility_id, and application_id

IF p_status = ‘APPLY’
THEN
l_hold_source_rec := oe_holds_pvt.g_miss_hold_source_rec;
l_hold_source_rec.hold_id := 1001;                           — hold_id
l_hold_source_rec.hold_entity_code := ‘O’;          — order level hold
l_hold_source_rec.hold_entity_id := p_header_id;
— header_id of the order
l_hold_source_rec.header_id := p_header_id;   — header_id of the order
l_hold_source_rec.line_id := p_line_id;                      — line_id
l_hold_source_rec.attribute1 := p_durdurma_adi;
—  oe_debug_pub.ADD (‘Just before calling OE_Holds_PUB.Apply_Holds:’);
oe_holds_pub.apply_holds
(p_api_version           => 1.0,
p_commit                => fnd_api.g_true,
p_validation_level      => fnd_api.g_valid_level_none,
p_hold_source_rec       => l_hold_source_rec,
x_return_status         => l_return_status,
x_msg_count             => l_msg_count,
x_msg_data              => l_msg_data
);
—   oe_debug_pub.ADD (‘Just after calling OE_Holds_PUB.Apply_Holds:’);
COMMIT;
END IF;

IF p_status = ‘RELEASE’
THEN
fnd_global.apps_initialize (1111, 50365, 660);
d_order_tbl (1).header_id := p_header_id;
d_order_tbl (1).line_id := p_line_id;
d_release_reason_code := ‘DURDUR’;
d_release_comment := ‘Durdurma kaldır’;
oe_holds_pub.release_holds
(1.0,                            —  p_api_version
fnd_api.g_false,               — p_init_msg_list
fnd_api.g_false,                      — p_commit
fnd_api.g_valid_level_full, — p_validation_level
d_order_tbl,
NULL,
d_release_reason_code,   — p_release_reason_code
d_release_comment,           — p_release_comment
h_return_status,                           — OUT
h_msg_count,                               — OUT
h_msg_data
);                                          — OUT
COMMIT;
END IF;

–DBMS_OUTPUT.put_line (‘process ORDER ret status IS: ‘ || l_return_status||’-‘||h_return_status);
—   DBMS_OUTPUT.put_line (‘process ORDER msg data IS: ‘ || l_msg_data||’-‘||h_msg_count);
— DBMS_OUTPUT.put_line (‘process ORDER msg COUNT IS: ‘ || l_msg_count||’-‘||h_msg_data);
oe_debug_pub.debug_off;
END;
/

Kaan Sertaç Bozatlı

Blog yöneticisi ve aynı zamanda yazardır. 10 yılı aşkın bir süredir
profesyonel kariyerine Oracle ERP Developer olarak devam etmektedir.
Mail: kbozatli@gmail.com
LinkedIn: Profili Görüntüleyin
Kaan Sertaç Bozatlı

Latest posts by Kaan Sertaç Bozatlı (see all)



Yorum yapın

*