Credit limit check cause the item schedule line confirmed qty empty
Hi,
I have an SO that is under credit limit check, the problem is, after releasing it via VKM3, the confirmed qty at item schedule line is not taking the qty as of stock at the time. The SO qty is 100 Pcs, but there's still stock of 80 Pcs. I will then need to split the schedule line to 2 lines --> 1st line with order qty 80 Pcs, and 2nd line 20 Pcs. Then only the confirmed qty appear for the 80Pcs.
For usual SO that is without credit checking, the confirmed qty will immediately shown as in 1 schedule line. Does anyone know why is this happening and can we amend this problem?
Thanks.
Hi
If an order is subject to credit check once you save the order the confirmed quantities becomes 0 because if the settings done in t code OVB8 Number of the routine used for copying is set as 101and System FORM routine number is set as 1 (and this is the standard settings)
This is kept like this in standard so that if a material stock is say 10 units and order from customer X has come for 10 units and that order is blocked on crediit limit so that when the next order from customer Y has come for another 5 units and this customer Y has a better credit limit and this order is not blocked on Credit limit check then she should not suffer for stocks
A genuine customer should not be deprived of stocks
For you between the order registered and released thro VKM3 another order has come from another customer for 20 units and hence the 100 units has become 80 now and balance 20 is confirmed for a future date thro forward scheduling
In T code OVB8 you can do the customizations for this scenario according to the business requirement
Regards
Raja
Similar Messages
-
How do I access the item Schedule line date in VA01?
Hi,
I am using userexit_check_vbep to carry out some checks. I need to access the Schedule line date value (RV45A-ETDAT) but it is not available at that point. How can I read that value from the exit?
Thanks,
KrocThanks Advait,
ahhh, I asked the wrong question. Yes, xvbep is available in the userexit but my code is being called earlier in the process. This is the call sequence
VBAP_FUELLEN
VBAP-VSTEL_ERMITTELN
VBAP-ROUTE_ERMITTELN
SD_ROUTE_DETERMINATION
EXIT_SAPL0VRF_001............This is where I need to access the schedule line data
Z_CUT_OFF_TIME_CALCULATE............This is where I need to access the schedule line data
Z_CUT_OFF_DETERMINE_DATA............This is where I need to access the schedule line data
Do you know if it is available at that stage?
Thanks,
Aidan. -
Regarding schedule line confirm qty
Hello ,
I am facing a problem ,that is when we create an order in CRM 2007, we are not able to see confirmed quantity check against the schedule line because of this order is not able to be processed
how can this problem can be solved
regards .Hi Rags,
I have issue regarding schedule line like this .
in Schedule line i have two line
Date qty Confirm Qty
Line 1 16.08.2011 1 0
Line 2 21.09.2011 0 1
Suppose we have created oreder on 16 th Aug so lschedule line 1 is triggerd on 16th Aug and other scedule line triggred on 21.09.2011 with confirm qty.
One Batch job run and update only line 1 like mat avalaiblity date, transpotration date, delivery date etc but not line 2. why ?
I have created PR on 21.08.2011 and Po on 26.08.2011 and material available in plant 5.09.2011 so why this batch job has not change the line2 and date for confirm qty. But it has not changed line 2. Why?
I have checked PR change log and found that item del date chaged from 21.09.2011 to .7.09.2011 but it is not chaged for line 2. Could you please tell me whre is the problem cone across?
thanks -
Dear Friends,
After entering the material details when I chkd the schedule line theres no confirmed qty.....in turn I tried to give the qty no even then the qty disappears....why it happens?.......Note:I havnt maintained stock for the material....Dear S kumar
The confirmed qty in the schedule lines in a sales order is given or determined by the system automatically based on the availabilty check carried out with the settings maintained in OVZ9 and we dont have any control over it
What i mean is confirmed qty will always be greyed out in the schedule lines even if the stock is there
But the order qty will appear as confirmed qty in the greyed out tab if stock is there
No stock means the confirmed qty will be zero
Whether stock is available or not we cant edit confirmed qty in a sales order
Regards
Raja -
Static Credit Limit Check for Sales Orders - Net Value vs Credit Value
We are testing order credit check and we have run into a problem with the Static Credit Limit Check. The Static Credit Limit Check is set to use both Order and Delivery Values. SAP uses the values in S066 and S067 to determine what values it uses to check against the credit limit. Standard SAP uses the confirmed quantity times the credit price to get the order values - this is the credit value.
So the problem is, once an order is released it is set up so it does not go back on credit hold, so anything which is not confirmed (but could be) it a potential credit value which is unaccounted for in the credit exposure and the customer can go over the credit limit.
Additionally, we run AFS and have items which are rejected with a J0 rejection code (unconfirmed) which have the potential of being confirmed and shipped and we want to include these items in the value of the order which is being checked against the credit limit (along with the deliveries, invoices and receivables).
Here is a quick example.
Customer has a credit limit of $100 (no deliveries, invoices or receivables - to keep it simple)
Order 1 is placed with a credit value of $50.00 but a potential value of $100 (the other half is J0) - this passes the credit check since $50.00 is less than the limit.
Order 2 is placed for $50.00 and has a credit value of $50. This also gets approved.
At this point, the credit limit used is 100% (based on standard SAP)
Then Order1 backorder is confirmed and the new credit value is now $100. This order now puts the customer over their limit and if the order had been released would not go back on credit hold and therefore the customer is not over their credit limit by 50%.
What I want is for Order1 to be credit checked for the $100 not the $50 so the exposure is correct.
Does anyone have any suggestions as to how we could use the Net Value of the order to perform the static credit check? And any thoughts on how to determine the correct credit exposure (open order value plus items which are J0, plus deliveries, plus invoices, plus receivables)?
I am thinking about a Z table to track the adjusted values on the orders and then use one of the customer checks to do a static credit check with the adjusted value. And for the exposure, use the adjusted value to recalculate the values in F.35 to show a more accurate view of the credit exposure.
Does anyone have an easier way to do this? Any advice is appreciated.
Thanks,
SuzanneHi Suzzane,
In the scenario that you have provided, in the first order items worth 50$ are rejected. Hence standard SAP will not take this into account as this item is rejected.Two solutions can be provided here:
1) The line item can have a delivery block instead of a reason for rejection.This way the 50$ will get accounted.However, if this is against customer norms as this will appear in the order acknowledgment, this cannot be used.
2) User exit can be used where a credit check can be triggered once the document value changes, even though the document has a released status.
Hope this helps.
Thanks,
Vinu -
Credit Limit Check - Exclude Specific Documents / Credits from Exposure
Hi,
I would like to know if it's possible to exclude specific document types (credits) from the credit exposure calculation used during credit limit checks.
The ideia is to exclude "DG" credits in customer GL that are related to Trade Deal/Agreements to avoid over-exposure.
Let me explain:
Currently, our credit management is configured to "Static" + "Open Items" for all credit groups in the CCA. Therefore, SAP calculates the credit exposure as:
CE = OPEN ORDERS (S066) + OPEN DELIVERIES (S067) + OPEN BILLING (S067) + OPEN ITEMS (BSID)
Regarding "Open Items", I understand that SAP calculates the net value between all debits (receivables) and credits (returns, overpayments, etc...) already posted and not cleared in the Customer GL account. This rationale is correct since the credits are due to the customers and should be deducted from their exposure (i.e. "you may not pay them if you don't receive").
However, in our case, we also pay trade deals contracts (i.e. trade incentives and trade marketing investments) directly to costumers and apart from sales orders or credit memos. The flow is the following: (1) contracts are managed on a satelite system and interfaced to SAP; (2) contracts are created in the costumer GL as a credit (doc. type "DG"); (3) credits are sent to accounts payable for payment via F110.
Problem is that, contract credits volume is significant and are impacting customers credit exposure and limit check, resulting in greater exposure than allowed. That is, orders are being released while contract credits are open in the customer GL up to the max exposure, but when contracts are paid the exposure goes above the limit. For example:
Day 1:
Costumer Credit Limit: 100
Sales Balance: 30
Open Itens: 50 (receivables: 70 / contracts: -20)
Credit Exposure: 80/100
Day 2:
Costumer Credit Limit: 100
Sales Balance: 50
Open Itens: 50 (receivables: 70 / contracts: -20)
Credit Exposure: 100/100 (no additional orders are released)
Day 3:
Costumer Credit Limit: 100
Sales Balance: 50
Open Itens: 70 (receivables: 70 / contracts: 0 - contracts are paid on day 3)
Credit Exposure: 120/100 (exposure is above customer limit since contracts that were being deducted were paid)
Any ideas or thoughts? Is something wrong in the explanation above? Should contracts credits be treated through special GL?
Many thanks!Hello Julie,
the 2nd, System behavior (how do you interact the credit limit check (yes/no question) via DI?)
Workaround:
Before you issue the Document, you may do a manual check: BP balance againt Credit Limit, and make deceision.
Regards
János -
Credit limit check and Payment terms
HI,
Is it possibile to enforce new credit limit check when the payment term is changed? Let's say that customer has "Immediate payment", and after few days wants to change payment term for "90 days payment term". In such case system should check new credit limit check on a sales order (va02). Could you tell me how to do that?
Best regards,
MKThanks, You were right. It runs well for the sales order with out delivery. After I create delivery in reference to this sales order and change payment terms in sales order there is no new credit control check.
Is there a possibility to run credit control check after a delivery is created? -
Sales Order Free item and Credit Limit Checking
Hiii Guys,
need your help,
How to release Sales Order free item when credit limit exceeded ?
Here some info :
Customer : ABC
Credit limit : 50,000.00
Credit Exposure : 52,000.00
Risk Category : 003 High Risk
My user want to create sales order for free item for customer ABC, the customer abc credit limit already exceeded .and the item in sales order not contain any value, it should past the sales order creation. how to allow Free item past the credit limit checking ?To reslove this issue,
I. you can create a new sales order type. for which you make the credit control de-active.
2. If you can't create a new order type and this cotrol should happen at item category level.
then try config at the IMG>Sales & Distribution>Basic function>creditmanagement>credit management/riskmanagement setting>Determine Active Receivables Per Item Category.
Regards/Rakesh Jindal -
Credit Limit Check - Value & Periodwise both at the same time
Dear All,
This problem is related to Credit Management.I want the system should carry out a check which will take into consideration both the value and credit limit days while punching a sales order.
For Example : Party : A Credit Limit : Rs. 1000/- Credit Limit days : 2
We have made one invoice of value Rs. 600/- Credit Exposure : 60% Remaining Credit Limit : Rs. 400/- on 08.01.2009.Now after 2days i.e. on 10.01.2009 I want the system to stop generation of sale order by setting the credit check block at the Sale Order level even though the sale order value will not exceed the remaining Credit Limit i.e. Rs.400 and the order will get blocked as a result of Credit Check being carried out on the basis of Credit Limit days.
The configurations which are at present prevailing in OVA8 are as follows -
CCA RkC CG Credit control Curr. Update
1000 001 01 High Risk Sale Orders INR 000012
No credit check 1
Item check (Check Box is marked on)
Checks
Reaction Status / Block Open Orders / Open Deliveries
Static C (Check Box is marked on) (Check Boxes are marked on)
Horizon - M
Oldest Open Item C (Check Box is marked on) Days oldest item - 30
All other check boxes and fields remain empty / blank.
Now considering the above scenario please suggest what other configurations are requiered to attain my requirement.
Looking forward to some valuable suggestions.
Thanks & Regards
PriyankaHi Priyanka
Your Configuration seems to be O.K
Even though every one has suggested , just change the following settings
In OVA8 make the changes
Max open item - Increase it to 75%
No of days - 1
Days oldest open item - Blank
Go to OMO1 and For the Infostructure S060 change the period to DAYS , if months or Year is there
Regards
Srinath -
Hi Experts,
I would like to retain the old schedule lines after the ATP/GATP check in the sales order for certain conditions.
I don't want to change XVBEP,IVBEP,VBEP contents in the user-exit..
Is there any standard sub-routine or function module to reatain old schedule lines in the sales order so that the schedule lines will not update with the new values after the ATP check ?
Thanks
RayuduIn Include LV03VFMM, you have:
* Userexit availability
PERFORM USEREXIT_AVAILABILITY_IN USING DA_ATPPR.
There may be an option to implement some logic in here. However, I tried changing the value of MVERF_POS-EINTEIL[1]-VFPKZ to initial. This will ensure that when FM AVAILABILITY_CHECK_CONTROLLER is called that the following IF statement is untrue:
CHECK NOT P_ATPCSX[] IS INITIAL.
as P_ATPCSX[] Table[0x648].....
However, this will just mean that the 2nd confirmed schedule line (assuming we have > 1 schedule lines) will have a confirmed quantity to zero.
EXIT_SAPLATPC_001 could also be used. However, when I removed the "X" from CHKFLG, I get the same result; the 2nd schedule line will revert to zero.
They were the only tests I tried; I cannot think of any other ways around this.... -
Change the schedule line committed qty in PO items using ME_PROCESS_PO_CUST
Dear Experts,
I want to make the PO item schedule line committed quantity MNG02 field to zero, for this purpose I wrote the logic as below.
but its not changing the committed quantity to zero. Please advice me.
method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
DATA: lwa_po_header TYPE REF TO if_purchase_order_mm,
lwa_mepoheader TYPE mepoheader,
lwa_mepoitem TYPE mepoitem,
lwa_mepoitemx TYPE mepoitemx,
lwa_ekko TYPE ekko,
lwa_ekpo TYPE ekpo,
lwa_ekpv TYPE ekpv,
lwa_eket TYPE eket,
tp_minqty TYPE min_qty,
tp_clabs TYPE labst,
tp_kosch TYPE kosch,
tp_werks TYPE werks_d,
tp_tdid type tdid,
ta_textlines type MMPUR_T_TEXTLINES,
lwa_textlines LIKE LINE OF ta_textlines,
lwa_minstk TYPE zminstk.
DATA: schedules TYPE PURCHASE_ORDER_SCHEDULES,
schedule LIKE LINE OF schedules,
lwa_schedule TYPE meposchedule,
tp_mtvfp TYPE mtvfp,
tp_avqty TYPE BSTMG,
tp_minqty1 TYPE BSTMG.
if sy-tcode = 'ME21N'.
Get PO Header data
lwa_po_header = im_item->get_header( ).
lwa_mepoheader = lwa_po_header->get_data( ).
MOVE-CORRESPONDING lwa_mepoheader TO lwa_ekko.
Get PO Item data
lwa_mepoitem = im_item->get_data( ).
MOVE-CORRESPONDING lwa_mepoitem TO lwa_ekpo.
*-> Get schedule line data
CALL METHOD im_item->get_schedules
RECEIVING
re_schedules = schedules.
LOOP AT schedules INTO schedule.
CALL METHOD schedule-schedule->get_data
RECEIVING
re_data = lwa_schedule.
*-> Change Committed quantity
lwa_schedule-mng02 = 0.
CALL METHOD schedule-schedule->set_data
EXPORTING
im_data = lwa_schedule.
ENDLOOP.
CALL METHOD im_item->set_data
EXPORTING
im_data = lwa_mepoitem.
ENDIF.
endmethod.Hi Siddu,
Please finf enclosed with the suedo code.
DATA: LS_MEPOITEM TYPE MEPOITEM,
LS_OBJ TYPE REF TO IF_PURCHASE_ORDER_MM,
LS_MEPOHEADER TYPE MEPOHEADER.
*IM_ITEM is ur importing parameter
in order to get the item details :
LS_MEPOITEM = IM_ITEM->GET_DATA( ).
*In order to get the current document type
LS_OBJ = IM_ITEM->GET_HEADER( ).
LS_MEPOHEADER = LS_OBJ->GET_DATA( ).
Now you have your document type in LS_MEPOHEADER-bsart ...
IF LS_MEPOHEADER-bsart ... = ur custom doc type .
*Set the return item = 'X'.
LS_MEPOITEM-RETPO = 'X'.
CALL METHOD IM_ITEM->SET_DATA
EXPORTING
IM_DATA = LS_MEPOITEM.
ENDIF.
Hope this helps you,,,
Regards,
Deepak. -
Does BOP respect the availability check setting made in Schedule line category?
Hi Gurus,
Does BOP respect the settings made for availability check in schedule line category?
Thanks,
NiharHi Sourabh,
In the Schedule line Category, we have an option Availability check right?
Business requirement is to suppress Availability check at schedule line category level, where Availability check box is not selected.
When I trigger availability check manually, the confirmation happens on the day requested & no additional schedule lines are created.
For the same order, if I run the BOP with the above settings made in schedule line category; order is confirmed & is checking against stock & lead time.
My question is: Online ATP respect the availability check setting made in schedule line category. Does BOP respects the same as Online ATP?
I hope I was clear!
Thanks,
Nihar -
Does Simple Credit Limit Check Include Checking for Open Orders
Hi all,
I have this issue here where I have configured the system to use simple credit limit check with error message. I did not use the standard/common automatic credit limit check since user insist on a pop-up warning and that the order could not be saved. But, I realized that it does not take open orders into account too although I have set the risk categories. Is it true and what solution is there for this issue then.
Thank you for all your help in inputs.
Regards,
YvonneHi,
Please follow the below configuration settings for Simple credit check process.
Simple credit check: In simple credit check the system compares the credit exposure with payers credit limit. The
credit exposure results from the total of the net document value and the value of the open items.
We can set the following system responses at when the credit limit has been reached.
A u2013Warning message
B u2013 Error message
C u2013 Delivery block
Specify in VOV8 Credit limit [C]
Configuration settings:
Sales documents types u2013 Credit limit check: Transaction code: OVAK
Path:
IMG
Sales and Distribution
Basic functions
Credit management/Risk management
Simple credit limit check
Choose sales document type OR
Specify value
[ ] = No credit limit check
[A] = Run simple credit limit check and warning message
<b> = Run simple credit limit check and error message
[C] = Run simple credit limit check and delivery block
Save and Exit
Define credit control area: Transaction code: OB45
Credit control area is an organizational unit that specifies and checks the credit limit for customers. A credit control
area can include one or more company codes. It means we can assign one credit control area to number of company
codes.
NOTE: Within credit control area the credit limit must be specified in the same currency.
Path:
IMG
Enterprise structure
Definition
Financial accounting
Define credit control area
Go to new entries
(OR)
Choose existing credit control area
Select it and click on copy icon
Rename it and click on details icon
Specify currency [INR]
257
Data for updating SD fields
Update [000012]: Open order value on time axis, delivery and billing document value. This field value controls
when the values are open sales orders, deliveries, billing documents are updated in LIS. We can specify the
following update groups for updating credit related statistics.
Update group 000012:
Sales order: Increase open order value from delivery relevant schedule lines.
Delivery: Reduces open order value from delivery relevant schedule lines.
Increases open delivery value
Billing document: Reduces the open delivery value, increases open billing document value.
Financial accounting document: Reduces open billing document value
Increases open items.
Update group 000015:
Delivery: Increases open delivery value.
Increases open billing document value.
Financial accounting document: Reduces open billing document value
Increases open items.
Update group 000018:
Sales order: Increases open delivery value
Billing document: Reduces open delivery value.
Increases open billing document value.
Financial accounting document: Reduces open billing document value.
Increases open items.
Fiscal year variant [K4]: It indicates specific fiscal year variant for particular credit control area. The fiscal year
variant is essential when a credit control area covers multiple company codes whose fiscal years are different. Then
the values of the open orders are updated by posting period.
Specify risk category [001]: 001 = High risk
002 = Medium risk
003 = Low risk
This risk category entered in the related control area of the customeru2019s credit master record, which is automatically
created when a customer is created in a company code.
The credit master record is automatically maintained when at least one of the below fields is maintained for the
corresponding control area.
(A) Risk category
(B) Credit representative group
(C) Credit limit
Credit limit: The credit limit that we enter here in the specific credit control area of the customeru2019s credit master
record. This is automatically created when a customer is created in a company code (in XD01).
NOTE: This credit limit is not a total credit limit for the control area.
Representative group [001]: Define credit representative group in IMG.
All company codes: If we want to tell to the system that, this credit control area is permitted for
postings in every company code we have defined.
Save and Exit
NOTE: After this create Risk categories and Credit representative groups and come back to this step and assign
these values to our credit control area.
Risk category and Representative group defined and maintained by FI/CO consultants in IMG.
258
Assign company code to credit control area: Transaction code: OB38
Path:
IMG
Enterprise structure
Assignment
Financial accounting
Assign company code to credit control area
Choose our company code from position button
Click on assign button on the application tool bar
Select our credit control area from the list and assign it
Save and Exit
Go to FD32 and check whether system created customeru2019s credit master data automatically or not.
System creates customers credit master data automatically when we (FI/CO) people) configure credit control area in
IMG.
So as to perform simple credit check we have to specify customer master payers limit in the credit control area, and
create customer master in XD01 transaction code.
Specify reconciliation account number (GL account number)
Payment history record: Check payment history record control in payment transaction tab. It is the
control parameter to update the payment details that are made by customers and system will show the
payment details in the FD32.
Specify the credit control area in credit control area field in billing document tab.
Save and Exit
Go to VA01 and raise the sales order
Check the system responses in each and every level of sales document processing and check whether the system
blocked the delivery document (due to the setting in VOV8 of OR in check credit limit field [C] = Blocked for
delivery).
To release the delivery go to VKM4 and release the delivery document. -
Link between delivery line item and sales order item schedule line.
Hello friends,
This is a continuation of my earlier query - for which I got half the solution, and this is the remaining problem.
I want to know: from delivery document line item, how to link it to sales order line item's schedule line (when there are multiple schedule lines with identical quantities).
Thanks for your help.
- ChetanThis is the code which i used for the same purpose and its working.
Hope this will help you too....
****it_itab is my final internal table.
*Internal table for manupulating the Delivery balance when
*its used in more than one schedule line
TYPES: BEGIN OF ty_new,
vbeln TYPE vbep-vbeln," so no
posnr TYPE vbep-posnr," so line no
etenr TYPE vbep-etenr," schedule line
delno TYPE lips-vbeln,"delivery no
delposnr TYPE lips-posnr,"del item no
totval TYPE vbep-wmeng," total del wise value
val TYPE vbep-wmeng," del wise used value
sdval TYPE vbep-wmeng,"schedule wise del used value
sdtotval TYPE vbep-wmeng," total Schedule value
END OF ty_new.
DATA:it_new TYPE ty_new OCCURS 0,
wa_new TYPE ty_new.
DATA: it_vbepvb TYPE TABLE OF vbepvb,
wa_vbepvb LIKE LINE OF it_vbepvb,
fvbfa TYPE TABLE OF vbfa,
fvbup TYPE TABLE OF vbup,
fvbap TYPE TABLE OF vbapvb.
LOOP AT it_vbak INTO wa_vbak.
LOOP AT it_vbap INTO wa_vbap
WHERE vbeln = wa_vbak-vbeln.
SELECT * FROM vbfa INTO TABLE fvbfa WHERE vbelv = wa_vbap-vbeln
AND posnv = wa_vbap-posnr.
SELECT * FROM vbup INTO TABLE fvbup WHERE vbeln = wa_vbap-vbeln
AND posnr = wa_vbap-posnr.
SELECT * FROM vbap INTO TABLE fvbap WHERE vbeln = wa_vbap-vbeln
AND posnr = wa_vbap-posnr.
SELECT * FROM vbep INTO TABLE it_vbepvb WHERE vbeln = wa_vbap-vbeln
AND posnr = wa_vbap-posnr.
CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
EXPORTING
fbeleg = wa_vbap-vbeln
fposnr = wa_vbap-posnr
FVERRECHNUNG = ' '
FS073_ALT = ' '
IF_NO_SORT = ' '
TABLES
fvbfa = fvbfa
fvbup = fvbup
fxvbep = it_vbepvb
FVBLB =
fvbap = fvbap
EXCEPTIONS
FEHLER_BEI_LESEN_FVBUP = 1
FEHLER_BEI_LESEN_FXVBEP = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT it_vbepvb BY vbeln posnr edatu.
LOOP AT it_vbepvb INTO wa_vbepvb
WHERE vbeln = wa_vbap-vbeln
AND posnr = wa_vbap-posnr.
to write data of schedule line with no delivery
MOVE wa_vbepvb-olfmng_flt TO wa_itab-openqty.
IF wa_vbepvb-bmeng EQ wa_itab-openqty.
CLEAR wa_itab.
PERFORM schedule_data. "schedule line based data to be displayed
MOVE: wa_vbap-lgort TO wa_itab-lgort.
MOVE: wa_vbepvb-etenr TO wa_itab-etenr,
wa_vbepvb-bmeng TO wa_itab-kwmeng,
wa_vbepvb-olfmng_flt TO wa_itab-openqty.
APPEND wa_itab TO it_itab .
CLEAR wa_itab.
ENDIF.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_vbepvb-vbeln
AND posnv = wa_vbepvb-posnr.
READ TABLE it_likp INTO wa_likp WITH KEY vbeln = wa_vbfa-vbeln.
CHECK wa_likp-bldat >= wa_vbepvb-edatu.
check the Delivery doc date with the schedule line confirmed date
CLEAR: delbal, deltot,wa_new.
LOOP AT it_new INTO wa_new WHERE vbeln = wa_vbepvb-vbeln
AND posnr = wa_vbepvb-posnr
AND etenr = wa_vbepvb-etenr.
deltot = deltot + wa_new-sdval.
ENDLOOP.
delbal = wa_new-sdtotval - deltot.
CHECK sy-subrc <> 0 OR delbal GT 0.
MOVE wa_vbepvb-olfmng_flt TO wa_itab-openqty.
CHECK wa_vbepvb-bmeng NE wa_itab-openqty.
****To check whether this delivery is already fully allocated against
any other schedule.
LOOP AT it_lips INTO wa_lips WHERE vbeln = wa_vbfa-vbeln
AND posnr = wa_vbfa-posnn.
MOVE: wa_likp-bolnr TO wa_itab-vesname.
MOVE: wa_likp-vbeln TO wa_itab-delno.
MOVE: wa_likp-wadat TO wa_itab-wadat.
MOVE: wa_likp-anzpk TO wa_itab-anzpk.
MOVE: wa_likp-lddat TO wa_itab-lddat.
MOVE: wa_likp-ernam TO wa_itab-ernam.
******end of code added by IVL1 on sep 27 2007 #3618
PERFORM schedule_data.
IF wa_lips-umvkz <> 0.
tempquant = wa_lips-umvkn / wa_lips-umvkz.
ELSE.
tempquant = wa_lips-umvkn. "delivery qty
ENDIF.
tempquant = tempquant * wa_vbfa-rfmng.
***New logic added to get delivery qty schedule wise****
MOVE: wa_vbepvb-etenr TO wa_itab-etenr,
wa_vbepvb-bmeng TO wa_itab-kwmeng,
wa_vbepvb-olfmng_flt TO wa_itab-openqty. "jo
**if delivery qty is less than or equal to schedule line qty******
IF tempquant LE wa_vbepvb-bmeng.
wa_itab-delqty = tempquant.
LOOP AT it_new INTO wa_new WHERE vbeln = wa_vbepvb-vbeln
AND posnr = wa_vbepvb-posnr
AND etenr = wa_vbepvb-etenr
AND delno = wa_lips-vbeln
AND delposnr = wa_lips-posnr.
MOVE-CORRESPONDING wa_itab TO wa_new.
wa_new-delposnr = wa_lips-posnr.
wa_new-val = tempquant.
wa_new-totval = tempquant.
wa_new-sdval = tempquant.
wa_new-sdtotval = wa_vbepvb-bmeng.
MODIFY TABLE it_new FROM wa_new .
IF NOT sy-subrc IS INITIAL.
APPEND wa_new TO it_new.
ENDIF.
ENDLOOP.
IF sy-subrc <> 0.
MOVE-CORRESPONDING wa_itab TO wa_new.
wa_new-delposnr = wa_lips-posnr.
wa_new-val = tempquant.
wa_new-totval = tempquant.
wa_new-sdval = tempquant.
wa_new-sdtotval = wa_vbepvb-bmeng.
APPEND wa_new TO it_new.
ENDIF.
wa_itab-delqty = tempquant.
CLEAR tempquant.
ELSE.
lips qty > so schedule lineqty
CLEAR deltol.
LOOP AT it_new INTO wa_new WHERE vbeln = wa_vbepvb-vbeln
AND posnr = wa_vbepvb-posnr
AND etenr = wa_vbepvb-etenr
AND delno = wa_lips-vbeln
AND delposnr = wa_lips-posnr.
deltol = deltol + wa_new-val.
ENDLOOP.
LOOP AT it_new INTO wa_new WHERE vbeln = wa_vbepvb-vbeln
AND posnr = wa_vbepvb-posnr
AND delno = wa_lips-vbeln
AND delposnr = wa_lips-posnr.
MOVE-CORRESPONDING wa_itab TO wa_new.
wa_new-val = wa_new-totval - deltol.
wa_itab-delqty = wa_new-val.
wa_new-delposnr = wa_lips-posnr.
wa_new-totval = tempquant.
wa_new-sdval = wa_new-val.
wa_new-sdtotval = wa_vbepvb-bmeng.
MODIFY TABLE it_new FROM wa_new .
IF NOT sy-subrc IS INITIAL.
APPEND wa_new TO it_new.
ENDIF.
ENDLOOP.
IF sy-subrc <> 0.
MOVE-CORRESPONDING wa_itab TO wa_new.
wa_itab-delqty = wa_vbepvb-bmeng.
wa_new-delposnr = wa_lips-posnr.
wa_new-val = wa_vbepvb-bmeng.
wa_new-totval = tempquant.
wa_new-sdval = wa_vbepvb-bmeng.
wa_new-sdtotval = wa_vbepvb-bmeng.
APPEND wa_new TO it_new.
ENDIF.
ENDIF.
IF NOT wa_lips-lgort IS INITIAL.
MOVE: wa_lips-lgort TO wa_itab-lgort.
ELSE.
MOVE: wa_vbap-lgort TO wa_itab-lgort.
ENDIF.
APPEND wa_itab TO it_itab .
CLEAR wa_itab.
ENDLOOP.
ENDLOOP.
CLEAR wa_vbepvb.
ENDLOOP.
ENDLOOP.
CLEAR wa_vbak.
ENDLOOP. -
Schedule lines confirmation based on item category(TAN and TANN)
Hi All,
We have a problem with the schedule line confirmation in the standard sales order. Suppose if I give the item category as TAN, the schedule lines are confirmed for that line item. If I change the item category from TAN to TANN, then there is no confirmation of the material(No confirmed schedule lines).
How Item categories influence the schedule lines? Are schedule lines also depend on customer?
Thanks & Regards,
Pranil.Hi Pranil,
When you change Item Category then most likely in your case Schedule Line Category is also getting redetermined.
Schedule Line category is determined by the Combination of Item category and MRP Type of Material.
Hence please check your Schedule Line category after entering new Item category.
Open VOV6 and check the Schedule Line Category. In that if Item Rel for Delivery Check Box is Unchecked then it means that
your schedule line will get unconfirmed.
Do let me know if this helps.
Regards,
Madhukar
Maybe you are looking for
-
Anyone's mini throw up this video pattern?
Brand new Mac mini 5,1 running 10.7.2. Randomly, it will crash every few hours and throw up this semi-checkboard pattern on my monitor, which is a Samsung 2333SW. The dark areas are approx. 2" x 2" and they're made up of a series of horizontal 1/4" l
-
Windows Server 2008 R2 BSOD Various Messages
Hello All, I've got a Windows Server 2008 R2 that's bluescreened twice in a month. Both times different stop error code. Running on a HP DL360 in Proxmox virtual environment. Below are the two dump outputs: Microsoft (R) Windows Debugger Version 6.12
-
Adobe Bridge CC bleibt stehen oder ist sehr langsam
Hallo. Ich hatte auf meinem Rechner die Bridge CC, Photoshop CC und Photoshop CC 2014 am laufen. Alles Tadellos, die Bridge arbeitet fehlerfrei. Die beiden PS Versionen hatte ich laufen, weil´s mit meine Tablet Probleme unter CC2014 gab. Nu gabs neue
-
Sapgui scripting - export report to Excel then return to sap
I am new to SAP and my company has just updated to 4.7. I can export a report to MS Excel as spreadsheet, run a excel macro on the spreadsheet in excel, save the excel workbook in a local directory, then close & exit excel. However, I can not get the
-
Insert image to atable in forms builder
hi everybody suppose this situation there is a database table in forms builder the first column is the name of the medicine and the second is the medicine image -- i want the user to insert an image from the hard disk or anywhere when he attempt to i