SD--Rescheduling - V_V2

本文详细解释了如何在V_V2系统中进行销售订单重新调度,包括其目的、工作原理和常见问题。重点介绍了文档重新分配、优先级设置和调试提示,帮助用户更好地理解和操作这一功能。

Rescheduling - V_V2

   

Purpose


The purpose of this page is to explain how rescheduling works and why is it used.

Overview

Rescheduling allows the redistribution of already confirmed quantities to other documents

Rescheduling of Sales Documents (V_V2)

The program SDV03V02 takes the selected documents and unconfirms them all. Then they are rechecked, one after the other, based on the customising customer has set priorities of sorting can be customized to a much finer level.

  1. Delivery priority
  2. Date the document was created
  3. Number of the sales document
  4. Alternatively the flag in V_V2 can be set to consider the delivery date instead of the creation date

Example:

There are two customer orders requiring the same material on the same date but there is only one piece in stock. Order of customer A has got the only piece in stock left, as his order was created earlier at 10am today. The order of customer B was created later in the day at 3pm today. Because, there was no stock left, order did not get a confirmation. But Customer B has a higher delivery priority (more important customer) and upon running rescheduling with a prioritization on delivery priority, order of Customer B will receive the confirmed quantity of 1 piece while the order of customer A will lose it.

 

Debugging Hints

  • Data selection

  1. In report SDV03V02, Depending on user’s entries on selection screen open and relevant sales orders and stock transport documents with their items/schedules are being read from the database and stored in an internal table (called XTAB)
  • Data processing

  1. Main module: XTAB_CHECK_AND_SAVE.
  2. Records of the internal table are read one by one, checked against ATP and saved with new results.
  3. Correction records’ are created to track and memorize the results of the availability check.
  4. An error during process will leave the ATP-situation unchanged.
  • Data Output

  1. Results list prepared throughout process (internal table ‘output’) and created via module XTAB_LIST 
  • Selecting Material and Plant

  1. SELECT FROM VAPMA FOR ENTERED MATERIAL/PLANT.
  • Check Header Status (VBUK)

  1. IF SY-SUBRC   NE 0                     OR

                    VBUK-GBSTK EQ CHARC                    OR     „completed          

                    VBUK-RFGSK EQ CHARC                    OR     „fully referenced     

                    VBUK-LFGSK EQ CHARC                     OR     „fully delivered    

                    VBUK-VBTYP CN VBTYP_VERK          OR     „no sales document

                    VBUK-VBTYP CA VBTYP_RETOUR     OR     „Retour           

                    VBUK-VBTYP CA VBTYP_OHNE_EINTEILUNG.     „No schedule lines

                    DA_SKIP_BELEG   = CHARX.                                        

  •  Check tem Status (VBUP)

  1.   IF VBAP-PROSA NE CHARB. (B = Replacement item of product selection)    

                      CHECK VBUP-GBSTA NE CHARC    AND      „completed

                      VBUP-RFGSA NE CHARC   AND                     „fully referenced

                      VBUP-LFGSA NE CHARC   AND                     „fully delivered

                      VBUP-ABSTA NE CHARC                              „not rejected

                      ELSE.                              

                      CHECK VBUP-ABSTA NE CHARC.       

                      ENDIF.                             

Process Flow

Correction Records

  • What are Condition Records

In the rescheduling process requirements are NOT read from database when ATP is checked for a material (while stocks and planned receipts are).The base for the sequence of the redistribution of confirmed quantities is how the internal table containing all 'to be processed records' are sorted. Also ATP is called with the values (quantities and dates) stored in the internal table. When reading from the database, all requirements would be read and would be added up against the stocks and planned receipts. But this will not allow redistribution. Therefore requirements are not read from the database. In order to track what has been confirmed (new) for a material in the rescheduling process this data is stored in the correction records.   

  • When and how are correction records handled

