Stock Report on Key date.
Hi,
I want to have a report which gives stock available on key dates. Is there any standard report available in sap.
Thanks in advance
VRH
HI,
Using T-code MB5B - Stock on Posting Date, the following input data to be given as follows.
Company Code : ______
Plant : _______
Storage Location : ______ if required to be selected
Selection Date : _________ to ___________ (Your key date from 01.10.2010 to 31.10.2010-report required period to be mentioned)
Stock Type - selected Valuated Stock
List of Scope click category and following options to be tick marked
With Opening Stock Without Closing Stock
With Opening Stock With Closing Stock, Changed
With Opening Stock With Closing Stock, Unchanged
Settings - Totals Only - Non Hierarchical Representation Layout /ZMB5B tick marked
The above input data given & options are tick marked, Executed the report shown opening, Receipt,Issues,Closing stock, UOM, Opening value, Receipt Value, Issue Value, Closing Value, Currency in columnar (like Excel tabular format).
Hope, it is useful for you.
Regards,
K.Rajendran
Similar Messages
-
Stock report on key date with customer information
Hi Experts,
Is there an available sap standard report that will show available stock in subcontractors or customers at specific date(posting date)?
transaction MC.9 only show consignment stock without customer information we would like to know which customer inventoried this quantity
Thank you for your inputsHello,
Thank you very much for your responses. I tried to check transaction MB51 but the customer is not displayed in the report. I found another report S_P00_07000140 that seems to fit the requirements. customer and posting date were also displayed in the generated report. However the SAP menu of this report is:
SAP Menuu21D2Accountingu21D2Financial Accountingu21D2General Ledgeru21D2Reportingu21D2Tax Reportsu21D2Thailandu21D2Inventory and Raw Material for Special Stock Report
Will there be no implications if this is used instead of MC.9 or MB51? what are the differences of the 3 transactions?
Best regards. -
Dear All,
Is there any function from which I can get Material Stock as on Particular Key Date.
e.g. I want to see the stock of X material on 31.03.2009.
And also any function from which i can get Batch Stock as on particular Key date:
e.g.
Material Batch 31.03.2009
X 1 10
X 2 20
Y 5 2
Y 8 40
Regards,
VishalHi Paul,
Thanks for your quick response.
But, actually I needed Material Stock data into my ABAP report. So I will be needing some Function Module or something like that. This transaction I already knew.
Regards,
Vishal -
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 -
Hi,
Reprot requirement is to display values as on a key dates i.e. posting which had happend on a date.
Issues- Cube aggregates key figures (from delta's) and publishes the final amount.Hi,
The Key Date in the Query is used for displaying Time Dependent Master Data. So based on the User enltry of the dates, the valid master data for that particular time frame is retrieved. It is nowhere related to Transaction data in the Cube.
Can you explain clearly what is your requirement??
Regards,
Ankit. -
Want to schedule WebI report for End date of Prior Month
Hello Experts,
We have WebI report created on top of Bex Query, We have key date as prompt for the report. Can we schedule the webi report for key date as last date of prior month, so if current month is February, my key date should be Jan 30 2011. I am not sure if this is possible?
Thanks,
RaviYou need to apply two FM to get the end day of the month.
First you need to apply FM MONTHS_PLUS_DETERMINE. This will give you the date after 3 months.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
MONTHS = 3 " << for 3 months
OLDDATE = l_start_Date " << 12/01/2007
IMPORTING
NEWDATE = l_3_Date. " << 02/01/2008
Then call the FM RP_LAST_DAY_OF_MONTHS . this will give you the end date of the month
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = l_3_Date " << 02/01/2008
IMPORTING
last_day_of_month = l_3_Date " < 02/29/2008
EXCEPTIONS
day_in_no_date = 1
OTHERS = 2.
Call both FMs again to get your another date(after 4 months).
Regards,
Naimesh Patel -
How to make key date of query as transcation date in cube
I am facing an issues in displaying the transaction data with time dependent master data.
I want to set the key date of the query to go against the transaction date and diplay the respective master data.
I read in other posts,
that i cant use the user exit variable, because the exit is executed only once before the query run.
The fllowing is the report i want to achive,
customer|customer_grp-|date-|--|sale
100-----|-sa|jan 1|--- 15$
100-----|-ic|oct 1|--- 32$
in the above scenario, customer_grp for cusotmer 100 is sa from jan - mar and
customer_grp for cusotmer 100 is ic from apr - dec
I have customer_grp as time dependent attribute of customer. when i execute the report with key date as ,nov 1st
it displays as,
customer|customer_grp-|date-|--|sale
100-----|-ic|jan 1|--- 15$
100-----|-ic|oct 1|--- 32$
if key date is jan 1st it displays as,
customer|customer_grp----|date-|--|sale
100--|-sa|jan 1|--- 15$
100--|-sa|oct 1|--- 32$
let me know whether it is possible to achive this type of report
-thanks in advance
- points will be awarded for inputsHello,
I have the same kind of requirement.
Is it possible to assign a Date field from the cube to Keydate of the query so that the time-dep attribute value is properly displayed based on InvoiceDate of each record, not based on today(query keydate by default)?
Otherway i can think of is to add a Char/KF to cube and insert the value using a query on Masterdata in update rules. How far this approach is recommended?
Thanks in advance,
vamsi. -
Bw time dependent hierarchy authorization in Hr - Key date problem - 0orgunit
Hello Gurus,
I'm facing a problem with the 0Orgunit hierarchy authorization.
In the Rsecadmin screen we set the hierarchy authorization for 0orgunit characteristic, before selecting the hierarchy node, we enter the key date.
I tried many cases, but neither of the key dates gives the correct results in the report. (Todays date, 01.01.1900, 31.12.9999 etc..)
In the report the key date variable is generated by RSTHJTMAINT transaction. I guess, this is creating a problem with the authorization key date.
A similar problem is told in the following link as well:
http://scn.sap.com/thread/1437951
I spend some hours, and tried many possibilities (validity period etc.), but I could'nt get it worked.
I'm not sure if I had this error before 7.31 update.
With this opportunity, I want to thank you every one in the Sdn community. It helps a lot for resolving our issues and sharing the knowledge.
Thanks a lot.
Regards.Hi Norbert,
Can you check that the SAP note 1301644 has been applied in your system.
Best Regards,
Des Gallagher -
Hi Experts.
Material stock report (unrestricted, blocked, quality) with in date range.
getting information in T-CODE: MB52 but not in date range.
In mard table i did't find the date for unrestricted, blocked and quality.
from where can i get that information and how should i link all
Need a psudo code for it.
If any one worked on this kind of object plz send me the code.
Points assured..
Regards..
Ravi Reddy.Hi
Check this sample code hope it will helpfull for you
*DATA: ED TYPE F.
DATA : ED(15) TYPE N .
TABLES: EKKO, EKBE, EKPO, KONH , KONV ,LFA1 ,ESLL.
TYPE-POOLS: SLIS.
DATA: val1 like konh-vakey.
Data:GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
G_REPID LIKE SY-REPID,
G_GRID_TITLE TYPE LVC_TITLE.
Data:G_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
DATA:G_TABNAME TYPE SLIS_TABNAME VALUE 'ITAB1',
G_SAVE .
DATA:GS_VARIANT LIKE DISVARIANT.
DATA:LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA:GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
G_SAVE = 'A'.
DATA: BEGIN OF ITAB OCCURS 10,
EBELN LIKE EKKO-EBELN,
* LIFNR like p_vendor,
LIFNR LIKE EKKO-LIFNR,
NAME1 LIKE LFA1-NAME1,
NAME2 LIKE LFA1-NAME2,
* EBELP LIKE EKBE-EBELP,
BELNR LIKE EKBE-BELNR,
VGABE LIKE EKBE-VGABE,
GJAHR LIKE EKBE-GJAHR,
KNUMV LIKE EKKO-KNUMV,
EKORG LIKE EKKO-EKORG,
BEDAT LIKE EKKO-BEDAT,
* VAKEY LIKE KONH-VAKEY,
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 10,
NAME1 LIKE LFA1-NAME1,
NAME2 LIKE LFA1-NAME2,
EBELN LIKE EKPO-EBELN,
LIFNR LIKE EKKO-LIFNR,
EBELP LIKE EKPO-EBELP,
* EBELP LIKE EKBE-EBELP,
KNUMH LIKE KONH-KNUMH,
BELNR LIKE EKBE-BELNR,
MATNR LIKE EKPO-MATNR,
TXZ01 LIKE EKPO-TXZ01,
PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
EXTROW LIKE ESLL-EXTROW,
SRVPOS LIKE ESLL-SRVPOS,
KTEXT1 LIKE ESLL-KTEXT1,
KOSTL LIKE EKKN-KOSTL,
NETPR LIKE EKPO-NETPR,
NETWR LIKE EKPO-NETWR,
ED1 TYPE p decimals 2,
KBETR2 LIKE KONV-KBETR,
KBETR1 LIKE KONV-KBETR,
KBETR LIKE KONV-KBETR,
* KBETR3 LIKE KONV-KBETR,
KWERT LIKE KONV-KWERT, " THIS IS FOR FREIGHT
KWERT1 LIKE KONV-KWERT, " THIS IS FOR PBXX OR PB00
KWERT2 LIKE KONV-KWERT, " THIS FOR OTHER CONDITION
MENGE LIKE EKPO-MENGE,
* TOTAL(15) type .
TOTAL TYPE p decimals 2,
VAKEY LIKE KONH-VAKEY,
WERKS LIKE EKPO-WERKS,
MWSKZ LIKE EKPO-MWSKZ,
PACKNO LIKE EKPO-PACKNO,
KNUMV LIKE KONV-KNUMV,
SUB_PACKNO LIKE ESLL-SUB_PACKNO,
GJAHR LIKE RSEG-GJAHR,
END OF ITAB1.
DATA: BEGIN OF ITAB2 OCCURS 10,
EBELN LIKE EKKN-EBELN,
EBELP LIKE EKKN-EBELP,
PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
KOSTL LIKE EKKN-KOSTL,
END OF ITAB2.
data: begin of itab3 occurs 10,
KNUMH LIKE KONH-KNUMH,
KSCHL LIKE KONH-KSCHL,
end of itab3.
data: begin of itab4 occurs 10,
KBETR LIKE KONP-KBETR,
end of itab4.
data: begin of itab5 occurs 10,
KPOSN LIKE KONV-KPOSN,
KNUMV LIKE KONV-KNUMV,
KSCHL LIKE KONV-KSCHL,
KBETR LIKE KONV-KBETR,
KWERT LIKE KONV-KWERT, " THIS IS FOR FREIGHT
* KAWRT LIKE KONV-KAWRT,
end of itab5.
DATA: BEGIN OF ITAB6 OCCURS 10,
* PACKNO LIKE EKPO-PACKNO,
SUB_PACKNO LIKE ESLL-SUB_PACKNO,
END OF ITAB6.
DATA: BEGIN OF ITAB7 OCCURS 10,
BELNR LIKE RSEG-BELNR,
GJAHR LIKE RSEG-GJAHR,
END OF ITAB7.
DATA: BEGIN OF ITAB8 OCCURS 10,
SUB_PACKNO LIKE ESLL-SUB_PACKNO,
SRVPOS LIKE ESLL-SRVPOS,
EXTROW LIKE ESLL-EXTROW,
KTEXT1 LIKE ESLL-KTEXT1,
END OF ITAB8.
*selection-screen
*SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
*SELECTION-SCREEN SKIP 2.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 25(23) text-002.
**SELECT-OPTIONS: s_lifnr FOR ekko-lifnr.
*PARAMETERS:p_lifnr LIKE ekko-lifnr obligatory.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_data.
* PERFORM field_catalog.
* PERFORM display_data.
END-OF-SELECTION.
**& Form display_data
** text
*FORM display_data.
*data: new(15) TYPE N.
* CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
* EXPORTING
* i_callback_program = sy-repid
* it_fieldcat = int_cat[]
* TABLES
* t_outtab = int_out
* EXCEPTIONS
* program_error = 1
* OTHERS = 2.
*ENDFORM. "display_data
PERFORM GET_DATA.
PERFORM CALL_ALV_GRID.
FORM CALL_ALV_GRID.
PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_repid
I_CALLBACK_USER_COMMAND = G_USER_COMMAND
I_GRID_TITLE = G_GRID_TITLE
IT_FIELDCAT = GT_FIELDCAT[]
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = Gs_VARIANT
TABLES
T_OUTTAB = ITAB1.
ENDFORM.
FORM FIELDCAT_INIT
USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-seltext_l = 'Vendo No'.
LS_FIELDCAT-FIELDNAME = 'LIFNR'.
LS_FIELDCAT-REF_FIELDNAME = 'LIFNR'.
LS_FIELDCAT-REF_TABNAME = 'EKKO'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'Vendor Name'.
LS_FIELDCAT-FIELDNAME = 'NAME1'.
LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
LS_FIELDCAT-REF_TABNAME = 'LFA1'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-FIELDNAME = 'NAME2'.
* LS_FIELDCAT-REF_FIELDNAME = 'NAME2'.
* LS_FIELDCAT-REF_TABNAME = 'LFA1'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-seltext_l = 'Purchase Document No'.
LS_FIELDCAT-FIELDNAME = 'EBELN'.
LS_FIELDCAT-REF_FIELDNAME = 'EBELN'.
LS_FIELDCAT-REF_TABNAME = 'EKKO'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-FIELDNAME = 'VGABE'.
* LS_FIELDCAT-REF_FIELDNAME = 'VGABE'.
* LS_FIELDCAT-REF_TABNAME = 'EKBE'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'Item No'.
LS_FIELDCAT-FIELDNAME = 'EBELP'.
LS_FIELDCAT-REF_FIELDNAME = 'EBELP'.
LS_FIELDCAT-REF_TABNAME = 'EKPO'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-FIELDNAME = 'BELNR'.
* LS_FIELDCAT-REF_FIELDNAME = 'BELNR'.
* LS_FIELDCAT-REF_TABNAME = 'EKBE'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'Document Con'.
LS_FIELDCAT-FIELDNAME = 'KNUMH'.
LS_FIELDCAT-REF_FIELDNAME = 'KNUMH'.
LS_FIELDCAT-REF_TABNAME = 'KONH'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'Service/Material No'.
* LS_FIELDCAT-FIELDNAME = 'MATNR'.
* LS_FIELDCAT-REF_FIELDNAME = 'MATNR'.
* LS_FIELDCAT-REF_TABNAME = 'EKPO'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'Service / Material description' .
* LS_FIELDCAT-FIELDNAME = 'TXZ01'.
* LS_FIELDCAT-REF_FIELDNAME = 'TXZ01'.
* LS_FIELDCAT-REF_TABNAME = 'EKPO'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'WBS Element' .
* LS_FIELDCAT-FIELDNAME = 'PS_PSP_PNR'.
* LS_FIELDCAT-REF_FIELDNAME = 'PS_PSP_PNR'.
* LS_FIELDCAT-REF_TABNAME = 'EKKN'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'Serial Number' .
* LS_FIELDCAT-FIELDNAME = 'EXTROW'.
* LS_FIELDCAT-REF_FIELDNAME = 'PACKNO'.
* LS_FIELDCAT-REF_TABNAME = 'ESLL'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'Service Number' .
* LS_FIELDCAT-FIELDNAME = 'SRVPOS'.
* LS_FIELDCAT-REF_FIELDNAME = 'SRVPOS'.
* LS_FIELDCAT-REF_TABNAME = 'ESLL'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'Dscription' .
* LS_FIELDCAT-FIELDNAME = 'KTEXT1'.
* LS_FIELDCAT-REF_FIELDNAME = 'KTEXT1'.
* LS_FIELDCAT-REF_TABNAME = 'ESLL'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'Cost Center'.
* LS_FIELDCAT-FIELDNAME = 'KOSTL'.
* LS_FIELDCAT-REF_FIELDNAME = 'KOSTL'.
* LS_FIELDCAT-REF_TABNAME = 'EKKN'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-FIELDNAME = 'NETWR'.
LS_FIELDCAT-FIELDNAME = 'NETPR'.
LS_FIELDCAT-reptext_ddic = 'Basic'.
* LS_FIELDCAT-SELTEXT_L = 'Basic'.
LS_FIELDCAT-REF_FIELDNAME = 'NETPR'.
LS_FIELDCAT-REF_TABNAME = 'EKPO'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-FIELDNAME = 'NETWR'.
* LS_FIELDCAT-FIELDNAME = 'NETPR'.
* LS_FIELDCAT-reptext_ddic = ''.
* LS_FIELDCAT-SELTEXT_L = 'Basic'.
LS_FIELDCAT-REF_FIELDNAME = 'NETWR'.
LS_FIELDCAT-REF_TABNAME = 'EKPO'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'Excise'.
LS_FIELDCAT-FIELDNAME = 'ED1'.
LS_FIELDCAT-REF_FIELDNAME = 'ED1'.
* LS_FIELDCAT-REF_TABNAME = 'EKKN'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'Insurance'.
LS_FIELDCAT-FIELDNAME = 'KBETR2'.
LS_FIELDCAT-REF_FIELDNAME = 'KBETR'.
LS_FIELDCAT-REF_TABNAME = 'KONV'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'Frieght'.
LS_FIELDCAT-FIELDNAME = 'KWERT'.
LS_FIELDCAT-REF_FIELDNAME = 'KWERT'.
LS_FIELDCAT-REF_TABNAME = 'KONV'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
* CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = '' .
* LS_FIELDCAT-FIELDNAME = 'KBETR1'.
* LS_FIELDCAT-REF_FIELDNAME = 'KBETR'.
* LS_FIELDCAT-REF_TABNAME = 'KONV'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
*CLEAR LS_FIELDCAT.
* LS_FIELDCAT-TABNAME = G_TABNAME.
* LS_FIELDCAT-SELTEXT_L = 'PBXX'.
* LS_FIELDCAT-FIELDNAME = 'KWERT1'.
* LS_FIELDCAT-REF_FIELDNAME = 'KWERT'.
* LS_FIELDCAT-REF_TABNAME = 'KONV'.
* APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'VAT/ST '.
LS_FIELDCAT-FIELDNAME = 'KBETR'.
LS_FIELDCAT-REF_FIELDNAME = "KBETR".
LS_FIELDCAT-REF_TABNAME = 'KONV'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'OTHER '.
LS_FIELDCAT-FIELDNAME = 'KWERT2'.
LS_FIELDCAT-REF_FIELDNAME = "KWERT".
LS_FIELDCAT-REF_TABNAME = 'KONV'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-TABNAME = G_TABNAME.
LS_FIELDCAT-SELTEXT_L = 'TOTAL'.
LS_FIELDCAT-FIELDNAME = 'TOTAL'.
LS_FIELDCAT-REF_FIELDNAME = 'TOTAL'.
* LS_FIELDCAT-REF_TABNAME = 'EKKN'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
ENDFORM. " FIELDCAT_INIT
FORM GET_DATA.
SELECT A~EBELN A~LIFNR A~EKORG A~KNUMV B~VGABE B~GJAHR B~BELNR
L~NAME1 L~NAME2
FROM EKKO AS A
INNER JOIN EKBE AS B ON B~EBELN = A~EBELN
INNER JOIN LFA1 AS L ON L~LIFNR = A~LIFNR
INTO CORRESPONDING
FIELDS OF TABLE ITAB.
* WHERE B~VGABE = '2'.
SELECT EKPO~EBELN EKPO~EBELP EKPO~MATNR EKPO~TXZ01 EKPO~WERKS
EKPO~NETWR EKPO~MENGE EKPO~MWSKZ EKPO~NETPR EKPO~PACKNO
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE ITAB1
FOR ALL ENTRIES IN ITAB
WHERE EKPO~EBELN = ITAB-EBELN and
EKPO~BUKRS = 'company code'.
SELECT EKKN~EBELN EKKN~EBELP EKKN~KOSTL EKKN~PS_PSP_PNR
FROM EKKN
INTO CORRESPONDING FIELDS OF TABLE ITAB2
FOR ALL ENTRIES IN ITAB1
WHERE EKKN~EBELN = ITAB1-EBELN AND
EKKN~EBELP = ITAB1-EBELP.
SELECT KONV~KNUMV KONV~KSCHL KONV~KBETR KONV~KWERT KONV~KWERT
KONV~KPOSN
FROM KONV
INTO CORRESPONDING FIELDS OF TABLE ITAB5
WHERE KONV~KNUMV = ITAB1-KNUMV AND
KONV~KPOSN = ITAB1-EBELP.
* SELECT LFA1~NAME1 LFA1~NAME2 FROM LFA1
* INTO CORRESPONDING FIELDS OF TABLE ITAB1
* WHERE LFA1~LIFNR = ITAB-LIFNR.
* SELECT ESLL~SUB_PACKNO ESLL~SRVPOS
* ESLL~EXTROW ESLL~KTEXT1 FROM ESLL
* INTO CORRESPONDING FIELDS OF TABLE ITAB6
* FOR ALL ENTRIES IN ITAB1
* WHERE ESLL~PACKNO = ITAB1-PACKNO .
** SELECT ESLL~SUB_PACKNO FROM ESLL
** INTO CORRESPONDING FIELDS OF TABLE ITAB6
** FOR ALL ENTRIES IN ITAB1
** WHERE ESLL~PACKNO = ITAB1-PACKNO.
* SELECT ESLL~SUB_PACKNO ESLL~SRVPOS
* ESLL~EXTROW ESLL~KTEXT1 FROM ESLL
* INTO CORRESPONDING FIELDS OF TABLE ITAB8
* FOR ALL ENTRIES IN ITAB6
* WHERE ESLL~PACKNO = ITAB6-SUB_PACKNO .
* SELECT RSEG~BELNR RSEG~GJAHR FROM RSEG
* INTO CORRESPONDING FIELDS OF TABLE ITAB7
* FOR ALL ENTRIES IN ITAB
* WHERE RSEG~BELNR = ITAB-BELNR AND
* RSEG~GJAHR = ITAB-GJAHR.
*LOOP AT ITAB1.
LOOP AT ITAB.
READ TABLE ITAB1 WITH KEY EBELN = ITAB-EBELN.
* IF ITAB1-EBELN = ITAB-EBELN.
IF sy-subrc eq 0.
* ITAB1-EBELN = ITAB-EBELN.
ITAB1-LIFNR = ITAB-LIFNR.
* ITAB1-EBELP = ITAB-EBELP.
ITAB1-BELNR = ITAB-BELNR.
ITAB1-KNUMV = ITAB-KNUMV.
ITAB1-NAME1 = ITAB-NAME1.
ITAB-NAME2 = ITAB-NAME2.
ITAB1-GJAHR = ITAB-GJAHR.
modify itab1 index sy-tabix.
ENDIF.
ENDLOOP.
*LOOP AT ITAB2.
* READ TABLE ITAB1 WITH KEY EBELN = ITAB2-EBELN.
* IF sy-subrc eq 0.
* ITAB1-EBELN = ITAB2-EBELN.
* ITAB1-PS_PSP_PNR = ITAB2-PS_PSP_PNR.
* ITAB1-KOSTL = ITAB2-KOSTL.
* modify itab1 transporting ps_psp_pnr kostl
* where ebeln = Itab2-ebeln AND EBELP = ITAB2-EBELP.
* ENDIF.
*ENDLOOP.
LOOP AT ITAB1.
**ON CHANGE OF ITAB1-ebeln or itab1-ebelp.
* concatenate itab1-werks itab1-lifnr itab1-matnr
* into val1.
* MOVE VAL1 TO ITAB1-VAKEY.
* MODIFY ITAB1.
* SELECT KONH~KNUMH KONH~KSCHL FROM KONH
* INTO CORRESPONDING FIELDS OF TABLE ITAB3
* FOR ALL ENTRIES IN ITAB1
* WHERE KONH~VAKEY = ITAB1-VAKEY.
**endon.
** sort Itab3 by kschl descending.
** Select konp-kbetr from konp into itab4 where
** KONP~KNUMH = ITAB3-KNUMH AND KONP~KSCHL = ITAB3-KSCHL.
**ON CHANGE OF ITAB1-ebelp.
**LOOP AT ITAB3
** ON CHANGE OF ITAB1-ebelp.
* itab1-knumh = itab3-knumh.
** SELECT KONP~KBETR FROM KONP INTO CORRESPONDING FIELDS
** OF TABLE ITAB4
** FOR ALL ENTRIES IN ITAB3 WHERE
** KONP~KNUMH = ITAB3-KNUMH AND KONP~KSCHL = ITAB3-KSCHL .
** IF ITAB3-KSCHL = 'JMOP' .
** ED = ITAB4-KBETR / 1000 * ITAB1-NETWR .
** ENDIF.
** IF ITAB3-KSCHL = 'JEC1'.
** Itab1-ed1 = ITAB4-KBETR / 1000 * ED.
** ADD ED TO ITAB1-ED1.
** modify ITAB1 transporting ed1.
** ENDIF.
* IF ITAB3-KSCHL = 'JMOP' .
* ED = 16 / 100 * ITAB1-NETWR .
* ENDIF.
* IF ITAB3-KSCHL = 'JEC1'.
* Itab1-ed1 = 2 / 100 * ED.
* ADD ED TO ITAB1-ED1.
* modify ITAB1 transporting ed1.
* ENDIF.
** ENDLOOP.
**endon.
modify ITAB1.
*endon.
LOOP AT ITAB5.
IF ITAB5-KSCHL = 'NAVS' OR ITAB5-KSCHL = 'NAVM'.
ITAB1-KBETR = ITAB5-KBETR.
modify ITAB1 transporting KBETR
where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP .
ELSEIF ITAB5-KSCHL = 'FRA1' OR ITAB5-KSCHL = 'FRC1' OR
ITAB5-KSCHL = 'FRB1'.
ITAB1-KWERT = ITAB5-KWERT .
modify ITAB1 transporting KWERT
where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
* IF ITAB5-KSCHL = 'FRA1'.
* ITAB1-KBETR1 = ITAB5-KBETR / 1000 * ITAB1-NETWR .
* modify ITAB1 transporting KBETR1
* where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
* ELSEIF ITAB5-KSCHL = 'FRC1' .
* ITAB1-KBETR1 = ITAB5-KBETR * ITAB1-MENGE .
* modify ITAB1 transporting KBETR1
* where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
* ELSEIF ITAB5-KSCHL = 'FRB1' .
* ITAB1-KBETR1 = ITAB5-KBETR .
* modify ITAB1 transporting KBETR1
* where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
* ENDIF.
* **THIS CODE IS FOR iNSURANCE CONDITION
ELSEIF ITAB5-KSCHL = 'ZGIN' OR ITAB5-KSCHL = 'ZIN2'.
ITAB1-KBETR2 = ITAB5-KBETR.
modify ITAB1 transporting KBETR2
where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
* **THIS CODE IS FOR PBXX OR PB00 CONDITION
* ELSEIF ITAB5-KSCHL = 'PBXX' OR ITAB5-KSCHL = 'PB00'.
* ITAB1-KWERT1 = ITAB5-KWERT1.
* modify ITAB1 transporting KWERT1
* where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
** ELSEIF ITAB5-KSCHL = 'JOCM' OR ITAB5-KSCHL = 'RA00' OR
** ITAB5-KSCHL = 'RA01' OR ITAB5-KSCHL = 'RB00' OR
** ITAB5-KSCHL = 'RC00' OR
**THIS CODE IS FOR OTHER CONDITION
ELSEIF ITAB5-KSCHL = 'RL01' OR ITAB5-KSCHL = 'ZA00' OR
ITAB5-KSCHL = 'ZA01' OR ITAB5-KSCHL = 'ZAE1' OR
ITAB5-KSCHL = 'ZAED' OR
ITAB5-KSCHL = 'ZAFR' OR ITAB5-KSCHL = 'ZB00' OR
ITAB5-KSCHL = 'ZBCH' OR ITAB5-KSCHL = 'ZBED' OR
ITAB5-KSCHL = 'ZC00' OR
ITAB5-KSCHL = 'ZCEX' OR ITAB5-KSCHL = 'ZCIF' OR
ITAB5-KSCHL = 'ZHC1' OR ITAB5-KSCHL = 'ZHC2' OR
ITAB5-KSCHL = 'ZHCT' OR
ITAB5-KSCHL = 'ZHCV' OR ITAB5-KSCHL = 'ZJOC' OR
ITAB5-KSCHL = 'ZOTH' OR ITAB5-KSCHL = 'ZOTP' OR
ITAB5-KSCHL = 'ZOTT' OR
ITAB5-KSCHL = 'ZPK1' OR ITAB5-KSCHL = 'ZPK2' OR
ITAB5-KSCHL = 'ZPK3' OR ITAB5-KSCHL = 'ZPK4' OR
ITAB5-KSCHL = 'ZRPO' OR
ITAB5-KSCHL = 'ZSE1' OR ITAB5-KSCHL = 'ZSED' OR
ITAB5-KSCHL = 'ZSFR' OR ITAB5-KSCHL = 'ZSTX' OR
ITAB5-KSCHL = 'ZTPI' OR
ITAB5-KSCHL = 'ZTPV' OR ITAB5-KSCHL = 'ZTRD' OR
ITAB5-KSCHL = 'ZWCT'.
ITAB1-KWERT2 = ITAB5-KWERT.
modify ITAB1 transporting KWERT2
where KNUMV = ITAB1-KNUMV AND EBELP = ITAB1-EBELP
modify itab1.
ENDIF.
ENDLOOP .
ITAB1-TOTAL = ITAB1-NETWR + ITAB1-KWERT2 + ITAB1-KWERT + ITAB1-KBETR.
* ITAB1-TOTAL = ITAB1-NETWR + ITAB1-ED1 + ITAB1-KBETR2 +
* ITAB1-KBETR1 + ITAB1-KBETR + ITAB1-KWERT .
modify ITAB1 transporting TOTAL.
LOOP AT ITAB6.
ITAB1-SUB_PACKNO = ITAB6-SUB_PACKNO.
* modify ITAB1.
ENDLOOP.
LOOP AT ITAB7.
ITAB1-BELNR = ITAB7-BELNR.
ITAB1-GJAHR = ITAB7-GJAHR.
ENDLOOP.
LOOP AT ITAB8.
ITAB1-SUB_PACKNO = ITAB8-SUB_PACKNO.
ITAB1-SRVPOS = ITAB8-SRVPOS.
ITAB1-EXTROW = ITAB8-EXTROW.
ITAB1-KTEXT1 = ITAB8-KTEXT1.
modify ITAB1.
ENDLOOP.
* SELECT ESLL~PACKNO ESLL~SUB_PACKNO ESLL~SRVPOS ESLL~KTEXT1
* FROM ESLL
* INTO CORRESPONDING FIELDS OF TABLE ITAB6
* WHERE ESLL~PACKNO = ITAB1-PACKNO.
** delete adjacent duplicates from itab1 comparing EBELN .
modify ITAB1.
endloop.
sort Itab1 by EBELN Ascending.
SELECT KONV~KBETR FROM KONV
INTO ITAB1-KBETR
WHERE KONV~KSCHL = 'NAVS' OR KONV~KSCHL = 'NAVM'.
ENDSELECT.
ITAB1-KBETR = ITAB5-KBETR.
*ENDLOOP.
*ENDLOOP.
*ENDLOOP.
ENDFORM.
Reward all helpfull answers
Regards
Pavan -
Opening and closing Stock report at Storage location level- date wise
Dear all
Is there any standard report to view opening and closing stock at storage location level? ( we have MB5B which resets the entry screen if we enter SLOC details).
Thanks
SamDo I have the option of selecting Storage Location wise opening and closing stock on a particular date or period, that is what I have requested? Is it possible, evenafter selecting storageloc/batch stock and entering all the SLOCs in the selection creen, the report output does not contain any SLOC, and using ctrl+F8 or display variant does not have SLOC as a field also.
pls gudie
sam -
Dear All
I am devlop new Stock Report Date wise
my output follows
Material Plant Storagelocaton Saleorder OPenning stock Closing Stock Total
Which Table stored that details?
how will calculated?
Thanks and Regards
Sureshhey
i think the following tables
will be helpful for the report:-
1>MARA
2>MBEWH
3>MSEG
4>VBRP
hope this will help
good luck
harry. -
Dear All,
I have the following fields in DSO.
Key Part: EmployeeID, DateTo, DateFrom.
Data Part: Designation, AnnualSalary.
I have data in the DSO as follows:
EmployeeID DateTo DateFrom Designation AnnualSalary
1 12.11.2008 01.01.2008 Worker 10000
1 31.12.9999 13.11.2008 Officer 20000
2 14.11.2008 01.01.2008 Worker 10000
2 31.12.9999 15.11.2008 Officer 20000
Now If I give key date as 13.11.2008.
The Output of the Report should be like this:
EmployeeID Designation AnnualSalary
1 Officer 20000
2 Worker 10000
How can I achive this ??
Cheers,
Neel.Hi,
I think you can achieve this by using a formula with boolean operators "is less than" and "is greather than", and then also use row/columns settings and/or conditions to suppress rows that does not contain the key date.
BR,
Niclas -
Key date in vendor ageing report
hi,
As i run the report S_ALR_87012077 which stands for vendor ageing report it shows
Key date on the top right hand side of the report.
Can any one tell me what does this Key Date stand for and from where it is getting picked up
Thanks
ParinS_ALR_87012078 - Due Date Analysis for Open Items
You run the above report for due date analysis.
Key date we will give manually for analysis on which date we want to take Open Items. -
Open orders display in BEX report based on Key date
Hello All,
I have a requirement:
We have an existing report which needs to have input selection as Key Date.
The report should display the Open orders based on the key date mentioned.
For Eg: if an item A was Opened on 20th Sept, 2010 and now CLEARED and if I run the ECC report today and mention the key date as 20th Sept, 2010, then the report will show me the item A status as OPEN
Plz help me with the logic for the same at the earliest
Tthanks..
SnehaHi Sneha,
I assume you have open and crear dates in your query. So put an open date in your query filter and restrict it as less then Key date variable(which is a variable of type user-input on 0calday), then create another variable that feeds from keydate variable (it can be a replacement path or simplest user-exit).
Note: the another variable is needed because as far as i can remember you cant use the same variable to restrict two different chars in the same query/anyway test if it's not possible - then create another variable as i mentioned.
Take Cleardate in your query filter and restrict it as more than keydate variable andr # (not assigned). (in case if it hasnt been creared at all yet at the key date time)
Pls let me know if this was helpfull -
Stock report for a specific date.
Hi Gurus,
Can any one please tell me if there is any option is SAP by which i can get the stock status for a particular day. I mean if i want to check what was the stock report on last week some day, is there an option in SAP to do that. This report should give the stock of that day and any movements after that day should not be included in that report, for example if 10 quantity of a material was available on 26/03/09 and 5 were either moved or consumed, can i get the status in past for 26/03/09 today as quantity 10 rather than quantity 5 which is available today.
Regards
Anoophi,
Try with t.code MB5B -Stock on Posting date. You can get what you want.
Regards,
Prasath
Maybe you are looking for
-
"The iPod could not be restored.An unknown error has occurred (1418)" Help!
Hope someone can please help me. iTunes is asking me to restore my iPod, but an error occurs each time. This is the chain of events. 1) I connected my iPod to iTunes and it asked if I wanted to update iPod software. I clicked yes. 2) The iPod then ch
-
Adobe Speedgrade wont open!
Adobe Speedgrade wont open! All I get is to the splash screen and then nothing but a grayed out window. I have uninstalled and reinstalled the program with no luck. Is this happening to anyone else?
-
Dera Gurus! Kindly enlighten me on SAP limitations for Digital Signature implementation. Are there any avenues in Sales and Distribution processes other than billing where digital signature could be useful (any internal or external process during ord
-
Trouble capturing analog video using Quicktime 7 in Yosemite
I am attempting to use Quicktime 7 Pro under Yosemite to convert old 8 mm or Hi8 analog videotapes to digital .mov files. The tapes are being played through a Sony TRV350 camcorder, which digitizes the analog video, and outputs digital video via the
-
Alphabetical with multiple columns
I have created a list of peoples name in the first column with their respective info in the next columns to the right. For example someone's name would be in box A2, their address in B2, email in C2, etc., and then in A3 would be another name, B3 is