Sunday 2 September 2018

api to update wsh_delivery_details

api to update wsh_delivery_details

 
In this post , We will discuss , how we can update the delivery details information's from oracle backend. We cannot update the standard table from backend because we don't know the impact and all the tables stores information about delivery details so its always recommendable from oracle side to use the standard api's to update the information. These api update all the related tables in oracle apps. We are using the standard api to update wsh_delivery_details in oracle apps. This api helps to change the information from wsh_delivery_details table. Here below is the sample script using api to update wsh_delivery_details.
 

Example using api to update wsh_delivery_details

DECLARE
 
 
l_index NUMBER;
l_msg_return NUMBER;
x_return_status VARCHAR2 (1);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (2000);
l_changedattributetabtype wsh_delivery_details_pub.changedattributetabtype;
l_file_name VARCHAR2 (32767);
l_return_status VARCHAR2 (32767);
l_msg_data VARCHAR2 (32767);
l_msg_count NUMBER;
BEGIN
fnd_global.apps_initialize (0, 344953, 660);
fnd_profile.put ('WSH_DEBUG_MODULE', '%');
fnd_profile.put ('WSH_DEBUG_LEVEL', WSH_DEBUG_SV.C_STMT_LEVEL);
wsh_debug_sv.start_debugger (l_file_name,
l_return_status,
l_msg_data,
l_msg_count);
l_index := 0;
l_changedattributetabtype (l_index).delivery_detail_id := 12239043;
l_changedattributetabtype (l_index).subinventory := 'FGI'; -- Providing subinventory to update
 

 
wsh_delivery_details_pub.Update_Shipping_Attributes (
p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
x_return_status => X_return_status,
x_msg_count => X_msg_count,
x_msg_data => X_msg_data,
p_changed_attributes => l_changedattributetabtype,
p_source_code => 'OE');
COMMIT;
IF x_return_status <> fnd_api.G_RET_STS_SUCCESS
THEN
FOR i IN 1 .. x_msg_count
LOOP
fnd_msg_pub.get (p_msg_index => I,
P_encoded => 'F',
P_data => X_msg_data,
P_msg_index_out => l_msg_return);
DBMS_OUTPUT.PUT_LINE (x_msg_data);
END LOOP;
ELSE
DBMS_OUTPUT.PUT_LINE ('S');
END IF;
END

0 comments:

Post a Comment

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

Name

Email *

Message *