Bulk Shipment Confirmation Development wsh_deliveries_pub.delivery_action

Source: Internet
Author: User

API wsh_deliveries_pub.delivery_action Problem Point:
1, the shipment confirmation will invoke the interface request, the same so corresponding several delivery numbers will be reported to appear the lock,
2, the request will be delayed, the report can not output the correct results
Workaround:
Set the shipping confirmation API to the deferred interface, i.e. P_sc_defer_interface_flag is ' Y ',
The connection to the docking station is then called directly in the stored procedure.


DEclare

--parameter for "wsh_deliveries_pub. Delivery_action "

X_return_status Varchar2 (1);
X_msg_count number;
X_msg_data Varchar2 (3500);
L_TRIP_ID number;
L_trip_name Varchar2 (40);
X_msg_details VARCHAR2 (3000);
X_msg_summary VARCHAR2 (3000);


BEGIN

Fnd_global.apps_initialize (1371,50627,660);

Wsh_deliveries_pub.delivery_action (P_api_version_number = 1.0,
P_init_msg_list = Fnd_api.g_true,
X_return_status = X_return_status,
X_msg_count = X_msg_count,
X_msg_data = X_msg_data,
P_action_code = ' CONFIRM ',
p_delivery_id = R2. DELIVERY_ID,
p_sc_rule_id = 21,--Shipping rule select * from Wsh_ship_confirm_rules
P_sc_action_flag = ' s ',--s/a/c/o: Ship entered quantity--option-' S ', ' B ', ' T ', ' A ', ' C '
P_sc_stage_del_flag = ' Y ',--ship confirm create delivery for staged quantity flag
P_sc_actual_dep_date = sysdate,--ship confirm actual departure date
P_sc_intransit_flag = ' Y ',--ship confirm set In-transit flag
P_sc_close_trip_flag = ' Y ',--ship confirm close trip flag
P_sc_create_bol_flag = ' N ',--ship confirm create BOL flag
P_sc_defer_interface_flag = ' y ',--ship confirm defer interface flag--for ' Y ', manually run the connection stop
--p_sc_report_set_id = 6,--ship Confirm documents:from wsh_report_sets where usage_code= ' ship_confirm '
x_trip_id = l_trip_id,
X_trip_name = L_trip_name);


if (X_return_status <> wsh_util_core. G_ret_sts_success and
X_return_status <> ' W ') then
Rollback
--raise api_failed;
Else

--Call to connect to the docking station request process
--defer_interface_flag is ' Y ' and needs to run the following interface request
Wsh_ship_confirm_actions.interface_all (errbuf = Errbuf2,
Retcode = Retcode2,
P_mode = P_mod,
p_stop_id = p_stop_id,
p_delivery_id = r2.delivery_id,
P_log_level = P_log_level);
IF retcode! = ' 0 ' Then
Rollback
ELSE
Commit
END IF;
End If;

End


Bulk Shipment Confirmation Development wsh_deliveries_pub.delivery_action

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.