Stock Statement Query
Hi All,
Can some one help me in writing the stock statement query which includes
Warehouse Code, Inventory Transfer No, Inventory Transfer Date, Item Code, Item Description, Batch No/Serial No, Expiry date, Delivery Note No if any
We have add on which links the Inventory Transfer to Delivery. We can copy the inventory transfers to delivery where inventory transfer no will be stored in the item level UDF (u_delno)
Thanks in advance
Try from here to start:
Select T1.WhsCode, T0.DocNum, T0.DocDate, T1.ItemCode, T1.Dscription, T1.SerialNum, T1.u_delno
FROM dbo.OWTR T0
INNER JOIN dbo.WTR1 T1 ON T1.DocEntry = T0.DocEntry
Thanks,
Gordon
Similar Messages
-
General stock statement query.
hi ,
can anybody help me in getting stock statement query.... no selection criteria it has to disply all the ware house with Opening stock......inward qty, outward qty,closing stock . (this general) and like this i have to get stock details date wiseHi Vignesh......
I'm in confusion. You are asking the same question with different meanings.
As you are already suggested to use Inventory Posting List. You get all of your answers to your question.
It will give you the stock Opening, In, Out, Closing Warehouse Wise (Particular/All), Date wise, Transaction wise...
Please check this path to refer This Report.
Inventory->Inventory Reports-->Inventory Posting List......
If you have different requirement then please do mention.
Regards,
Rahul -
Have any one got the stock statement query report in the folowing format....
1.ItemCode
2.Item Description
3.Item Price
4.Opening
5.Receipts
6.Issues
7.Closing
8. Value
The selection criteria are:
3.Posting Date
from wh
to wh
help me in making stock statement query
regards,
VigneshHi
Check This
select w0.itemcode, i0.docdate, w0.whscode, w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0), 0
from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
where i0.docduedate >= [%0]
group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) >= 0
union
select w0.itemcode, i0.docdate, w0.whscode, 0, -(w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0))
from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
where i0.docduedate >= [%0]
group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) < 0
or
SELECT T0.ITEMCODE, T0.DSCRIPTION,T0.OPENQTY, T0.OPENVALUE, T0.INQTY, T0.INQTY*T0.PRICE AS 'RCPT VAL', T0.OUTQTY,T0.OUTQTY*T0.PRICE AS 'ISS. VAL', T0.INQTY-T0.OUTQTY AS 'CLOSING STOCK QTY',((T0.INQTY-T0.OUTQTY)*(T0.CALCPRICE)) AS 'CLOSING STOCK VAL' FROM OINM T0 WHERE T0.DOCDATE >=[%0] AND T0.DOCDATE <=[%1]
Thanks
Kevin
Edited by: Kevin Shah on Oct 23, 2010 5:37 PM -
Re:Query for Stock Statement for a particular item..!!!!
Dear SAP Experts,
I need a stock statement query for a particular item which contains:
1.ItemCode
2.Item Description
3.Item Price
4.Opening
5.Receipts
6.Issues
7.Closing
8. Value
The selection criteria are:
1.Warehouse code
2.Item Name
3.Posting Date
Plz give me a good solution for this issue.
With Regards,
RevathyCheck this
Declare @FromDate Datetime
Declare @ToDate Datetime
set @FromDate =
(Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
set @ToDate =
(Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
select * from
SELECT T0.itemcode,
min(T0.Dscription) as 'Item Description',
min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
(isnull((
Select sum(isnull(inqty,0))
from OINM O1
where O1.itemcode=T1.itemcode
and O1.Warehouse=W1.Whscode
and O1.docdate<@FromDate ),0)-
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode
and O1.Warehouse=W1.Whscode
and O1.docdate<@FromDate),0)
) as [Opening Stock],
isnull((
Select sum(isnull(inqty,0))
from OINM O1
where O1.itemcode=T1.itemcode
and O1.Warehouse=W1.Whscode
and O1.docdate>=@FromDate
and O1.docdate<=@ToDate and O1.inqty>0
and O1.transtype in (20,18)),0
) as [Purchase Quantity],
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate>=@FromDate and O1.docdate<=@ToDate
and O1.outqty>0 and O1.transtype in (21,19)),0
) as [Purchase Return Quantity],
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
and O1.transtype in (13,15)),0
) as [sale Quatity],
(isnull
Select sum(isnull(inqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate<=@ToDate),0
isnull((
Select sum(isnull(outqty,0))
from OINM O1
where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
and O1.docdate<=@ToDate),0)
) as [Closing Stock]
FROM OINM T0
INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
INNER JOIN OLCT C1 ON W1.Location=C1.Code
Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
) a
where (a.[Opening Stock]
+a.[Purchase Quantity]
+ a.[Purchase Return Quantity]
+a.[sale Quatity]+a.[Closing Stock]
) !=0
Regards,
Bala -
Hi Members,
My customer needs an report "Stock Statement" with selection criteria as Date, ItemGroupwise and warehouse wise with following columns namely.
Itemcode
ItemName
Opening Stock Qty
Receipt Qty
Issue Qty.
Price.
Kindly help me in this regard,
Thanks in advance,
Venkatesh.RHi!
Check these threads
Re: Item Stock Report (2nd page)
Item Stock Report -
Hi,
As our customer requirement we need a report "Stock Statement" for given period (From date - To date) with the following columns
Item
Opening Stock Qty
Opening stock Value
Receipt Qty
Receipt Value
Issue (Consumption) Qty.
Issue (Consumption) Value
Closing stock qty
Closing stock value.
Expecting your valuable solutions and it would be rewarded fully.
Thanks & Regards,
Venkatesan G.Hi,
I had this problem last week (to know the initial stock for a given item and a past date). The only way which I found to solve it ,was to recalculate the initial stock.
To do it, I used two tables (OINM and OITW). Here is an excerpt of my query, which does only what you asked for:
DECLARE @ItemCode varchar(15)
DECLARE @StartDate smalldatetime
SELECT @ItemCode = $[$38.1.0], @StartDate = $[$12.1.Date]
-- Before inserting the misc. operations, we have first to recalculate the initial stock
-- We have to do the following:
-- - Add or deduce, from the actual stock, all the movements which are stored in the OINM table
SELECT W0.ItemCode, @StartDate, W0.WhsCode, W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0), 0
FROM OITW W0 LEFT OUTER JOIN OINM I0 ON W0.ItemCode = I0.ItemCode AND W0.WhsCode = I0.Warehouse
WHERE I0.DocDuedate >= @StartDate
GROUP BY W0.ItemCode, W0.WhsCode, W0.OnHand
HAVING W0.ItemCode = @ItemCode AND W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0) >= 0
UNION
SELECT W0.ItemCode, @StartDate, W0.WhsCode, 0, -(W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0))
FROM OITW W0 LEFT OUTER JOIN OINM I0 ON W0.ItemCode = I0.ItemCode AND W0.WhsCode = I0.Warehouse
WHERE I0.DocDuedate >= @StartDate
GROUP BY W0.ItemCode, W0.WhsCode, W0.OnHand
HAVING W0.ItemCode = @ItemCode AND W0.OnHand - ISNULL (SUM (I0.InQty - I0.OutQty), 0) < 0
Just don't forget to give correct values to the two variables, since in my case they were taken from the Invoice window.
In my case, I was in need of this to show the evolution of an item's stock during time.
Regards,
Eric -
hi guy's,
i am doing report for the stock statement .... my issue is in MB5B if i reverse some document it shows as it move's to issue QTY and my receipt is same but my closing stock is correct ...is there any std report avalible ....
thank's in advanceUse this code :
TABLES : MSEG,MKPF,MARA,MAKT,BEWART,MSLB,BSIM.
TYPE-POOLS : SLIS.
DATA : IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_LIST_HEADER TYPE SLIS_T_LISTHEADER,
IT_EVENTS TYPE SLIS_T_EVENT,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
REPID LIKE SY-REPID,
FRM_DATE(10),TO_DATE(10),
DISPTEXT(255),DISPTEXT2(255).
TYPES : BEGIN OF ST_OPBAL,
MATNR LIKE MSEG-MATNR,
MAKTX LIKE MAKT-MAKTX,
BATCH LIKE MSEG-CHARG,
BWART LIKE MSEG-BWART,
MENGE LIKE MSEG-MENGE,
ZEILE LIKE MSEG-ZEILE,
WERKS LIKE MSEG-WERKS,
SOBKZ LIKE MSEG-SOBKZ,
BUDAT LIKE MKPF-BUDAT,
SHKZG LIKE MSEG-SHKZG,
DMBTR LIKE MSEG-DMBTR,
MBLNR LIKE MSEG-MBLNR,
LGORT LIKE MSEG-LGORT,
END OF ST_OPBAL.
DATA : OPBAL TYPE ST_OPBAL OCCURS 0 WITH HEADER LINE,
TMP_OPBAL TYPE ST_OPBAL OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF BAL_NOREF OCCURS 0,
MATNR LIKE MARA-MATNR,
SHKZG LIKE MSEG-SHKZG,
DMBTR LIKE MSEG-DMBTR,
END OF BAL_NOREF.
DATA : BEGIN OF OPBAL2 OCCURS 0,
SNO(3) TYPE N,
MATNR LIKE MSEG-MATNR,
MAKTX LIKE MAKT-MAKTX,
OP_BAL LIKE MSEG-MENGE,
OP_STKVAL LIKE MSEG-DMBTR, "NEW
REC LIKE MSEG-MENGE,
T_OPBAL_REC LIKE MSEG-MENGE,
REC_STKVAL LIKE MSEG-DMBTR, "NEW
ISS LIKE MSEG-MENGE,
ISS_STKVAL LIKE MSEG-DMBTR, "NEW
SALES LIKE MSEG-MENGE,
T_ISS LIKE MSEG-MENGE,
CL_BAL LIKE MSEG-MENGE,
BATCH LIKE MSEG-CHARG,
SUBCON LIKE MSEG-MENGE,
CL_STKVAL LIKE MSEG-DMBTR,
END OF OPBAL2.
DATA SERNO(4) TYPE C.
DATA OPTOT TYPE P DECIMALS 3.
DATA RECTOT TYPE P DECIMALS 3.
DATA ISSTOT TYPE P DECIMALS 3.
DATA TOTALL TYPE P DECIMALS 3.
DATA FLG TYPE N.
DATA FLAG TYPE N.
DATA STOCKVAL TYPE MSEG-DMBTR.
DATA REC_STOCKVAL TYPE MSEG-DMBTR.
DATA ISS_STOCKVAL TYPE MSEG-DMBTR.
DATA CL_STKVAL TYPE MSEG-DMBTR.
SELECTION-SCREEN BEGIN OF BLOCK X WITH FRAME.
SELECT-OPTIONS: P_MATNR FOR MSEG-MATNR,
P_MGRP FOR MARA-MATKL,
P_DATE FOR MKPF-BUDAT,
P_PLANT FOR MSEG-WERKS DEFAULT 'NB01' OBLIGATORY NO INTERVALS
NO-EXTENSION .
SELECT-OPTIONS: P_STLOC FOR MSEG-LGORT NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK X.
INITIALIZATION.
REPID = SY-REPID.
PERFORM FILL_FLDCAT USING IT_FLDCAT.
PERFORM FILL_EVENTS USING IT_EVENTS.
PERFORM FILL_LAYOUT USING GS_LAYOUT.
START-OF-SELECTION.
CONCATENATE P_DATE-LOW6(2) '.' P_DATE-LOW4(2) '.' P_DATE-LOW+0(4)
INTO FRM_DATE.
CONCATENATE P_DATE-HIGH6(2) '.' P_DATE-HIGH4(2) '.' P_DATE-HIGH+0(4)
INTO TO_DATE.
CONCATENATE TEXT-003 FRM_DATE' TO : ' TO_DATE INTO DISPTEXT.
CONCATENATE TEXT-004 P_PLANT-LOW ' Storage Location : ' P_STLOC-LOW
INTO DISPTEXT2.
PERFORM FILL_HEADER USING IT_LIST_HEADER.
SELECT A~MATNR
F~MAKTX
A~CHARG
A~BWART
A~MENGE
A~ZEILE
A~WERKS
A~SOBKZ
D~BUDAT
A~SHKZG
A~DMBTR
A~MBLNR
A~LGORT
INTO TABLE OPBAL
FROM MKPF AS D JOIN MSEG AS A
ON DMBLNR = AMBLNR AND
DMJAHR = AMJAHR
JOIN MARA AS E
ON EMATNR = AMATNR
JOIN MAKT AS F
ON FMATNR = AMATNR
WHERE A~MATNR IN P_MATNR
AND A~WERKS IN P_PLANT
AND A~KZBEW IN (' ','B')
AND E~MATKL IN P_MGRP
AND A~BWART NOT IN ('541','542','321','322','121')
AND A~KZVBR NOT IN ('A')
AND D~BUDAT LE P_DATE-HIGH.
LOOP AT OPBAL WHERE BWART EQ '544' AND LGORT EQ ''.
TMP_OPBAL = OPBAL.
APPEND TMP_OPBAL.
ENDLOOP.
DELETE OPBAL WHERE ( BWART EQ '309' AND DMBTR EQ 0 ).
DELETE OPBAL WHERE ( BWART NE '543' AND LGORT EQ '' ).
LOOP AT TMP_OPBAL.
OPBAL = TMP_OPBAL.
APPEND OPBAL.
ENDLOOP.
STOCKVAL = 0.
SORT OPBAL BY MATNR BATCH BUDAT.
LOOP AT OPBAL.
SELECT SINGLE LBLAB INTO MSLB-LBLAB FROM MSLB
WHERE MATNR = OPBAL-MATNR.
IF OPBAL-BUDAT LT P_DATE-LOW.
IF OPBAL-SHKZG = 'H'.
OPTOT = OPTOT - OPBAL-MENGE.
ELSEIF OPBAL-SHKZG = 'S'.
OPTOT = OPTOT + OPBAL-MENGE.
ENDIF.
For the duration II part *****************
ELSEIF OPBAL-BUDAT IN P_DATE.
IF OPBAL-SHKZG = 'H'.
ISSTOT = ISSTOT + OPBAL-MENGE.
ELSEIF OPBAL-SHKZG = 'S'.
RECTOT = RECTOT + OPBAL-MENGE.
ENDIF.
ENDIF.
AT END OF BATCH. " modified for chek
READ TABLE OPBAL INDEX SY-TABIX.
CLEAR BAL_NOREF. REFRESH BAL_NOREF.
SELECT MATNR SHKZG SUM( DMBTR )
INTO TABLE BAL_NOREF
FROM BSIM
WHERE BUDAT LT P_DATE-LOW AND
MATNR EQ OPBAL-MATNR AND
BWTAR EQ OPBAL-BATCH AND
BWKEY IN P_PLANT AND
BLART IN ('RE','WE','WA','PR')
GROUP BY MATNR SHKZG.
LOOP AT BAL_NOREF.
IF BAL_NOREF-SHKZG = 'H'.
STOCKVAL = STOCKVAL - BAL_NOREF-DMBTR.
ELSE.
STOCKVAL = STOCKVAL + BAL_NOREF-DMBTR.
ENDIF.
ENDLOOP.
CLEAR BAL_NOREF. REFRESH BAL_NOREF.
SELECT MATNR SHKZG SUM( DMBTR )
INTO TABLE BAL_NOREF
FROM BSIM
WHERE BUDAT IN P_DATE AND
MATNR EQ OPBAL-MATNR AND
BWTAR EQ OPBAL-BATCH AND
BWKEY IN P_PLANT AND
BLART IN ('RE','WE','WA','PR')
GROUP BY MATNR SHKZG.
LOOP AT BAL_NOREF.
IF BAL_NOREF-SHKZG = 'H'.
ISS_STOCKVAL = ISS_STOCKVAL + BAL_NOREF-DMBTR.
ELSE.
REC_STOCKVAL = REC_STOCKVAL + BAL_NOREF-DMBTR.
ENDIF.
ENDLOOP.
" MSLB-LBLAB (STOCK WITH SUBCONTRACTOR).
CL_STKVAL = STOCKVAL + REC_STOCKVAL - ISS_STOCKVAL.
TOTALL = OPTOT + RECTOT - ISSTOT.
IF OPTOT = '0' AND RECTOT = '0' AND ISSTOT = '0'.
FLG = 1.
ENDIF.
IF FLG = 1.
CLEAR FLG.
ELSE.
SERNO = SERNO + 1.
OPBAL2-SNO = SERNO.
OPBAL2-MATNR = OPBAL-MATNR.
OPBAL2-MAKTX = OPBAL-MAKTX.
OPBAL2-OP_BAL = OPTOT.
OPBAL2-REC = RECTOT.
OPBAL2-T_OPBAL_REC = OPTOT + RECTOT.
OPBAL2-ISS = ISSTOT.
OPBAL2-T_ISS = ISSTOT.
OPBAL2-CL_BAL = TOTALL.
OPBAL2-BATCH = OPBAL-BATCH.
OPBAL2-SUBCON = MSLB-LBLAB.
OPBAL2-OP_STKVAL = STOCKVAL.
OPBAL2-ISS_STKVAL = ISS_STOCKVAL.
OPBAL2-REC_STKVAL = REC_STOCKVAL.
OPBAL2-CL_STKVAL = CL_STKVAL.
APPEND OPBAL2.
ENDIF.
OPTOT = 0.
RECTOT = 0.
ISSTOT = 0.
STOCKVAL = 0.
ISS_STOCKVAL = 0.
REC_STOCKVAL = 0.
CL_STKVAL = 0.
ENDAT.
ENDLOOP.
WA_SORT-SPOS = 1.
WA_SORT-FIELDNAME = 'MATNR'.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
IT_FIELDCAT = IT_FLDCAT
IT_EVENTS = IT_EVENTS
IS_LAYOUT = GS_LAYOUT
IT_SORT = IT_SORT
TABLES
T_OUTTAB = OPBAL2.
FORM FILL_FLDCAT USING P_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
PERFORM FILL_PARAM_FLDCAT USING 1 'SNo' 'SNO' ' ' 'X'
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 2 'Material No.' 'MATNR' ' ' 'X'
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 3 'Description' 'MAKTX' ' ' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 4 'Op.Bal' 'OP_BAL' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 5 'Op.Stock Val' 'OP_STKVAL' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 6 'Receipts' 'REC' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 7 'Total' 'T_OPBAL_REC' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 8 'Rect.Val.' 'REC_STKVAL' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 9 'Issues' 'ISS' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 10 'Iss. Val.' 'ISS_STKVAL' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 11 'Cl. Bal.' 'CL_BAL' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 12 'Cl.Stock Val' 'CL_STKVAL' 'X' ' '
'OPBAL2' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 13 'BATCH ' 'BATCH' ' ' ' '
'OPBAL2' P_FLDCAT.
ENDFORM.
FORM FILL_PARAM_FLDCAT USING VALUE(P_COL) VALUE(P_TEXT) VALUE(P_FLDNAME)
VALUE(P_DOSUM) VALUE(P_NOZERO) VALUE(P_TABNAME)
PP_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_FLDCAT TYPE SLIS_FIELDCAT_ALV.
CLEAR WA_FLDCAT.
WA_FLDCAT-COL_POS = P_COL.
WA_FLDCAT-SELTEXT_M = P_TEXT.
WA_FLDCAT-FIELDNAME = P_FLDNAME.
WA_FLDCAT-TABNAME = P_TABNAME.
WA_FLDCAT-DO_SUM = P_DOSUM.
WA_FLDCAT-NO_ZERO = P_NOZERO.
APPEND WA_FLDCAT TO PP_FLDCAT.
ENDFORM.
FORM FILL_HEADER USING P_IT_LIST_HEADER TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-INFO = TEXT-002.
APPEND LS_LINE TO P_IT_LIST_HEADER.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-INFO = DISPTEXT.
APPEND LS_LINE TO P_IT_LIST_HEADER.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-INFO = DISPTEXT2.
APPEND LS_LINE TO P_IT_LIST_HEADER.
ENDFORM.
FORM FILL_EVENTS USING P_IT_EVENTS TYPE SLIS_T_EVENT.
DATA LS_EVENT TYPE SLIS_ALV_EVENT.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-NAME.
APPEND LS_EVENT TO P_IT_EVENTS.
ENDFORM.
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LIST_HEADER.
ENDFORM.
FORM FILL_LAYOUT USING P_GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
P_GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
P_GS_LAYOUT-ZEBRA = 'X'.
P_GS_LAYOUT-FLEXIBLE_KEY = 'X'.
ENDFORM.
FOR TESTING PURPOSE.
*SORT OPBAL BY BUDAT.
*CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
IT_FIELDCAT = IT_FLDCAT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = OPBAL.
*FORM FILL_FLDCAT USING P_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
PERFORM FILL_PARAM_FLDCAT USING 1 'MBLNR' 'MBLNR'
'OPBAL' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 2 'CREDIT/DEBIT' 'SHKZG'
'OPBAL' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 3 'MOV.TYP.' 'BWART'
'OPBAL' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 4 'ST.LOC.' 'LGORT'
'OPBAL' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 5 'STOCK VAL' 'DMBTR'
'OPBAL' P_FLDCAT.
PERFORM FILL_PARAM_FLDCAT USING 6 'POS.DATE' 'BUDAT'
'OPBAL' P_FLDCAT.
*ENDFORM. -
Daily stock statement by location in dp value
hi guys,
iam using the t.code mb52 for daily stock statement by location in dp value report. i have to dipspaly the date wise 4 locations i.e ( snt,sabh,sarawak,departement). these are the 4 locations and i want total sum of snt sabah etc of cost in date wise. so how to find out the cost of particular locations.
Thanks & Regards,
praveen.Perfect - many thanks for the quick response. Points have been awarded.
-
Daily Stock Statements by location in dp value report
hi guys,
iam using the t.code mb52 for daily stock statement by location in dp value report. i have to dipspaly the date wise 4 locations i.e ( snt,sabh,sarawak,departement). these are the 4 locations and i want total sum of snt sabah etc of cost in date wise. so how to find out the cost of particular locations.
Thanks & Regards,
praveen.Perfect - many thanks for the quick response. Points have been awarded.
-
STOCK STATEMENT STORAGE LOCATION WISE
Dear All,
Ca we able to take Stock Value on storage location wise for the particular date.
Thank You,
Warm Regards
Mani.Hi,
Stock statement storage location wise can be get, by using T-Code MB5B.
But Quantity can be gettable on storage location basis. However value can be gettable on Plant level.
First you have to take the plant stock on any particular date in which you can get Plant Qty and Plant Value. Please divide Plant value by Plant Qty, you can get Rate of each material. After that take storage location wise stock and multiply with Rate.
Please note that in SAP prices are maintained on Plant level basis. Hence, it is a small workaround.
Secondly you get Monthend Stock of any month at storage location level with value using T-code mc.9
Hope this will help you.
Please reward if useful.
Ishu -
How to edit the records value fetched by select statement query in sqldever
How to edit the records value fetched by select statement query in sqldever 2.1.1.
EX-
SELECT * FROM emp WHERE ename like 'Jaga%'
Edited by: user9372056 on Aug 31, 2010 2:16 AMHi,
Although some forum members may be using that tool, there is still a dedicated forum for SQL Developer.
SQL Developer
Maybe your chances are better there.
Regards
Peter -
AGE WISE CLOSING STOCK STATEMENT
Dear All,
Kindly send me your valuable inputs with regard to getting the detailed closing stock statment with AGE wise details ( above 60 days / 90 days / 120 days / 180 days,
etc ) - if it is possible immediately.
Thanks & regards
G. Janarthanan
Edited by: N-Power FI TEAM on Feb 11, 2008 6:17 AMHi,
Please send me the details with regard to getting the AGE wise Stock statement as mentioned in my earlier mail.
Thanks
G. Jana -
Hi,
I had used the RSZC transaction to migrate query 0FIGL_VC1_Q0002 - Cash flow statement, based on 0FIGL_VC1 to a custom virtual cube which extracts data from a cube containing general ledger accounting (New) data. on execution of the query, no data is displayed.
In a similar fashion the query 0FIGL_V10_Q0001, which is based on virtual cube 0FIGL_V10 was migrated to the same custom virtual cube and was found to be executing.
has anyone faced similar issue with cash flow statement query?
Regards,
SainathLook at the import parameters - there is a hard coded and change it to Z version
https://forums.sdn.sap.com/click.jspa?searchID=10104420&messageID=5012838
Hope it Helps
Chetan
@CP.. -
Printing Prepared Statement Query
Hi all,
Is it possible to print Prepared Statement query. When i give System.out.println(query);, i get the query with '?' and not with the actual value sent. How can i print the query with the value passed in place of the '?' ?Hi all,
Is it possible to print Prepared Statement
tatement query. When i give
System.out.println(query);, i get the query with '?'
and not with the actual value sent. How can i print
the query with the value passed in place of the '?' ?The simple answer is that you can't (AFAIK), but some database drivers are able to log the sql statements.
Kaj -
STOCK STATEMENT (STORES)
hi abapers
pls help me abt stock statement (stores)
output fields are
1. S.no.
2. Item Description.
3. Item Code.
4. Opening Balance.
5. Received Qty.
6. Issued to
x. y z
7. Sold Qty.
8. Closing Balance.
pls help me abt the table name and field names for that report.
Points will be rewarded.
thnks
pardeepdear sir
check with t code : S_P00_07000139
stock card report, you will get
regards
jrp
Maybe you are looking for
-
Why is so much storage taken up in the 'other' category on my mac?
I have been going through a lot of things on my macbook air and I don't understand how I less available storage now then I did before I began cleaning things up. I have emptied my trash deleted old apps etc. I have not deleted things that I have no i
-
CHANGING LINK COLORS TO SOME LINKS NOT ALL
please see attachment for a visual of this issue. i have some links i want gray (on the left side) and some link black (on the bottom). i dreamweaver mx this was a very simple task. i can't figure out how to change the bottom links to black in cs4. i
-
Sqlanywhere database not start DBSPAWN ERROR -80
Dear Experts I am installed BO 4.1 Sp3 under AIX 7 and default database sqlanywhere after stop BOE 1. tomcat 2. BOE 3 database from BOBJ home /usr/sap/BOD/sap_bobj using scripts but when in start database ./sqlanywhere_startup.sh Flowing error occur
-
Dificulty seting up C4740 in a MacBook pro
Hi. I just bought a C4740 and a MBP, ni network consists of the following. 1. THOMSON Router thats has wirelles and eathernet port. 2. Apple Time machine (which I use to connect to internet) connected to the THOMSON via Ethernet 3. the Printer 4. A
-
Is it possible to leave movies on the Itouch and erase them from computer??
I have an Itouch and have been trying to find out how to leave movies on my Itouch after I download them, and then erase them from the hard drive of my computer. I thought it would be simple to do. I tryed downloading the movie then put it on the Ito