Partially Shipped Deliveries
A partially shipped delivery is one which has multiple TOs and at least one TO for that delivery has been shipped out.
I have taken all the Delivery Note Num and TO num in an internal table. How can I check if the Delivery Number is having multiple Transfer Orders.
Internal table structure : Delv Num, TO Num.
Please suggest
Thanks
hi,
check VBFA table
raj
Similar Messages
-
Need to automate the process of partial orders-deliveries
Hi experts,
I need to automate the process of partial order deliveries in VL01N.
I checked few BAPI for the above requirement.
BAPI_OUTB_DELIVERY_CHANGE
BAPI_OUTB_DELIVERY_SAVEREPLICA
BAPI_OUTB_DELIVERY_CONFIRM_DEC
But have no clue ,which would be relevent.
If any one of you have worked on any such requirement before,please let know,which BAPI i can use in this development.
Thanks in advance.
MeenakshiHi
Try with function modules WS_DELIVERY_UPDATE and RV_DELIVERY_CREATE.
Regards
Srilaxmi -
How to migrate Tax lines in Data Migration for Partial Shipped Qty?
Hi,
We are migrating 11.0.3 Orders to R12 and there are some Sales Orders which are in Partial Shipped status. In this scenario, we are bringing two lines where one line is completely closed and other line is awaiting shipment.
My question is, how to manage the Taxation for this type of lines?
For e.g. If original line is of 10 qty, 4 qty is already shipped. So we are bringing this line as Closed. For 6 qty, we are bringing line in Awaiting Shipment status. How to derive at the correct tax amount for this type of line?
Client is storing Tax amount in 11.0.3 at Header level.
With Regards,
Vishal>
Through the TopLink code API, you can set an
Expression as the additionalJoinExpresssion for a
descriptor, this "filter" will be applied to all
queries for this class.
i.e.
ExpressionBuilder builder = new ExpressionBuilder();
descriptor.getQueryManager().setAdditionalJoinExpressi
on(builder.get("region").equal("AU"));The problem with this solution is that the parameter ("AU") is hard-coded in the mappings. Hibernate filters can use session-specific parameters. That allows, for instance, session A to filter on region="AU" and session B to filter on region="NZ".
To resolve this problem, I wrote a new expression class that can retrieve a parameter value from a TopLink session property:
class SessionPropertyExpression extends ParameterExpression {
public SessionPropertyExpression(String propertyName, Expression base) {
super(propertyName, base);
public Object getValue(DatabaseRow databaserow,
oracle.toplink.publicinterface.Session session) {
return session.getProperties().get(getField().getName());
The new expression class can be used in the mappings. For instance:
ExpressionBuilder builder = new ExpressionBuilder();
SessionPropertyExpression propertyExpr = new SessionPropertyExpression
("regionCode", builder);
descriptor.getQueryManager().setAdditionalJoinExpression(builder.get("region").equal(propertyExpr );
The application can set the property in the TopLink session associated with a particular request. For instance;
Session A
session.setProperty("regionCode", "AU");
Session B
session.setProperty("regionCode", "NZ"); -
Development Request - Edit UDFs on partially shipped MD lines
A client has built functionality around Line Item User Defined fields on Marketing Document Lines. They enter values in UDFs on Sales Orders and Purchase Orders to notify customers and factories with information about the lines on remining open quantities. For example, on a sales order, they have fields that contain estimated dates (other than delivery date) such as date to depart factory, date to domestic port, vessel name and Bill of Lading/Airway bill number. They have some other fields that they use internally.
The problem occurs when the line partially ships. They can't edit these UDFs. Currently, in a patch later in 2005 SP1 (somewhere around PL37) Business One allowed the editing of the quantity and ship date on partially shipped lines, however, you still cannot edit UDFs on Partially shipped lines. This breaks their design and there's really no reason for not being able to edit these lines.
Edited by: Michael Neuendorff on Apr 18, 2008 6:31 PMI am, 6 months later, getting the same issue. Has something to do with Oracle.web. My intention as of now is to remove Oracle.Web.*
What did you do?
Thanks -
Canceling Partially Shipped line items
We have a business scenario where an order line item is created. Then it is partially shipped. Finally it is canceled. If the order is placed for a quantity of 10, 10 comes to BI via 2LIS_11VAITM. Then 3 were shipped and finally the line item was canceled. 10 comes to BI via 2LIS_11VAITM as being canceled. But in this case we really want to consider 7 as being canceled since three were already shipped. I've challenged the procedure, but it looks like this will continue. Does anyone have any input on how to model this, so that in BI I can see that 7 were canceled?
Thanks,
Chrisshould be rather standard behavior to have the 7, unless the partial shipping and cancellation occur without an update towards BI first
it'll depend on your model, how the system will react to this... try it in QAS and see what's going on in the change log -
Orders always show as Partially Shipped
Hi all,
We have noticed that if I partially ship an order through a delivery document and check the order status in Webtools it says Partial.
However when we ship the rest of the order, it still has the status of partial.
It doesnt change to shipped.
The customer will always have to check the 2 shipping notices and calculate the quantities to decide if the order is fully shipped or not.
Have I done something wrong or is this the way the system works?
Thanks,
JohnIt will change to shipped when all the items on the order for that delivery have been shipped. Perhaps the other delivery docs didn't synch?
-
Partial Outbound Deliveries Created Against a Stock Transport order.
Hi,
I Have a Stock Transport Order with Delivery and Billing Document/Invoice.
in this PO i have 200qty in one line item, when i am creating a outbound delivery with respect to this PO through VL10d, i am able to create a delivery for only 10qty, because of this i had to process the outbound delivery 19 times to complete the whole item qty of 200.
Can some one help me in finding out why this spliting is taking place, all these deliveries are picked by Transfer orders in Warehouse.
Regards.Hi,
Check the Shipping point - check in the SPRO - Logistics Execution - Shipping - Basic Shipping - Shipping point and receiving point determination - Assign shipping point. Here you check for a unique combination of shipping condition (customer master) then loading group (material master) and delivering plant (material master) for all these you will have a shipping point. check for the same in your order. See that the combination matches with all your schedules and then delivery. It will not split
Hope this will help you out.
Thanks,
PNR -
Partial shipping through STO for SD
Hi Guru's,
please help with solution for my following business scenario.
I have 3 plants for ex A, B and C, normally manfaturing will be done in plant B and C. if we have sales order in plant A we want to create STO for plant B for some line items and STO for plant C for remaining line items (they r doing manually). here we would like to ship items directly to customer in sales order from plant C. is it possible?
suggest any best solutions for above case.The customer in V_001W_IV-KUNNR is "plant customer", it represents the issuing / supplying plant to which it is assigned and not the customer(s) of receiving plant(s).
You have to extend this customer to the STO sales area of its own plant and of the receiving plants'. Whenever you create an sTO in which the receiving plant is this, the plant customer will appear in the delivery as ship-to. Independently from the supplying plant, the ship-to party is the same if the receiving plant is the same.
So, one of them is enough even if you have several plants and you want to have STOs between them.
You can define several customers for issuing plant based on plant/storage location combinations:
SPRO > MM > Purchasing > Purchase Order > Set Up STO > Set Up Stock Transfer Between Storage Locations > Define Shipping Data for Stock Transfer Between Storage Locations
However I guess you only have to understand how this works and you need only one customer per plant...
Please understand how it works before sending lots of messages...
Regards,
Csaba
Edited by: Csaba Szommer on Jun 23, 2010 4:19 PM -
How to Ship Partial Quantities using an API - Oracle Order Management
Hi,
In Order Management I need to ship the Internal Sales Order Lines partially using an API.
I have done full shipping but if I trying the partially shipping it is also shipping fully.
I am unable to find the problem. Is there any set up missed?
How to do partial shipping.
I am giving the some part of the code please look into it and suggest me.
----**************************UPDATEING SHIPIN ATTR ***************************-------------
I_changed_attributes (X_count).delivery_detail_id := cos.delivery_detail_id;
I_changed_attributes (X_count).shipped_quantity := cos.shipped_quantity;
X_ship_date := cos.act_shipped_date;
X_slaes_order := cos.sales_order;
X_org_id := cos.org_id;
wsh_delivery_details_pub.update_shipping_attributes ( p_api_version_number => 1.0
,p_init_msg_list => I_init_msg_list
,p_commit => I_commit
,x_return_status => O_return_status
,x_msg_count => O_msg_count
,x_msg_data => O_msg_data
,p_changed_attributes => I_changed_attributes
,p_source_code => I_source_code
----***************************SHIP CONFIRM API ***************************-------------
I_action_code := 'CONFIRM';
I_sc_action_flag := 'B'; --'S'; -- Ship entered quantity. 'B' - Ship Entered Quantities, Backorder Unspecified
--'T' - Ship Entered Quantities, Stage Unspecified'A' - Ship All'C' - Completely Backordered
I_sc_intransit_flag := 'Y';
--In transit flag is set to 'Y' closes the pickup stop and sets the delivery in transit.
I_sc_close_trip_flag := 'Y'; -- Close the trip after ship confirm
I_sc_trip_ship_method := X_ship_method_code; -- The ship method code
I_sc_defer_interface_flag := 'Y';
I_sc_stage_del_flag := 'Y';
I_sc_create_bol_flag := 'N';
I_wv_override_flag := 'N';
-- API Call for Ship Confirmation
fnd_file.put_line(fnd_file.log,'Calling WSH_DELIVERIES_PUB to Perform Ship Confirmation');
fnd_file.put_line(fnd_file.log,'=============================================');
wsh_deliveries_pub.delivery_action ( p_api_version_number => 1.0
, p_init_msg_list => I_init_msg_list
, x_return_status => O_return_status
, x_msg_count => O_msg_count
, x_msg_data => O_msg_data
, p_action_code => I_action_code
-- , p_delivery_id => cos.delivery_id
, p_delivery_name => G_delivery_name
, p_sc_action_flag => I_sc_action_flag
, p_sc_intransit_flag => I_sc_intransit_flag
, p_sc_close_trip_flag => I_sc_close_trip_flag
, p_sc_create_bol_flag => I_sc_create_bol_flag
, p_sc_stage_del_flag => I_sc_stage_del_flag
, p_sc_trip_ship_method => I_sc_trip_ship_method
, p_sc_actual_dep_date => X_ship_date --P_act_shipped_dt
, p_sc_defer_interface_flag => I_sc_defer_interface_flag
, p_wv_override_flag => I_wv_override_flag
, x_trip_id => O_trip_id
, x_trip_name => O_trip_name
----***********************************************************************--------------------Hi Shesh,
Thanks you for your replay.
I am tried Shipping transaction screen but here the ware house is WMS enabled I tried Oracle Mobile Terminal application to do this, but it is not accepting the partial shipping. May be some set up required or the process will be differ.
I will try your suggested API's .
Regards,
Prasanna
Edited by: 843676 on Apr 23, 2012 10:31 PM
I am not able to do the Partial Shipment or Backorder as mentioned above API's, but it is split the lines and all the lines are in same state (Awaiting Shipping)
Edited by: 843676 on Apr 24, 2012 2:45 AM -
Hey guys..
I'm plagued with this problem and haven't found a solution yet so I'd thought I'd come the experts:
We routinely ship partial qty's per delivery line to customers if they choose..
ie- SalesOrder is for 3 widgets and we only have 1. We'll ship the 1 we have and later ship the remaining 2.
Our GUI-SAP has no problem with this but when I push this though the SAPbobsCom.dll, it returns the following error:
SAPbobsCom_Call Funct- Error in SAP Post--- DocEntry:16052 didn't commit--->Quantity falls into negative inventory [DLN1.ItemCode][line: 1]| retval: -10
This error seems revolve around serialized stock but I'm not ruling out that our non-serialized is also a problem.. I'll test shortly.
Regardless, here's the code
SAPbobsCOM.Documents odeliveries = (SAPbobsCOM.Documents)Vcmp.GetBusinessObject(BoObjectTypes.oDeliveryNotes);//new SAPbobsCOM.Documents();
odeliveries.DocDate = DateTime.Now;
foreach (var CommitItem in CommitObject)
BaseEntry = CommitItem.RDR_DocEntry;
BaseNum = CommitItem.RDR_DocNum;
odeliveries.Lines.BaseEntry = Convert.ToInt32(CommitItem.RDR_DocEntry);
odeliveries.Lines.BaseType = 17;
odeliveries.Lines.BaseLine = Convert.ToInt32(CommitItem.RDR_LineNum);
odeliveries.Lines.WarehouseCode = CommitItem.RDR_WhsCode;
//odeliveries.Lines.Quantity = CommitItem.Qty_To_Pick;
//odeliveries.Lines.ItemCode = CommitItem.RDR_ItemCode;
if (CommitItem.Serial_Flag == "Y")
int SerialCount = 0;
foreach (var sysnum in CommitObject.FirstOrDefault(x => x.RDR_LineNum == CommitItem.RDR_LineNum).SysNum)
odeliveries.Lines.SerialNumbers.Quantity = 1;
odeliveries.Lines.SerialNumbers.SystemSerialNumber = Convert.ToInt32(sysnum);
odeliveries.Lines.SerialNumbers.SetCurrentLine(SerialCount);
odeliveries.Lines.SerialNumbers.Add();
SerialCount++;
else
int CurrentLine = 0;
odeliveries.Lines.ItemCode = CommitItem.RDR_ItemCode;
foreach (var Bin_AbsNum in CommitObject.FirstOrDefault(x => x.RDR_LineNum == CommitItem.RDR_LineNum).From_Bin)
odeliveries.Lines.BinAllocations.Quantity = Bin_AbsNum.Value;
odeliveries.Lines.BinAllocations.BinAbsEntry = Bin_AbsNum.Key;
odeliveries.Lines.BinAllocations.SetCurrentLine(CurrentLine);
odeliveries.Lines.BinAllocations.Add();
CurrentLine++;
odeliveries.Lines.Add();
Note this code has worked for creation of over 2000 lines on 850 deliveries, So the problem seems to be isolated to partial line deliveries..
Thanks in advance Guys!!Hi Steve,
the error message is quite clear - you are trying to add an delivery line with an item which is not onhand ( in that warehouse ).This isn't't working in SBO client either : you can't deliver something you don't have.
btw. you always add an empty line at the end which is not needed.
regards,
Maik -
Sales Reports with Partial Shipments
Hello,
I need to write a sales report for open orders. If the order has been partially shipped, I just need to pull what remains to be shipped and display this total.
If the order has not been partially shipped, I need to pull the doc total.
How do I specify if an order has been partially shipped or not? Is there any way to say, "If a line in RDR1 has been shipped or partially shipped, sum the totals of OpenCreQty * Price, else pull DocTotal"?
I need to display the report in 1 line per sales order.
Thanks in advance,
ChrisHi Christine,
Without knowing the exact fields you are using you should be doing something like:
If {TABLE.OpenCreQty} NOT EQUAL {TABLE.Quantity} Then
0
Else {TABLE.Quantity};
NOTE: WHERE IT SAYS NOT EQUAL TO should be LESS THAN and GREATER THAN symbols. They don't show up in here.
So the If is checking what was shipped with the order's quantity. If they are not equal then show 0 otherwise show the order's quantity.
Now you can do a summary and sum this formula and you should get the proper numbers.
Good luck,
Brian -
Partial Delivery Per Item Setting Not Effective
Hi,
Any help greatly appreciated.
We have a business requirement whereby sales orders may be partially shipped but the sales order lines themselves MUST be shipped complete.
Therefore we have set the customer master record accordingly ie Partial Delivery Per Item = C ( Only complete delivery allowed)
This setting is indeed copied into the sales order but the availability check seems to ignore it. Instead it proposes a delivery schedule ie 100 qty del tomorrow, balance in 2 weeks.
I would expect that the availability WOULD NOT split the qty like this instead propose the complete qty in 2 weeks.
I could probably get round this by making the message an error during delivery creation, but I would really like the sales order to behave as expected and make an intelligent 'promise'
Am I missing something somewhere?
Please help.
Regards
GuyHi,
You can try the following setting;
In SPRO -> SD -> Basic functions -> availability check and TOR -> Availabity check -> Availability check with ATP logic or against planning -> Define default settings. The t.code is OVZJ.
Here for your sales area, under Availabitlity check rule column, you can assign value B and try.
Regards, -
Partial Pick Confirming Sales Order
Hi Folks,
I have a requirement where I have to Pick Confirm and Ship confirm Sales Order through API.
1. When the quantites to be picked are same as quantity ordered the code seems to work just fine.
But suppose in my example my quantity in SO line is 50 and I want to partially Ship confirm the lines lets say 20 quantites.
then which API i need to use?
The approach I am following is while pick confirming I am passing 20 quantites only and the ship confirming it.
I researched and found that we can use the following API to update shipping attributes 'WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes' but when I run it (I tried before and after Pick confirm) the API runs fine but no changes are getting affected and the code Pick confirms all the quantity.
Could some please help me with this.
Please find the codes for pick confirm and updating shipping attributes
Pick confirm code
DECLARE
lv_order_num number := 700145812;
vMoveOrderLineId NUMBER;
p_pick_conf_qty NUMBER;
pStatus VARCHAR2(100);
pMsgData VARCHAR2(4000);
v_movehdr_rec INV_MOVE_ORDER_PUB.TROHDR_REC_TYPE;
v_movehdr_val_rec INV_MOVE_ORDER_PUB.TROHDR_VAL_REC_TYPE;
v_moveln_tbl INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
v_moveln_tbl_p INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
v_moveln_zero_tbl INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
v_moveln_zero_tbl_p INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
v_moveln_tbl_d INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
v_moveln_tbl_o INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
v_moveln_val_tbl INV_MOVE_ORDER_PUB.TROLIN_VAL_TBL_TYPE;
v_mold_tbl INV_MO_LINE_DETAIL_UTIL.G_MMTT_TBL_TYPE;
v_mold_tbl_p INV_MO_LINE_DETAIL_UTIL.G_MMTT_TBL_TYPE;
l_mold_tbl INV_MO_LINE_DETAIL_UTIL.G_MMTT_TBL_TYPE;
l_moveln_tbl INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
l_trolin_rec INV_MOVE_ORDER_PUB.TROLIN_REC_TYPE;
l_trolin_tbl INV_MOVE_ORDER_PUB.TROLIN_TBL_TYPE;
l_return_status VARCHAR2(240);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
l_move_hdr_id NUMBER;
l_move_order_no NUMBER := 0;
v_return_values VARCHAR2(2000) := FND_API.G_TRUE;
v_move_hdr_rec INV_MOVE_ORDER_PUB.TROHDR_REC_TYPE;
v_move_hdr_val_rec INV_MOVE_ORDER_PUB.TROHDR_VAL_REC_TYPE;
v_api_pick_confirm NUMBER;
cv_fail VARCHAR2(100) := 'Fail';
cv_success VARCHAR2(100) := 'Success';
g_user_id number;
g_resp_id number;
g_resp_appl_id number;
p_user_name varchar2(100) := 'SYSADMIN';
p_resp_name varchar2(100) := 'Order Management Super User';
p_mo_apps varchar2(100) := 'ONT';
CURSOR c_mmtt_recs(vMoveOrderLineId NUMBER) IS
SELECT transaction_header_id,
transaction_temp_id,
source_code,
source_line_id,
transaction_mode,
lock_flag,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
request_id,
program_application_id,
program_id,
program_update_date,
inventory_item_id,
revision,
organization_id,
subinventory_code,
locator_id,
transaction_quantity,
primary_quantity,
transaction_uom,
transaction_cost,
transaction_type_id,
transaction_action_id,
transaction_source_type_id,
transaction_source_id,
transaction_source_name,
transaction_date,
acct_period_id,
distribution_account_id,
transaction_reference,
requisition_line_id,
requisition_distribution_id,
reason_id,
lot_number,
lot_expiration_date,
serial_number,
receiving_document,
demand_id,
rcv_transaction_id,
move_transaction_id,
completion_transaction_id,
wip_entity_type,
schedule_id,
repetitive_line_id,
employee_code,
primary_switch,
schedule_update_code,
setup_teardown_code,
item_ordering,
negative_req_flag,
operation_seq_num,
picking_line_id,
trx_source_line_id,
trx_source_delivery_id,
physical_adjustment_id,
cycle_count_id,
rma_line_id,
customer_ship_id,
currency_code,
currency_conversion_rate,
currency_conversion_type,
currency_conversion_date,
ussgl_transaction_code,
vendor_lot_number,
encumbrance_account,
encumbrance_amount,
ship_to_location,
shipment_number,
transfer_cost,
transportation_cost,
transportation_account,
freight_code,
containers,
waybill_airbill,
expected_arrival_date,
transfer_subinventory,
transfer_organization,
transfer_to_location,
new_average_cost,
value_change,
percentage_change,
material_allocation_temp_id,
demand_source_header_id,
demand_source_line,
demand_source_delivery,
item_segments,
item_description,
item_trx_enabled_flag,
item_location_control_code,
item_restrict_subinv_code,
item_restrict_locators_code,
item_revision_qty_control_code,
item_primary_uom_code,
item_uom_class,
item_shelf_life_code,
item_shelf_life_days,
item_lot_control_code,
item_serial_control_code,
item_inventory_asset_flag,
allowed_units_lookup_code,
department_id,
department_code,
wip_supply_type,
supply_subinventory,
supply_locator_id,
valid_subinventory_flag,
valid_locator_flag,
locator_segments,
current_locator_control_code,
number_of_lots_entered,
wip_commit_flag,
next_lot_number,
lot_alpha_prefix,
next_serial_number,
serial_alpha_prefix,
shippable_flag,
posting_flag,
required_flag,
process_flag,
error_code,
error_explanation,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
movement_id,
reservation_quantity,
shipped_quantity,
transaction_line_number,
task_id,
to_task_id,
source_task_id,
project_id,
source_project_id,
pa_expenditure_org_id,
to_project_id,
expenditure_type,
final_completion_flag,
transfer_percentage,
transaction_sequence_id,
material_account,
material_overhead_account,
resource_account,
outside_processing_account,
overhead_account,
flow_schedule,
cost_group_id,
demand_class,
qa_collection_id,
kanban_card_id,
overcompletion_transaction_id,
overcompletion_primary_qty,
overcompletion_transaction_qty,
end_item_unit_number,
scheduled_payback_date,
line_type_code,
parent_transaction_temp_id,
put_away_strategy_id,
put_away_rule_id,
pick_strategy_id,
pick_rule_id,
common_bom_seq_id,
common_routing_seq_id,
cost_type_id,
org_cost_group_id,
move_order_line_id,
task_group_id,
pick_slip_number,
reservation_id,
transaction_status,
transfer_cost_group_id,
lpn_id,
transfer_lpn_id,
pick_slip_date,
content_lpn_id
FROM MTL_MATERIAL_TRANSACTIONS_TEMP
WHERE move_order_line_id = vMoveOrderLineId;
l_moveln_fidx NUMBER;
l_moveln_lidx NUMBER;
n_mvln_cntr NUMBER;
l_Index NUMBER := 1;
v_records_in_mmtt NUMBER := 0;
REC C_MMTT_RECS%ROWTYPE;
BEGIN
select user_id
into g_user_id
from fnd_user
where user_name = p_user_name;
select responsibility_id, application_id
into g_resp_id, g_resp_appl_id
from apps.fnd_responsibility_vl
where responsibility_name = p_resp_name;
Apps.FND_Global.Apps_Initialize(g_user_id, g_resp_id, g_resp_appl_id);
MO_GLOBAL.INIT(p_mo_apps);
for mol in (select wda.delivery_id,
wda.delivery_detail_id,
wda.parent_delivery_detail_id,
wdd.source_code,
wdd.inventory_item_id,
wdd.organization_id,
wdd.ship_from_location_id,
wdd.ship_to_location_id,
wdd.requested_quantity,
wdd.requested_quantity_uom,
wdd.move_order_line_id,
wdd.org_id,
mtrl.quantity,
mtrl.quantity_delivered
from wsh_delivery_details wdd,
wsh_delivery_assignments wda,
oe_order_lines_all ol,
oe_order_headers_all oh,
mtl_txn_request_lines mtrl,
mtl_txn_request_headers mtrh
where wdd.source_line_id = ol.line_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and ol.header_id = oh.header_id
and wdd.move_order_line_id = mtrl.line_id(+)
and mtrl.header_id = mtrh.header_id(+)
and oh.order_number = lv_order_num) loop
vMoveOrderLineId := mol.move_order_line_id;
p_pick_conf_qty := mol.quantity - nvl(mol.quantity_delivered,0);
SELECT COUNT(move_order_line_id)
INTO v_records_in_mmtt
FROM MTL_MATERIAL_TRANSACTIONS_TEMP
WHERE move_order_line_id = vMoveOrderLineId;
IF v_records_in_mmtt > 1 THEN
pStatus := cv_fail;
pMsgData := 'Wrong number of records in MMTT for the MOVE_ORDER_LINE_ID : ' ||
vMoveOrderLineId;
DBMS_OUTPUT.PUT_LINE('Multiple records in MMTT for move_order_line_id = ' ||
vMoveOrderLineId);
v_api_pick_confirm := 0;
GOTO end_of_pkcnf;
ELSIF v_records_in_mmtt = 0 THEN
--means that the delivery is already pick confirmed
pStatus := cv_success;
DBMS_OUTPUT.PUT_LINE('No records in MMTT for move_order_line_id = ' ||
vMoveOrderLineId ||
' hence it is already pick confirmed');
v_api_pick_confirm := 0;
GOTO end_of_pkcnf;
END IF;
SELECT mtrh.header_id, mtrh.request_number
INTO l_move_hdr_id, l_move_order_no
FROM mtl_txn_request_headers mtrh, mtl_txn_request_lines mtrl
WHERE mtrh.header_id = mtrl.header_id
AND mtrl.line_id = vMoveOrderLineId;
DBMS_OUTPUT.PUT_LINE('Obtained MTRH.HEADER_ID = ' || l_move_hdr_id ||
' MTRH.REQUEST_NUMBER = ' || l_move_order_no ||
' for move_order_line_id = ' || vMoveOrderLineId);
INV_MOVE_ORDER_PUB.GET_MOVE_ORDER(p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_return_values => v_return_values,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_header_id => l_move_hdr_id,
p_header => l_move_order_no,
x_trohdr_rec => v_move_hdr_rec,
x_trohdr_val_rec => v_move_hdr_val_rec,
x_trolin_tbl => v_moveln_tbl,
x_trolin_val_tbl => v_moveln_val_tbl);
COMMIT;
DBMS_OUTPUT.PUT_LINE('Return status of INV_MOVE_ORDER_PUB.GET_MOVE_ORDER = ' ||
l_return_status);
IF l_return_status != FND_API.G_RET_STS_SUCCESS THEN
pStatus := cv_fail;
pMsgData := 'Failed to get move order inv_move_order_pub.get_move_order for MOVE_ORDER_LINE_ID : ' ||
vMoveOrderLineId;
GOTO end_of_pkcnf;
END IF;
OPEN c_mmtt_recs(vMoveOrderLineId);
FETCH c_mmtt_recs
INTO rec;
CLOSE c_mmtt_recs;
v_mold_tbl(1).transaction_header_id := rec.transaction_header_id;
v_mold_tbl(1).transaction_temp_id := rec.transaction_temp_id;
v_mold_tbl(1).source_code := rec.source_code;
v_mold_tbl(1).source_line_id := rec.source_line_id;
v_mold_tbl(1).transaction_mode := rec.transaction_mode;
v_mold_tbl(1).lock_flag := rec.lock_flag;
v_mold_tbl(1).last_update_date := rec.last_update_date;
v_mold_tbl(1).last_updated_by := rec.last_updated_by;
v_mold_tbl(1).creation_date := rec.creation_date;
v_mold_tbl(1).created_by := rec.created_by;
v_mold_tbl(1).last_update_login := rec.last_update_login;
v_mold_tbl(1).request_id := rec.request_id;
v_mold_tbl(1).program_application_id := rec.program_application_id;
v_mold_tbl(1).program_id := rec.program_id;
v_mold_tbl(1).program_update_date := rec.program_update_date;
v_mold_tbl(1).inventory_item_id := rec.inventory_item_id;
v_mold_tbl(1).revision := rec.revision;
v_mold_tbl(1).organization_id := rec.organization_id;
v_mold_tbl(1).subinventory_code := rec.subinventory_code;
v_mold_tbl(1).locator_id := rec.locator_id;
v_mold_tbl(1).transaction_quantity := rec.transaction_quantity;
v_mold_tbl(1).primary_quantity := rec.primary_quantity;
v_mold_tbl(1).transaction_uom := rec.transaction_uom;
v_mold_tbl(1).transaction_cost := rec.transaction_cost;
v_mold_tbl(1).transaction_type_id := rec.transaction_type_id;
v_mold_tbl(1).transaction_action_id := rec.transaction_action_id;
v_mold_tbl(1).transaction_source_type_id := rec.transaction_source_type_id;
v_mold_tbl(1).transaction_source_id := rec.transaction_source_id;
v_mold_tbl(1).transaction_source_name := rec.transaction_source_name;
v_mold_tbl(1).transaction_date := rec.transaction_date;
v_mold_tbl(1).acct_period_id := rec.acct_period_id;
v_mold_tbl(1).distribution_account_id := rec.distribution_account_id;
v_mold_tbl(1).transaction_reference := rec.transaction_reference;
v_mold_tbl(1).requisition_line_id := rec.requisition_line_id;
v_mold_tbl(1).requisition_distribution_id := rec.requisition_distribution_id;
v_mold_tbl(1).reason_id := rec.reason_id;
v_mold_tbl(1).lot_number := rec.lot_number;
v_mold_tbl(1).lot_expiration_date := rec.lot_expiration_date;
v_mold_tbl(1).serial_number := rec.serial_number;
v_mold_tbl(1).receiving_document := rec.receiving_document;
v_mold_tbl(1).demand_id := rec.demand_id;
v_mold_tbl(1).rcv_transaction_id := rec.rcv_transaction_id;
v_mold_tbl(1).move_transaction_id := rec.move_transaction_id;
v_mold_tbl(1).completion_transaction_id := rec.completion_transaction_id;
v_mold_tbl(1).wip_entity_type := rec.wip_entity_type;
v_mold_tbl(1).schedule_id := rec.schedule_id;
v_mold_tbl(1).repetitive_line_id := rec.repetitive_line_id;
v_mold_tbl(1).employee_code := rec.employee_code;
v_mold_tbl(1).primary_switch := rec.primary_switch;
v_mold_tbl(1).schedule_update_code := rec.schedule_update_code;
v_mold_tbl(1).setup_teardown_code := rec.setup_teardown_code;
v_mold_tbl(1).item_ordering := rec.item_ordering;
v_mold_tbl(1).negative_req_flag := rec.negative_req_flag;
v_mold_tbl(1).operation_seq_num := rec.operation_seq_num;
v_mold_tbl(1).picking_line_id := rec.picking_line_id;
v_mold_tbl(1).trx_source_line_id := rec.trx_source_line_id;
v_mold_tbl(1).trx_source_delivery_id := rec.trx_source_delivery_id;
v_mold_tbl(1).physical_adjustment_id := rec.physical_adjustment_id;
v_mold_tbl(1).cycle_count_id := rec.cycle_count_id;
v_mold_tbl(1).rma_line_id := rec.rma_line_id;
v_mold_tbl(1).customer_ship_id := rec.customer_ship_id;
v_mold_tbl(1).currency_code := rec.currency_code;
v_mold_tbl(1).currency_conversion_rate := rec.currency_conversion_rate;
v_mold_tbl(1).currency_conversion_type := rec.currency_conversion_type;
v_mold_tbl(1).currency_conversion_date := rec.currency_conversion_date;
v_mold_tbl(1).ussgl_transaction_code := rec.ussgl_transaction_code;
v_mold_tbl(1).vendor_lot_number := rec.vendor_lot_number;
v_mold_tbl(1).encumbrance_account := rec.encumbrance_account;
v_mold_tbl(1).encumbrance_amount := rec.encumbrance_amount;
v_mold_tbl(1).ship_to_location := rec.ship_to_location;
v_mold_tbl(1).shipment_number := rec.shipment_number;
v_mold_tbl(1).transfer_cost := rec.transfer_cost;
v_mold_tbl(1).transportation_cost := rec.transportation_cost;
v_mold_tbl(1).transportation_account := rec.transportation_account;
v_mold_tbl(1).freight_code := rec.freight_code;
v_mold_tbl(1).containers := rec.containers;
v_mold_tbl(1).waybill_airbill := rec.waybill_airbill;
v_mold_tbl(1).expected_arrival_date := rec.expected_arrival_date;
v_mold_tbl(1).transfer_subinventory := rec.transfer_subinventory;
v_mold_tbl(1).transfer_organization := rec.transfer_organization;
v_mold_tbl(1).transfer_to_location := rec.transfer_to_location;
v_mold_tbl(1).new_average_cost := rec.new_average_cost;
v_mold_tbl(1).value_change := rec.value_change;
v_mold_tbl(1).percentage_change := rec.percentage_change;
v_mold_tbl(1).material_allocation_temp_id := rec.material_allocation_temp_id;
v_mold_tbl(1).demand_source_header_id := rec.demand_source_header_id;
v_mold_tbl(1).demand_source_line := rec.demand_source_line;
v_mold_tbl(1).demand_source_delivery := rec.demand_source_delivery;
v_mold_tbl(1).item_segments := rec.item_segments;
v_mold_tbl(1).item_description := rec.item_description;
v_mold_tbl(1).item_trx_enabled_flag := rec.item_trx_enabled_flag;
v_mold_tbl(1).item_location_control_code := rec.item_location_control_code;
v_mold_tbl(1).item_restrict_subinv_code := rec.item_restrict_subinv_code;
v_mold_tbl(1).item_restrict_locators_code := rec.item_restrict_locators_code;
v_mold_tbl(1).item_revision_qty_control_code := rec.item_revision_qty_control_code;
v_mold_tbl(1).item_primary_uom_code := rec.item_primary_uom_code;
v_mold_tbl(1).item_uom_class := rec.item_uom_class;
v_mold_tbl(1).item_shelf_life_code := rec.item_shelf_life_code;
v_mold_tbl(1).item_shelf_life_days := rec.item_shelf_life_days;
v_mold_tbl(1).item_lot_control_code := rec.item_lot_control_code;
v_mold_tbl(1).item_serial_control_code := rec.item_serial_control_code;
v_mold_tbl(1).item_inventory_asset_flag := rec.item_inventory_asset_flag;
v_mold_tbl(1).allowed_units_lookup_code := rec.allowed_units_lookup_code;
v_mold_tbl(1).department_id := rec.department_id;
v_mold_tbl(1).department_code := rec.department_code;
v_mold_tbl(1).wip_supply_type := rec.wip_supply_type;
v_mold_tbl(1).supply_subinventory := rec.supply_subinventory;
v_mold_tbl(1).supply_locator_id := rec.supply_locator_id;
v_mold_tbl(1).valid_subinventory_flag := rec.valid_subinventory_flag;
v_mold_tbl(1).valid_locator_flag := rec.valid_locator_flag;
v_mold_tbl(1).locator_segments := rec.locator_segments;
v_mold_tbl(1).current_locator_control_code := rec.current_locator_control_code;
v_mold_tbl(1).number_of_lots_entered := rec.number_of_lots_entered;
v_mold_tbl(1).wip_commit_flag := rec.wip_commit_flag;
v_mold_tbl(1).next_lot_number := rec.next_lot_number;
v_mold_tbl(1).lot_alpha_prefix := rec.lot_alpha_prefix;
v_mold_tbl(1).next_serial_number := rec.next_serial_number;
v_mold_tbl(1).serial_alpha_prefix := rec.serial_alpha_prefix;
v_mold_tbl(1).shippable_flag := rec.shippable_flag;
v_mold_tbl(1).posting_flag := rec.posting_flag;
v_mold_tbl(1).required_flag := rec.required_flag;
v_mold_tbl(1).process_flag := rec.process_flag;
v_mold_tbl(1).error_code := rec.error_code;
v_mold_tbl(1).error_explanation := rec.error_explanation;
v_mold_tbl(1).attribute_category := rec.attribute_category;
v_mold_tbl(1).attribute1 := rec.attribute1;
v_mold_tbl(1).attribute2 := rec.attribute2;
v_mold_tbl(1).attribute3 := rec.attribute3;
v_mold_tbl(1).attribute4 := rec.attribute4;
v_mold_tbl(1).attribute5 := rec.attribute5;
v_mold_tbl(1).attribute6 := rec.attribute6;
v_mold_tbl(1).attribute7 := rec.attribute7;
v_mold_tbl(1).attribute8 := rec.attribute8;
v_mold_tbl(1).attribute9 := rec.attribute9;
v_mold_tbl(1).attribute10 := rec.attribute10;
v_mold_tbl(1).attribute11 := rec.attribute11;
v_mold_tbl(1).attribute12 := rec.attribute12;
v_mold_tbl(1).attribute13 := rec.attribute13;
v_mold_tbl(1).attribute14 := rec.attribute14;
v_mold_tbl(1).attribute15 := rec.attribute15;
v_mold_tbl(1).movement_id := rec.movement_id;
v_mold_tbl(1).reservation_quantity := rec.reservation_quantity;
v_mold_tbl(1).shipped_quantity := rec.shipped_quantity;
v_mold_tbl(1).transaction_line_number := rec.transaction_line_number;
v_mold_tbl(1).task_id := rec.task_id;
v_mold_tbl(1).to_task_id := rec.to_task_id;
v_mold_tbl(1).source_task_id := rec.source_task_id;
v_mold_tbl(1).project_id := rec.project_id;
v_mold_tbl(1).source_project_id := rec.source_project_id;
v_mold_tbl(1).pa_expenditure_org_id := rec.pa_expenditure_org_id;
v_mold_tbl(1).to_project_id := rec.to_project_id;
v_mold_tbl(1).expenditure_type := rec.expenditure_type;
v_mold_tbl(1).final_completion_flag := rec.final_completion_flag;
v_mold_tbl(1).transfer_percentage := rec.transfer_percentage;
v_mold_tbl(1).transaction_sequence_id := rec.transaction_sequence_id;
v_mold_tbl(1).material_account := rec.material_account;
v_mold_tbl(1).material_overhead_account := rec.material_overhead_account;
v_mold_tbl(1).resource_account := rec.resource_account;
v_mold_tbl(1).outside_processing_account := rec.outside_processing_account;
v_mold_tbl(1).overhead_account := rec.overhead_account;
v_mold_tbl(1).flow_schedule := rec.flow_schedule;
v_mold_tbl(1).cost_group_id := rec.cost_group_id;
v_mold_tbl(1).demand_class := rec.demand_class;
v_mold_tbl(1).qa_collection_id := rec.qa_collection_id;
v_mold_tbl(1).kanban_card_id := rec.kanban_card_id;
v_mold_tbl(1).overcompletion_transaction_id := rec.overcompletion_transaction_id;
v_mold_tbl(1).overcompletion_primary_qty := rec.overcompletion_primary_qty;
v_mold_tbl(1).overcompletion_transaction_qty := rec.overcompletion_transaction_qty;
v_mold_tbl(1).end_item_unit_number := rec.end_item_unit_number;
v_mold_tbl(1).scheduled_payback_date := rec.scheduled_payback_date;
v_mold_tbl(1).line_type_code := rec.line_type_code;
v_mold_tbl(1).parent_transaction_temp_id := rec.parent_transaction_temp_id;
v_mold_tbl(1).put_away_strategy_id := rec.put_away_strategy_id;
v_mold_tbl(1).put_away_rule_id := rec.put_away_rule_id;
v_mold_tbl(1).pick_strategy_id := rec.pick_strategy_id;
v_mold_tbl(1).pick_rule_id := rec.pick_rule_id;
v_mold_tbl(1).common_bom_seq_id := rec.common_bom_seq_id;
v_mold_tbl(1).common_routing_seq_id := rec.common_routing_seq_id;
v_mold_tbl(1).cost_type_id := rec.cost_type_id;
v_mold_tbl(1).org_cost_group_id := rec.org_cost_group_id;
v_mold_tbl(1).move_order_line_id := rec.move_order_line_id;
v_mold_tbl(1).task_group_id := rec.task_group_id;
v_mold_tbl(1).pick_slip_number := rec.pick_slip_number;
v_mold_tbl(1).reservation_id := rec.reservation_id;
v_mold_tbl(1).transaction_status := rec.transaction_status;
v_mold_tbl(1).transfer_cost_group_id := rec.transfer_cost_group_id;
v_mold_tbl(1).lpn_id := rec.lpn_id;
v_mold_tbl(1).transfer_lpn_id := rec.transfer_lpn_id;
v_mold_tbl(1).pick_slip_date := rec.pick_slip_date;
v_mold_tbl(1).content_lpn_id := rec.content_lpn_id;
v_mold_tbl(1).transaction_quantity := p_pick_conf_qty;
v_mold_tbl(1).primary_quantity := p_pick_conf_qty;
v_mold_tbl(1).shipped_quantity := p_pick_conf_qty;
INV_PICK_WAVE_PICK_CONFIRM_PUB.PICK_CONFIRM(p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_move_order_type => 3 -- PickWave - Order
p_transaction_mode => 1 -- 1:On-Line, 2:Concurrent, 3:Background
p_trolin_tbl => v_moveln_tbl_d,
p_mold_tbl => v_mold_tbl,
x_mmtt_tbl => v_mold_tbl,
x_trolin_tbl => v_moveln_tbl_o,
p_transaction_date => SYSDATE);
COMMIT;
DBMS_OUTPUT.PUT_LINE('Return status of INV_PICK_WAVE_PICK_CONFIRM_PUB.PICK_CONFIRM = ' ||
l_return_status);
IF l_return_status != FND_API.G_RET_STS_SUCCESS THEN
pStatus := cv_fail;
pMsgData := 'Failed to pick confirm move order inv_pick_wave_pick_confirm_pub.pick_confirm for MOVE_ORDER_LINE_ID : ' ||
vMoveOrderLineId;
GOTO end_of_pkcnf;
END IF;
v_api_pick_confirm := 1;
dbms_output.put_line('Status of the Pick Confirm is : ' ||
l_return_status);
<<end_of_pkcnf>>
NULL;
end loop;
END;
Updating Shipping attributes
DECLARE
--Standard Parameters.
p_api_version NUMBER;
init_msg_list VARCHAR2(30);
p_commit VARCHAR2(30);
--Parameters for WSH_DELIVERY_DETAILS_PUB.update_shipping_attributes.
source_code VARCHAR2(15);
changed_attributes WSH_DELIVERY_DETAILS_PUB.ChangedAttributeTabType;
--out parameters
x_return_status VARCHAR2(10);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_msg_details VARCHAR2(3000);
x_msg_summary VARCHAR2(3000);
-- Handle exceptions
vApiErrorException EXCEPTION;
BEGIN
-- Initialize return status
x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
-- Call this procedure to initialize applications parameters
FND_GLOBAL.APPS_INITIALIZE(user_id => 0,
resp_id => 21623,
resp_appl_id => 660);
source_code := 'OE';
changed_attributes(1).delivery_detail_id := 9317811; -- delivery_detail_id
changed_attributes(1).shipped_quantity := 0; -- quantity to update
changed_attributes(1).cycle_count_quantity := 30;
--Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes(p_api_version_number => 1.0,
p_init_msg_list => init_msg_list,
p_commit => p_commit,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_changed_attributes => changed_attributes,
p_source_code => source_code);
commit;
IF (x_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
RAISE vApiErrorException;
ELSE
dbms_output.put_line('The shipped quantity is updated with ' ||
changed_attributes(1)
.shipped_quantity || ' for the delivery detail ' ||
changed_attributes(1).delivery_detail_id);
END IF;
EXCEPTION
WHEN vApiErrorException 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;
DBMS_OUTPUT.PUT_LINE('Message Data : ' || x_msg_data);
ELSE
x_msg_data := x_msg_summary;
DBMS_OUTPUT.PUT_LINE('Message Data : ' || x_msg_data);
END IF;
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Unexpected Error: ' || SQLERRM);
END;
ThanksHi,
Goto VTFL.Select you valid combination.
Click on item.Select yout item category there.Goto details.
Select the Pos/neg quantity field as "+".
Maintain the billing quantity as "A".
Maintain VBRK/VBRP as "001".
Save.
Goto VOV7 and select your item category.Details.
Select completion rule as "B" and billing relevance as "F".
Save.
Pls go through the follwing threads that are posted by me earlier.
[Invoice split|Re: Invoice split]
[Splitiing of invoice|Re: Invoice split]
Regards,
Krishna. -
Automatic TO Creation for Inbound Deliveries
I would like to have TO created automatically for Inbound delivery for PO.
1) I have set the Automatic TO = A in Mvmt Type 101 for my warehouse in transaction OMKZ.
2) I have set Immediate TO Creation and Mail Control = A for Mvmt Type 101, Mvmt Indicator =B, Mvmt Type 101, TR Create =X for my warehouse in transaction OMKX
3) I have assigned Routine #32 to Application E1 in transaction VOFM
4) I have created output conditon WMTA for delivery type EL with Medium =8 and Date/Time =4.
Tranfer order is not created when the delivery is created via transaction VL34. The output determination analysis indicates that WMTA was ignored because requirement 032 not fulfilled. What am I missing?
Thank you.Hi Julie Simonds
I believe you are working with Inbound delivery with Item catagory as ELN.
Please check if Relevant for putaway is checked.
Path for your refernce :
SPRO > LE > Shipping > Deliveries > Define Item catagory for deliveries.
Thanks,
Mahesh -
Redetermination of item category in deliveries
Hi,
Let me explain with an example i have sales order with item category TAN and when i do delivery i want the item category should redetermine as TAS(example)
what are all the setting in need to do?
Please guide me its really urgent for me.
Thanks alot
Sridhar BHi,
Delivery Item category is determined based on the Delivery type assigned to your sales document, Item category group from the material master.
So if u want to redetermine the delivery type in the sales order, go to
Spro, Logistics execution, Shipping, Deliveries, Define Item Category determination in deliveries.
Here assign Item category to the combination of ur delivery type, Item category group. Then that item category will be determined automatically.
Reward points if it is helpful,
Regards,
Sree
Maybe you are looking for
-
Does the Ipod nano 5th gen. work with the built in microphone on Skullcandy headphones?
I want to buy a pair of Skullcandys with a microphone in them, but it wouldnt make sense to pay the extra money for a microphone if my iPod wont work with it. Has anyone ever tried it or know if the headphones would be compatible with the iPod
-
How to read from one file and write into another file?
Hi, I am trying to read a File and write into another file.This is the code that i am using.But what happens is last line is only getting written..How to resolve this.the code is as follows, public String get() { FileReader fr; try {
-
Column-clipping behavior of FIND from SAP-delivered ALV toolbar
I have an ALV display whose rows start with three short columns followed by one pretty long column. The customers want to use the FIND button from the standard SAP ALV toolbar to search for substrings in the text that's in the long column. The find i
-
Problem again with maintenance workbench,
Hi all, The probelm again with the Maintenance Workbench is, when i try to implement the scheduled works am receiving an error "The entitiy with header id(3) generated the following error(s)" Please help me out Thanks Dinesh Edited by: Dinesh on 29-A
-
Why iCloud only allows store documents created by Pages, Numbers or Key Note ? How can I "iCloud" documents created with Word Mac or Excel mac??