MMBE table for line items

Hi experts,
I am currently developing a report same like MMBE.
Currently MMBE is showing only the current stock at the warehouse.
But i m sure there is line item behind this stock balance.
I need to develop a report to show the stock for a particular period which should map to the MMBE.
In this case i need the tables to show the line item and not the history table.
Thank you in advaced.

Hi,
Try MKPF & MSEG  tables. or FM MB_READ_MATERIAL_STOCKS
Regards,
Amit

Similar Messages

  • Table for line items for parked documents

    Hello all,
    Do anyone know what is the table for line items for parked documents(fbv3)?
    Because I check bseg and these doc. aren't there.
    Thanks a lot!

    Hi,
    Please Check table "VBSEGS" you will get parked document ine items .please check below link it will clear...
    Find tables for GLs on Parking Documents by FB60
    Thanks in advance
    Chakri

  • Table for line item in F-47 Display Document - Down Payment

    Hi,
    Can anyone please tell me from which table can I pick the values for line items. I'm developing a report in smartforms for down payment request. For header items I found out that the values are stored in table - BKPF.
    Please help..
    Regards,
    Sriram

    Hi,
    Go to Logical database through SE36 and give KDF for vendor and DDF for customer. You will get the details of tables there.
    Regards
    shankar

  • Table for line items of budget document posted through FMBB transaction.

    HI,
    I am looking for Table of line items of budget document posted through FMBB transaction.
    There is table FMBL but it is breaking the amount into 12 parts.
    Thanks.

    Hi
    check the tables
    FMBDA   
    FMBDP   
    FMBDT   
    FMBH
    BPDK
    Regards
    Anji

  • Table for line item relevancy for due list

    Hi all
    i have taken the list of orders from VF04 ,but is there any table where i can check which line item is relavant for Due list for each order?
    Regars
    Phani

    hi Rhani,
    that would be the billing index VKDFS.
    Balazs

  • Table for line item dimensions

    Hello SDN,
    Any table gives info about what all line item dimensions are used in Cubes.
    Goodday.

    hi,
    there is no table which contains info. about what are the line item dimensuins in a cube.
    use LISTSCHEMA t-code to know the tables in a cube.
    or got SE11, give Dim table name ie /BIC/D<cube name><dim no>
    serach the keyfield.
    or check directly in infocube edit.

  • Problem in bdc for table control for line items

    Hi experts,
    I am runnig a bdc for ME52.
    i am just entering PR number, in the second screen i have got all the line items. I need to select these line item 10 and double click or hit enter, it takes me to screen 3, there im just checking a checkbox and saving.
    Again i need to select the line item 20 and double click or hit enter. again the same process.
    Again repeat for all the line items.
    But my problem is it is updating everytime for only line item  10. for line item 20 and others it say "no chnge in the data".
    I am pasting my code here. please check and revert me back .plz.
    DATA: w_output LIKE LINE OF i_output.
      REFRESH I_ITAB[].
      SELECT * FROM EBAN
               INTO TABLE i_itab
               WHERE banfn in s_banfn AND
                     bsart in s_bsart AND
                     bstyp in s_bstyp AND
                     matnr in s_matnr AND
                     werks in s_werks AND
                     lfdat in s_lfdat AND
                     pstyp in s_pstyp AND
                     knttp in s_knttp AND
                     estkz in s_estkz AND
                     loekz eq ' '.
      IF sy-subrc = 0.
        CLEAR: w_itab,
                 i_poitab[].
        SORT i_itab by banfn.
        LOOP AT i_itab INTO w_itab where menge GT eban-bsmng.
          IF p_close = 'X' AND p_rep = 'X'.
            IF w_itab-ebakz = 'X'.
              w_itab-ebakz = ' '.
              APPEND w_itab to i_poitab.
            ENDIF.
          ELSEIF p_open = 'X' AND p_rep = 'X'.
            IF w_itab-ebakz = ' '.
              w_itab-ebakz = 'X'.
              APPEND w_itab to i_poitab.
            ENDIF.
          ELSEIF p_close = 'X' AND p_repw = 'X'.
            IF w_itab-ebakz = ' '.
              APPEND w_itab to i_poitab.
            ENDIF.
          ELSEIF p_open = 'X' AND p_repw = 'X'.
            IF w_itab-ebakz = 'X'.
              APPEND w_itab to i_poitab.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      LOOP AT i_poitab into w_output.
        APPEND w_output to i_output.
       PERFORM CALL_BDC.
      endloop.
    IF p_rep = 'X'.
    PERFORM CALL_BDC.
    ENDIF.
    ENDFORM.                    " GET_DATA
    *&      Form  CALL_BDC
          text
    -->  p1        text
    <--  p2        text
    FORM CALL_BDC.
    DATA: seltab(5) TYPE N,
          seltab1(2) TYPE N,
          tempvar(30) TYPE N,
          cnt TYPE N.
    LOOP AT i_output.
    clear: seltab,
           seltab1.
    seltab = i_output-bnfpo.
    seltab1 = seltab+2(2).
    perform bdc_dynpro      using 'SAPMM06B' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EBAN-BANFN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'EBAN-BANFN'
                                  i_output-banfn.
    perform bdc_dynpro      using 'SAPMM06B' '0106'.
    clear tempvar.
    *cnt = 1.
    concatenate 'EBAN-BNFPO(' seltab1 ')' into tempvar.
    perform bdc_field       using 'BDC_CURSOR'
                                 'EBAN-BNFPO(seltab1)'.
                                    tempvar.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=DETA'.
    perform bdc_field       using 'RM06B-BNFPO'
                                  i_output-bnfpo.
    perform bdc_field       using 'RM06B-TCSELFLAG(seltab1)'
                                 'X'.
    perform bdc_dynpro      using 'SAPMM06B' '0102'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EBAN-EBAKZ'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'EBAN-EBAKZ'
                                  i_output-ebakz.
    CALL TRANSACTION 'ME52' USING bdc_data MODE 'A'
                                   MESSAGES INTO i_bdcmsg.
        COMMIT WORK AND WAIT.
    ENDLOOP.
    ENDFORM.                    " CALL_BDC
    *&      Form  bdc_dynpro
          text
         -->P_0686   text
         -->P_0687   text
    FORM bdc_dynpro USING    program dynpro.
    CLEAR bdc_data.
      bdc_data-program  = program.
      bdc_data-dynpro   = dynpro.
      bdc_data-dynbegin = 'X'.
      APPEND bdc_data.
      CLEAR bdc_data.
    ENDFORM.   
    thanks,
    N

    Looks like table control logic is wrong -- do compare with below program...
    only table contril area
    REPORT ZPadmam
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
    i1 TYPE i,
    lifnr LIKE rf02k-lifnr,
    bukrs LIKE rf02k-bukrs,
    ekorg LIKE rf02k-ekorg,
    ktokk LIKE rf02k-ktokk,
    anred LIKE lfa1-anred,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    land1 LIKE lfa1-land1,
    akont LIKE lfb1-akont,
    fdgrv LIKE lfb1-fdgrv,
    waers LIKE lfm1-waers,
    END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
    j1 TYPE i,
    banks LIKE lfbk-banks,
    bankl LIKE lfbk-bankl,
    bankn LIKE lfbk-bankn,
    END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\first1.txt'
    filetype = 'DAT'
    TABLES
    data_tab = itab.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\second.txt'
    filetype = 'DAT'
    TABLES
    data_tab = jtab.
    LOOP AT itab.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-KTOKK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RF02K-LIFNR'
    itab-lifnr.
    PERFORM bdc_field USING 'RF02K-BUKRS'
    itab-bukrs.
    PERFORM bdc_field USING 'RF02K-EKORG'
    itab-ekorg.
    PERFORM bdc_field USING 'RF02K-KTOKK'
    itab-ktokk.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-LAND1'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFA1-ANRED'
    itab-anred.
    PERFORM bdc_field USING 'LFA1-NAME1'
    itab-name1.
    PERFORM bdc_field USING 'LFA1-SORTL'
    itab-sortl.
    PERFORM bdc_field USING 'LFA1-LAND1'
    itab-land1.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-KUNNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
    cnt = cnt + 1.
    CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-banks.
    CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankl.
    CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankn.
    IF cnt = 5.
    cnt = 0.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=P+'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(02)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    ENDIF.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-FDGRV'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFB1-AKONT'
    itab-akont.
    PERFORM bdc_field USING 'LFB1-FDGRV'
    itab-fdgrv.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-ZTERM'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB5-MAHNA'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFM1-WAERS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFM1-WAERS'
    itab-waers.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-LIFNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=YES'.
    PERFORM bdc_transaction USING 'XK01'.
    ENDLOOP.
    PERFORM close_group.
    Thanks
    Seshu

  • Error Handling in table control for line item.

    Hi,
    Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and  how to do background processing in call transaction.
    Thanks

    Background processing is not possible using call transaction method.
    You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
    What do you exactly mean by Error handling for Items in table control. Can you give some more details.

  • No control line for line item - error while posting bd to accounting

    Hi all,
    Billing document showing err "no control line for line item" while posting to accounting doc.Sales document is complete no in completion logs.
    Previous errr: g/l missing for line item" in order incompletion after maintaining company code for customer, then refresh the g/l missing for line item is no more logs and showing the error "no control line for line item" while posting bd to accts.
    Please help
    Regards
    anush

    Hello Anush,
    if the company data of the payer was not created when the sales order has been created, then the system could not create the correct records in table VBREVK. Once the company data has been maintained the VBREVK records could be corrected by re-saving the sales, but only if no billing document exists.
    In your case you already created the billing document.
    Please try these step:
    1. reverse billing document
    2. run VA02 add a blank char to PO number, save
    3. create new billing document
    Best regards,
    Ivano.

  • BDC For Line Items In Sales Order

    Hello,
    I have an internal table of line items which i need it to pass it to BDC for sales order line items creation. Can anybody tell me how to do this like the logic which is used to pass the field names. I just have the material number and Quantity to be passed ..
    Thanks
    Viky

    See below code for Purchase Order :
    report zpochange.
    data : i_error like bdcmsgcoll occurs 0 with header line.
    data : i_bdcdata like bdcdata occurs 0 with header line.
    tables : ekko, ekpo.
    data :c1(10) value 'ME22',
          c2(1) value ',',c3(10).
    data : var1(20). " LIKE EKKO-EBELN.
    data : var2 like ekko-ebeln.
    data : begin of i_ekko occurs 0,
              header(2),
              ebeln like ekko-ebeln,
              end of i_ekko.
    data : begin of i_ekpo occurs 0,
    item(2),
            ebeln like ekpo-ebeln,
            ebelp like ekpo-ebelp,
            menge(10), " LIKE EKPO-MENGE,
           end of i_ekpo.
    data : v like ekpo-ebelp.
    data: begin of itab occurs 0,
             text(300),
            end of itab.
    parameters: p_file like ibipparms-path.
    *PARAMETERS: PONUMBER LIKE EKPO-EBELN.
    at selection-screen on value-request for p_file.
    call function 'F4_FILENAME'
      exporting
        program_name        = syst-cprog
        dynpro_number       = syst-dynnr
       FIELD_NAME          = ' '
      importing
        file_name           = p_file
    start-of-selection.
    *SELECT EBELN FROM EKKO INTO TABLE I_EKKO WHERE EBELN = PONUMBER.
          SELECT EBELN EBELP MENGE FROM EKPO INTO TABLE I_EKPO WHERE EBELN
    *= PONUMBER.
    perform get_data.
    *LOOP AT ITAB.
    WRITE :/ ITAB.
    ENDLOOP.
    loop at itab.
    var1 = itab-text+0(1).
    if var1 = 'H'.
    *I_EKKO-EBELN = ITAB-TEXT.
    split itab at c2 into i_ekko-header
                           i_ekko-ebeln.
    SPLIT  ITAB AT ',' INTO I_EKKO-EBELN.
                        " I_EKPO-EBELP
                        " I_EKPO-MENGE
                        " var1.
    append i_ekko.
    else.
    split itab at c2 into i_ekpo-item
                            i_ekpo-ebeln
                            i_ekpo-ebelp
                            i_ekpo-menge.
    append i_ekpo.
    endif.
    *var2 = i_ekpo-ebeln.
      MOVE VAR1 TO I_EKPO-EBELN.
      MOVE VAR1 TO I_EKKO-EBELN.
    APPEND: I_EKPO.
    *if not var1 is initial.
        split var1 at ',' into i_ekpo-ebelp
                               i_ekpo-menge.
      i_ekpo-ebeln = var2.
    append i_ekpo.
    *endif.
    endloop.
    loop at i_ekpo.
    write :/ i_ekpo.
    endloop.
    loop at i_ekko.
    perform fill_data. " TABLES I_EKPO.
    endloop.
    LOOP AT I_EKPO.
    WRITE :/ I_EKPO.
    ENDLOOP.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    *LOOP AT I_ERROR.
    WRITE :/ I_ERROR.
    ENDLOOP.
    form get_data.
    call function 'WS_UPLOAD'
    exporting
       codepage                      = ' '
       filename                      = p_file
       filetype                      = 'ASC'
       headlen                       = ' '
       line_exit                     = ' '
       trunclen                      = ' '
       user_form                     = ' '
       user_prog                     = ' '
       dat_d_format                  = ' '
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = itab
    exceptions
       conversion_error              = 1
       file_open_error               = 2
       file_read_error               = 3
       invalid_type                  = 4
       no_batch                      = 5
       unknown_error                 = 6
       invalid_table_width           = 7
       gui_refuse_filetransfer       = 8
       customer_error                = 9
       others                        = 10
    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.                    " GET_DATA
    *&      Form  FILL_DATA
          text
         -->P_I_EKPO  text
    form fill_data. " tables   i_ekpo .
    perform bdcscreen using 'SAPMM06E' '0105'.
    perform bdcfield using 'RM06E-BSTNR' i_ekko-ebeln.
    perform bdcfield using 'BDC_OKCODE' '/00'.
    loop at i_ekpo where ebeln = i_ekko-ebeln.
      V = I_EKPO-EBELP.
    perform bdcscreen using 'SAPMM06E' 0120.
    perform bdcfield using 'BDC_CURSOR' 'RM06E-EBELP'.
    perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
    perform bdcfield using 'BDC_OKCODE' '/00'.
    perform bdcscreen using 'SAPMM06E' 0120.
    perform bdcfield using 'BDC_CURSOR' 'EKPO-MENGE(01)'.
    perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
    perform bdcfield using 'EKPO-MENGE(01)' i_ekpo-menge.
    perform bdcfield using 'BDC_OKCODE' '/00'.
    *PERFORM BDCSCREEN USING 'SAPMM06E' 0120.
    *PERFORM BDCFIELD USING 'BDC_CURSOR'  'RMO6E-EBELP'.
    *CLEAR V.
    endloop.
    perform bdcfield using 'BDC_OKCODE' '=BU'.
    call transaction  c1 using i_bdcdata mode 'A'
                                       messages into i_error.
    refresh i_bdcdata.
    endform.                    " FILL_DATA
    *&      Form  BDCSCREEN
          text
         -->P_0140   text
         -->P_0120   text
    form bdcscreen using    p_program p_screen.
    i_bdcdata-program = p_program.
    i_bdcdata-dynpro = p_screen.
    i_bdcdata-dynbegin = 'X'.
    append i_bdcdata.
    clear i_bdcdata.
    endform.                    " BDCSCREEN
    *&      Form  BDCFIELD
          text
         -->P_0145   text
         -->P_I_EKPO_EBELN  text
    form bdcfield using    fnam fval.
    i_bdcdata-fnam = fnam.
    i_bdcdata-fval = fval.
    append i_bdcdata.
    clear i_bdcdata.
    endform.                    " BDCFIELD
    I hope same thing for sales order ,i mean both has Table control
    Reward Points if it is helpful
    Thanks
    Seshu

  • Adding a characteristics to AR Drill down report for line items

    I have raised an OSS note on this, but they deem this to be consulting.
    I have an AR drill down report for line items
    It calls the structure RFRRD20.
    I need to add a value into the characteristics so I can use it in the drill down report.
    I have appended the structure, added a value in TKAF for the field, and it still does not show.
    Has anybody done something similar?
    I am sure this is easy, but only when you know how, so if you know how to do it please can you let me know.
    thanks
    Mark

    Hi Mark
        I am also in the same situation where i need to add two characteristics (invoice date, due date) to the AR drill down reports. I added them to the structure and TKAF table as you did, but still could not get them to the drill down reports (FDI5 or FI1).
       From your posts, i see that SAP's response was that it is not possible to add characteristics to AR drilldown reports? Did they mention any reasons or OSS notes? How did you handle your requirement, were you able to work around?
       Your suggestions would be highly appreciated.
    Thanks
    Vamsi

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • How can i decide candidates for line item dimension?

    1Q): we have many infocubes out of all these infocubes, i have to decide which infocubes are the candidates for lineitem dimension? How to do it? Please tell me the technical specs how to do the analysis to find out the candidates for line item dimension?
    2Q): if i have the small dimension can i combine all these dimension in to one dimension? what is the benefit of doing this? how to find out which dimensions are small?
    <u>Pizzaman i like to hear from you on this topic</u>. Thanks to SDN Community. i appreciate your help. Again Thank you.

    The process of figuring out what you might want to create as a line item dimension can vary a bit, it can depend a lot on your exisitng level of domain expertise (how well do you know the data in question). If you are familiar with the data, I would recommend you just take an initial guess at what you believe could be line item dimensions.  If you are not familiar witht the data, you might want to examine the source more to understand the cardinality of different characteristics and identify any relationships between characteristics. 
    I really encourage people to just go ahead and model it and load some data and review, rather than agonizing over developing the theoretically perfect model on paper before they start. You learn a lot more that way.
    Any of the SAP rules of thumb, are just that, general rules, not a pronouncement from God.  There are always extenuating or unique circumstances that might warrant disregarding the rule, e.g. if the InfoCube will never become very large, maybe some of the concerns just are not worth your effort.
    With every release of the Oracle (and the other DBs too)Oracle keeps getting better at data warehousing and star schemas. Oracle 10i is supposed to have made handling bitmap indices much more efficient, which is on of the  factors influencing the decision to create a line item dimension.      
    There are other threads on SDN on line item dims that provide more technical detail and can help answer you first question
    As far as 2Q - generally, it's better to have several small dimensions than one larger dimension. But having said that, combining a few <b>very small dimensions</b> into another  slightly larger (<i>but still small</i>) dimension is a good idea. It keeps the number of table joins down which will improve query performance. You would do this with characterisitcs that have very few values, e.g. yes/no indicators.
    e.g.
    You have 8 characteristics that all of which have only two values. You put them in one dimension, and the max size of the dimension table is still only 2x2x2x2x2x2x2x2 or 256 rows.  If you had these characteristics in other much larger dimensions, it's not hard to see it causing those dimensions to double, perhaps creating hundreds of thousands of dimension table rows to be created.
    For more - read   <a href="http://www.kimballgroup.com/html/designtipsPDF/DesignTips2003/KimballDT48DeClutter.pdf">Ralph Kimball Design Tip 48 - Junk Dimensions</a>

  • Subtotal for line item in REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Hi Abapers,
    Is it possible to have subtotal functionality for line item for
    REUSE_ALV_HIERSEQ_LIST_DISPLAY.
    when i select particular line item and press subtotal button
    system displaying information mesage
    "Subtotals cannot be calculated using item
    characteristics"
    Even when  i executed  standard hie program same message displaying for line item.
    please provide any sample code for subtotal for line item .
    regards,
    Hari priya

    just copy the program and execute
    *& Report  Z_HIERSEQ_REP2                                              *
    *& author : ramesh.k                                                                    *
    *& title  : hierseq list in alv format                                                                    *
    REPORT  z_hierseq_rep2 MESSAGE-ID zrae.
    TYPE-POOLS : slis.
    *structure declarations
    *structure for likp
    TYPES : BEGIN OF ty_likp,
             vbeln TYPE vbeln_vl,
             vkorg TYPE vkorg,
             END OF ty_likp.
    *structure for lips
    TYPES : BEGIN OF ty_lips,
             vbeln TYPE vbeln_vl,
             posnr TYPE posnr_vl,
             matnr TYPE matnr,
             matkl TYPE matkl,
             ntgew TYPE ntgew_15,
             END OF ty_lips.
    *internal table declarations
    DATA : t_likp TYPE STANDARD TABLE OF ty_likp INITIAL SIZE 0,
           t_lips TYPE STANDARD TABLE OF ty_lips INITIAL SIZE 0.
    DATA : t_fieldcat TYPE slis_t_fieldcat_alv,
           t_sortinfo TYPE slis_t_sortinfo_alv,
           i_events TYPE slis_t_event.
    *workareas
    DATA : w_likp TYPE ty_likp,
           w_lips TYPE ty_lips,
           w_fieldcat TYPE slis_fieldcat_alv,
           w_keyinfo TYPE slis_keyinfo_alv,
           w_sortinfo TYPE slis_sortinfo_alv,
           W_event TYPE slis_alv_event ,
           sub_text type slis_subtot_text.
    *global declarations.
    DATA : g_vbeln like likp-vbeln.
    *selection-screen declarations
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    SELECT-OPTIONS : s_vbeln FOR g_vbeln.
    SELECTION-SCREEN END OF BLOCK blk1.
    AT SELECTION-SCREEN.
      SELECT SINGLE
             vbeln
             FROM likp
             INTO (w_likp-vbeln)
             WHERE vbeln IN s_vbeln.
      IF sy-subrc NE 0.
        MESSAGE i001 WITH 'vbeln not found'.
      ENDIF.
    START-OF-SELECTION.
    get_data_likp
      PERFORM sub_getdata_likp.
    get_data_lips
      PERFORM sub_getdata_lips.
    fieldcatlog_build
      PERFORM build_fieldcatlog.
    *SORTINFO FOR SUBTOTALS
      PERFORM get_sortinfo.
    *KEYINFORMATION
      PERFORM get_keyinfo.
    *LIST DISPLAY
      PERFORM alv_list_display.
    *&      Form  sub_getdata_likp
        extracting the data from likp.
    -->  p1        text
    <--  p2        text
    FORM sub_getdata_likp .
      SELECT vbeln
             vkorg
             FROM likp
             INTO TABLE t_likp
             WHERE vbeln IN s_vbeln.
    ENDFORM.                    " sub_getdata_likp
    *&      Form  sub_getdata_lips
       extracting data from lips.
    -->  p1        text
    <--  p2        text
    FORM sub_getdata_lips .
      SELECT vbeln
             posnr
             matnr
             matkl
             ntgew
             FROM lips
             INTO TABLE t_lips
             FOR ALL ENTRIES IN t_likp
             WHERE vbeln = t_likp-vbeln.
    ENDFORM.                    " sub_getdata_lips
    *&      Form  build_fieldcatlog
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatlog .
    *FIELDCATLOG FOR HEADER TABLE
      PERFORM build_fieldcatlog1 USING :
                     '1' 'VBELN' 'DELIVERY NO' 'T_LIKP' ' ' ' ' ' ',
                     '2' 'VKORG' 'GROUP'       'T_LIKP' ' ' ' ' ' ',
    *FIELDCATLOAG FOR ITEM TABLE
                     '1' 'POSNR' 'ITEM NO' 'T_LIPS' ' ' ' ' ' ',
                     '2' 'MATNR' 'MAT NO'  'T_LIPS' ' ' ' ' ' ',
                     '3' 'MATKL' 'GROUP'   'T_LIPS' ' ' ' ' ' ',
                     '4' 'NTGEW' 'QUAN'    'T_LIPS' 'X' 'X' 'X'.
    ENDFORM.                    " build_fieldcatlog
    *&      Form  build_fieldcatlog1
          text
         -->P_0185   text
         -->P_0186   text
         -->P_0187   text
         -->P_0188   text
    FORM build_fieldcatlog1  USING
                                  pcol     TYPE char2
                                  pfldname TYPE char8
                                  pseltext TYPE char20
                                  ptabname TYPE char10
                                  psum     TYPE char10
                                  PQUAN    TYPE CHAR15
                                  PSUBTOTAL TYPE CHAR40.
      w_fieldcat-col_pos = pcol.
      w_fieldcat-fieldname = pfldname.
      w_fieldcat-seltext_m = pseltext.
      w_fieldcat-tabname = ptabname.
      w_fieldcat-do_sum = psum.
      W_FIELDCAT-qfieldname = PQUAN.
    W_FIELDCAT-subtotals_text = PSUBTOTAL.
      APPEND w_fieldcat TO t_fieldcat.
    ENDFORM.                    " build_fieldcatlog1
    *&      Form  GET_KEYINFO
          text
    -->  p1        text
    <--  p2        text
    FORM get_keyinfo .
      w_keyinfo-header01 = 'VBELN'.
      w_keyinfo-item01   = 'VBELN'.
    ENDFORM.                    " GET_KEYINFO
    *&      Form  ALV_LIST_DISPLAY
          text
    FORM alv_list_display .
    DATA : S_REPID TYPE SY-REPID.
           S_REPID = SY-REPID.
    DATA W_LAYOUT TYPE SLIS_LAYOUT_ALV.
    W_LAYOUT-totals_text = 'G.TOTAL'.
    W_LAYOUT-subtotals_text = 'SUBTOTAL_TEXT'.
    *FORM subtotal_text CHANGING p_total TYPE any
                               p_subtot_text TYPE slis_subtot_text.
    p_subtot_text-criteria = 'VBELN'.
    *p_subtot_text-max_len = 40.
    *p_subtot_text-display_text_for_subtotal
    *= 'SUBTOTAL'.
    **ENDIF.
    *ENDFORM.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK              = ' '
         i_callback_program             = S_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
       IS_LAYOUT                      = W_LAYOUT
         it_fieldcat                    = t_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
         it_sort                        = t_sortinfo
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
       I_SAVE                         = 'X'
      IS_VARIANT                     =
       IT_EVENTS                      = i_eventS
      IT_EVENT_EXIT                  =
          i_tabname_header               = 'T_LIKP'
          i_tabname_item                 = 'T_LIPS'
      I_STRUCTURE_NAME_HEADER        =
      I_STRUCTURE_NAME_ITEM          =
          is_keyinfo                     = w_keyinfo
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab_header                = t_likp
          t_outtab_item                  = t_lips
    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.                    " ALV_LIST_DISPLAY
    *&      Form  GET_SORTINFO
          text
    -->  p1        text
    <--  p2        text
    FORM get_sortinfo .
      w_sortinfo-fieldname = 'VBELN'.
      w_sortinfo-tabname   = 'T_LIKP'.
    W_SORTINFO-group     = TEXT-001.
      w_sortinfo-subtot    = 'X'.
      APPEND w_sortinfo  TO t_sortinfo.
    ENDFORM.                    " GET_SORTINFO

  • Need a scenario where we go for line item diemension?

    can anyone explain the senario where we use the line item dimension ?
    and how we know that size of dimension is more than fact tablw?

    Hi
    You need to roughly estimate that if you put two characteristics in one dimension means,
    say plant and material
    say there are 100 plants and 1000 materials...
    then your dimension table will have 100 * 1000 = 100000 entries.so your fact table need to contain 100000 entries for these two chars...
    .instead of putting these two into one dimension...if you put two dimensions...total entries in two dimensions are 100 + 1000= 1100...so your fact table contains 1100 entries...right???
    so you need to think like this...if you feel that  a characteristic may contains high cardinality then you have to go for line item dimension
    run program
    sap_infocube_designs
    this will give the fact to dimension rations of all your cubes and indicate if the cube is balanced or not.
    Hope it helps
    Thanks
    Teja
    Message was edited by:
            Teja badugu

Maybe you are looking for