EBS销售订单挑库发放处理程序

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

EBS销售订单挑库发放处理程序成功在EBS实施中,经常遇到从外部传进来一个销售订单,需要回传到EBS中,通过程序进行销售订单的挑库发放下面是对SO挑库发放的实现步骤的详细实现:1.对销售订单的有效性验证1)检查销售订单的行是否被完全传回客户化表2)验证销售订单的关键字段3)检查子库存是否启用了货位控制,如果启用了货位控制,没有生成货位,则调用API生成货位4)调用API检查子库存中的某一个物料的现用量和可用量2.销售订单发放调用API进行销售订单发放发放成功:返回一个批号,这个批号作为挑库发放的参数3.销售订单挑库发放调用API进行挑库发放发放前行状态:准备发放下一步:挑库发放判断依据:销售订单发放生成的批号作为挑库发放的参数发放成功行状态:已发放至仓库下一步:处理物料搬运单判断依据:返回一个批号,这个批号作为挑库发放的参数发放失败行状态:已延交下一步:挑库发放判断依据:未成功返回一个批号说明:订单发放是按照整个订单发放的。4.处理物料搬运单处理成功:行状态:发运下一步:判断依据:返回成功的处理状态处理成失败行状态:下一步:处理物料搬运单判断依据:未返回成功的处理状态5.得到销售订单的交货号(delivery_id)调用API查看是否产生发运号成功:返回发运号失败:未返回发运号6.发运确认处理成功订单状态为:关闭说明:如果发运确认已经成功,则会自动调用连接形成停靠站接口程序具体实现代码1.对销售订单的有效性验证调用API验证货位的代码:fnd_profile.put('MFG_ORGANIZATION_ID',p_organization_id);l_locator_type:=get_locator_type(p_sub_inv,p_organization_id);IFl_locator_type!=1THENl_locator:=p_sub_inv||'.'||p_project||'.'||p_task;inv_loc_wms_pub.create_locator(x_return_status=l_status,x_msg_count=l_msg_count,x_msg_data=l_msg_data,x_inventory_location_id=l_locator_id,x_locator_exists=l_locator_exists,p_organization_id=p_organization_id,p_organization_code=p_organization_code,p_concatenated_segments=l_locator,p_description=NULL,p_inventory_location_type=l_locator_type,p_picking_order=NULL,p_location_maximum_units=NULL,p_subinventory_code=p_sub_inv,p_location_weight_uom_code=NULL,p_max_weight=NULL,p_volume_uom_code=NULL,p_max_cubic_area=NULL,p_x_coordinate=NULL,p_y_coordinate=NULL,p_z_coordinate=NULL,p_physical_location_id=NULL,p_pick_uom_code=NULL,p_dimension_uom_code=NULL,p_length=NULL,p_width=NULL,p_height=NULL,p_status_id=1,p_dropping_order=NULL);IFl_locator_idISNULLTHENo_err_code:=g_error;o_err_msg:='创建(获取)货位弹性域发生错误';ELSEo_locator_id:=l_locator_id;ENDIF;调用API验证库存现用量和可用量的代码:inv_quantity_tree_pub.query_quantities(p_api_version_number=1.0,x_return_status=l_return_status,x_msg_count=l_msg_count,x_msg_data=l_msg_data,p_organization_id=l_organization_id,p_inventory_item_id=rec_data.item_id,--itemidp_tree_mode=2,p_is_revision_control=FALSE,p_is_lot_control=l_lot_control_flag,p_lot_expiration_date=rec_data.transaction_date,p_is_serial_control=FALSE,p_grade_code=NULL,--INVCONVNOTNEEDEDNOWp_revision=NULL,p_lot_number=NULL,p_subinventory_code=rec_data.pick_from_subinventory,p_locator_id=l_locator_id,x_qoh=l_qoh,x_rqoh=l_rqoh,x_qr=l_qr,x_qs=l_qs,x_att=l_att,x_atr=l_atr,x_sqoh=l_sqoh,--INVCONVx_srqoh=l_srqoh,--INVCONVx_sqr=l_sqr,--INVCONVx_sqs=l_sqs,--INVCONVx_satt=l_satt,--INVCONVx_satr=l_satr);--INVCONVIFnvl(l_atr,0)=0THENGOTOend_loop;ENDIF;2.销售订单发放调用API进行销售订单发放的代码:fnd_profile.PUT('MFG_ORGANIZATION_ID',l_organization_id);wsh_picking_batches_pkg.insert_row(x_rowid=l_row_id,x_batch_id=l_batch_id,p_creation_date=g_sysdate,p_created_by=g_user_id,p_last_update_date=g_sysdate,p_last_updated_by=g_user_id,p_last_update_login=g_login_id,p_batch_name_prefix=NULL,x_name=l_name,p_backorders_only_flag=l_rule_rec.backorders_only_flag,p_document_set_id=l_rule_rec.document_set_id,p_existing_rsvs_only_flag=l_rule_rec.existing_rsvs_only_flag,p_shipment_priority_code=l_rule_rec.shipment_priority_code,p_ship_method_code=l_rule_rec.ship_method_code,p_customer_id=l_customer_id,p_order_header_id=rec_data.order_header_id,p_ship_set_number=l_rule_rec.ship_set_number,p_inventory_item_id=NULL,p_order_type_id=l_order_type_id,p_from_requested_date=NULL,p_to_requested_date=NULL,p_from_scheduled_ship_date=NULL,p_to_scheduled_ship_date=NULL,p_ship_to_location_id=l_rule_rec.ship_to_location_id,p_ship_from_location_id=l_rule_rec.ship_from_location_id/*l_stage_locator_id*/,p_trip_id=NULL,p_delivery_id=NULL,p_include_planned_lines=l_rule_rec.include_planned_lines,p_pick_grouping_rule_id=l_rule_rec.pick_grouping_rule_id,p_pick_sequence_rule_id=l_rule_rec.pick_sequence_rule_id,p_autocreate_delivery_flag='Y',--l_rule_rec.autocreate_delivery_flag;--无论规则是否自动创建交货号,都让系统自动创建(用shipment_number做交货号)p_attribute_category=NULL,p_attribute1=NULL,p_attribute2=NULL,p_attribute3=NULL,p_attribute4=NULL,p_attribute5=NULL,p_attribute6=NULL,p_attribute7=NULL,p_attribute8=NULL,p_attribute9=NULL,p_attribute10=NULL,p_attribute11=NULL,p_attribute12=NULL,p_attribute13=NULL,p_attribute14=NULL,p_attribute15=NULL,p_autodetail_pr_flag=l_rule_rec.autodetail_pr_flag,p_carrier_id=l_rule_rec.carrier_id,p_trip_stop_id=NULL,p_default_stage_subinventory=l_rule_rec.default_stage_subinventory,--ERP临时发货区p_default_stage_locator_id=l_stage_locator_id,p_pick_from_subinventory=rec_data.pick_from_subinventory,/*l_rule_rec.pick_from_subinventory,*/--ERP提货区p_pick_from_locator_id=l_locator_id,--l_rule_rec.pick_from_locator_id,p_auto_pick_confirm_flag='N'/*l_rule_rec.auto_pick_confirm_flag*/,--无论规则是否自动确认挑库,都不让系统自动挑库(可能会修改分配数)p_delivery_detail_id=NULL,p_project_id=rec_data.project_id,p_task_id=rec_data.task_id,p_organization_id=l_organization_id,p_ship_confirm_rule_id=l_rule_rec.ship_confirm_rule_id,p_autopack_flag=l_rule_rec.autopack_flag,p_autopack_level=l_rule_rec.autopack_level,p_task_planning_flag=l_r

1 / 16
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功