Stock as on past dates
Hi all,
I have a requirement to audit stock differences that had happened few months back between SAP and BI.
The stock in BI has a cumulative figure of all stock categories viz. unrestricted, in transit, blocked and QI.
In SAP, I can get the unrestricted stock on a particular day using MB5B but I don't know how to find the blocked stock/QI stock/in-transit stock on a past date say as on 15/Jan/2009.
Could you please help me out?
Thanks
Rana
Hi,
MB5OA doesn't serve my purpose. I need to find what was the stock break-up for all the stock categories (blocked, UR, QI, In-transit) for a material on a past date. For example, I need to know what was the stock of material ABC in QI, in Blocked and in unrestricted stock on 15th of Jan 2009.
Could you please help me?
Thanks,
Rana.
Similar Messages
-
Hi All,
Can a stock report for any Past date with respect to qty and value be developed which gives the split of unrestricted, Quality and Blocked stock.
MB5B gives stock report on any past date which is the total of all the stocks but not the split.
Need ur assistance.Hi,
MB52 tcode gives the current stock status. In my case stock status of any past date with the split up is needed.
Regards -
Stock qty on past date (yesterday)
Hi,i would like to see the qty of the stock on previous day (or past date).is there any option in sap?
YS,
You can use T code MB5B for this purpose.
Input has to be given like material, Plant (if required), storage location (if required) & date 'under selection date' on which you want to see the stock.
Under 'Settings' mark 'Total only- Non hierarchical representation layout' & execute.
You will data of opening stock, receipt, issue & closing stock.
Hope this helps you.
SmanS -
Consignment stock as on past date
Hi friends,
Is there a way to view the consignment stock per customer location as on a previous date?
MB51 does not help and MB5B gives the total stock but not by customer (apart from its layout being hardly friendly). We need to reconcile stocks of same MATNR which lies in various ship to locations but can't when the customer provides us the statement from their end and we ourselves don't have ready numbers as on those dates. Appreciate any guidance.
Many thanks.Yogesh,
In MB58 Double click on customer and it gives u break up stock at customers place..
Try to explore that....
REWARD IF U FINDS THIS AS USEFUL....
Regds
MM -
Sales order stock and storage location stock on past date with value
Hi everyone.
I m looking for a report which can give sales order stock with value as it is shown in mb5b and storage location stock with value as in mc.5 is there any report which can give the combination of both the things on past date with values.can you tell me what shall be the fields and table for special stock on past date with value and sloc stock on past date with value
-
Table to get "stock of material on a past date "
Hi Guru's,
Can anyone tell me "how to get stock of material on a past date".
Pls tell me from which Table you can fetch these values and in what logic.
Any Input is highly appreciated.
Thanks and Regards,
SelvaHello,
You can get the stock from the table MARDH, MCHBH period wise.
this table is use for history stocks.
Regards
Bhima -
Stock upload - Goods receipt date, FIFO
We are doing our initial stock upload using LSMW based on goods movements.
When posting a goods movement the posting date will be used for FIFO considerations.
That's fine when your system is operative, but during the initial stock upload the posting date will be the same for all movements, which is not what we want.
Is there a way to transfer a GR date from the legacy system?
(Opening the posting periods to any date in the past is not an option).
Any ideas?
Thanks
AndreasIf you had a GR on May 2nd of 1000 and another GR on Oct. 1st for 500 and your currect stock is 800, then you just know that the last GR date was Oct. 1st. But this is not the truth for all stock on hand. So FIFO cannot work. So the field has just information caracter.
SAP will capture such info at batch level. Different software, different concepts. so each batch can have its own last GR date, and you distinguish the stock by batches, and can use batch search strategy to find the oldest one.
Without batch managment, SAP has this information about last goods receipt at quant level in warehouse managment. Do you use WM module?
(even then I have no standard solution to manipulate this field while doing the stock load) -
Hello,
I notice that i can issue more than the available quantity of a material in past date. The material i issued had 15 PCS at 5/6/2010 and 30 PCS at 11/6/2010. I issued 18 PCS with posting date 6/6/2010. Then i issued the rest but i couldn't issue more than 30 PCS.
Is this standard SAP functionality or it can be customized ?
Thanks in advance.Hi,
Go to MB5B stock on date and check for the available stock on that particular date & same stock you can issue in back date which is restricated to only one month as SAP standard in MM and if you ahve set allow in back date tick then only it will allow.
If you wish to issue more then the available stock then you ahve to set negative stock tick in configuration which will allow to issue more then the availabe stock. -
PGI is not allowed in past date
Dear Experts,
I have a situation where we want to post the PGI/Delivery on past date. I recieved the stock on 20-May so system should allow the PGI/Delivery on 20-May. But when trying to do PGI, system is throwing the error message "Deficit of BA unrestricted use. But it's allowing to post the PGI on today's date.
Is it not possible to post the PGI on past date or am I doing something wrong?
Please Help.
R.SHi!
You seem to have stock in the current period (June) but not in the previous period (May). For example, your situation might be as follows:
1st of May - Stock 0.
5th of May - GR of 5 PC.
-> 31st of May -> Close period.
You are now in june and your initial stock is 5 PC.
Therefore you have:
Current period (06 2011) = 5 PC
Previous period (05 2011) = 5 PC.
Now you post a GR on the 10th of June of 5 PC into the current period. The situation changes to:
Current period (06 2011) = 10 PC
Previous period (05 2011) = 5 PC.
On the 11th of June you try to post a goods issue of 10 PC into the previous period using as posting date 31st of may: you cannot because in may you have only 5 PC and not 10. The system will inform you about the stock deficit in the previous period.
MMBE shows only the current stock of the current period (for batches, from table MCHB).
To see the previous period stock check the History Table MCHBH.
I hope this helps you!
Esther. -
Dear all,
i update the stock by today with posting date 01.10.2010 for 10 qty. When i created the sale order for 10 qty and do availability check . system confirm the delivery for current date but i need to deliver in 01.10.2010.
i checked for delivery in vl01n and system throu no schedule line .
how we can do delivery in past date.
Thnaks..
Edited by: raj on Dec 16, 2010 5:45 AMhi,
there are number of paratmeters to check:
check MMBE - in unrestricted use or scheduled for delivery.
check the schedule line date.
check the delivery scheduling and transportation scheduling in SPRO.
check in MMR in MRP views - RLT.
how we can do delivery in past date - please explain this in brief
confirm the forum
balajia -
MRP+forecast(past data)
Hello experts
is there any way to use past data(such as invoices etc) in MRP in order to make comparisons from early years?
what i want to do is to have a bried look what happened last year this period in my system. unfortunatelly, i did not use it earlier, so i am not able to have a brief look in my saved scenarios
i was thinking if there is a way to import somehow these data into the MRP
thanks a lot for your time!Hi Fasolis.......
You can not take the Invoices into consideration while MRP.
Invoice means Stock Data and you are generating Recommendations based on Instock, Ordered and Commited.
As you have not used MRP for Past data unfortunately it is not possible to get that history.
Regards,
Rahul -
Scheduline Date to follow Past Date
Dear SD Expert,
My users are doing a back log for Sales Order in December 2008 & January 2009.
In Sales Order i enter the Request Delivery Date as a past date, i will then proceed to enter my materials to be sold.
But in the schedule line of the material is has 2 lines:
1. First line is the past date
2. Second line is today's date (greyed out)
Now i know system does an ATP that's why its giving today's date. But is there a way to configure the schedule line to follow a past date instead of proposing a second line which is today's date?
Please advise. Thanks.
Regards,
LEEDear Lee,
Scheduline lines will be happened based on the material availability.
For Example:- If you create sales order on today and material is available today then scheduline will get conformed on today itself.
-->If stock not available system will generate the another scheduline in the future date with conform quantity.
-->If the stock is not available then system will calculate conform date or material availability date based on the material Replenishment leade time.
+But is there a way to configure the schedule line to follow a past date instead of proposing a second line which is today's date?
So through configuration you can't change material conformation dates in the scheduline this is depend upon the availability of the material.
I hope this will help you,
Regards,
Murali. -
Closing stock of a particular date
how to get plant wise material closing stock on any particular date. say previous months end date. I am calculating that from MSEG table with the help of MSEGINSMK and MSEGSHKZG field. (with date filtaration by joining MBLNR of MKPF table) But stock is showing different with the closing stock showing in MB5B report for that date. I don't know which BWART of MSEG table to be excluded. My email id is [email protected]
Hi,
This is a stock aging report, you can use this for reference.
Logic: Based on current stock and value from MBEW table. The latest receipt dates were taken till the qty tallies off.Rejections and reversals are considered.
The movement types considered are ('101','102','105','106','122','123','131','132','301','302','309','310','501','502','531','532','561','562','701','702').
*& Report ZMM03_TRY *
REPORT ZMM03 LINE-SIZE 226
LINE-COUNT 35(2)
NO STANDARD PAGE HEADING..
TABLES : S032, "Current Stock And Grouping Terms
MBEW, "Material Valuation
T023T, "Material Group Desc.
MAKT, "Material Description
EKPO. "Purchasing Document Item.
DATA : BEGIN OF T_HEADER OCCURS 0,
MTART LIKE MARA-MTART,
MATNR LIKE MBEW-MATNR,
BWKEY LIKE MBEW-BWKEY,
MATKL LIKE MARA-MATKL,
MAKTX LIKE MAKT-MAKTX,
MEINS LIKE MARA-MEINS,
LBKUM LIKE MBEW-LBKUM,
SALK3 LIKE MBEW-SALK3,
VERPR LIKE MBEW-VERPR,
CLSTK LIKE MBEW-LBKUM,
CLVAL LIKE CKMLCR-SALK3,
UNIT LIKE CKMLCR-PVPRS,
END OF T_HEADER.
DATA : BEGIN OF T_MSEG OCCURS 0,
MATNR LIKE MSEG-MATNR,
WERKS LIKE MSEG-WERKS,
BUDAT LIKE MKPF-BUDAT,
MBLNR LIKE MKPF-MBLNR,
MJAHR LIKE MKPF-MJAHR,
ZEILE LIKE MSEG-ZEILE,
LFBNR LIKE MSEG-LFBNR,
LFBJA LIKE MSEG-LFBJA,
LFPOS LIKE MSEG-LFPOS,
BWART LIKE MSEG-BWART,
MENGE LIKE MSEG-MENGE,
EBELN LIKE MSEG-EBELN,
EBELP LIKE MSEG-EBELP,
XAUTO LIKE MSEG-XAUTO,
UMMAT LIKE MSEG-UMMAT,
UMWRK LIKE MSEG-UMWRK,
MARK(1),
END OF T_MSEG.
TYPE-POOLS : SLIS.
DATA : L_STOCK TYPE MSEG-MENGE.
DATA : WA_MSEG LIKE T_MSEG.
DATA : WA_MSEG1 LIKE T_MSEG.
DATA : T_ITEMS LIKE T_MSEG OCCURS 0 WITH HEADER LINE.
DATA : T_CUR_STOCK LIKE T_MSEG OCCURS 0 WITH HEADER LINE.
DATA : L_LBKUM TYPE MBEW-LBKUM.
DATA : BEGIN OF T_OUTPUT OCCURS 0,
WERKS LIKE MSEG-WERKS,
MATNR LIKE MSEG-MATNR,
BUDAT LIKE MKPF-BUDAT,
MENGE LIKE MSEG-MENGE,
PDAYS TYPE I,
PVAL TYPE MSEG-MENGE,
MAKTX LIKE MAKT-MAKTX,
CQTY LIKE MSEG-MENGE,
CPRC LIKE MBEW-SALK3,
END OF T_OUTPUT.
DATA: GRID_TAB TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
DATA : T_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV.
*AT SELECTION-SCREEN.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-014.
SELECTION-SCREEN SKIP 1.
PARAMETERS : P_DATE LIKE S032-LETZTABG OBLIGATORY DEFAULT SY-DATUM.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE TEXT-015.
PARAMETERS : P_WERKS TYPE S032-WERKS OBLIGATORY.
SELECT-OPTIONS : S_LGORT FOR S032-LGORT,
S_MATNR FOR S032-MATNR.
SELECTION-SCREEN END OF BLOCK 2.
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE TEXT-016.
SELECT-OPTIONS : S_MTART FOR S032-MTART,
S_MATKL FOR S032-MATKL.
SELECTION-SCREEN END OF BLOCK 3.
IF P_DATE IS INITIAL AND
P_WERKS IS INITIAL AND
S_LGORT IS INITIAL AND
S_MATNR IS INITIAL AND
S_MTART IS INITIAL AND
S_MATKL IS INITIAL.
MESSAGE I398(00) WITH 'Enter Selection Critirea'(019).
SY-SUBRC = '1'.
ELSE.
SELECT AMATNR ABWKEY BMATKL BMTART CMAKTX BMEINS A~LBKUM
A~SALK3
INTO CORRESPONDING FIELDS OF TABLE T_HEADER
FROM MBEW AS A INNER JOIN MARA AS B ON AMATNR = BMATNR
INNER JOIN MAKT AS C ON AMATNR = CMATNR
WHERE A~MATNR IN S_MATNR
AND A~BWKEY EQ P_WERKS
AND MATKL IN S_MATKL
AND MTART IN S_MTART
AND BWTAR EQ ' '
AND C~SPRAS = SY-LANGU.
IF SY-SUBRC EQ 0.
SELECT ABUDAT AMBLNR AMJAHR BZEILE BMATNR BWERKS B~BWART
BMENGE BLFBNR BLFBJA BLFPOS BEBELN BEBELP B~XAUTO
BUMMAT BUMWRK
INTO CORRESPONDING FIELDS OF TABLE T_MSEG
FROM MKPF AS A INNER JOIN MSEG AS B ON AMBLNR = BMBLNR
AND AMJAHR = BMJAHR
FOR ALL ENTRIES IN T_HEADER
WHERE A~BUDAT <= P_DATE
AND B~MATNR = T_HEADER-MATNR
AND B~WERKS = T_HEADER-BWKEY
AND B~BWART IN ('101',
'102',
'105',
'106',
'122',
'123',
'301',
'302',
'701',
'702',
'131',
'132',
'309',
'310',
'501',
'502',
'531',
'532',
'561',
'562').
PERFORM GET_DEAD_STOCK.
PERFORM DISPLAY_OUTPUT.
ELSE.
MESSAGE S398(00) WITH 'No Data found for'(013)
'Given Selection Critirea'(017).
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
*& Form get_dead_stock
text
FORM GET_DEAD_STOCK .
LOOP AT T_HEADER.
SORT T_MSEG BY MATNR WERKS BUDAT DESCENDING MBLNR DESCENDING.
LOOP AT T_MSEG WHERE MATNR = T_HEADER-MATNR
AND WERKS = T_HEADER-BWKEY
AND ( BWART = '101' OR
BWART = '105' OR
BWART = '501' OR
BWART = '531' OR
BWART = '561' OR
BWART = '701' OR
BWART = '309' OR
BWART = '301' OR
BWART = '131' ).
IF T_MSEG-BWART = 101.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 102.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
READ TABLE T_MSEG INTO WA_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 122.
IF SY-SUBRC = 0.
READ TABLE T_MSEG INTO WA_MSEG1 WITH KEY LFBNR = WA_MSEG-MBLNR
LFBJA = WA_MSEG-MJAHR
LFPOS = WA_MSEG-ZEILE
BWART = 123.
IF SY-SUBRC EQ 0.
WA_MSEG-MARK = 'X'.
MODIFY T_MSEG FROM WA_MSEG.
CONTINUE.
ELSE.
IF T_MSEG-MENGE EQ WA_MSEG-MENGE.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ELSE.
T_MSEG-MENGE = T_MSEG-MENGE - WA_MSEG-MENGE.
MODIFY T_MSEG.
ENDIF.
ENDIF.
ENDIF.
ELSEIF T_MSEG-BWART = 105.
READ TABLE T_MSEG INTO WA_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 106.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 131.
READ TABLE T_MSEG INTO WA_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 132.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 501.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 502.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 301.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 302.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 531.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 532.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 561.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 562.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 701.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 702.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ELSEIF T_MSEG-BWART = 309.
READ TABLE T_MSEG WITH KEY LFBNR = T_MSEG-MBLNR
LFBJA = T_MSEG-MJAHR
LFPOS = T_MSEG-ZEILE
BWART = 310.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ELSEIF T_MSEG-XAUTO = ' '.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ELSEIF T_MSEG-MATNR EQ T_MSEG-UMMAT.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
ENDIF.
SELECT SINGLE EBELN INTO EKPO-EBELN FROM EKPO
WHERE EBELN = T_MSEG-EBELN
AND EBELP = T_MSEG-EBELP
AND KNTTP = 'K'.
IF SY-SUBRC = 0.
T_MSEG-MARK = 'X'.
MODIFY T_MSEG.
CONTINUE.
ENDIF.
TMENGE = TMENGE - t_mseg-MENGE.
ENDLOOP.
ENDLOOP.
DELETE T_MSEG WHERE MARK = 'X'.
DELETE T_MSEG WHERE ( BWART = '102' OR
BWART = '106' OR
BWART = '502' OR
BWART = '532' OR
BWART = '562' OR
BWART = '702' OR
BWART = '310' OR
BWART = '302' OR
BWART = '123' OR
BWART = '122' OR
BWART = '132' ).
SORT T_HEADER BY MATNR BWKEY.
DELETE ADJACENT DUPLICATES FROM T_HEADER COMPARING MATNR BWKEY.
T_CUR_STOCK[] = T_MSEG[].
SORT T_CUR_STOCK BY MATNR WERKS.
LOOP AT T_CUR_STOCK.
WA_MSEG = T_CUR_STOCK.
AT END OF WERKS.
ENDAT.
ENDLOOP.
LOOP AT T_HEADER.
CLEAR L_LBKUM.
L_LBKUM = T_HEADER-LBKUM.
REFRESH T_ITEMS.
CLEAR T_ITEMS.
LOOP AT T_MSEG WHERE MATNR EQ T_HEADER-MATNR
AND WERKS EQ T_HEADER-BWKEY.
T_ITEMS = T_MSEG.
APPEND T_ITEMS.
CLEAR T_ITEMS.
ENDLOOP.
SORT T_ITEMS BY BUDAT DESCENDING
MBLNR DESCENDING.
CLEAR L_LBKUM.
LOOP AT T_ITEMS.
L_LBKUM = T_ITEMS-MENGE - T_HEADER-LBKUM.
IF L_LBKUM GE 0.
T_OUTPUT-MATNR = T_HEADER-MATNR.
T_OUTPUT-WERKS = T_HEADER-BWKEY.
T_OUTPUT-BUDAT = T_ITEMS-BUDAT.
T_OUTPUT-MENGE = T_HEADER-LBKUM.
APPEND T_OUTPUT.
CLEAR T_OUTPUT.
EXIT.
ELSE.
T_HEADER-LBKUM = T_HEADER-LBKUM - T_ITEMS-MENGE.
T_OUTPUT-MATNR = T_HEADER-MATNR.
T_OUTPUT-WERKS = T_HEADER-BWKEY.
T_OUTPUT-BUDAT = T_ITEMS-BUDAT.
T_OUTPUT-MENGE = T_ITEMS-MENGE.
APPEND T_OUTPUT.
CLEAR T_OUTPUT.
CONTINUE.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDFORM. " get_dead_stock
*& Form DISPLAY_OUTPUT
text
FORM DISPLAY_OUTPUT .
DATA: L_DAYS TYPE I.
DATA : WA_OUTPUT LIKE T_OUTPUT.
DATA : T_FINAL LIKE T_OUTPUT OCCURS 0 WITH HEADER LINE.
DATA : WA_FINAL LIKE T_OUTPUT.
DATA : L_CQTY TYPE MSEG-MENGE,
L_CPRC TYPE MBEW-SALK3.
DATA : L_TITLE TYPE LVC_TITLE.
DATA : L_NAME1 TYPE T001W-NAME1.
*C-- Not to output when the quantity is zero.
DELETE T_OUTPUT WHERE MENGE EQ 0.
SORT T_OUTPUT BY WERKS MATNR BUDAT.
LOOP AT T_OUTPUT.
T_FINAL = T_OUTPUT.
AT NEW MATNR.
CLEAR T_HEADER.
READ TABLE T_HEADER WITH KEY MATNR = T_OUTPUT-MATNR
BWKEY = T_OUTPUT-WERKS.
ENDAT.
T_FINAL-MAKTX = T_HEADER-MAKTX.
IF T_HEADER-LBKUM GT 0.
T_FINAL-PVAL = ( T_OUTPUT-MENGE * T_HEADER-SALK3 / T_HEADER-LBKUM ).
ELSE.
CLEAR T_FINAL-PVAL.
ENDIF.
L_CQTY = L_CQTY + T_OUTPUT-MENGE.
IF T_HEADER-LBKUM GT 0.
L_CPRC = L_CPRC + ( T_OUTPUT-MENGE * T_HEADER-SALK3 / T_HEADER-LBKUM ).
ENDIF.
CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
EXPORTING
BEG_DA = T_OUTPUT-BUDAT
END_DA = P_DATE
IMPORTING
NO_CAL_DAY = L_DAYS
EXCEPTIONS
DATEINT_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE : 70 'Error While Calculating days'(018) .
ELSE.
T_FINAL-PDAYS = L_DAYS.
ENDIF.
T_FINAL-CQTY = L_CQTY.
T_FINAL-CPRC = L_CPRC.
APPEND T_FINAL.
AT END OF MATNR.
CLEAR : L_CPRC, L_CQTY.
ENDAT.
ENDLOOP.
PERFORM BUILD_FIELD_CATALOG.
WA_SORT-FIELDNAME = 'MATNR'.
WA_SORT-SPOS = '1'.
APPEND WA_SORT TO T_SORT.
SELECT SINGLE NAME1 FROM T001W INTO L_NAME1
WHERE WERKS = P_WERKS.
CONCATENATE 'Plant: ' P_WERKS ',' L_NAME1 INTO L_TITLE.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_GRID_TITLE = L_TITLE
IT_FIELDCAT = GRID_TAB[]
IT_SORT = T_SORT
I_SAVE = 'A'
TABLES
T_OUTTAB = T_FINAL[].
SORT T_FINAL BY WERKS MATNR BUDAT.
LOOP AT T_FINAL.
WRITE : /10 T_FINAL-MATNR.
WRITE : 30 T_FINAL-WERKS.
WRITE : 40 T_FINAL-BUDAT.
WRITE : 50 T_FINAL-MENGE.
**C-- FM to find the number of days between
**C-- todays date and the posting date
CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
EXPORTING
BEG_DA = T_FINAL-BUDAT
END_DA = P_DATE
IMPORTING
NO_CAL_DAY = L_DAYS
EXCEPTIONS
DATEINT_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE : 70 'Error While Calculating days'(018) .
ELSE.
WRITE : 70 L_DAYS.
ENDIF.
AT END OF MATNR.
ULINE.
READ TABLE T_HEADER WITH KEY MATNR = T_FINAL-MATNR
BWKEY = T_FINAL-WERKS.
IF SY-SUBRC EQ 0.
WRITE : /1 'Total Valuated Stock', T_HEADER-LBKUM.
WRITE : /1 'Value of total valuated Stock', T_HEADER-SALK3.
ULINE.
ENDIF.
ENDAT.
ENDLOOP.
ENDFORM. " DISPLAY_OUTPUT
*& Form BUILD_FIELD_CATALOG
text
--> p1 text
<-- p2 text
FORM BUILD_FIELD_CATALOG .
DATA : CNT1 TYPE I.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Material'.
GRID_TAB-FIELDNAME = 'MATNR'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Material Description'.
GRID_TAB-FIELDNAME = 'MAKTX'.
GRID_TAB-OUTPUTLEN = '30'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Date of Reciept'.
GRID_TAB-FIELDNAME = 'BUDAT'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Quantity'.
GRID_TAB-FIELDNAME = 'MENGE'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Pending Days'.
GRID_TAB-FIELDNAME = 'PDAYS'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Value'.
GRID_TAB-FIELDNAME = 'PVAL'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Cumulative Quantity'.
GRID_TAB-FIELDNAME = 'CQTY'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
CLEAR GRID_TAB.
CNT1 = CNT1 + 1.
GRID_TAB-COL_POS = CNT1.
GRID_TAB-SELTEXT_L = 'Value of Cumulative Quantity'.
GRID_TAB-OUTPUTLEN = '30'.
GRID_TAB-FIELDNAME = 'CPRC'.
GRID_TAB-KEY = 'X'.
GRID_TAB-NO_ZERO = 'X'.
GRID_TAB-TABNAME = 'T_FINAL'.
APPEND GRID_TAB.
ENDFORM. " BUILD_FIELD_CATALOG -
AP Invoice Aging Report for past date
hi guys,
I am running R12.
my requirement is to run AP invoice aging report for past dates (same like AP Trial Balance Report), but the seeded invoice aging report has no option to do so.
would appreciate some help
thanks in advance
RaviHi Senthil,
I am running R12.
my requirement is to run AP invoice aging report for past dates (same like AP Trial Balance Report
if u have any solution to this , please suggest me how to resolve this requierement.
thanks in advance
Ravi
mail:[email protected] -
Delivery schedule dates are coming in Past dates
Hi Friends,
In the Scheduling Agreements the delivery schedule dates are coming in the past dates even tough the scheduling agreements are having new schedules. There is also open quantities there for the scheduling agreements.
please kindly explain me what is the delivery schedule date in Scheduling Agreement.
Thanks in advance.
Regards,
Kannan MHi Khan,
Just check this thease might be the reasons to get correct the delivery schedule.
To access a delivery schedule, mark a scheduling agreement item and choose Goto ® Item ® .
The following data is displayed in the delivery schedule tabstrip:
· Delivery schedule number and date
· A wide range of standard cumulative quantities
· Delivery information
To display deliveries for the delivery schedule, choose Deliveries on the delivery schedule tabstrip.
In scheduling agreements involving external agents, the system displays deliveries made to the customer by external agents as consignment issues.
· Correction delivery information
To display or create correction deliveries, choose Corr. delivery on the delivery schedule tabstrip.
· An analysis function
· Information at a glance
To display a summary of delivery schedule data, choose Short disp. on the delivery schedule tabstrip.
· Schedule lines
Choose DlvSch.Hdr on the delivery schedule tabstrip to access the delivery schedule header. The following data is displayed here:
· Information on quantities received by the customer
· Information on the customer fiscal year and cumulative quantities reset due to a year change
· A wide range of cumulative go-ahead quantities
· Notes on the delivery schedule
Correcting Cumulative Delivered Quantities
Prerequisites
You correct cumulative quantities in scheduling agreements:
· In case of returns
· When there has been a processing error
· When there has been a year change
· When you are transferring initial quantities from a legacy system into the SAP System
To do this, you create a correction delivery within the delivery schedule itself. This delivery is not relevant for requirements planning, shipping, goods issue, or billing.
Correct cumulative quantities only when the customer has not posted goods receipt.
Procedure
To create a correction delivery (document type LFKO):
1. Choose Corr. delivery on the delivery scheduletabstrip.
The system displays a dialog box in which you enter a:
- Correction delivery date
For help on deciding where you want to position the correction delivery, choose Display. The system lists delivery dates in chronological order.
- Correction quantity
Enter a negative correction quantity by placing a minus sign after the quantity.
2. Choose Enter and save the scheduling agreement.
Result
When you save the correction delivery, the system updates the cumulative quantities in the delivery schedule.
To display correction deliveries, choose Deliveries on the delivery schedule tabstrip, or Environment ® Display document flow.
Example
Your customer returns 200 pieces of material from a delivery made on 7/10 because of damage during transport. Several other deliveries have been made before you prepare the correction delivery, so you view a list and choose an appropriate date. In this case you decide on 7/14 because it occurs after the delivery on 7/10 and before the delivery on 7/15.
Regards,
Murthy V.N
Maybe you are looking for
-
I attempted to install a new PATA hard drive and was never able to get it to be recognized or mount, no matter I gave up on that and went back to my original configuration to find that my 3rd small drive was now unreadable. I erased that and remounte
-
Adobe Flash Player 11.3 r300 still crashing (includes about:crashes)
Just had some more crashes while trying to use youtube this morning. In a previous discussion you asked for the "about:crashes" report, so here they are. https://crash-stats.mozilla.com/report/index/bp-1914231b-4147-4482-bd0c-ab1792120627 https://cra
-
I have connected the Apple TV to my Sony Bravia according to the directions. The TV does not recognize that anything is plugged into the HDMI, and the HDMI on the input screen stays grey instead of lighting up. I have tried a different cable and have
-
We want to create an online contract form with different options which will determine different prices as they make their choices. We will also require a legally binding e-signature. Is Acrobat the best product or even an option for this?
-
Hi all i am using a fileupload code that seems correct but after execution of code there are 0 kb jpg files on my folders...seems uploaded but files are empty 0kb:( here is my code below; import java.io.IOException; import java.util.Iterator; import