When a material is checked against ATP all available (sales and stock transport) requirements are read from the internal correction record tables to reflect an appropriate ATP-situation (Internal table sales: XVBBD) Entries are forwarded into p_atpcsx to be used in the ATP-check .A new correction record is saved following the ATP-check. It can also be a case that the same material is found in two lines items in a stock transport order so the changes to the first item have to be directly reflected. Should an error occur during the update of a document, the correction records have to be changed to the values of the situation before the check.

Frequent Issues

  • More than one material is shown in results, only one was requested. During rescheduling, if one material is selected for rescheduling, and there is a delivery block or a complete delivery indicator (on header level of sales order) on ANY of the orders that the program picks up, it will reschedule ALL of the materials found on that order that had the block/indicator.
  • All documents had a confirmation quantity, but rescheduling ran anyhow .Within rescheduling there is a button UNCONFIRMED DOCUMENTS REQUIRED. When populated, you would expect that any order with a fully confirmed quantity to not be considered for rescheduling. But: It just needs one unconfirmed sales document to start the rescheduling. Still all selected sales documents will take part in rescheduling (unconfirmed or confirmed). About the Status confirmed/not confirmed please have a look into note 304570

Related Content

Related Documents

Performing Rescheduling of Sales Documents 

Related SAP Notes/KBA

SAP Note: 304570 - VBUP-BESTA status is "not yet confirmed"

SAP KBA: 1567491 - V_V2 / SDV03V02 - Sales order Items are not selected

 Source link: http://wiki.sdn.sap.com/wiki/display/SCM/Rescheduling+-+V_V2

