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.
Kenny

check 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

Similar Messages

  • The relation between table mbew and mbewh

    MORNING!
      I wanna know the relation between table mbew and mbewh.
      I finded some materials in table mbewh have total valuated stock , but these materials don't have value .
      Thanks a lot !

    Hi Roy, please check this link.
    http://www.sapfans.com/forums/viewtopic.php?p=4330&sid=a1b0e2c950bb90aa410b796d9ce0a13c
    REgards,
    Rich Heilman

  • Difference between table CKMLKEPH and transaction figure of CKM3

    Hi Gurus,
    Having an issue in material ledger transaction and table data.
    There is a difference between table CKMLKEPH and transaction figure of CKM3 for couple of periods.
    Single level price difference for raw material domestic figure coming in transaction CKM3 is not matching with CKMLKEPH table.
    Can you advice the tentative reason of it.
    Thanks in advance,
    MC.

    Hi MC,
    MLHELP_CCS_CONS_CHECK which check the actual CCS and the program
    MLHELP_SPRICE_CCS_INIT for the standard CCS.
    These programs are provided by the ML Helpdesk tool via note 364368.
    Although these reports are used by SAP Support you can execute them in
    test mode to verify your CCS data.
    Regards,Declan

  • Table MBEW and MVEW Difference?

    Hi Guys,
      What’s the difference b’tween MBEW and MVEW  i can see both for material valuation. If i enter data in material costing (From Material Master Transaction)  it is appending entries in MBEW why not in MVEW.
    The second thing is what’s the use of table MBEW_TMP (File for Incorrect data in direct Input)  it also not appending entries from transaction material master as i said before.
    Please share your knowledge, looking for your reply.
    Thanks in advance.

    There is no such table MVEW
    The material valuation table  MBEW is availabe in SAP...
    Regards
    sapman

  • Logging Table changes and transactions

    I am using oracle 11.2 DB and need to track some changes made to specific tables (need to capture old/new values of columns). I have experimented with creating a MV log on a table which seems to get me most of what I want:
    CREATE materialized view log on students WITH SEQUENCE,rowid (id,last_name,first_name,middle_name) INCLUDING NEW VALUES
    Since some of the processes update more that 1 table at a time before doing a commit, I need to be able to capture that these 3 table updates are all part of the same transaction (commit) . Is there any way of doing that?
    ie.
    update table 1 set x = '1';
    update table 2 set y = '2';
    update table 3 set z = '3';
    commit;

    Triggers:
    http://www.adp-gmbh.ch/ora/sql/trigger/before_after_each_row.html
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/triggers.htm
          bobmagan     
    Handle:      bobmagan 
    Status Level:      Newbie
    Registered:      Feb 22, 2010
    Total Posts:      431
    Total Questions:      183 (115 unresolved)
    remember close your threads marking them as answered when your doubt will be solved, keep the forum clean

  • Table lock and transaction timout problem

              We encounter 2 problems and aprreciate your suggestion :
              1. if it is container-managed connection, supposed the trans-timeout-seconds is
              set to 10 secs.
              why does the ejb receive time-out exception with message like " timeout
              after 13 secs" rather than after 10 seconds.
              2. if the table accessed in the container-managed transaction is locked , why
              the ejb does not
              receive the timeout exception until the table get unlocked ?
              Thanks.
              

    Hi,
    I think this is beacouse the LOck used for lockign the DB table is a Exclusive loacked.
    If its a custom code try changin the locking mechanism from exclusive to share lock.
    This may solve ur problem.
    One more method... I think the exceptions from the function module used for locking is not declared in the program
    so that its terminating. Call FM properly with all exceptions & handle the Exceptions programatically.
    (Meaning U can code to tell some message by checking the SY-SUBRC)
    Reagrds,
    Bhargava

  • Table maintenance and transaction

    HI ABAPERS
    Iam created one ztable in that fields are
      CLIENT like MANDT   PRIMARY KEY
      KUNNR like KUNNR   PRIMARY KEY
      MATNR like MATNR   PRIMARY KEY
      ERSDA like ERSDA       Created On
      ERNAM like ERNAm   Name of Person
      LAEDA like LAEDA        Date of Last Change
      AENAM like AENAm   Name of Person Who Changed t
    and iam maintaind settings as fallowes
    Data class: 'APPL0'  
    Size category: '1'      
    Delivery Class: 'A'
    Data Browser/Table view Maint: Display/maintenance allowed with restrictions 
    and i have this conditions
    - Create Maintenance view to maintain Z_SD_CUST_MAT database table using SM30
    - Assign transaction code 'ZCUSTMAT' to maintain table entries
    - Information like Created by, changed by  ERSDA, ERNAM, LAEDA, AENAM should be Display
    only and should be populated by the system at the time of data maintenance.
    how can i display only this four fields and in the table maitainence genarateor what Authorization Group i have to use.

    Hi, since you are in the table maintainence , all the non-key fields will be enabled mode. If you want these fields to be in display mode,  make them key fields.
    But why do you want to have these fields disabled when  accessing through sm30?  You may as well use se11 or se16 to view the data .
    Edited by: Srini Bhagavatam on Aug 21, 2008 12:36 PM

  • Allocations are differing in table T811F and 4KE3 transaction(urgent)

    Hi experts,
    we have come across an incident where the allocations in table T811F and transaction 4ke3 are differing alot?can any one tell why it is so? the tracing factor tab of 4ke3 is showing 000 for some profit centers where as it is showing 100 in T811F table the sender and receiever rules are 1 and 4 respectively in 4ke3.due points will be given.
    Thanks in advance.
    Moses.

    Hi
    anyupdate on this .i appriciate your inputs on this and due points will be assigned.
    regards,
    moses.

  • Stock report using mbew and mbewh

    Hi to all.
    i want to prepare o report for month end stock.
    i am preparing this report using tables mbew and mbewh..
    as per my knowledge goes the current stock is in the table mbew and history stock is in the table mbewh.
    i am picking up the current data from the mbew and history data from mbewh..
    the report is working fine till for january to august..
    but i dont know what wrong happen when i run it for the last month of previous year i.e 01/12/2005.
    it is showing some data difference for this period and also due to this some difference for earlier periods..
    please suggest me what could be the reason..
    because i have worked a lot on it and it is also working fine for this year...
    also tell me what could be the problem..
    i will surely reward back with points..

    HI
      I guess the problem might be lying with the way you
    are handling the date or period.
      Can you post your code???
    Kind Regards
    Eswar

  • PM Tables and Transaction

    HI...
    Plz provide the Plant maintenance(PM) Tables and Transaction.
    And detais about PMIS?? Use of it??
    thanks..

    Hi,
    PM T codes and PM Tables
    Equipement-- Maintable-EQUI
    Functiuonal location-     IFLOT
    Serial number             -SERI
    Material master         MATNR
    IE01                 Create Equipment
    IL01                 Create Functional Location
    IB01                 Create Equipment BOM
    IQ01                 Create Material Serial Number
    MM01               Material Master
    IB 01, IB11       Bills of materials
    IW21 - Notification creation
    IW31- PM order IA07 Display General Task List IA03 Display Equipment Task List IA13 Display Functional Location Task List IR03 Display Work Centre KO88 Settle Order (Single) IW32 Change Work Order IW31 Create Work Order IW33 Display Work Order IW38 Work Order List Editing - Change IW39 Work Order List Editing - Display IW40 Work Order List Editing - Display Multi Level ME21 Create Purchase Order (pre R4.6) ME21N Create Purchase Order (R4.6 onwards) IP41 Create Single Cycle Plan (R4 onwards) IE02 Change Equipment IE01 Create Equipment IE03 Display Equipment IE05 Equipment List Editing - Change IE08 Equipment List Editing - Display IW42 Overall Completion Confirmation IW26 Create Notification QS42 Display Catalog ML81 Create Service Entry Sheet MM03 Display Material CS03 Display Material BOM IW13 Material Where Used List IW66 Change Notification List of Tasks IW67 Display Notification List of Tasks IW22 Change Notification IW23 Display Notification IH01 Display Functional Location Structure MB11 Goods Movement MB31 Goods Receipt IW8W Goods Receipt for Refurbishment (R4 onwards) IP02 Change Maintenance Plan IP03 Display Maintenance Plan IP10 Schedule Maintenance Plan IP30 Deadline Monitoring IP11 Change Maintenance Strategy IP12 Display Maintenance Strategy IP19 Maintenance Scheduling Overview Graphic IP24 Maintenance Scheduling Overview List IW28 Notification List Editing - Change IW29 Notification List Editing - Display IW30 Notification List Editing - Display Multi Level IW64 Change Notification List of Activities IW65 Display Notification List of Activities IW68 Change Notification List of Items IW69 Display Notification List of Items IQ03 Display Serial Numbers IW24 Create Notification IP42 Create Strategy Maintenance Plan (from R4 onwards) IW25 Create Notification IL02 Change Functional Location IL01 Create Functional Location IL03 Display Functional Location IL05 Functional Location List Editing - Change IL06 Functional Location List Editing - Display IW41 Time Confirmation - Indvidual Entry IW48 Time Confirmation - Collective Entry with Selection IW44 Time Confirmation - Collective Entry no Selection IA11 Create Functional LocationTask Lists IA12 Change Functional Location Task List IL02 Change Functional Location IA05 Create General Task List IA06 Change General Task List IA01 Create Equpment Task List IA02 Change Equipment Task List IE03 Display Equipment IR01 Create Work Centre IR02 Change Work Centre CA85 Replace Work Centre IP13 Strategy Package Sequence IP14 Strategy Package Sequence IP04 Create Maintenance Item IP05 Change Maintenance Item IP06 Display Maintenance Item IP17 Maintenance Item List Editing - Change IP18 Maintenance Item List Editing - Display IP02 Change Maintenance Plan IP03 Display Maintenance Plan IP15 Maintenance Plan List Editing - Change IP16 Maintenance Plan List Editing - Display IK11 Create Measurement Documents IK12 Change Measurement Documents IK13 Display Measurement Documents IK22 Measurement Documents List Editing - Create IK21 Measurement Documents List Editing - Create IK22 Measurement Documents List Editing - Create IK18 Measurement Documents List Editing - Change IK17 Measurement Documents List Editing - Display IK41 Measurement Documents List Editing - Display Archive IQ01 Create Serial Numbers IQ02 Change Serial numbers IQ04 Serial Numbers List Editing - Create IQ08 Serial Numbers List Editing - Change IQ09 Serial Numbers List Editing - Display IK01 Create Measurment Point IK02 Change Measurement Point Ik03 Display Measurement Point IK08 Measurement Point List Editing - Change Ik07 Measurement Point List Editing u2013 Display and a few PM related tables: TPST -- Functional Location - BOM Link STAS -- BOMs - Item Selection STKO -- BOM Header STPO -- BOM item STPU -- BOM Subitem STZU -- Permanent BOM data RESB - Reservation, Material number, Requirement date, Required Quantity, Quantity withdrawn, Work order number RSADD - Date created, User ID of person who created the reservation MAKT - Material Description AUFK - Work Order description AFIH - Revision (as a selection field) MBEW - Total valuated stock (SOH) USER_ADDR - The User ID first name & second name RKPF - Reservation Header information if required.
    IP01 - maintenance plan
    Plant maintenance (PM) IHPA Plant Maintenance: Partners OBJK Plant Maintenance Object List ILOA PM Object Location and Account Assignment AFIH Maintenance order header AFIH Maintenance Order Header AFKO Order header data PP orders AFPO Order item (not used much) AFRU Order completion confirmations AFVC Operation within an order AFVV Order position data CRCO Assignment of work center to cost center OBJK Plant Maintenance Object List CRHD Work Center Header PLAF Planned order HIKO Order master data history HIVG PM order history: operations Logical databases: CNJ AUFK Order master data AFKO Order header data PP orders AFPO Order item JSTO Status object information JEST Object status Logical databases: ODK 12.1 Routings/operations MAPL - Allocation of task lists to materials PLAS - Task list - selection of operations/activities PLFH - Task list - production resources/tools PLFL - Task list - sequences PLKO - Task list - header PLKZ - Task list: main header PLPH - Phases / suboperations PLPO - Task list operation / activity PLPR - Log collector for tasklists PLMZ - Allocation of BOM - items to operations 12.2 Bill of material STKO - BOM - header STPO - BOM - item STAS - BOMs - Item Selection STPN - BOMs - follow-up control STPU - BOM - sub-item STZU - Permanent BOM data PLMZ - Allocation of BOM - items to operations MAST - Material to BOM link KDST - Sales order to BOM link 12.3 PRTu2019s production orders AFFH - PRT assignment data for the work order CRVD_A - Link of PRT to Document DRAW - Document Info Record TDWA - Document Types TDWD - Data Carrier/Network Nodes TDWE - Data Carrier Type 12.4 Work center CRHH - Work center hierarchy CRHS - Hierarchy structure CRHD - Work center header CRTX - Text for the Work Center or Production Resource/Tool CRCO - Assignment of Work Center to Cost Center KAKO - Capacity Header Segment CRCA - Work Center Capacity Allocation TC24 - Person responsible for the work center 12.5 Classification CABS Result of the Statistical Analysis of Table AUSP CUFM Customizing: Class/Config: Screendesigner Form TCME Validity for Global Characteristics KLAH Class Header Data KLAT Classes: long texts KSML Characteristics of a Class AUSP Characteristic values SWOR Classification System: Catchwords KSSK Allocation Table: Object to Class TCLG Class groups TCLO Key Fields of Objects TCLS Classes: Organizational areas TCLST Classes: Org. Areas (Texts) TCLU Class Status COCC PP-PI attributes for characteristics COFV Process management - process instr. charact. in ctrl. recipe COME Process management - message characteristics CORE Process mgmt.- display characteristics of the eval. version PLFV PI Characteristics/Sub-Operation Parameter Values TCLA Class Types TCLAT Class Type Texts TCLT Classifiable Objects LTCLTT Classifiable Objects: Texts CABN Characteristic CAWN Characteristic values Logical databases: - Matchcodes: CLAS, MERK en KLSW 12.6 Equipment EQUI Equipment master data EQKT Equipment short texts EQUZ Equipment time segment EAPL Allocation of Task Lists to Pieces of Equipment EQUI Equipment master data JSTO Status object information JEST Object status TJ30 User status TJ30T Texts for user status TJ02 System status TJ02T Texts for system status 12.7 Functional Location IFLOT Functional Location (Table) IFLOTX Functional location: short texts IRLOTX Reference functional location: short texts TAPL Allocation of task lists to functional
    Edited by: Sreenivasu on May 18, 2009 12:43 PM
    Edited by: Sreenivasu on May 18, 2009 12:48 PM
    Edited by: Sreenivasu on May 18, 2009 12:50 PM
    Edited by: Sreenivasu on May 18, 2009 2:06 PM
    Edited by: Sreenivasu on May 18, 2009 2:07 PM
    Edited by: Sreenivasu on May 18, 2009 2:14 PM
    Edited by: Sreenivasu on May 18, 2009 2:15 PM

  • Field sales related tables and Transaction code

    Dear SAPGurus,
    I have been working with field sales activities in mySAP CRM..
    Can I have the list of the tables and transaction code related to Field sales sales activies..
    I am grateful for ur help....
    I would like to appreciate u by rewarding the points
    Thanks a lot

    Hi Pratik Patel,
    Thank u very much for sending the table names.They are all very useful unto me
    Can I have the more table in this area
    If u have the CRM Data model and its relationship...Pls share with me..
    I  appreciate ur help by rewarding the points
    Regards,
    CRM Consultant

  • Is it possible to customize the ARUN table (J_3ABDBS) and delivery creation program (transaction VL04) in SAP?

    I am a student, pursuing MBA and currently doing internship with a big fashion and lifestyle company in India. I am stuck at a place where i need help.
    We are planning to give customer the control over the time of delivery of their orders as per their convenience. For that I am exploring the possibility of modifying the ARUN table in such a way that an extra column is added into the ARUN table. this field will contain a flag value (1/0) where '0' will indicate that the customer wants to block delivery for the specific items.
    at the time of delivery creation, transaction VL04 should check this flag value for every item. So when we try to create delivery for a whole order in one go, the delivery for the items with '0' flag value shouldn't be created.
    basically, my whole purpose is to enable our SAP system to create delivery on item level instead of on order level.
    Ques:
    1. Is it at all possible to do what i am thinking of?
    2. has any company customised the ARUN table and delivery creation program before?
    3. If we go ahead with this customisation in-house, will the SAP pull back the maintenance support on account of tempering with base programs?
    4. Also, please suggest other ways to do what i am trying to do?

    you can use the Tables SRRELROLES and IDOCREL
    if it is inbound delivery the use the business object BUS2015(outbound use LIKP)
    first get the ROLEID using the Delivery number as Objectkey(business obecjt BUS2015/LIK) from the SRRELROLES,
    then pass the ROLEID to the table IDOCREL to ROLE_A , get the ROLE_B,
    use this ROLE_B supply to ROLEID of SRRELROLES table(business object as IDOC, )
    get the objkey which is nothing But IDOC.

  • Let me know what is new table and transaction code in ECC6?

    Hi
    As the above title, I want to know what is new table and transaction code, through from R/3 4.6c to ECC6.
    Regards
    Sang lim.

    Hi Sang lim,
    Apart from the tocdes listed above,
    Transactions that changed from Release 4.6 C
    Rel.  Old TCode  New TCode 
    46C  ME51  ME51N 
    46C  ME52  ME52N 
    46C  ME53  ME53N 
    470  FNBD  FNBT 
    470  ME54  ME54N 
    470  ME59  ME59N 
    46A  MR01  MIRO 
    46A  MR02  MRBR 
    46A  MR08  MR8M 
    46A  MR1G  MIRO 
    46A  MRHG  MIRO 
    46A  MRHR  MIRO 
    46A  MRRS  MRRL 
    46B  S_P99_41000327  S_ALR_87100205 
    46C  MR03  MIR4 
    46C  MR1B  MIR6 
    46C  MR2M  MIR4 
    46C  MR3M  MIR4 
    46C  MR41  MIR7 
    46C  MR42  MIR4 
    46C  MR43  MIR4 
    46C  MR44  MIR4 
    46C  MR5M  MIR4 
    46C  OAA2  AUFW 
    620  AFAB  AFABN 
    620  AL01  RZ20 
    620  AL02  RZ20 
    620  AL03  RZ20 
    620  AR11  AR11N 
    620  AR29  AR29N 
    620  ASKB  ASKBN 
    620  CA97  CA97N 
    620  DB02  DB02N 
    620  FM3S  FMCIA 
    620  FM3U  FMCIA 
    620  FMN3  FMN3N 
    620  FMN4  FMN4N 
    620  FMN5  FMN5N 
    620  O02E  BMBC 
    620  OACR  OAC0 
    620  RZ23  RZ23N 
    620  SCOM  SCOT 
    620  SM22  SM21 
    620  SWID  SWI2_DIAG 
    620  S_P9C_18000190  S_PL0_09000447 
    620  S_P9C_18000247  S_P6B_12000136 
    620  VOPA  VOPAN 
    620  VOTX  VOTXN 
    620  WE49  WE42 
    620  WE52  WE41 
    620  WE53  WE41 
    640  ABAW  ABAWN 
    640  AL04  RZ20 
    640  AL19  OS07 
    640  COHVOMAVAILCHECK  COMAC 
    640  COHVOMPI  COHVPI 
    640  COHVOMPP  COHV 
    640  KE1F  KE1FN 
    640  KE29  KE29N 
    640  MKH1  MKH1N 
    640  MKH2  MKH2N 
    640  RZ02  RZ20 
    640  RZ06  RZ20 
    640  RZ08  RZ20 
    640  STAT  STAD 
    640  STMP  SLPP 
    640  VL22  VL22N 
    700  AL05  RZ20 
    700  AL16  RZ20 
    700  AL17  OS07 
    700  OVXA  OVXAN 
    700  OVXG  OVXGN 
    700  OVXJ  OVXJN 
    700  OVXK  OVXKN 
    700  OVXM  OVXMN 
    700  OVX3  OVX3N 
    700  OVX6  OVX6N 
    700  OVX8  OVX8N 
    700  WLAM  WLAMN 
    700  WLMM  WLMMN 
    700  WLMV  WLMVN 
    700  WLWB  WLWBN 
    700  WPLG  WPLGN 
    Regards,
    Kiran

  • Master data tables and Transaction data Tables

    Hello Gurus,
    Please let me know how to know which table belongs to master data  and which table belongs to transaction data.
    for FICO module.
    Does any one  have specific material relating to master data table and transaction data tables.
    Thanks
    Edited by: Manu Rathore on Jan 18, 2012 4:38 AM

    Hi Manu,
    Find attached table relation diagram by Christopher Solomon. It is one of the very comprehensive chart on this topic.
    deleted
    Warm regards,
    Murukan Arunachalam

  • Customization tables and transactions

    Hi everybody,
    I have a very simple question:
    I would like to know if every customization table is accessible through a transaction code.
    If yes, then were can I find a table that contains the connection between customization table names and the transactions, which open them?
    If no, then how can I access a customization table except for doing that through the SPRO?
    Thanks,
    Roy

    Hi,
    Check the table OBJSUB and
    [How do I open a customization table for editing using my program?|Re: How do I open a customization table for editing using my program?;
    Cheers,
    Remi

Maybe you are looking for