SO and PO numbers

1.      Number Sequence

In Axapta, all the order numbers for the deferent types are set by number sequence in basic module. There is an important option of number sequence create.

The checked continuous means the number sequence will be keep continuous always. If the former order are deleted or missed, system will try to find the missing number and reuse it. The right moment for finding is always occurs after the clean up.

The operation for cleaning up can be done manually or automatically.

2.      Business requirement

In Haldex, from requirement of business audit, we should set all the numbers for PO and SO continuous, the deleted numbers should not be used again.

3.      Solution

In Axapta, we can set number sequences of the PO and SO with checked continuous. In parameters of the modules of Sales ledger and purchase ledger, we can keep the voided orders, so the deleted orders can be inquired, the deleted number cannot be used again. Use the following path to find the deleted information.

1、    Deleted SO: Sales Ledger-> inquiries->history->Voided sales order

2、    Deleted PO: Purchase Ledger-> inquiries ->history->Voided purchase order

优化以下Oracle语句: SELECT SUBSTR(msn.serial_number, 1, 10) genset_sn, msi2.segment1 Genset_BOM_NUM, msi2.inventory_item_id, msi.segment1 key_component, mut1.serial_number component_sn, msi.description component_desc, wdj.date_completed, (SELECT MAX(aps.vendor_name) FROM ap_suppliers aps, bom_resources bor, mtl_unit_transactions mut, po_headers_all poh, po_lines_all pol, wip_osp_resources_val_v wor WHERE aps.vendor_id = poh.vendor_id AND bor.resource_id = wor.resource_id AND poh.po_header_id = pol.po_header_id AND pol.item_id = bor.purchase_item_id AND wor.wip_entity_id = mut.transaction_source_id AND mut.serial_number = mut1.serial_number AND mut.inventory_item_id = mut1.inventory_item_id AND mut.organization_id = mut1.organization_id AND mut.receipt_issue_type = 2 AND mut.transaction_source_type_id = 5 ) supplier FROM mtl_material_transactions mmt1, mtl_material_transactions mmt2, mtl_parameters mpa, mtl_serial_numbers msn, mtl_system_items msi, mtl_system_items msi2, mtl_transaction_types mtt1, mtl_transaction_types mtt2, mtl_unit_transactions mut1, mtl_unit_transactions mut2, wip_discrete_jobs_v wdj WHERE mmt1.inventory_item_id = mut1.inventory_item_id AND mmt1.organization_id = mut1.organization_id AND WDJ.PRIMARY_ITEM_ID = msi2.INVENTORY_ITEM_ID AND mmt1.transaction_id = mut1.transaction_id AND mmt1.transaction_source_id = wdj.wip_entity_id AND mmt1.transaction_type_id = mtt1.transaction_type_id AND mtt1.transaction_type_name = 'WIP Issue' AND NOT EXISTS (SELECT 'WIP Negative Issue or WIP Return' FROM mtl_material_transactions mmt3, mtl_transaction_types mtt3, mtl_unit_transactions mut3 WHERE mmt3.transaction_id = mut3.transaction_id AND mmt3.transaction_type_id = mtt3.transaction_type_id AND mmt3.transaction_date > mmt1.transaction_date AND mtt3.transaction_type_name IN ('WIP Negative Issue', 'WIP Return') AND mut3.serial_number = mut1.serial_number AND mut3.inventory_item_id = mut1.inventory_item_id) AND mmt2.transaction_id = mut2.transaction_id AND mmt2.transaction_source_id = wdj.wip_entity_id AND mmt2.transaction_type_id = mtt2.transaction_type_id AND mtt2.transaction_type_name = 'WIP Completion' AND mpa.organization_code = 'WHP' AND msn.current_organization_id = mpa.organization_id AND LENGTH(msn.serial_number) >= 10 AND msi.inventory_item_id = mmt1.inventory_item_id AND msi.organization_id = mmt1.organization_id AND (msi.planning_make_buy_code = 2 OR msi.segment1 LIKE 'SO%') AND mut2.serial_number = msn.serial_number AND mut2.inventory_item_id = msn.inventory_item_id AND mut2.organization_id = mpa.organization_id AND msi2.ORGANIZATION_ID = '323'
07-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值