/** * vhost_rdma_completer - Main completer function (run per QP) * @arg: Pointer to vhost_rdma_qp * * Processes incoming response packets and completes WQEs accordingly. * Implements reliability mechanisms: retry, RNR backoff, PSN tracking. * * Return: 0 on success, -EAGAIN if needs rescheduling */ int vhost_rdma_completer(void *arg) { struct vhost_rdma_qp *qp = arg; struct vhost_rdma_device *dev = qp->dev; struct vhost_rdma_send_wqe *wqe = NULL; struct rte_mbuf *mbuf = NULL; struct vhost_rdma_pkt_info *pkt = NULL; enum comp_state state; int ret = 0; vhost_rdma_add_ref(qp); if (!qp->valid || qp->req.state == QP_STATE_ERROR || qp->req.state == QP_STATE_RESET) { vhost_rdma_drain_resp_pkts(qp, qp->valid && qp->req.state == QP_STATE_ERROR); ret = -EAGAIN; goto done; } if (qp->comp.timeout) { qp->comp.timeout_retry = 1; qp->comp.timeout = 0; } else { qp->comp.timeout_retry = 0; } if (qp->req.need_retry) { ret = -EAGAIN; goto done; } state = VHOST_RDMA_COMPST_GET_ACK; while (1) { RDMA_LOG_DEBUG_DP("QP#%d state=%s", qp->qpn, comp_state_name[state]); switch (state) { case VHOST_RDMA_COMPST_GET_ACK: if (rte_ring_dequeue(qp->resp_pkts, (void **)&mbuf) == 0) { pkt = MBUF_TO_PKT(mbuf); qp->comp.timeout_retry = 0; } else { mbuf = NULL; } state = VHOST_RDMA_COMPST_GET_WQE; break; case VHOST_RDMA_COMPST_GET_WQE: state = vhost_rdma_get_wqe(qp, pkt, &wqe); break; case VHOST_RDMA_COMPST_CHECK_PSN: state = vhost_rdma_check_psn(qp, pkt, wqe); break; case VHOST_RDMA_COMPST_CHECK_ACK: state = vhost_rdma_check_ack(qp, pkt, wqe); break; case VHOST_RDMA_COMPST_READ: state = vhost_rdma_do_read(qp, pkt, wqe); break; case VHOST_RDMA_COMPST_ATOMIC: state = vhost_rdma_do_atomic(qp, pkt, wqe); break; case VHOST_RDMA_COMPST_WRITE_SEND: if (wqe && wqe->state == WQE_STATE_PENDING && wqe->last_psn == pkt->psn) state = VHOST_RDMA_COMPST_COMP_ACK; else state = VHOST_RDMA_COMPST_UPDATE_COMP; break; case VHOST_RDMA_COMPST_COMP_ACK: state = vhost_rdma_complete_ack(qp, pkt, wqe); break; case VHOST_RDMA_COMPST_COMP_WQE: state = vhost_rdma_complete_wqe(qp, pkt, wqe); break; case VHOST_RDMA_COMPST_UPDATE_COMP: if (pkt->mask & VHOST_END_MASK) qp->comp.opcode = -1; else qp->comp.opcode = pkt->opcode; if (psn_compare(pkt->psn, qp->comp.psn) >= 0) qp->comp.psn = (pkt->psn + 1) & VHOST_RDMA_PSN_MASK; if (qp->req.wait_psn) { qp->req.wait_psn = 0; vhost_rdma_run_task(&qp->req.task, 1); } state = VHOST_RDMA_COMPST_DONE; break; case VHOST_RDMA_COMPST_DONE: goto done; case VHOST_RDMA_COMPST_EXIT: if (qp->comp.timeout_retry && wqe) { state = VHOST_RDMA_COMPST_ERROR_RETRY; break; } /* Restart retransmit timer if conditions met */ if ((qp->type == VHOST_RDMA_IB_QPT_RC) && (qp->req.state == QP_STATE_READY) && (psn_compare(qp->req.psn, qp->comp.psn) > 0) && qp->qp_timeout_ticks) { rte_timer_reset(&qp->retrans_timer, qp->qp_timeout_ticks, SINGLE, rte_lcore_id(), retransmit_timer, qp); } ret = -EAGAIN; goto done; case VHOST_RDMA_COMPST_ERROR_RETRY: if (!wqe || wqe->state == WQE_STATE_POSTED) goto done; if (qp->comp.started_retry && !qp->comp.timeout_retry) goto done; if (qp->comp.retry_cnt > 0) { if (qp->comp.retry_cnt != 7) qp->comp.retry_cnt--; if (psn_compare(qp->req.psn, qp->comp.psn) > 0) { vhost_rdma_counter_inc(dev, VHOST_RDMA_CNT_COMP_RETRY); qp->req.need_retry = 1; qp->comp.started_retry = 1; vhost_rdma_run_task(&qp->req.task, 0); } goto done; } else { vhost_rdma_counter_inc(dev, VHOST_RDMA_CNT_RETRY_EXCEEDED); wqe->status = VHOST_RDMA_IB_WC_RETRY_EXC_ERR; state = VHOST_RDMA_COMPST_ERROR; } break; case VHOST_RDMA_COMPST_RNR_RETRY: if (qp->comp.rnr_retry > 0) { if (qp->comp.rnr_retry != 7) qp->comp.rnr_retry--; qp->req.need_retry = 1; RDMA_LOG_DEBUG_DP("QP#%d setting RNR NAK timer", qp->qpn); rte_timer_reset(&qp->rnr_nak_timer, rnrnak_ticks(aeth_syn(pkt) & ~AETH_TYPE_MASK), SINGLE, rte_lcore_id(), vhost_rdma_rnr_nak_timer, qp); ret = -EAGAIN; goto done; } else { vhost_rdma_counter_inc(dev, VHOST_RDMA_CNT_RNR_RETRY_EXCEEDED); wqe->status = VHOST_RDMA_IB_WC_RNR_RETRY_EXC_ERR; state = VHOST_RDMA_COMPST_ERROR; } break; case VHOST_RDMA_COMPST_ERROR: RDMA_LOG_ERR_DP("WQE Error: %u", wqe->status); vhost_rdma_do_complete(qp, wqe); vhost_rdma_qp_error(qp); ret = -EAGAIN; goto done; } } done: if (pkt) free_pkt(pkt); vhost_rdma_drop_ref(qp, dev, qp); return ret; } 还有这段也生成一下
最新发布
12-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值