MVER Table
Hello experts,
I would like to know ,based on what factors does the material consumption table is updated ??? I knw that when they do the config OMJJ TCode they would specify if that movement type is specific/relevant to Consumption or not by checking the Consumption posting indicator ( If my understanding is correct) ,But how would one know if we need to consider or enable that based on the movement type ????
Pls let me know if iam not clear in explaining my question ?
regards
Roa
Hi suresh
As far as i know
Every time a material has been used or issued system makes an entry in MVER (T code MB1A - mov. type 261)
Mov. 261 is for --Goods issue for an order (for example, production order, maintenance order, except customer orders.)
I hope this will clarify ur doubt
Vishal...
Similar Messages
-
Negative postings to MVER table
Dear SAP guru's,
I am trying to simulatie the MVER table trough the MSEG material movements. I've accomplished 95% accuracy through the use of T156-KZVBU en MSEG-KZVBR fields. I'm still missing the posting of some material movement.
For example the following line:
MSEG-MENGE=500
MSEG-BWART=602
MSEG-SHKZG=S
MSEG-KZVBR=V
T156-SHKZG=S
T156-KZVBU=G
This has been posted as negative consumption (-500) in MVER. Although it is adding stock (S) this usually gets posted as positive consumption (like a 101 movement with KZVBR=V).
What am I missing? Which fields are used to further determine the consumption posting to MVER?
With kind regards,
Nanne SluisIf it helps somebody, I wrote a little tutorial, documenting my research (no guarantees on completeness; and feedback welcome):
How does MSEG-INSMK work, or better: How are the different stock types being updated in MARD/MARDH/MCHB/MCHBH/u2026
According to SAP note 368259, MSEG-INSMK cannot be used to determine which stock type fields in history tables are getting updated by the MSEG row. Hence, we investigated the approach on how stock type quantities are getting updated:
Required SAP tables:
- MSEG
- MKPF
- T156M
- T156F
Maybe required:
- T156SC
- T156SY
- T156W
- T156X
The following tables need to be considered and joined accordingly:
Example:
The following tables/fields need to be joined together to retrieve the information which history table fields of stock types are getting updated based on which material movement. Beware that multiple fields can get updated within one transaction; hence the joins can multiply rows. It makes sense to first create a table of T156M / T156F values and pivot it. Afterwards it can be used within the material movements flow:
1. Table MSEG (Document Segment: Material): Starting point
MSEG-BWART = 555 (GI scrapping blocked)
MSEG-SHKZG = H (Credit posting)
MSEG-SOBKZ = u2018u2019 (no special stock)
MSEG-BUSTM= u2019MS01u2019 (Posting string for quantities)
MSEG-ZUSTD_T156M= u2018u2019 (Stock Type Modification (Read from Table T156M))
2. Table T156M (Posting String: Quantity): Result after Join
T156M-BUSTM=u2019MS01u2019 (Posting string for quantities)
T156M-ZUSTD=u2019u2019 (Stock type modification)
T156M-CNT02=u201801u2018 (Consecutive counter in ATAB tables for inventory management)
T156M-SMARD=u2018LS1u2018 (Segment string) Updating table MARD
T156M-SMCHB=u2018CD1u2018 (Segment string) Updating table MCHB if batches are used
3. Table T156F (Fields in Quantity String): Result after Join
T156F-SEGST=u2018LS1u2018 (Segment string)
T156F-CNT02=u201801u2018 (Consecutive counter in ATAB tables for inventory management)
T156F-FELDV=u2019MARD-SPEMEu2018 shows the updated history table field
The following fields need to be joined, basically:
MSEG inner join T156M ON
MSEG.BUSTM=T156M.BUSTM
and MSEG.ZUSTD_T156M=T156M.ZUSTD
T156M inner join T156F ON
T156M.SMARD=T156F.SEGST
T156M.CNT02=T156F.CNT02
Additional Information:
MSEG-BUSTM (Posting string for quantities)
Key for the automatic determination of the stock fields that:
u2022 Have to be checked when a goods movement is entered (availability check)
u2022 Are updated following a goods movement.
T156M-ZUSTD (Stock type modification)
Serves to differentiate between quantity updates carried out for the various stock types. -
Hi Experts,
Can anyone let me know how this table MVER updates. What are all the mvt type it will consider for updation. Your fast reply is appreciated.
Thanks,
SureshHi Suresh,
The following are the various mvmt types that are used for consumption.
201
221
231
241
251
261
281
291
331
333
335
551
553
555
557
These values are updated in the MVER table. For eg. V06, V08 fields of MVER are updated with 261 and 201 Mvmt types.
Reward if cleared and close the thread. -
MVER table - Manually corrected total consumption
I am trying to determine total and manual corrected consumption based on the tables MSEG & T156 instead of using MVER.
Could someone please explaine me how is the value of the field 'Manually corrected total consumption' determined in the table MVER.Hi,
The below will help you in understanding the behaviour . Please check the same in such a way and please post back.
http://scn.sap.com/thread/1789094
Regards, -
Hi,
My requirement is to create a generic delta which should run on daily basis to deliver deltas to BW system.
I am wondering what is the field that i should use in the generic delta definition of the to be created datasource as in the
Table MVER, i do not find any date field or timestamp field to determine delta.
The field i have are Fiscal Year and Period Indicator (Daily,Weekly, Monthly etc Flag).
Any one has any idea of how one can create generic delta datasource if underlying table does not have any Date field or timestamp field or Numric key for that matter?Hi,
You can achieve that as well using Rule group in transformation. Keep the same datasource as I have mentioned and similar selection conditions as well.
As you have mentioned that you want to store the data on monthly basis rather than yearly basis, you can achive so in Transformations using concept of Rule Group. See below article on same.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90754b76-bcf1-2a10-3ba7-b299b2be09f2
In your case, table has entries in this fashion:
Material Fiscal year Consumption1month consumption2month consumption3month .........
ABC 2010 10 20 30
whereas as I understand you want to have data as
Material fiscal year Month Consumption
ABC 2010 1 10
ABC 2010 2 20
ABC 2010 3 30
Please see the link below which gives the details about fields that denote data for a particular period in table MVER.
http://www.sap-img.com/materials/how-to-get-the-total-stock-consumption-data.htm -
Standard extractor for forecast & consumptions values (prow and mver table)
Hi All,
Is there any SAP BI standard extractor for forecast and consumptions data ?
For information,
ECC6 Forecast table : PROW.
ECC6 Consumptions table : MVER.
Thx.
radj.
Edited by: Radjech Radjech on Jul 27, 2011 11:13 AM
Edited by: Radjech Radjech on Jul 27, 2011 11:25 AMI have created a generic extractor, in the past, with the FEBEP table. However, my requirement was to join it with the BSID and BSAD tables in order to determine payments that have been received into the lockbox but not cleared, so that the Credit Department has a more up-to-date look at customer accounts.
If you have multiple companies you could end up with a Cartesian product when the data for this view is rendered because the Accounting Document and Fiscal Year don't uniquely identify records in BSEG and BKPF. Additionally, you wouldn't know exactly which Accounting Document Line Item is the correct record on BSEG. Both of these cases are potential sticky points for both a custom view or User Exit in CMOD, unless you've been given by the end customer a way to mitigate these. For instance, you may be able to derive the Company Code for the FEBEP entry by using the Cost Center or Profit Center, unless your Cost Centers or Profit Centers can span across companies. -
Info about report to rebuild MVER table
Dear guru ,
Can you give me info about report ZMVERBRP that rebuild historical consumptions ?
Oss note 804011 describe that I can use note 791728.
But this note doesnu2019t exist.
Can you help me ?
ThanksThe implementation is free of charge from SAP's perspective as you apply the note. Please make sure that you actually read the code and adapt to your needs if needed.
The note exists but only as a pilot release and and customers will be added only if they really want the reports. SAP does not officially support it. I know it from first hand, I'm the one who releases it to the customers
Cheers,
Attila -
Table MBEW and Transaction MC.9
Hi,
I developed a report program that reads stocks from table MBEW, but it doesnt reconcile with the stocks you get from MC.9.
Im thinking MC.9 gets the data from other source tables. I need to explain why its not the same and possibly modify the code to reconcile the quantities.
Please help.
Thanks.
Kennycheck with LQUA Table,MLGT Table,MARD-LABST Table
See the below Program and Which is inventory report :
type-pools
type-pools : slis.
Data Declaration
tables : mara,
marc,
lagp,
mvke,
makt.
Constants
constants : c_werks(4) type c value '1000'," Plant
c_lgort(4) type c value '1000'," Storage Location
c_periv like MARC-PERIV value 'XX',
c_perkz like MVER-PERKZ value 'T'.
Internal Tables
Internal Table for MARA and MAKT and MARD
data : begin of I_material occurs 0,
matnr like mara-matnr, " Material
lgpla like mlgt-lgpla," Storage Type
zzdept like marc-zzdept," Pick Dept
ZZPRODDEPT like marc-ZZPRODDEPT," Prod Dept
vmsta like mvke-vmsta, " Material Status
end of i_material.
Structure
data : begin of i_final occurs 0 ,
matnr like mara-matnr," Material #
maktx like makt-maktx," Description
lgpla like mlgt-lgpla, " Storage Bin
days like P0347-SCRDD, " No of Days
menge like mseg-menge, " Avg Daily Sales
kbetr like konp-kbetr, " Avg
labst like mard-labst," Inventory Stock
stprs like mbew-stprs, " Mvg avg Price
dos like mseg-menge, " DOS Units
dosm like konp-kbetr, " DOS $$
end of i_final.
data : int_ges_verb_tab like sverbtaba
occurs 0 with header line.
Internal table for A004
data : i_a004 like a004 occurs 0 with header line.
Data Variables
data : v_stprs like konp-kbetr,
v_repid like sy-repid,
v_labst like mard-labst,
v_maktx like makt-maktx.
ALV Function Module Variables
DATA: g_repid like sy-repid,
gs_layout type slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat type slis_t_fieldcat_alv,
gs_print type slis_print_alv,
gt_events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
g_status_set type slis_formname value 'PF_STATUS_SET',
g_user_command type slis_formname value 'USER_COMMAND',
g_top_of_page type slis_formname value 'TOP_OF_PAGE',
g_top_of_list type slis_formname value 'TOP_OF_LIST',
g_end_of_list type slis_formname value 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
Selection-screen
selection-screen : begin of block blk with frame title text-001.
parameters : p_werks like marc-werks obligatory default '1000'.
select-options : s_matnr for mara-matnr,
s_MATKL for mara-MATKL,
s_mtart for mara-mtart,
s_LGTYP for LAGP-LGTYP,
p_vmsta for MVKE-VMSTA,
s_dept for marc-zzdept,
s_pdept for MARC-ZZPRODDEPT.
selection-screen: end of block blk.
selection-screen begin of block periods with frame title text-002.
selection-screen begin of line.
selection-screen comment (15) text-c01.
selection-screen position 18.
Period 1
parameters: p_stdat1 like mkpf-budat obligatory.
selection-screen position 35.
selection-screen comment (10) text-c02.
parameters: p_endat1 like mkpf-budat obligatory.
selection-screen end of line.
selection-screen end of block periods.
Fill the default values
initialization.
v_repid = sy-repid.
PERFORM LAYOUT_INIT USING GS_LAYOUT.
PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
Validation for Dates
at selection-screen.
if p_stdat1 > p_endat1.
message e206(zwave) with
' End date should be greater than or equal to Start Date'.
endif.
Make one of the Selection should be mandatory
if s_matnr-low is initial.
if s_matkl-low is initial and s_mtart-low is initial and
s_dept-low is initial and s_pdept-low is initial.
message e208(zwave) with
'Enter atleast one selection Criteria'.
endif.
endif.
Start-of-selection.
start-of-selection.
Get the data from MARA,MARD,MAKT Table
perform get_data_tables.
Read the data into FInal Table.
perform read_data.
END-OF-SELECTION.
end-of-selection.
if not i_final[] is initial.
ALV Function Module
perform print_alv.
endif.
*& Form get_data_tables
Get the data from Tables MARA,MARD,MAKT
FORM get_data_tables.
select a~matnr
b~lgpla
czzdept cZZPRODDEPT d~vmsta into table i_material
from mara as a inner join mlgt as b on amatnr = bmatnr
inner join marc as c on cmatnr = amatnr
inner join mvke as d on dmatnr = amatnr
where a~matnr in s_matnr
and c~werks = p_werks
and a~mtart in s_mtart
and c~ZZPRODDEPT in s_pdept
and a~MATKL in s_MATKL
and c~zzdept in s_dept
and b~lgnum = '100'
and b~LGTYP in s_lgtyp
and b~lgpla ne space
and d~vkorg = '0001'
and d~vtweg = '01'
and d~matnr in s_matnr
and d~vmsta in p_vmsta.
if sy-subrc ne 0.
message e207(zwave) with 'No data found for Given Selection Criteria'.
endif.
sort i_material by matnr .
DELETE ADJACENT DUPLICATES FROM i_material COMPARING matnr.
ENDFORM. " get_data_tables
*& Form read_data
Read the data
FORM read_data.
loop at i_material.
Storage Bin
i_final-lgpla = i_material-lgpla.
Days of Sales ( End date - Start date )
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
DATE1 = p_endat1
DATE2 = p_stdat1
OUTPUT_FORMAT = '02'
IMPORTING
DAYS = i_final-days.
Get the Average Daily Sales (Units) from MVER Table
perform get_average_sales.
Get the Average Daily Sales ($$) from VK13 Transaction
perform get_avgsales_price.
clear : v_labst.
Get the Inventory from MARD Table
select single labst from mard into v_labst
where matnr = i_material-matnr
and werks = p_werks
and lgort = c_lgort.
if sy-subrc eq 0.
Inventory Stock - MARD-LABST
i_final-labst = v_labst.
endif.
Material #
i_final-matnr = i_material-matnr.
Get the Material Description
clear v_maktx.
select single maktx from makt into v_maktx
where matnr = i_material-matnr
and spras = 'EN'.
if sy-subrc eq 0.
Description
i_final-maktx = v_maktx.
endif.
Get the Mvg Average Price
perform get_moving_avgpr.
Days of Supply Units.
if i_final-kbetr ne 0.
i_final-dos = i_final-labst / i_final-menge.
endif.
Days of Supply $$
i_final-dosm = i_final-dos * v_stprs.
append i_final.
clear : i_final,
i_material.
endloop.
refresh i_material.
ENDFORM. " read_data
*& Form get_average_sales
Get the data from MVER Table
FORM get_average_sales.
data : lv_menge like mseg-menge.
refresh int_ges_verb_tab.
clear : int_ges_verb_tab,
lv_menge.
CALL FUNCTION 'CONSUMPTION_READ_FOR_MM'
EXPORTING
KZRFB = ' '
MATNR = i_material-matnr
WERKS = c_werks
PERKZ = c_perkz
PERIV = c_periv
TABLES
GES_VERB_TAB = int_ges_verb_tab
UNG_VERB_TAB =
EXCEPTIONS
WRONG_CALL = 1
NOT_FOUND = 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.
loop at int_ges_verb_tab.
if int_ges_verb_tab-ertag >= p_stdat1 and
int_ges_verb_tab-ertag <= p_endat1.
add int_ges_verb_tab-vbwrt to lv_menge.
endif.
endloop.
i_final-menge = lv_menge / i_final-days.
ENDFORM. " get_average_sales
*& Form get_avgsales_price
Avg Daily Sales Price
FORM get_avgsales_price.
Get the data from A004 table to get KNUMH
Added new field Sales Unit - Seshu 01/09/2006
refresh : i_a004.
clear : i_a004.
data : lv_kbetr like konp-kbetr," Condition value
lv_KPEIN like konp-kpein , "per
lv_KMEIN like konp-KMEIN. " Sales Unit
select * from a004 into table i_a004
where matnr = i_material-matnr
and vkorg = '0001'
and vtweg = '01'.
if sy-subrc eq 0.
sort i_a004 by DATAB descending.
Get the Latetest Date
read table i_a004 with key matnr = i_material-matnr
vkorg = '0001'
vtweg = '01'
binary search.
Get the Sales Value
select single kbetr KPEIN KMEIN from konp
into (lv_kbetr,lv_KPEIN, lv_KMEIN)
where knumh = i_a004-knumh
and kappl = i_a004-kappl
and kschl = i_a004-kschl.
if sy-subrc eq 0.
i_final-kbetr = lv_kbetr / lv_KPEIN.
i_final-kbetr = i_final-kbetr * i_final-menge.
endif.
endif.
clear : lv_kbetr,
lv_kpein,
lv_KMEIN.
ENDFORM. " get_avgsales_price
*& Form get_moving_avgpr
Get the data from MVEW Table
FORM get_moving_avgpr.
Local Variables
data : lv_stprs like mbew-stprs, " Standard Price
lv_verpr like mbew-verpr, " Moving avg Price
lv_vprsv like mbew-vprsv. " Price Indicator
clear : lv_stprs,
lv_verpr,
lv_vprsv,
v_stprs.
select single stprs verpr vprsv from mbew
into (lv_stprs,lv_verpr,lv_vprsv)
where matnr = i_material-matnr.
if sy-subrc eq 0.
if lv_vprsv = 'S'.
i_final-stprs = lv_stprs * i_final-labst.
v_stprs = lv_stprs.
elseif lv_vprsv = 'V'.
i_final-stprs = lv_verpr * i_final-labst.
v_stprs = lv_verpr.
endif.
endif.
ENDFORM. " get_moving_avgpr
*& Form print_alv
REUSE_ALV_GRID_DISPLAY Function Module
FORM print_alv.
PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
Populate field catalog
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = g_top_of_page
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_final
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " print_alv
*& Form get_fieldcatlog
Fieldcatlog
*& Form fieldcat_init
Fieldcat
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'MARA'.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Material'.
ls_fieldcat-seltext_M = 'Material'.
ls_fieldcat-seltext_S = 'Material'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material Description
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MAKTX'.
LS_FIELDCAT-OUTPUTLEN = 30.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Description'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Storage Bin
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LGPLA'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Storage Bin'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Start Date
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'SDATE'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Start Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
End Date.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'EDATE'.
LS_FIELDCAT-OUTPUTLEN = 10.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'End Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Days of Sales
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DAYS'.
LS_FIELDCAT-OUTPUTLEN = 12.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Days of Sales'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales(Units).
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MENGE'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Average Daily Sales(Units)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'KBETR'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Average Daily Sales($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory(Units)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LABST'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Inventory(Units)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STPRS'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Inventory($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS($$)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DOSM'.
LS_FIELDCAT-OUTPUTLEN = 13.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'DOS($$)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS(Days)
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DOS'.
LS_FIELDCAT-OUTPUTLEN = 13.
LS_FIELDCAT-TABNAME = 'I_FINAL'.
ls_fieldcat-seltext_L = 'DOS(Days)'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " get_fieldcatlog
FORM COMMENT_BUILD *
--> LT_TOP_OF_PAGE *
FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Variables for Date
data : lv_year(4) type c,
lv_mon(2) type c,
lv_day(2) type c,
lv_date1(10) type c,
lv_date2(10) type c.
LIST HEADING LINE: TYPE H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = sy-title.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
clear : lv_year,
lv_day,
lv_mon,
lv_date1.
lv_year = p_stdat1+0(4).
lv_mon = p_stdat1+4(2).
lv_day = p_stdat1+6(2).
concatenate lv_mon '/' lv_day '/' lv_year into lv_date1.
STATUS LINE: TYPE S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-c01.
LS_LINE-INFO = lv_date1.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
clear : lv_year,
lv_day,
lv_mon,
lv_date2.
lv_year = P_ENDAT1+0(4).
lv_mon = P_ENDAT1+4(2).
lv_day = P_ENDAT1+6(2).
concatenate lv_mon '/' lv_day '/' lv_year into lv_date2.
LS_LINE-KEY = text-c02.
LS_LINE-INFO = lv_date2.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'FDLOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
FORM EVENTTAB_BUILD *
--> RT_EVENTS *
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
*"Registration of events to happen during list display
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM.
FORM LAYOUT_INIT *
--> RS_LAYOUT *
FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
**"Build layout for list display
RS_LAYOUT-DETAIL_POPUP = 'X'.
lslayout-f2code = p_f2code.
rs_layout-zebra = 'X'.
rs_layout-colwidth_optimize = 'X'.
ENDFORM.
Reward Points if it is helpful
Thanks
Seshu -
Consumption not updated - MVER not update
Hi experts,
Here's my case :
- inital stock has been uploaded via mvt 561
- a consumption mvt (201) has been done
- a month later another consumption mvt (201) has been done
The thing is the first consumption has not been updated in MVER table whereas the second one was.
I already checked OSS note 804011, but can't find an explanation . Does someone have an idea?
Thanks in advance
P.I dont think so.
Is this consumption made from the same stock type like unrestricted use stock, or is one made from unrestricted use stock and the other one from special stock like sales order stock?
I suggest you open a message at SAP to get the report ZMVERBRP from OSS note 791728.
This report should rebuilt the consupmtion for your first goods issue if the posting string situation is okay now. -
Badi / Exit / Enhancement for replacing INSMK during PO creation
Hi Gurus,
we want to default the INSMK field (stock type) during Purchase Order creation..
Can someone help me findind the right BAdI / exit / enhancement for it?
Thanks in advance,
Regards,
AlessioHi Alessio,
You may check these first:
Re: Negative postings to MVER table
Re: select stock type
Thanks,
Gordon -
What does the field Inconsistent mean for ABC Analysis for Cycle Counting report
What does column "Inconsistent" mean for report ABC Analysis for Cycle Counting (T-code MIBC)? The reason I'm asking is because I see TotalStock values greater than 0, but the Accounting 1 view for Material Master and MMBE both show zero stock. I do not understand why TotalStock in the report does not show zero. Can anyone explain how this can happen?
Note: the report is run for consumption/usage date range.
Thank you,
DougHi,
MBEW table and MMBE transaction will show the current stock. When you run MIBC report for consumption, the system considers the consumption for the date range given (from MVER table), which may not be equal to the current stock. Refer the KBA: 1817237 - Stock quantities and stock values in MIBC which explains the system design.
Regards,
AKPT -
Hi can anyone help me out...
I need to prepare a report where it should display the
plant, used-1 to used -12(which we'll get from MVER-GSV01 TO MVER-GSV12) and so on..
The plant, material we can get from 2lis_03_bf datasource but how to populate these GSV01 TO GSV12, month wise and show it in the report as
PLANT MATERIAL USED-1 USED-2 ............USED-12
Thanks a Lot in Advance..
Jasmine
Edited by: Jasmine Rao on Sep 1, 2010 3:33 PMHi Jasmine,
If you need this info together with other fields of 2lis_03_bf, then enhance the data source with 12 fields and write and user exit to read the MVER table to populate the 12 enhanced fields.
Else you can create a generic datasource on this table. Load it to a DSO/Cube in BW.
You can report on this target alone or Create a multiprovider between inventory cube and this cube. and report.
Good luck,
Vijay -
Function module VERBRAUCH_BCO
Hi,
Can anybody explain me the purpose of the function module
AUFBAU_WERTETABELLE
VERBRAUCH_BCO
WERTE_ZU_WERKSMATERIAL.
Within this function module we are fetching the Material consumption from MVER table based upon plant and vendor. Can i get some more details related to this function modules and exact purpose of this function modules.
thanks,
Revathi V.hi zakir,
Function module to Explode BOM is
CS_BOM_EXPL_MAT_V2 -
Help on Function module in Generic Extraction
Hi ,
i am writing FM in for Generic Extraction.
i am dont know ABAP.
i am using RSAX_BW_GET_DATA_SIMPLE..
i created Strcture from the MVER table ..
Strcture fileds : MATNR
GJAHR
GSV01,
GSV02,
SUM.
SUM is not in the MVER table .
Pl . give me code for this logic ..
Logic :
Take sum of GSV01 , GSV02 from table MVER with the key
MVER-MATNR = MARA- MATNR and
MVER-GJAHR = Year from SY-DATUM.
Pl . give me code for this logic..
i assign points ..
Regards,
PSR
Edited by: PSR on Feb 19, 2008 11:08 AMHi Diego Lombardini ,
thanks for fast reply..
i retrieve fields from 6 tables , thats why i choose function module but
my main logic mention above .
i created view but it gives wrong values bcoz lot of joins .
so i decide FM is better option ..
Pl . provide code for this logic ..
Regards,
PSR -
Mvt Types used to calculate Total Consumption Values
Hi All,
I have a report that has the Total Consumptions Output from the MVER table for every period. Now My requirement is to eliminate certain Movement types from the Total Consumption Quantity. These Movement types are input as select-options by user.
Now my main problem is that , The values got from MVER table are total values per period. And if i need to exclude certain movement types that are in the total, i need to know which movement types were used to calculate the total. What movement types contribute to the values in MVER-GSV01, MVER-GSV02.....etc. How is that value found. How is that table populated by SAP directly. What is that criteria. Can i find any other table which can let me do the same, i mean manually add values to get that total.
I tried MSEG-MKPF and got some values for Material-Movement type-Period combination. But which of those values should i consider for the total value? I guess only certain movement types are considered as sum of all movement types results in a value higher than the value in MVEr. Does T156 tell us anything about which to add?
Thanks in advance..!Hi,
Field KZVBU of T156 will give you clue which of the movement types will update consumption data. But you have to check for field XLAUT to check whether the movement is a reversal of some other movements and accordingly do the calculations.
Give me some more time to find out whether the movement types we get from above observations are the once to be considered.
Maybe you are looking for
-
I am trying to get special text to appear on the pick list when the oitm.qrygroup2 field is Yes. I have 2 operator fields: f_398 is the text field with the special text, link to f_400 f_399 is a database field, table is oitm, field is property 2, re
-
I have an iMac7,1 computer with OS 10.6.8 and wish to use iCloud with it. Is this computer compatible with Apple OS 10.7.2, so I can download the new OS 10.7.2 and use iCloud on my iMac7,1?
-
I tried to bounce in place a couple of midi tracks, put the opttion is greyed out Im unable to action this. Can anyone help as I am bew to logic and am going through a tutorial at the moment. The other thing is how do I change logic from a 32 to 64 b
-
How to create an action to save the file as the name of the selected layer
I have a .psd with several layers, and I would like to save multiple versions of the document based on the layer name. Is there a way to tell Photoshop to do this through an action? Also, how can I get rid of the "filename_copy" filenaming behavior.
-
Problem opening a VI due to improper shutdown of PC.
Hello, I am using LABVIEW-7. I am having problem in opening a vi that i created and named as 'P Calculator.vi'. When I click on it, window (W1) opens in which it searches for sub-vi. The search halts when it looks for 'Obsolete ni Switch.LLB' and imm