Filling of DFKKDOUBTD_W and DFKKDOUBTD_RET_W tables

Hi experts,
those 2 tables have respectively 235 and 138 millions of entries..
Actually, we don't use the data in there.
Maybe you know the action to do to stop filling those tables?
Thanks a lot,
Anne-Sophie

hi annie
for lock  concepts refer fol  links
http://www.*******************/2007/08/lesson-47-sap-lock-concept.html
or http://help.sap.com/saphelp_nw04/helpdata/EN/7b/f9813712f7434be10000009b38f8cf/content.htm
or contact a abaper
its maintained in  delivery  and maintance tab
go to  particular table
click delivery and maintancen tab
in that choose table maintanece restricted..
hope it  restrict the entries
kr
raj
Edited by: Varadha on Apr 6, 2009 2:24 PM
Edited by: Varadha on Apr 6, 2009 2:28 PM

Similar Messages

  • Filling of ESTPS  and ESTPJ table

    Hi Experts,
    I have created Phrases and assigned it to characteristics thorugh CGAB but I am unable to find any reocrd associated with phrases that I have created in ESTPS and ESTPJ table.
    Please help me with this issue.
    Thanks in Advance
    Regards
    Kapil

    Hi Mark,
    Thanks for your reply, My issue has been resolved.
    Can you please help me with an issues with  BAPI_BUS1077_CREATE http://scn.sap.com/thread/3596621
    Thanks Alot
    Warm Regards
    Kapil

  • Filling of Dimension and Fact tables

    Hello every one,
    Basically from the training guide from net. I have come to know that when you make Dimenions or facts you put every column to the source as seperate level e.g 'emp_no' column from the source will be a level in OWB and will convert into 'id and emp_no'. Now the problem arises that how can i populate them both when data will come in emp_no from source, should i link a sequence with every level's IDs.
    I am pretty much confuse and then at the time of making OLAP Cube, will i call the IDs of every level or what. Please guide me.
    Thanks
    Mustafa Ali Qizilbash
    [email protected]

    Dimension level can have more than one attribute (except ID), so if you have a customer dimension, and customer is at the lowest levelof your hierarchy, this level can have multiple attributes like first_name, last_name, address, age etc. On the next hierarchy level you can have, for example, customer_type, where you will have customer_type_id and again multiple level attributes (customer_type_name, income_bracket etc.).
    For OLAP you indeed have to have a unique id across all the levels (you cannot have a customer_id that is identical with a customer_type_id). You can achieve this for example by loading each level id in a separate mapping ssequentially from the same sequence (this would not be particularly efficient, but can be acceptable in some cases) or by having one sequence per level. These sequences start with different numbers and you take care that the sequence numbers they generate will never overlap. For example you can have a cust_s sequence that populates the customer_id, and you know that you will probably never ever have more that 100 thousands customers. In this case, this sequence will start with 1. As for the customer_type_id, you can have the sequence cust_type_s that starts with 10 million and progresses from there (always take some slack in these cases). This way the values generated by cust_s and cust_type_s will (probably) never overlap.
    Regards:
    Igor

  • Export - Import In ABAP ( for variables and internal table)

    how can we pass value for the variable and internal table using Export and Import?
    data: var type sy-uzeit.
    var = sy-uzeit.
    EXPORT var TO MEMORY ID 'TIME'.
    data: var type sy-uzeit.
    IMPORT var FROM MEMORY ID 'TIME'.
    write:/ var,sy-subrc,sy-uzeit.
    i found var value 0 while importing. 
    what is the right syntax for passing value of variable and internaltable.
    regards,
    dushyant.

    Hi,
    There are two possible solutions.
    Solution1:
    Program1.Should be run before atleast once so that TIME should be filled.
    data: var type sy-uzeit.
    var = sy-uzeit.
    EXPORT var TO MEMORY ID 'TIME'.
    Program2.IF the TIME is filled,then only it will produce the result.
    data: var type sy-uzeit.
    clear var.
    IMPORT var FROM MEMORY ID 'TIME'.
    write:/ var, sy-subrc, sy-uzeit.
    Solution2:
    Single program:
    data: var type sy-uzeit.
    var = sy-uzeit.
    EXPORT var TO MEMORY ID 'TIME'.
    clear var.
    IMPORT var FROM MEMORY ID 'TIME'.
    write:/ var, sy-subrc, sy-uzeit.
    Kindly reward points by clikcing the star on the left of reply,if it helps.

  • Need to fill a new field in table EKKO

    Hi all,
    i created a new field (ZZCODE) in the table EKKO. Well, now i would like to fill this field when the user save his purchase order. Which user-exit or BADI can i use ?
    I tried a lot but either i can't change the parameters values either the FM is not raise.
    Thanks for help.

    HI CECG,
    Yesterday itself i tried this example,
    i will forward u the document to ur mail id,
    plz provide me the mail id so that i will forward u the doc..
    STEP-BY-STEP PROCEDURE FOR SCREEN EXIT IN ME21n TRANSACTION
    Introduction:
                        SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
                        To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
    Requirement:
                         You have to add the custom field in SAP standard table EKKO. Then we have to place the field in ME21N screen. When user enters any input into the field it should get updated in the database.
    Note:
                         EKKO table is meant for Purchasing document header, you should add the field in the header level for ME21n screen. There you are provided with customer sub screens where you can add the field in the screen.
    In EKKO table
    include : cl_ekkodb
    in that u can add the field u want
    Procedure:
    1.     You have to create a field in the Custom Include of standard table, after creating activate it.
    2.     Double click on the include then you can add your custom field here.
    Find out the Required Enhancements:
    1.     Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton ‘Information system’.
    MM06E005 : CUSTOMER FIELDS IN PURCHASING DOCUMENT
    2.     Then mention the particular package name of the transaction you need to      enhance. Then you will be shown the list of Enhancement components for that particular package.
    3.     Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
    MM06E005 is the Enhancement component we are using here.
    Development
    Creating a Project to include the enhancement:
    1.     Go to transaction CMOD and create a project.
    2.     Enter a description for the project.
    3.     Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.
    4.     Click on the components in Application Toolbar.
    5.     Here you will be shown the function module exits, screen exits and Include tables.
    6.     Click on the custom screen SAPLXMO6 – 0101 in which it suits the requirement of adding the custom field to the layout.
    7.     Click on layout and go to get from dictionary and select the field you need to add and click ok.
    8.     Place the field in the layout and activate it.
    9.     After that you come back and check the respective function module in which you need to implement the code. So, we need to import the data from sub screen for purchasing document header. Therefore we have chosen  the  EXIT_SAPMM06E_008.
    10. Write code in the Function Exits to synchronize the programs:
                           Now, code has to be written in the function modules EXIT_SAPMM06E_008 so that data flows to and fro between the main SAP program and custom sub screen program. Double clicking on the exit we get the following screen.
    11. Double click on the include and write the required code inside it. Then activate it.
    12. Now come back and activate the entire project.
    13. Now go to ME21n transaction and create a purchase order by giving all the mandatory fields including custom field we have created. Go to SE16n, check whether the field got updated in the database or not.
    Finally it gets updated in the database.
    IF U PROVIDE ME UR MAILID I CAN SEND U THE DOCUMENT WHICH IS VERY CLEAR FOR PURCHASE ORDER
    PLZ REWARDS POINTS IF HELPFUL,
    Ganesh.

  • How to get the link between mara, ausp, cawn and cawnt tables

    hello ABAPERS
    i have got a requiremet in that i have to get the relation .
    how to get the link between mara, ausp, cawn and cawnt tables and also type how can we get link between  char value and char description in cawn and cawnt tables through ausp and mara tables.
    I would be very thankful  for ur help in advance.
    Thanks & Regards.
    soni

    Hi,
    Sample report using the linkage between tables;
    report batch_char no standard page heading
                              line-size  132
                              line-count 58(1)
                              message-id mm.
           Report by Batch Characteristic                                *
    Description          : Report by Batch Characteristic                *
    Declaration for Tables
    tables: mara,    " Material Master
            mard,    " Storage Location Data for Material
            t001w,   " Plants/Branches
            t001l,   " Storage Locations
            cabn,    " Characteristics
            inob.    " Link between Internal Number and Object
    Declaration for Constants
    constants : c_klart like ausp-klart value '023',     " Class Type
                c_obtab like inob-obtab value 'MCH1',    " Database Table
                c_flag  type c          value 'X',       " Flag
                c_c23   type i          value '23',      " Ratio
    Constants for Ratio Categories
                c_13    type p decimals 2 value '13.00', " For Ratio 13
                c_1499  type p decimals 2 value '14.99', " For Ratio 14.99
                c_15    type p decimals 2 value '15.00', " For Ratio 15
                c_1699  type p decimals 2 value '16.99', " For Ratio  16.99
                c_17    type p decimals 2 value '17.00', " For Ratio 17
                c_1899  type p decimals 2 value '18.99', " For Ratio 18.99
                c_19    type p decimals 2 value '19.00', " For Ratio 19
                c_2099  type p decimals 2 value '20.99', " For Ratio 20.99
                c_21    type p decimals 2 value '21.00', " For Ratio 21
                c_2299  type p decimals 2 value '22.99', " For Ratio 22.99
                c_23    type p decimals 2 value '23.00', " For Ratio 23
                c_g23(4) type c value '>=23',            " For Ratio >=23
                c_ratio(5) value 'RATIO',                  " For Ratio
    Constants for Storing Selected item field information
                c_cursor1(15) value 'I_OUTPUT1-MEINS',   " For Selected Base
                                                         " Unit of Measure
                c_cursor2(15) value 'I_OUTPUT1-MATNR',   " For Selected Base
                                                         " Material Number
                c_cursor3(15) value 'I_OUTPUT1-MAKTX',   " For Selected Base
                                                         " Material Des.
                c_cursor4(15) value 'I_OUTPUT1-CLABS',   "For Selected Base
                                                         " Stock Value
                c_cursor5(15) value 'I_OUTPUT1-ATFLV',   " For Selected Base
                                                        " Char.Value (Ratio)
                c_cursor6(5) value 'C_G23'.
    Declaration for Global Variables
    data : g_exit  type c,                            " Flag
           g_clabs1(16) type c,                       " Quantity
           g_clabs(18)  type c,                       " Quantity
           g_cursor(15) type c,                       " Cursor field name
           g_matnr     type mara-matnr,               " Material Number
           g_werks     type mchb-werks,               " Plant
           g_atinn(30) type c.                        " Character.
    Declaration for Internal tables
    Internal table to hold Batch Stock data
    data : begin of i_mchb occurs 0,
             matnr like mchb-matnr,      " Material Number
             werks like mchb-werks,      " Plant
             lgort like mchb-lgort,      " Storage Location
             charg like mchb-charg,      " Batch Number
             clabs like mchb-clabs,      " Stock Value
             meins like mara-meins,      " Unit of measure
             atflo like ausp-atflv,      " Char.Value (Ratio)
             atflv like ausp-atflv,      " Char.Value (Ratio)
           end of i_mchb.
    Internal table to hold Secondary List data
    data : begin of i_mchb1 occurs 0,
             werks like mchb-werks,      " Plant
             matnr like mchb-matnr,      " Material Number
             lgort like mchb-lgort,      " Storage Location
             charg like mchb-charg,      " Batch Number
             atinn like ausp-atinn,      " Char.Value
             clabs like mchb-clabs,      " Stock Value
             atflo like ausp-atflv,      " Char.Value (Ratio)
             atflv like ausp-atflv,      " Char.Value (Ratio)
           end of i_mchb1.
    Internal table to get the Plant Name
    data : begin of i_plant occurs 0,
             werks like t001w-werks,     " Plant
             name1 like t001w-name1,     " Name
           end of i_plant.
    Internal table to get the Material Description
    data : begin of i_makt occurs 0,
             matnr like makt-matnr,      " Material
             maktx like makt-maktx,     " Description
           end of i_makt.
    Internal table to hold AUSP data
    data : begin of i_ausp occurs 0,
             objek like ausp-objek,      " Object No
             atinn like cabn-atinn,      " Characteric value
             atflv like ausp-atflv,      " Characteristic Value
           end of i_ausp.
    Internal table to hold output data
    data : begin of i_output occurs 0,
             atinn like cabn-atinn,      " Characteric value
             werks like mchb-werks,      " Plant
             matnr like mchb-matnr,      " Material Number
             atnam like cabn-atnam,      " Characteristic
             atflv like ausp-atflv,      " Char.Value (Ratio)
             name1 like t001w-name1,     " Plant Description
             maktx like makt-maktx,      " Material Description
             clabs like mchb-clabs,      " Stock Value
             meins like mara-meins,      " Base Unit of Measure
           end of i_output.
    Internal table to hold final Output data
    data : begin of i_output1 occurs 0,
             atinn like cabn-atinn,      " Characteric value
             werks like mchb-werks,      " Plant
             matnr like mchb-matnr,      " Material Number
             atnam like cabn-atnam,      " Characteristic
             atflv(32) type c,           " Char.Value (Ratio)
             name1 like t001w-name1,     " Plant Description
             maktx like makt-maktx,      " Material Description
             clabs like mchb-clabs,      " Stock Value
             meins like mara-meins,      " Base Unit of Measure
           end of i_output1.
           Selection screen
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_werks for t001w-werks obligatory,  " Plant
                    s_lgort for t001l-lgort,             " Stor.Location
                    s_matnr for mara-matnr  obligatory,  " Material No
                    s_atinn for cabn-atinn.              " Character.
    selection-screen end of block b1.
    At selection screen
    at selection-screen.
    Validation of Selection Screen Fields
      perform validate_screen.
    Start of selection
    start-of-selection.
    Get the Material and Batch Stock data from MARA and MCHB Tables
      perform get_mat_stock_data.
    Get the Material Group Text and Plant Name from T023T and T001W Tables
      perform get_plant_grp_data.
    Append the data into final Output Internal Table after getting the
    Characteristic Values data from INOB and AUSP Tables
      perform append_final_data.
    Processing if the Characteristics contain 'RATIO'
      perform collect_ratio.
    End-of-Page
    end-of-page.
      write /1(125) sy-uline.
    End of selection
    end-of-selection.
      if g_exit <> c_flag.
    Display the Report Output data
        perform display_report.
      endif.
    Top-of-Page
    top-of-page.
    Write the Report and Column Headings
      perform get_headings.
    at line-selection
    at line-selection.
      if sy-lsind = 1.
        perform display_batch.
      endif.
    Top of page during line-selection
    top-of-page during line-selection.
      perform heading_seclist.
          Form validate_screen
    Validation of Selection Screen fields
    form validate_screen.
    Validation of Plant
      clear t001w.
      if not s_werks[] is initial.
        select werks
          into t001w-werks
          from t001w
          up to 1 rows
          where werks in s_werks.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Plant'(002).
        endif.
      endif.
    Validation of Material Number
      clear mara.
      if not s_matnr[] is initial.
        select matnr
          into mara-matnr
          from mara
          up to 1 rows
          where matnr in s_matnr.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Material'(003).
        endif.
      endif.
    Validation of Storage Location
      clear t001l.
      if not s_lgort[] is initial.
        select lgort
          into t001l-lgort
          from t001l
          up to 1 rows
          where lgort in s_lgort.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Storage Location'(004).
        endif.
      endif.
    Validation of Characteristic Value
      clear cabn.
      if not s_atinn[] is initial.
        select atinn
          into cabn-atinn
          from cabn
          up to 1 rows
          where atinn in s_atinn.
        endselect.
        if sy-subrc <> 0.
          message e899 with 'Enter Valid Characteristic Value'(005).
        endif.
      endif.
    Validation of Plant, Material and Storage Location
      clear mard.
      select matnr werks lgort
        into (mard-matnr, mard-werks, mard-lgort)
        from mard
        up to 1 rows
        where matnr in s_matnr and
              werks in s_werks and
              lgort in s_lgort.
      endselect.
      if sy-subrc <> 0.
        message e899 with 'No Data found for the Selection Criteria'(006).
      endif.
    endform.                          "validate_screen
    *&      Form  get_headings
    Write the Report and Column Headings
    form get_headings.
      data: l_repid type sy-repid.
      l_repid =  sy-repid.
      call function 'Y_STANDARD_HEADING'
           exporting
                repid    = l_repid
                heading1 = sy-title.
      write:/1(125) sy-uline.
      format color col_heading on.
      write : /1  sy-vline,  2(18)   'Material Number'(008) centered,
              20  sy-vline,  21(40)  'Material Description'(011) centered,
              61  sy-vline,  62(22)  'Ratio'(009) centered,
              84  sy-vline,  85(18)  'Quantity'(010) centered,
             103  sy-vline, 104(20)  'Base Unit of Measure'(015) centered,
             125  sy-vline.
      write:/1(125) sy-uline.
      format color off.
    endform.                    "get_headings
    *&      Form  get_mat_stock_data
    Get the Material and Batch Stock data from MARA and MCHB Tables
    form get_mat_stock_data.
      clear: i_mchb,i_output, i_output1.
      refresh: i_mchb,i_output, i_output1.
      select a~matnr       " Material Number
             b~werks       " Plant
             b~lgort       " Storage Location
             b~charg       " Batch Number
             b~clabs       " Stock Value
             a~meins       " Base Unit of Measure
          into table i_mchb
          from mara as a inner join mchb as b
          on amatnr eq bmatnr
          where b~matnr in s_matnr and
                b~werks in s_werks and
                b~lgort in s_lgort.
      if sy-subrc <> 0.
        g_exit = c_flag.
        message s899 with 'No Data found for the Selection Criteria'(006).
        stop.
      endif.
      sort i_mchb by matnr werks lgort charg.
    endform.                    " get_mat_stock_data
    *&      Form  get_plant_grp_data
    Get the Material Group Text and Plant Name from T023T and T001W
    form get_plant_grp_data.
      if not i_mchb[] is initial.
    Get the Plant Description from t001w Table
        clear i_plant.
        refresh i_plant.
        select werks      " Plant
               name1      " Name
          into table i_plant
          from t001w
          for all entries in i_mchb
          where werks = i_mchb-werks.
    Get the Material Description from MAKT Table
        clear i_makt.
        refresh i_makt.
        select matnr      " Material number
               maktx      " Material Description
          into table i_makt
          from makt
          for all entries in i_mchb
          where matnr = i_mchb-matnr and
                spras = sy-langu.
        sort i_plant by werks.
        delete adjacent duplicates from i_plant comparing werks.
        sort i_makt by matnr.
        delete adjacent duplicates from i_makt comparing matnr.
      endif.
    endform.                   "form get_plant_grp_data.
    *&      Form  append_final_data
    Append the data into final Internal Table
    form append_final_data.
      data : l_matbatch(28),
             l_tabix like sy-tabix.
      if not i_mchb[] is initial.
        loop at i_mchb.
          l_tabix = sy-tabix.
          clear l_matbatch.
          concatenate i_mchb-matnr i_mchb-charg into l_matbatch.
          move-corresponding i_mchb to i_output.
    Get the Plant Description from i_plant Table
            read table i_plant with key werks = i_mchb-werks binary search.
            if sy-subrc = 0.
              i_output-name1 = i_plant-name1.
            endif.
    Get the Material Description from i_makt Table
          read table i_makt with key matnr = i_mchb-matnr binary search.
          if sy-subrc = 0.
            i_output-maktx = i_makt-maktx.
          endif.
    Get the Characteristic Values data from INOB and AUSP Tables
          clear inob.
          select single cuobj from inob
              into inob-cuobj
              where klart = c_klart and
                    obtab = c_obtab and
                    objek = l_matbatch.
          if sy-subrc = 0.
            select objek
                   atinn
                   atflv
               from ausp
               into table i_ausp
               where objek = inob-cuobj and
                     atinn in s_atinn   and
                     klart = c_klart.
            sort i_ausp by objek atinn.
            loop at i_ausp.
              clear cabn.
              select single atinn atnam from cabn
                         into (cabn-atinn,cabn-atnam)
                         where atinn = i_ausp-atinn.
              if sy-subrc = 0.
    If the ratio value is between 13-14.99, display 13
                if cabn-atnam cs c_ratio.
                  if i_ausp-atflv between c_13 and c_1499.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_13.
    If the ratio value is between 15-16.99, display 15
                  elseif i_ausp-atflv between c_15 and c_1699.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_15.
    If the ratio value is between 17-18.99, display 17
                  elseif i_ausp-atflv between c_17 and c_1899.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_17.
    If the ratio value is between 19-20.99, display 19
                  elseif i_ausp-atflv between c_19 and c_2099.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_19.
    If the ratio value is between 21-22.99, display 21
                  elseif i_ausp-atflv between c_21 and c_2299.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_21.
    If the ratio value is greater than or equal to 23, display 23
                  elseif i_ausp-atflv >= c_23.
                    i_mchb-atflo = i_ausp-atflv.
                    i_mchb-atflv = c_23.
                  endif.           " Condition for RATIO values
                else.              " If characteristic does contain RATIO
                  i_mchb-atflv = i_ausp-atflv.
                endif.
                i_output-atinn = cabn-atinn.
                i_output-atnam = cabn-atnam.
                i_output-atflv = i_ausp-atflv.
                i_mchb1-matnr = i_mchb-matnr.
                i_mchb1-werks = i_mchb-werks.
                i_mchb1-lgort = i_mchb-lgort.
                i_mchb1-charg = i_mchb-charg.
                i_mchb1-clabs = i_mchb-clabs.
                i_mchb1-atinn = i_ausp-atinn.
                i_mchb1-atflo = i_mchb-atflv.
                i_mchb1-atflv = i_ausp-atflv.
                append : i_output, i_mchb1.
                clear i_mchb1.
                modify i_mchb index l_tabix transporting atflo atflv .
              endif.
            endloop.
          endif.
        endloop.
      endif.
    Checking whether the table is filled or not
      if not i_output[] is initial.
        sort i_output by atinn werks matnr atflv.
      else.
        g_exit = c_flag.
        message s899 with 'No Data found for the Selection Criteria'(006).
      endif.
    Delete the records where RATIO is less than 13.
      delete i_output where atnam cs c_ratio and atflv lt c_13.
    endform.                    "append_final_data
    *&      Form  display_report
    Display the Report Output data
    form display_report.
    data: l_tabix like sy-tabix.
      loop at i_output1.
        l_tabix = sy-tabix.
    At new Characteristic
         at new atinn.
          read table i_output1 index l_tabix.
          format color 1 intensified on.
          write: /1 sy-vline, 2(20) 'Characteristic Name:'(007),
                 23(40) i_output1-atnam,
                 125 sy-vline.
          format color off.
          format color 4 intensified on.
          write: /1 sy-vline, 2(20) 'Plant Name         :'(022),
                 23(4) i_output1-werks, 29(30) i_output1-name1,
                 125 sy-vline.
          format color off.
          write /1(125) sy-uline.
        endat.
        clear: g_clabs, g_clabs1.
        format color col_normal.
        write :/1 sy-vline,  2(18)   i_output1-matnr,
               20 sy-vline,  21(40)  i_output1-maktx,
               61 sy-vline.
        if i_output1-atflv = c_c23.
          write: 62(22)  c_g23 centered.
        else.
          shift i_output1-atflv left deleting leading space.
          write: 62(22)  i_output1-atflv centered.
        endif.
        write:  84     sy-vline,
               103     sy-vline,
               110(5)  i_output1-meins.
    If the quantity value is negative
        if i_output1-clabs ge 0.
          write: 85(18) i_output1-clabs unit i_mchb-meins,
                125     sy-vline.
        else.
          i_output1-clabs = - i_output1-clabs.
          write i_output1-clabs unit i_mchb-meins to g_clabs1.
          condense g_clabs1.
          concatenate '(' g_clabs1 ')' into g_clabs separated by space.
          write: 85(18) g_clabs right-justified,
               125 sy-vline.
        endif.
        format color off.
        hide : i_output1.
        new-line.
    At end of material
        at end of matnr.
          sum.
          move : i_output1-matnr to g_matnr.
          format color 3 intensified on.
          write /1(125) sy-uline.
          write :/1 sy-vline,  2(25) 'Total for Material      :'(012),
                 28(18) g_matnr.
          if i_output1-clabs ge 0.
            write: 85(18) i_output1-clabs  unit i_mchb-meins,
            125 sy-vline.
          else.
            i_output1-clabs = - i_output1-clabs.
            write i_output1-clabs unit i_mchb-meins to g_clabs1.
            condense g_clabs1.
            concatenate '(' g_clabs1 ')' into g_clabs separated by space.
            write: 85(18) g_clabs right-justified,
                 125 sy-vline.
          endif.
          write: 125 sy-vline.
          format color off.
          write /1(125) sy-uline.
        endat.
    At end of plant
        at end of werks.
          sum.
          move : i_output1-werks to g_werks.
          format color 3 intensified off.
          write :/1 sy-vline,  2(25) 'Total for Plant          :'(013),
                 28(4) g_werks.
          if i_output1-clabs ge 0.
            write:  85(18) i_output1-clabs  unit i_mchb-meins,
            125 sy-vline.
          else.
            i_output1-clabs = - i_output1-clabs.
            write i_output1-clabs unit i_mchb-meins to g_clabs1.
            condense g_clabs1.
            concatenate '(' g_clabs1 ')' into g_clabs separated by space.
            write: 85(18) g_clabs right-justified,
                 125 sy-vline.
          endif.
          format color off.
          write /1(125) sy-uline.
        endat.
    At end of  characteristic
        at end of atinn.
          read table i_output1 index l_tabix.
          sum.
          format color 3 intensified on.
          write :/1 sy-vline,  2(25) 'Total for Characteristic:'(014),
                 28(25) i_output1-atnam.
          if i_output1-clabs ge 0.
            write:  85(18) i_output1-clabs  unit i_mchb-meins,
            125 sy-vline.
          else.
            i_output1-clabs = - i_output1-clabs.
            write i_output1-clabs unit i_mchb-meins to g_clabs1.
            condense g_clabs1.
            concatenate '(' g_clabs1 ')' into g_clabs separated by space.
            write: 85(18) g_clabs right-justified,
                 125 sy-vline.
          endif.
          format color off.
          write /1(125) sy-uline.
        endat.
      endloop.
    endform.                    " display_report
    *&      Form  DISPLAY_BATCH
         Display the batch details for the seclected material            *
    form display_batch.
    Get the batch details for the selected material
      get cursor field g_cursor.
      if g_cursor = c_cursor1 or
         g_cursor = c_cursor2 or
         g_cursor = c_cursor3 or
         g_cursor = c_cursor4 or
         g_cursor = c_cursor5 or
         g_cursor = c_cursor6.
        format color 3.
        write: /1 sy-vline,
                2(17) 'Material Number :'(020),
               20(17) i_output1-matnr,
               94 sy-vline.
        format color off.
        write /1(94) sy-uline.
        loop at i_mchb1 where matnr = i_output1-matnr and
                              atinn = i_output1-atinn and
                              atflo = i_output1-atflv.
          format color col_normal.
          shift i_mchb1-charg left deleting leading '0'.
          write :/1 sy-vline,  2(16) i_mchb1-lgort centered,
                 18 sy-vline, 19(17) i_mchb1-charg centered,
                 36 sy-vline.
          if i_output1-atnam cs c_ratio.
            write: 37(29) i_mchb1-atflv
                           exponent 0 decimals 2 centered.
          else.
            write : 37(29) i_mchb1-atflv
                          exponent 0 decimals 0 centered.
          endif.
          write : 66 sy-vline, 67(27) i_mchb1-clabs unit i_mchb-meins,
                  94 sy-vline.
          format color off.
        endloop.
        write /1(94) sy-uline.
      else.
        message s899 with 'Invalid cursor position'(016).
        exit.
      endif.
    endform.                    " DISPLAY_BATCH
    *&      Form  HEADING_SECLIST
          Write the Column Headings for Interactive Report
    form heading_seclist.
      write /1(94) sy-uline.
      format color col_heading on.
      write :/1 sy-vline,  2(16) 'Storage Location'(021),
             18 sy-vline, 19(17) 'Batch Number'(017) centered,
             36 sy-vline, 37(29) 'Characteristic Value'(018) centered,
             66 sy-vline, 67(27) 'Quantity'(019) centered,
             94 sy-vline.
      write /1(94) sy-uline.
      format color off.
    endform.                    " HEADING_SECLIST
    *&      Form  COLLECT_RATIO
          Display the Characteristic ratio data
    form collect_ratio.
      loop at i_output.
        clear g_atinn.
        i_output1-atinn = i_output-atinn.
        i_output1-atnam = i_output-atnam .
        i_output1-werks = i_output-werks.
        i_output1-name1 = i_output-name1.
        i_output1-matnr = i_output-matnr.
        i_output1-maktx = i_output-maktx.
        i_output1-clabs = i_output-clabs.
        i_output1-meins = i_output-meins.
        call function 'CONVERSION_EXIT_ATINN_OUTPUT'
             exporting
                  input  = i_output-atinn
             importing
                  output = g_atinn.
        if g_atinn cs c_ratio.
    If the ratio value is between 13-14.99, display 13
          if i_output-atflv between c_13 and c_1499.
            i_output1-atflv = c_13.
    If the ratio value is between 15-16.99, display 15
          elseif i_output-atflv between c_15 and c_1699.
            i_output1-atflv = c_15.
    If the ratio value is between 17-18.99, display 17
          elseif i_output-atflv between c_17 and c_1899.
            i_output1-atflv = c_17.
    If the ratio value is between 19-20.99, display 19
          elseif i_output-atflv between c_19 and c_2099.
            i_output1-atflv = c_19.
    If the ratio value is between 21-22.99, display 21
          elseif i_output-atflv between c_21 and c_2299.
            i_output1-atflv = c_21.
    If the ratio value is greater than or equal to 23, display 23
          elseif i_output-atflv >= c_23.
            i_output1-atflv = c_23.
          endif.
          write i_output1-atflv to i_output1-atflv .
        else.
          write i_output-atflv to i_output1-atflv exponent 0 decimals 0.
        endif.
        collect i_output1.
        clear   i_output1.
      endloop.
      sort i_output1 by atinn werks matnr atflv.
    endform.                    " COLLECT_RATIO
    Reward if useful..
    Regards,
    Anji

  • Use of T168F and T168 Tables in System

    Hi everybody
    I'm making a development, the purpose is to assign the Release Strategy to RFQ's when the user sets the Unit Prices for Items in transactión ME47.
    This action is executed in SAPMM06E in Routine strategie_ermitteln calling FM ME_REL_STRATEGIE_EKKO, but before the call there is a check at routine begin: t160-vorga NE vorga-angb (vorga-angb is a constant 'AG').
    t160-vorga has the 'A' value for ME41 (creating RFQ), then in this transaction the Strategy is assigned.
    But in ME47, t160-vorga has the 'AG' value, then the FM is not called.
    I solved this making t160-vorga = 'A' (only in memory) in EXIT_SAPMM06E_017, and the Release Strategy is assigned ok.
    But, when the user modificates a price using a button, the program makes a validation in Routine FCODE, checking that the value of t160-vorga exists in T168F and T168 tables with field fcode = 'KO'.  Because i modified the value from AG to A, this record does not exist and the program set an error. But, if i don't modify the t160-vorga, the Release is not assigned because the check in Routine strategie_ermitteln.
    So , i'm thinking in change my development, calling myself the FM  ME_REL_STRATEGIE_EKKO in EXIT_SAPMM06E_012 when action Save, but i dont' like this solution because i would need to copy not only the FM call, but else all the code involved in fill the parameters.
    So, i think other solution is to create the record for vorga = 'A', fcode = 'KO'  in T168F and T168 tables.
    If somebody can helpe, my doubts are:
    1. what implicates this record creation in these tables T168/T168F, that is, wich is the usage of these tables in the system ??     
    2. Where can i see the meaning of t168-vorga values (AG, A, K, F etc.)  ??
    3. In wich transaction can i create records to these tables ??
    4. Could be any problem if i add that records to these tables ??
    Any help will be apreciated !!
    (Excuse the long Topic text)
    Thanks
    Frank

    Hi Frank,
    2. Look the table T167T (to find this, I was going into the SE11, Data element: VORGA, : table, ...)
    3. The table T167T could be updated with the SM30/SM31 transaction. But you have a warning message.
    4. See the message, in the previous answer
    Rgd
    Frédéric

  • Updating bseg and bsis table ...

    Hello,
    I want to update bseg and bsis table. I guess i will have to use BAPI_ACC_DOCUMENT_POST.
    how do i go on using this BAPI ? any starter code snippet ...!!

    Functionality
    Using this method you can create a posing in accounting for certain business transactions.
    Possible ( Business Transactions):
    Postings that generally only affect the general ledger. (RFBU)
    Billing: For billing in Sales and Distribution, accounting is supplied with the relevant billing data. (SD00) Billing Document
    Accounting can use the data of a logistics system that result from an Invoice Receipt. (RMRP)
    Goods Movement are triggered by transactions in Sales and Distribution or by inventory postings. Within logistics, they lead to a change in the warehouse stocks of
    <DS:GLOS.Inventory Management>Inventory Management. This results in a posting in accounting. This is why accounting is supplied with the relevant data from logistics. (RMWA)
    Example
    Billing document:
    By selling goods in accordance with targets, revenue is generated. The revenue is posted in billing and forwarded
    to accounting.
    Invoice receipt:
    Raw materials are purchased in accordance with targets. The invoice receipt is posted in a logistics system. The data from the raw materials is forwarded to accounting.
    Goods Movment:
    The use of raw materials leads to a change in stock in inventory managment. The posting of raw material consumption is forwarded to accounting.
    G/L Account Posting:
    Provision posting for an expected warranty service. This can refer to acquisitions or retirements belonging to stocks that are not in subledger accounting relevant to inventory management. This is particularly the case if such materials are not displayed as vendor/customer, materials, loans etc. or cannot be displayed in this way. This can also refer to write-ups or depreciation that contain higher aggregations of values than are maintained in a corresponding subledger that is relevant to inventory management.
    The conversion of foreign currencies for receivables/payables due to large exchange rate changes that should not lead to an update of the accounts payable or accounts receivable accounting. A similar transaction can arise for the revaluation of raw materials if this revaluation takes place at a correspondingly aggreagated level.
    Reclassification of inventory of P&L statement accounts that are only used for reconcilliation purposes in the general ledger (this rearranges values for balance sheet items).
    Balance reclassifications of stocks to receivables with different return times.
    Notes
    If the parameter CurrencyAmount is filled with the currency fields, a complete document check including characteristics and value components of profitability analysis (CO-PA). Otherwise, the account assignment objects are checked.
    Messages are returned in the parameter Return. In the parameter documentation you can find the return values and their meaning.

  • How to set standart fields in SHIPPING and SALES tables in items?

    Hello SDN!
    I need to fill some standart fields in CT_SHIPPING and CT_SALES tables (sorry, I don't know their real names, written names used commonly in BADI) for items. I've got a BADI for header (extends IF_EX_CRM_ISA_BASKET_HEAD) and item (extends IF_EX_CRM_ISA_BASKET_ITEM) with methods CHANGEHEAD_BEFORE_ORDER and CHANGEITEMS_BEFORE_ORDER correspondenly. In these methods I try to fill required fields. These fields filled OK for header, but when I tried to fill fields for item it still saved to header. In these tables REF_KIND sets 'B' for item, REF_GUID also sets properly... Can anybody give rules for filling these fields? What main fields (such as REF_KIND) must be set and which values must they have?
    version of subject is CRM 5.0 SP 11
    Help will be appreciated.
    Regards, Lev
    Edited by: Lev Kulaev on Sep 8, 2008 9:24 AM
    give a version of CRM and give more detailed description of problem

    Hello Lev,
    Yes, if you have a "fully loaded" order - I mean some good order that has all the business data (such as shipping, sales ord, schedline etc. available. Usually an order that has been created in CRM or downloaded from R/3 should do to understand the data structures.
    To start with, just give the Transaction Number as the onl;y input and execute. And read through the output - each set (ET_SHIPPING) etc you are interested in. The several GUID and REF_GUID and REF_KINDs can be better understood with an example than me providing the explanation and code.
    An equivalent counterpart to this report program is the CRM_ORDER_READ, which does the same thing but does not let you play with the maintain part. CRM_ORDER_MAINTAIN program allows you to try the ipdate / change / maintain.
    Well here is the help text  for CRM_ORDER_MAINTAIN
    <h5>Short text</h5>
    Test program for function module CRM_ORDER_MAINTAIN
    <h5>Purpose</h5>
    This program replaces the missing option to execute a single test for the function module CRM_ORDER_MAINTAIN.
    The usual single test function in transaction SE37 is not possible as sorted tables are used as import parameters. The module RS_COMPLEX_OBJECT_EDIT used from Basis for maintaining import parameters is only able to process standard tables.
    <h5>Features</h5>
    The report executes a test call of the function module CRM_ORDER_MAINTAIN and displays the result (the export parameters).
    In addition, it is possible to
    <li>Save the changed data on the database,
    <li>Delete the buffer afterwards,
    <li>And, by calling CRM_ORDER_READ, to read it again.
    <h5>Selection</h5>
    <li>Specify the transaction number, the transaction GUID or the item GUID for changing an existing transaction.
    <li>Specify how many headers or items are to be created for creating new transactions or items.
    <li>Select "Subobject to be maintained" for the subobjects that you wish to change or enter.
    <li>After, enter "Maintain input values", and maintain the interface for CRM_ORDER_MAINTAIN. This means you make an entery for the IT_X_COM parameter for subobject X, and make the required entries in the CT_INPUT_FIELDS table.
    <li>If you wish to save and initialize after the change, specify this.
    <li>If the transaction should be re-read in the buffer afterwards, specify this.
    <h5>Standard Variants</h5>
    You can save your entries as a variant. All entered data is then stored under a GUID in the INDX table, and can be recovered again by calling this variant.
    <h5>Output</h5>
    The output parameter for CRM_ORDER_MAINTAIN and, if necessary, for CRM_ORDER_SAVE, CRM_ORDER_INITIALIZE and CRM_ORDER_READ are issued.
    Easwar Ram
    http://www.parxlns.com

  • Fact and dimension table partition

    My team is implementing new data-warehouse. I would like to know that when  should we plan to do partition of fact and dimension table, before data comes in or after?

    Hi,
    It is recommended to partition Fact table (Where we will have huge data). Automate the partition so that each day it will create a new partition to hold latest data (Split the previous partition into 2). Best practice is to create partition on transaction
    timestamps so load the incremental data into a empty table called (Table_IN) and then Switch that data into main table (Table). Make sure your tables (Table and Table_IN) should be on one file group.
    Refer below content for detailed info
    Designing and Administrating Partitions in SQL Server 2012
    A popular method of better managing large and active tables and indexes is the use of partitioning. Partitioning is a feature for segregating I/O workload within
    SQL Server database so that I/O can be better balanced against available I/O subsystems while providing better user response time, lower I/O latency, and faster backups and recovery. By partitioning tables and indexes across multiple filegroups, data retrieval
    and management is much quicker because only subsets of the data are used, meanwhile ensuring that the integrity of the database as a whole remains intact.
    Tip
    Partitioning is typically used for administrative or certain I/O performance scenarios. However, partitioning can also speed up some queries by enabling
    lock escalation to a single partition, rather than to an entire table. You must allow lock escalation to move up to the partition level by setting it with either the Lock Escalation option of Database Options page in SSMS or by using the LOCK_ESCALATION option
    of the ALTER TABLE statement.
    After a table or index is partitioned, data is stored horizontally across multiple filegroups, so groups of data are mapped to individual partitions. Typical
    scenarios for partitioning include large tables that become very difficult to manage, tables that are suffering performance degradation because of excessive I/O or blocking locks, table-centric maintenance processes that exceed the available time for maintenance,
    and moving historical data from the active portion of a table to a partition with less activity.
    Partitioning tables and indexes warrants a bit of planning before putting them into production. The usual approach to partitioning a table or index follows these
    steps:
    1. Create
    the filegroup(s) and file(s) used to hold the partitions defined by the partitioning scheme.
    2. Create
    a partition function to map the rows of the table or index to specific partitions based on the values in a specified column. A very common partitioning function is based on the creation date of the record.
    3. Create
    a partitioning scheme to map the partitions of the partitioned table to the specified filegroup(s) and, thereby, to specific locations on the Windows file system.
    4. Create
    the table or index (or ALTER an existing table or index) by specifying the partition scheme as the storage location for the partitioned object.
    Although Transact-SQL commands are available to perform every step described earlier, the Create Partition Wizard makes the entire process quick and easy through
    an intuitive point-and-click interface. The next section provides an overview of using the Create Partition Wizard in SQL Server 2012, and an example later in this section shows the Transact-SQL commands.
    Leveraging the Create Partition Wizard to Create Table and Index Partitions
    The Create Partition Wizard can be used to divide data in large tables across multiple filegroups to increase performance and can be invoked by right-clicking
    any table or index, selecting Storage, and then selecting Create Partition. The first step is to identify which columns to partition by reviewing all the columns available in the Available Partitioning Columns section located on the Select a Partitioning Column
    dialog box, as displayed in Figure 3.13. This screen also includes additional options such as the following:
    Figure 3.13. Selecting a partitioning column.
    The next screen is called Select a Partition Function. This page is used for specifying the partition function where the data will be partitioned. The options
    include using an existing partition or creating a new partition. The subsequent page is called New Partition Scheme. Here a DBA will conduct a mapping of the rows selected of tables being partitioned to a desired filegroup. Either a new partition scheme should
    be used or a new one needs to be created. The final screen is used for doing the actual mapping. On the Map Partitions page, specify the partitions to be used for each partition and then enter a range for the values of the partitions. The
    ranges and settings on the grid include the following:
    Note
    By opening the Set Boundary Values dialog box, a DBA can set boundary values based on dates (for example, partition everything in a column after a specific
    date). The data types are based on dates.
    Designing table and index partitions is a DBA task that typically requires a joint effort with the database development team. The DBA must have a strong understanding
    of the database, tables, and columns to make the correct choices for partitioning. For more information on partitioning, review Books Online.
    Enhancements to Partitioning in SQL Server 2012
    SQL Server 2012 now supports as many as 15,000 partitions. When using more than 1,000 partitions, Microsoft recommends that the instance of SQL Server have at
    least 16Gb of available memory. This recommendation particularly applies to partitioned indexes, especially those that are not aligned with the base table or with the clustered index of the table. Other Data Manipulation Language statements (DML) and Data
    Definition Language statements (DDL) may also run short of memory when processing on a large number of partitions.
    Certain DBCC commands may take longer to execute when processing a large number of partitions. On the other hand, a few DBCC commands can be scoped to the partition
    level and, if so, can be used to perform their function on a subset of data in the partitioned table.
    Queries may also benefit from a new query engine enhancement called partition elimination. SQL Server uses partition enhancement automatically if it is available.
    Here’s how it works. Assume a table has four partitions, with all the data for customers whose names begin with R, S, or T in the third partition. If a query’s WHERE clause
    filters on customer name looking for ‘System%’, the query engine knows that it needs only to partition three to answer
    the request. Thus, it might greatly reduce I/O for that query. On the other hand, some queries might take longer if there are more than 1,000 partitions and the query is not able to perform partition elimination.
    Finally, SQL Server 2012 introduces some changes and improvements to the algorithms used to calculate partitioned index statistics. Primarily, SQL Server 2012
    samples rows in a partitioned index when it is created or rebuilt, rather than scanning all available rows. This may sometimes result in somewhat different query behavior compared to the same queries running on SQL Server 2012.
    Administrating Data Using Partition Switching
    Partitioning is useful to access and manage a subset of data while losing none of the integrity of the entire data set. There is one limitation, though. When
    a partition is created on an existing table, new data is added to a specific partition or to the default partition if none is specified. That means the default partition might grow unwieldy if it is left unmanaged. (This concept is similar to how a clustered
    index needs to be rebuilt from time to time to reestablish its fill factor setting.)
    Switching partitions is a fast operation because no physical movement of data takes place. Instead, only the metadata pointers to the physical data are altered.
    You can alter partitions using SQL Server Management Studio or with the ALTER TABLE...SWITCH
    Transact-SQL statement. Both options enable you to ensure partitions are
    well maintained. For example, you can transfer subsets of data between partitions, move tables between partitions, or combine partitions together. Because the ALTER TABLE...SWITCH statement
    does not actually move the data, a few prerequisites must be in place:
    • Partitions must use the same column when switching between two partitions.
    • The source and target table must exist prior to the switch and must be on the same filegroup, along with their corresponding indexes,
    index partitions, and indexed view partitions.
    • The target partition must exist prior to the switch, and it must be empty, whether adding a table to an existing partitioned table
    or moving a partition from one table to another. The same holds true when moving a partitioned table to a nonpartitioned table structure.
    • The source and target tables must have the same columns in identical order with the same names, data types, and data type attributes
    (length, precision, scale, and nullability). Computed columns must have identical syntax, as well as primary key constraints. The tables must also have the same settings for ANSI_NULLS and QUOTED_IDENTIFIER properties.
    Clustered and nonclustered indexes must be identical. ROWGUID properties
    and XML schemas must match. Finally, settings for in-row data storage must also be the same.
    • The source and target tables must have matching nullability on the partitioning column. Although both NULL and NOT
    NULL are supported, NOT
    NULL is strongly recommended.
    Likewise, the ALTER TABLE...SWITCH statement
    will not work under certain circumstances:
    • Full-text indexes, XML indexes, and old-fashioned SQL Server rules are not allowed (though CHECK constraints
    are allowed).
    • Tables in a merge replication scheme are not allowed. Tables in a transactional replication scheme are allowed with special caveats.
    Triggers are allowed on tables but must not fire during the switch.
    • Indexes on the source and target table must reside on the same partition as the tables themselves.
    • Indexed views make partition switching difficult and have a lot of extra rules about how and when they can be switched. Refer to
    the SQL Server Books Online if you want to perform partition switching on tables containing indexed views.
    • Referential integrity can impact the use of partition switching. First, foreign keys on other tables cannot reference the source
    table. If the source table holds the primary key, it cannot have a primary or foreign key relationship with the target table. If the target table holds the foreign key, it cannot have a primary or foreign key relationship with the source table.
    In summary, simple tables can easily accommodate partition switching. The more complexity a source or target table exhibits, the more likely that careful planning
    and extra work will be required to even make partition switching possible, let alone efficient.
    Here’s an example where we create a partitioned table using a previously created partition scheme, called Date_Range_PartScheme1.
    We then create a new, nonpartitioned table identical to the partitioned table residing on the same filegroup. We finish up switching the data from the partitioned table into the nonpartitioned table:
    CREATE TABLE TransactionHistory_Partn1 (Xn_Hst_ID int, Xn_Type char(10)) ON Date_Range_PartScheme1 (Xn_Hst_ID) ; GO CREATE TABLE TransactionHistory_No_Partn (Xn_Hst_ID int, Xn_Type
    char(10)) ON main_filegroup ; GO ALTER TABLE TransactionHistory_Partn1 SWITCH partition1 TO TransactionHistory_No_Partn; GO
    The next section shows how to use a more sophisticated, but very popular, approach to partition switching called a sliding
    window partition.
    Example and Best Practices for Managing Sliding Window Partitions
    Assume that our AdventureWorks business is booming. The sales staff, and by extension the AdventureWorks2012 database, is very busy. We noticed over time that
    the TransactionHistory table is very active as sales transactions are first entered and are still very active over their first month in the database. But the older the transactions are, the less activity they see. Consequently, we’d like to automatically group
    transactions into four partitions per year, basically containing one quarter of the year’s data each, in a rolling partitioning. Any transaction older than one year will be purged or archived.
    The answer to a scenario like the preceding one is called a sliding window partition because
    we are constantly loading new data in and sliding old data over, eventually to be purged or archived. Before you begin, you must choose either a LEFT partition function window or a RIGHT partition function window:
    1. How
    data is handled varies according to the choice of LEFT or RIGHT partition function window:
    • With a LEFT strategy, partition1 holds the oldest data (Q4 data), partition2 holds data that is 6- to 9-months old (Q3), partition3
    holds data that is 3- to 6-months old (Q2), and partition4 holds recent data less than 3-months old.
    • With a RIGHT strategy, partition4 holds the holds data (Q4), partition3 holds Q3 data, partition2 holds Q2 data, and partition1
    holds recent data.
    • Following the best practice, make sure there are empty partitions on both the leading edge (partition0) and trailing edge (partition5)
    of the partition.
    • RIGHT range functions usually make more sense to most people because it is natural for most people to to start ranges at their lowest
    value and work upward from there.
    2. Assuming
    that a RIGHT partition function windows is used, we first use the SPLIT subclause of the ALTER PARTITION FUNCTIONstatement
    to split empty partition5 into two empty partitions, 5 and 6.
    3. We
    use the SWITCH subclause
    of ALTER TABLE to
    switch out partition4 to a staging table for archiving or simply to drop and purge the data. Partition4 is now empty.
    4. We
    can then use MERGE to
    combine the empty partitions 4 and 5, so that we’re back to the same number of partitions as when we started. This way, partition3 becomes the new partition4, partition2 becomes the new partition3, and partition1 becomes the new partition2.
    5. We
    can use SWITCH to
    push the new quarter’s data into the spot of partition1.
    Tip
    Use the $PARTITION system
    function to determine where a partition function places values within a range of partitions.
    Some best practices to consider for using a slide window partition include the following:
    • Load newest data into a heap, and then add indexes after the load is finished. Delete oldest data or, when working with very large
    data sets, drop the partition with the oldest data.
    • Keep an empty staging partition at the leftmost and rightmost ends of the partition range to ensure that the partitions split when
    loading in new data, and merge, after unloading old data, do not cause data movement.
    • Do not split or merge a partition already populated with data because this can cause severe locking and explosive log growth.
    • Create the load staging table in the same filegroup as the partition you are loading.
    • Create the unload staging table in the same filegroup as the partition you are deleting.
    • Don’t load a partition until its range boundary is met. For example, don’t create and load a partition meant to hold data that is
    one to two months older before the current data has aged one month. Instead, continue to allow the latest partition to accumulate data until the data is ready for a new, full partition.
    • Unload one partition at a time.
    • The ALTER TABLE...SWITCH statement
    issues a schema lock on the entire table. Keep this in mind if regular transactional activity is still going on while a table is being partitioned.
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • Missing SIDs in X and Y tables

    We are on BI 3.5
    I loaded master data and then transactional data for 2 time periods, after which we found that we had to change display attributes to become navigational.
    I deleted all transactional data, deleted the loads of the master data, but the system did not let me delete all master data with SIDs, as the InfoObject but not its attributes were used in other cubes.
    After that I reloaded the master data and executed the attribute change run after every load. Then I started loading the transactional data again.
    While loading transactional data, I found that not all records of the X and Z table had their SIDs filled for the 2 time periods, although for other prior periods they are filled.
    Ditto for the X table - some are filled but some are not.
    What can I do to force the SIDs into the X and Y table?
    I already have executed RSDDS_AGGREGATES_MAINTAIN, but the results were not good. I must say however, that at the point when I did run it, transactional data was again in the cube.
    Any help would be appreciated,
    Arno Ghedina

    Hi, check the thread, similar kind of problem has discussed:
    Missing SID for Nav Attr

  • Move a table from one table space to another tablespace and different table

    Hi,
    I have a 60gb table nearly 200 million records in it and the table has range partition.
    inorder to archive this table we have created 3 different tables and 3 different tablespaces for the tables.
    I want to move certain partitions to tableA and certain partitions to tableB and on to tableC and on the top i'm creating a view to access these 3 tables.
    Is there any technique to move the partition wise data to different tables. is there any new technique in 11g database?
    The database is 11gr1
    linux rhel5 x-86-64
    Edited by: user8894072 on Oct 12, 2010 2:03 PM

    if i do that like each partition has some millions of records. and the undotablespace is filling out and also the temp table space is filling out. The performance is very very poor if i use the create statement.
    Insert INTO TableA (select * FROM <BASETABLE> where pay_end_dt between '01-Jan-1999' and '31-Dec-2005')
    the above statement is also degrading the performance. I just need the synatx to move the partioned wise data to new table.

  • Requests are green in the infocube but the E- and F-table are empty???

    Hallo Experts,
    we made an upgrade from 3.5 to 7.0 and have therefore a testsystem (after systemcopy we made the upgrade technical).
    So it looks good. But one InfoCube looks bad. The dim-tables are alright but the E- and F-tables are empty. So the administrator and the user doesn´t´t get data from this cube. Can someone help? You can see the copied requests and the data and we already load data but you just got the new data (after system copy).
    Thanks Santra

    You have two ways to nail this issue
    1. Use transaction SE38 to run the "SAP_FACTVIEWS_RECREATE" ABAP report.This report creates "factviews" for all InfoCubes in the system, in case these are not available.This is the fastest method.
    2. Reactivate the affected InfoCube.This may take a long time if the InfoCubes have already been filled.In this case, you should switch to option 1.
    Hope it Helps
    Chetan
    @CP..

  • Why to give  New Run Name every time for  filling up the Set UP Tables

    Hi,
    While filling up the SETUP Tables we have to  give RUN Name.
    Every time while filling the SETUP Tables we have to give New Run Name.Is there any special reason for this
    every time we have to give NEW Run Name while filling up  the SET UP Tables?
    Thanks and Regards,
    Asim
    Edited by: asim khan on Apr 19, 2011 4:09 PM
    Edited by: asim khan on Apr 19, 2011 4:11 PM

    Hi,
    Thats true but my question is why to give NEW Run name every time while filling up the SET UP Tables.
    Why it wont take  old run name . Whats the logic behind this.
    Thanks for the Reply.
    Asim

  • Clustertable and pooled table

    hi guru
    which type of data is store in cluster table and pooled table?
    what is relation between cluster and pooled table

    Hi,
    . Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)
    · Allows secondary indexes (SE11->Display Table->Indexes)
    · Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.
    II. Pool Tables (match codes, look up tables)
    · Should be accessed via primary key or
    · Should be buffered (SE11->Display Table->technical settings)
    · No secondary indexes
    · Select * is Ok because all columns retrieved anyway
    III. Cluster Tables (BSEG,BSEC)
    · Should be accessed via primary key - very fast retrieval otherwise very slow
    · No secondary indexes
    · Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.
    · Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported
    · Can not be buffered
    IV. Buffered Tables (includes both Transparent & Pool Tables)
    While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.
    "Major difference betwen Standard tables,Pooled tables and Cluster Tables?
    1.A transparent table is a table that stores data directly. You can read these tables directly on the database from outside SAP with for instance an SQL statement.
    2.Transparent table is a one to one relation table i.e. when you create one transparent table then exactly same table will create in data base and if is basically used to store transaction data.
    3.A clustered and a pooled table cannot be read from outside SAP because certain data are clustered and pooled in one field.
    4.One of the possible reasons is for instance that their content can be variable in length and build up. Database manipulations in Abap are limited as well.
    5.But pool and cluster table is a many to one relationship table. This means many pool table store in a database table which is know as table pool.
    6.All the pool table stored table in table pool does not need to have any foreign key relationship but in the case of cluster table it is must. And pool and cluster table is basically use to store application data.
    7.Table pool can contain 10 to 1000 small pool table which has 10 to 100 records. But cluster table can contain very big but few (1 to 10) cluster table.
    8.For pool and cluster table you can create secondary index and you can use select distinct, group for pool and cluster table. You can use native SQL statement for pool and cluster table.
    9.A structure is a table without data. It is only filled by program logic at the moment it is needed starting from tables.
    10.A View is a way of looking at the contents of tables. It only contains the combination of the tables at the basis and the way the data needs to be represented. You actually call directly upon the underlying tables.
    'The table which store information about Structures and Tables are as follows:
    DD02L - table properties
    DD02T - table texts
    DD03L - field properties
    DD03T - field texts
    Creating cluster/pool tables:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f0b7446011d189700000e8322d00/content.htm
    creating transparent tables
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb6e446011d189700000e8322d00/frameset.htm
    Thanks,
    Reward If Helpful.

Maybe you are looking for

  • Issue with Create BAPI - Please help

    I need to do a Create BAPI the structure is as follows:   -Orders      -Operations_create  (Afvgd - BAPI table structure) On a click of a InsertOperation button, I should be able to insert the line Items to the Operations_create node and then set the

  • Bootcamp not showing up on startup disk after upgrading to Yosemite. :(

    So after i've upgrade my macbook to Yosemite, bootcamp window won't show up when i hold on to 'alt' key during the start up. The bootcamp window also doesn't shows up in the startup disk in system preferences. Tried removing windows 7 and re-install

  • Compaq Presario CQ60-112LA: Problems with the wireless

    Hello!!! :D:D:D:D I send my greetings to the community. I want to write 2 things before to tell you about my problem: 1. I'm sorry for my English, It isn't so good. 2. I'm Newbie in Arch Linux but not in GNU/Linux (I'm not an expert ) and I've read t

  • IPad wont sync photos

    can't get ipad to sync photos, will do the first photo in a folder but the rest are not moved/copied. error comes up saying that the **.jpg format can not be displayed or supported on my ipad. took it to the apple store, they tried the re upload of i

  • Multicast Error When Starting Managed Servers

    Environment: HP-UX 11i, Weblogic 8.1 SP1.           We're getting the following error when we start managed servers in our clustered environment:           <Feb 24, 2004 6:33:12 PM CST> <Error> <Cluster> <BEA-000116> <Failed to join cluster PDICluste