Sunday, 2 September 2018

Pick release api in oracle apps

Pick release api in oracle apps

In this post , We will discuss about Pick release api in oracle apps. Pick release we do in the order management module for the sales order to launch request to release the finished good item from oracle inventory to the Staging Sub inventory. Usually we do this operation from the frontend through launch pick release program. but some time we have an business Requirment to release the pick release from backend. Here below we are using the pick release api in oracle apps to launch the pick release request from backend.
 
 

Example of pick release api in oracle apps

 
CREATE OR REPLACE PROCEDURE APPS.XX_LAUNCH_PICK_RELEASE
 (x_errbuf OUT VARCHAR2,
 x_retcode OUT NUMBER
 )
 AS
 p_api_version_number NUMBER :=1.0;
 init_msg_list VARCHAR2(200);
 x_msg_details VARCHAR2(3000);
 x_msg_summary VARCHAR2(3000);
 p_line_rows WSH_UTIL_CORE.ID_TAB_TYPE;
 x_del_rows WSH_UTIL_CORE.ID_TAB_TYPE;
 l_ship_method_code VARCHAR2(100);
 i NUMBER;
 l_commit VARCHAR2(30);
 p_delivery_id NUMBER;
 p_delivery_name VARCHAR2(30);
 x_trip_id VARCHAR2(30);
 x_trip_name VARCHAR2(30);
 fail_api EXCEPTION;
 l_picked_flag VARCHAR2(10);
 l_return_status VARCHAR2(1000);
 l_msg_count NUMBER;
 l_msg_data VARCHAR2(1000);
 ln_user_id number := fnd_profile.value('USER_ID');
 ln_trip_id number;
 lv_trip_name varchar2(30);
 x_return_status varchar2(10);
 x_msg_count number;
 x_msg_data varchar2(500);
 
 BEGIN
 fnd_global.apps_initialize (0, 344953, 660);
 i := 0;
 dbms_output.put_line( 'Before API');
 wsh_deliveries_pub.delivery_action
 ( p_api_version_number => 1.0,
 p_init_msg_list => NULL,
 x_return_status => x_return_status,
 x_msg_count => x_msg_count,
 x_msg_data => x_msg_data,
 p_action_code => 'PICK-RELEASE',
 p_delivery_id => 433486,
 p_delivery_name => 433486,
 -- p_asg_trip_id = 100,
 x_trip_id => ln_trip_id,
 x_trip_name => lv_trip_name
 );
 commit;
 IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
 RAISE fail_api;
 ELSE
 fnd_file.put_line(fnd_file.log, 'Success: Pick release');
 dbms_output.put_line( 'Success: Pick release'||' '||x_trip_id);
 END IF;
 
 EXCEPTION
 WHEN fail_api THEN
 WSH_UTIL_CORE.get_messages('Y', x_msg_summary, x_msg_details, x_msg_count);
 
 IF x_msg_count > 1 THEN
 x_msg_data := x_msg_summary || x_msg_details;
 ELSE
 x_msg_data := x_msg_summary || x_msg_details;
 END IF;
 END XX_LAUNCH_PICK_RELEASE;

1 comments:

Souvik said...

The If Else block in the exception has no difference. Please fix this. Thanks.

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *