Regarding line item in bdc

Hi,
     I tried bdc for transaction mfbf.
     After entering all values and entering into post   with correction the line item exists.
     Here using counter in bdc the batches are entered.
      say,
           (01),
           (02),
           (15).
     But after pressing page down.
     The line item changes to (02). and values are get
     stored in (02) of first page.
    Here i am facing some difficulty.
   Is there any possibility to rectify these.
   If there please send me...

Hello Shiba,
Try to do the recording again, but if you need to insert a new record in the table click the botton to add a new row, it will be always adding the data in the firts row, and the others will scrool down automatacally,
Hope this helps,
Gabriel. P

Similar Messages

  • Regarding line-item-dimention

    hi,
    plz clarify my doubt regarding line-item-dimention.
    When line-item Dimensions are used without containing the line-item characteristic in the aggregate, which aggregate should be built?
    thanks,
    Neelima.

    Hi Nl .G
    Aggregates can be built out of other aggregates to reduce the amount of data to be read and, hence, to improve the roll-up performance Aggregate hierarchy is determined automatically. 
    In order to use an aggregate in the first place, it must be defined activated and filled. When you activate it, the required tables are created in the database from the aggregate definition. Technically speaking, an aggregate is actually a separate BasicCube with its own fact table and dimension tables. Dimension tables that agree with the InfoCube are used together. Upon creation, every aggregate is given a six-digit number that starts with the figure1.
    am sure using basic aggreate will solve this issue..Try and let me know..
    any furthur info you can read from the given link..
    [Aggregates|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cbd2d390-0201-0010-8eab-a8a9269a23c2]
    Edited by: Prasanna Kumar Perla on Aug 4, 2008 1:52 PM

  • Regarding line item dimension

    Hi all,
    what are the necessary prerequisities will u take regarding line item dimension.
    for eg., for sd cubes we r using sales doc no., i.obj as a line item dimension? why can't the other i.obj?
    plz explain me clearly?
    Thanks & Regards,
    V.Vijay.

    HI,
    Line Item and High Cardinality
    When compared to a fact table, dimensions ideally have a small cardinality. However, there is an exception to this rule. For example, there are InfoCubes in which a characteristic document is used, in which case almost every entry in the fact table is assigned to a different document. This means that the dimension (or the associated dimension table) has almost as many entries as the fact table itself. We refer here to a degenerated dimension. In BW 2.0, this was also known as a line item dimension, in which case the characteristic responsible for the high cardinality was seen as a line item. Generally, relational and multi-dimensional database systems have problems to efficiently process such dimensions. You can use the indicators line item and high cardinality to execute the following optimizations:
    Line Item Dimensions
    Line item: This means the dimension contains precisely one characteristic. This means that the system does not create a dimension table. Instead, the SID table of the characteristic takes on the role of dimension table. Removing the dimension table has the following advantages:
    ¡        When loading transaction data, no IDs are generated for the entries in the dimension table. This number range operation can compromise performance precisely in the case where a degenerated dimension is involved.
    ¡        A table- having a very large cardinality- is removed from the star schema. As a result, the SQL-based queries are simpler. In many cases, the database optimizer can choose better execution plans.
    Nevertheless, it also has a disadvantage: A dimension marked as a line item cannot subsequently include additional characteristics. This is only possible with normal dimensions.
    High Cardinality
    If your dim table size exceeds the 20% of your fact table then you can say it as high cardinality, for ex: your fact table contains 100 records and your customer dimension contains 25 records means this dim is with high cardinality. you can check with your client for the expected records for those dimensions or for the info objects which you define in one dimension. to know the sizes of the dimension tables and fact tables you can runa a program in SE37 SAP_INFOCUBE_DESIGNS, it displays all your info cubes fact and dimension tables with sizes, if any dimension exceeds the more than 10% to 20% it will be in RED.
    It means that the dimension is to have a large number of instances (that is, a high cardinality). This information is used to carry out optimizations on a physical level in depending on the database platform. Different index types are used than is normally the case. A general rule is that a dimension has a high cardinality when the number of dimension entries is at least 20% of the fact table entries. If you are unsure, do not select a dimension having high cardinality.
    http://help.sap.com/saphelp_nw04/helpdata/en/b2/fbb859c64611d295dd00a0c929b3c3/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/a7/d50f395fc8cb7fe10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/d14d3c306f090ae10000000a11405a/frameset.htm
    Note: In SAP BW 3.0, the term line item dimension from SAP BW 2.0 must a) have precisely one characteristic and b) this characteristic must have a high cardinality. Before, the term line item dimension was often only associated with a). Hence the inclusion of this property in the above. Be aware that a line item dimension has a different meaning now than in SAP BW2.0.
    SAP recommends that you use ODS objects, where possible, instead of InfoCubes for line items.
    Tarak

  • How to upload a file which has more than 999 line item  through BDC ?

    Hello Techards
    Hi to all
    Can any body tell me how to upload a file which has more than 999 line item  through BDC for traction F-02 ?
    Thanks in advance.
    Shovan

    Hello Shovan,
    You split it up to post two accounting documents with the help of a "suspense" a/c.
    Say, you have to post the following line items below:
    line 1 - dr. - GL a/c X - $1000
    line 2 - cr. - GL a/c Y - $1
    line 3 - cr. - GL a/c Y - $1
    line 1001 - cr. - GL a/c Y - $1
    You cannot post the above as a single doc in SAP (because of technical reasons), so you need to break it up into 2 documents as below:
    Doc1
    line 1 - dr - GL a/c X - $1000
    line 2 - cr - GL a/c Y - $1
    line 3 - cr - GL a/c Y - $1
    line 998 - cr - GL a/c Y - $1
    line 999 - cr - SUSPENSE a/c - $3
    Doc2
    line 1 - dr - SUSPENSE a/c - $3
    line 2 - cr - GL a/c Y - $3
    Note that there is no incorrect impact on accounting as first we credit suspense a/c by $3 and next we debit the same suspense a/c by $3 as a result the effect is nil. Similarly, we credit $997 to GL a/c Y (which is less by $3) in the first doc which is compensated by the second doc by crediting the shortfall of $3.
    Hope this helps,
    Cheers,
    Sougata.

  • More than 1 line items in bdc using table controls for BOM

    Hi....
    how do u update more than one line item for BOM using BDC table control.......
    is there any specific command for doing that.......
    hav tried d following code bt it takes the flatfile i/p FOR 2 LINE ITEMS as 2 different BOM'S.....
    would appreciate ur help....plz provide code.............
    REPORT zbdc4_cs01
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    INCLUDE bdcrecx1.
    DATA : a TYPE i,
           b type i,
           c type i.
    DATA : BEGIN OF it_rec OCCURS 0,
           rec(200) TYPE c,
           END OF it_rec.
    DATA : BEGIN OF ctab OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
           END OF ctab.
    DATA : BEGIN OF xtab OCCURS 0,
           idnrk(18),
           menge(13),
           postp(1),
           END OF xtab.
    DATA : BEGIN OF itab OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
           idnrk(18),
           menge(13),
           postp(1),
           END OF itab.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = 'C:/TEST4.TXT'
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_rec.
      LOOP AT  it_rec.
        a = strlen( it_rec-rec ).
        if a = 55.
        itab-matnr = it_rec-rec+0(18).
        itab-werks = it_rec-rec+18(4).
        itab-stlan = it_rec-rec+22(1).
        itab-idnrk = it_rec-rec+23(18).
        itab-menge = it_rec-rec+41(13).
        itab-postp = it_rec-rec+54(1).
        APPEND itab.
        elseif a > 55.
        itab-matnr = it_rec-rec+0(18).
        itab-werks = it_rec-rec+18(4).
        itab-stlan = it_rec-rec+22(1).
        itab-idnrk = it_rec-rec+23(18).
        itab-menge = it_rec-rec+41(13).
        itab-postp = it_rec-rec+54(1).
        APPEND itab.
        itab-idnrk = it_rec-rec+55(18).
        itab-menge = it_rec-rec+73(13).
        itab-postp = it_rec-rec+86(1).
        APPEND itab.
        endif.
      ENDLOOP.
      PERFORM open_group.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29N-STLAN'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29N-MATNR'
                                       itab-matnr.           "'3000000107'.
        PERFORM bdc_field       USING 'RC29N-WERKS'
                                       itab-werks.              "'UN02'.
        PERFORM bdc_field       USING 'RC29N-STLAN'
                                       itab-stlan.              "'1'.
        PERFORM bdc_field       USING 'RC29N-STLAL'
        PERFORM bdc_field       USING 'RC29N-DATUV'
                                      '11.08.2008'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0110'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29K-BMENG'
                                      '1'.
        PERFORM bdc_field       USING 'RC29K-STLST'
                                      '1'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29K-EXSTL'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0111'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29K-LABOR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSTP(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RC29P-IDNRK(01)'
                                       itab-idnrk.             "'1000000232'.
        PERFORM bdc_field       USING 'RC29P-MENGE(01)'
                                       itab-menge.              "'100'.
        PERFORM bdc_field       USING 'RC29P-POSTP(01)'
                                       itab-postp.             "'L'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0130'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR'.
        PERFORM bdc_field       USING 'RC29P-POSNR'
                                      '0010'.
        PERFORM bdc_field       USING 'RC29P-IDNRK'
                                      '1000000232'.
        PERFORM bdc_field       USING 'RC29P-MENGE'
                                      '100'.
        PERFORM bdc_field       USING 'RC29P-MEINS'
                                      'KG'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0131'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POTX1'.
        PERFORM bdc_field       USING 'RC29P-SANKA'
                                      'X'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RC29P-POSNR(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=FCBU'.
        PERFORM bdc_transaction USING 'CS01'.
      ENDLOOP.
      PERFORM close_group.

    Hi
    Check this sample code for the Table Control in BDC:
    data: fnam(20) type c.
    move 1 to id.
        loop at TI_STAGING WHERE VENDOR = IT_STAGING-VENDOR AND DOCDATE = IT_STAGING-DOCDATE.
          concatenate 'RM06E-EPSTP(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-itmcategory.
          concatenate 'EKPO-KNTTP(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-accassignment.
          concatenate 'EKPO-EMATN(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-material.
          concatenate 'EKPO-TXZ01(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-shortxt.
          quan = ti_staging-poqty.
          concatenate 'EKPO-MENGE(0' id ')' into fnam.
          perform bdc_field       using fnam quan.
          concatenate 'RM06E-EEIND(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-deliverydate.
          netpr = ti_staging-netpr.
          concatenate 'EKPO-NETPR(0' id ')' into fnam.
          perform bdc_field       using fnam netpr.
          concatenate 'EKPO-MATKL(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-mategroup.
          concatenate 'EKPO-WERKS(0' id ')' into fnam.
          perform bdc_field       using fnam TI_STAGING-plant.
          ID = ID + 1.
        ENDLOOP.
    Regards,
    Vishwa.

  • Regarding Line Items posting in LSMW

    Hi
       Can You let me know the procedure that how we can post the data realted to the line items using LSMW technique.
    Regards,
    kumar

    LSMW cannot be used for data involving table control. U need to go in for a BDC session method for better performance .

  • Multiple line items in BDC

    Hi Friends
    I'm doing a BDC .... in the recording I have found that I've to change different line items.. the part of recording in which I'm facing problem is as below:
    BDC_CURSOR     VBAP-ABGRU(06)
    VBAP-ABGRU(01)     10
    VBAP-ABGRU(02)     10
    VBAP-ABGRU(03)     10
    VBAP-ABGRU(04)     10
    VBAP-ABGRU(05)     10
    VBAP-ABGRU(06)     10
    now I have counted the item nos in a variable v_count. While filling the internal table of BDCdata how will i approach to fill different line items here as shown above.. for 1 item I have no prob....but for n no of items what will be the code of filling bdctab... please let me know....
    Thanks
    Moumita

    Hi moumita ....
    Plz have a look......
    How to deal with table control / step loop in BDC?
    Steploop and table contol is inevitable in certain transactions. When we run BDC for such transactions, we will face the situation: how many visible lines of steploop/tablecontrol are on the screen? Although we can always find certain method to deal with it, such as function code 'NP', 'POPO', considering some extreme situation: there is only one line visible one the screen,
    our BDC program should display an error message. (See transaction 'ME21', we you resize your screen to let only one row visible, you can not enter mutiple lines on this screen even you use 'NP')
    Now, I find a method with which we can determine the number of visible lines on Transaction Screen from our Calling BDC program. Maybe it is useless to you, but I think it will give your some idea.
    Demo ABAP code has two purposes:
    1. how to determine number of visible lines and how to calculte page number; (the 'calpage' routine has been modify to meet general purpose usage)
    2. using field symbol in BDC program, please pay special attention to the difference in Static
    ASSIGN and Dynamic ASSIGN.
    Now I begin to describe the step to implement my method:
    (I use transaction 'ME21', screen 121 for sample, the method using is Call Transation Using..)
    Step1: go to screen painter to display the screen 121, then we can count the fixed line on this screen, there is 7 lines above the steploop and 2 lines below the steploop, so there are total 9 fixed lines on this screen. This means except these 9 lines, all the other line is for step loop.
    Then have a look at steploop itselp, one entry of it will occupy two lines.
    (Be careful, for table control, the head and the bottom scroll bar will possess another two fixed lines, and there is a maximum number for table line)
    Now we have : FixedLine = 9
    LoopLine = 2(for table control, LoopLine is always equal to 1)
    Step2: go to transaction itself(ME21) to see how it roll page, in ME21, the first line of new page is always occupied by the last line of last page, so it begin with index '02', but in some other case, fisrt line is empty and ready for input.
    Now we have: FirstLine = 0
    or FirstLine = 1 ( in our case, FirstLine is 1 because the first line of new page is fulfilled)
    Step3: write a subroutine calcalculating number of pages
    (here, the name of actual parameter is the same as formal parameter)
    global data: FixedLine type i, " number of fixed line on a certain screen
    LoopLine type i, " the number of lines occupied by one steploop item
    FirstLine type i, " possbile value 0 or 1, 0 stand for the first line of new
    " scrolling screen is empty, otherwise is 1
    Dataline type i, " number of items you will use in BDC, using DESCRIBE to get
    pageno type i, " you need to scroll screen how many times.
    line type i, " number of lines appears on the screen.
    index(2) type N, " the screen index for certain item
    begin type i, " from parameter of loop
    end type i. " to parameter of loop
    *in code sample, the DataTable-linindex stands for the table index number of this line
    form calpage using FixedLine type i (see step 1)
    LoopLine type i (see step 1)
    FirstLine type i (see step 2)
    DataLine type i ( this is the item number you will enter in transaction)
    changing pageno type i (return the number of page, depends on run-time visible line in table control/ Step Loop)
    changing line type i.(visible lines one the screen)
    data: midd type i,
    vline type i, "visible lines
    if DataLine eq 0.
    Message eXXX.
    endif.
    vline = ( sy-srows - FixedLine ) div LoopLine.
    *for table control, you should compare vline with maximum line of
    *table control, then take the small one that is min(vline, maximum)
    *here only illustrate step loop
    if FirstLine eq 0.
    pageno = DataLine div vline.
    if pageno eq 0.
    pageno = pageno + 1.
    endif.
    elseif FirstLine eq 1.
    pageno = ( DataLine - 1 ) div ( vline - 1 ) + 1.
    midd = ( DataLine - 1 ) mod ( vline - 1).
    if midd = 0 and DataLine gt 1.
    pageno = pageno - 1.
    endif.
    endif.
    line = vline.
    endform.
    Step4 write a subroutine to calculate the line index for each item.
    form calindex using Line type i (visible lines on the screen)
    FirstLine type i(see step 2)
    LineIndex type i(item index)
    changing Index type n. (index on the screen)
    if FirstLine = 0.
    index = LineIndex mod Line.
    if index = '00'.
    index = Line.
    endif.
    elseif FirstLine = 1.
    index = LineIndex mod ( Line - 1 ).
    if ( index between 1 and 0 ) and LineIndex gt 1.
    index = index + Line - 1.
    endif.
    if Line = 2.
    index = index + Line - 1.
    endif.
    endif.
    endform.
    Step5 write a subroutine to calculate the loop range.
    form calrange using Line type i ( visible lines on the screen)
    DataLine type i
    FirstLine type i
    loopindex like sy-index
    changing begin type i
    end type i.
    If FirstLine = 0.
    if loopindex = 1.
    begin = 1.
    if DataLine <= Line.
    end = DataLine.
    else.
    end = Line.
    endif.
    elseif loopindex gt 1.
    begin = Line * ( loopindex - 1 ) + 1.
    end = Line * loopindex.
    if end gt DataLine.
    end = DataLine.
    endif.
    endif.
    elseif FirstLine = 1.
    if loopindex = 1.
    begin = 1.
    if DataLine <= Line.
    end = DataLine.
    else.
    end = Line.
    endif.
    elseif loop index gt 1.
    begin = ( Line - 1 ) * ( loopindex - 1 ) + 2.
    end = ( Line - 1 ) * ( loopindex - 1 ) + Line.
    if end gt DataLine.
    end = DataLine.
    endif.
    endif.
    endif.
    endform.
    Step6 using field sysbol in your BDC, for example: in ME21, but you should calculate each item will correponding to which index
    form creat_bdc.
    field-symbols: <material>, <quan>, <indicator>.
    data: name1(14) value 'EKPO-EMATN(XX)',
    name2(14) value 'EKPO-MENGE(XX)',
    name3(15) value 'RM06E-SELKZ(XX)'.
    assign: name1 to <material>,
    name2 to <quan>,
    name3 to <indicator>.
    do pageno times.
    if sy-index gt 1
    *insert scroll page ok_code"
    endif.
    perform calrange using Line DataLine FirstLine sy-index
    changing begin end.
    loop at DataTable from begin to end.
    perform calindex using Line FirstLine DataTable-LineIndex changing Index.
    name1+11(2) = Index.
    name2+11(2) = Index.
    name3+12(2) = Index.
    perform bdcfield using <material> DataTable-matnr.
    perform bdcfield using <quan> DataTable-menge.
    perform bdcfield using <indicator> DataTable-indicator.
    endloop.
    enddo.
    Sample code
    Following is a sample code of handling table control in BDC.
    REPORT Y730_BDC5 .
    *HANDLING TABLE CONTROL IN BDC
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
    DUMMY(100) TYPE C,
    END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
    LIFNR(10) TYPE C,
    BUKRS(4) TYPE C,
    EKORG(4) TYPE C,
    KTOKK(4) TYPE C,
    NAME1(30) TYPE C,
    SORTL(10) TYPE C,
    LAND1(3) TYPE C,
    SPRAS(2) TYPE C,
    AKONT(6) TYPE C,
    FDGRV(2) TYPE C,
    WAERS(3) TYPE C,
    END OF IT_XK01,
    BEGIN OF IT_BANK OCCURS 0,
    BANKS(3) TYPE C,
    BANKL(10) TYPE C,
    BANKN(10) TYPE C,
    KOINH(30) TYPE C,
    LIFNR(10) TYPE C,
    END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    FILENAME = 'C:\VENDOR.TXT'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = IT_DUMMY.
    LOOP AT IT_DUMMY.
    IF IT_DUMMY-DUMMY+0(2) = '11'.
    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
    APPEND IT_XK01.
    ELSE.
    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
    APPEND IT_BANK.
    ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro using 'SAPMF02K' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-REF_LIFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    IT_XK01-LIFNR.
    perform bdc_field using 'RF02K-BUKRS'
    IT_XK01-BUKRS.
    perform bdc_field using 'RF02K-EKORG'
    IT_XK01-EKORG.
    perform bdc_field using 'RF02K-KTOKK'
    IT_XK01-KTOKK.
    perform bdc_dynpro using 'SAPMF02K' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-TELX1'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFA1-NAME1'
    IT_XK01-NAME1.
    perform bdc_field using 'LFA1-SORTL'
    IT_XK01-SORTL.
    perform bdc_field using 'LFA1-LAND1'
    IT_XK01-LAND1.
    perform bdc_field using 'LFA1-SPRAS'
    IT_XK01-SPRAS.
    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-KOINH(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    DATA : FNAM(20) TYPE C,
    IDX TYPE C.
    MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
    CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKS.
    CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKL.
    CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKN.
    CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-KOINH.
    IDX = IDX + 1.
    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'
    IT_XK01-AKONT.
    perform bdc_field using 'LFB1-FDGRV'
    IT_XK01-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'
    IT_XK01-WAERS.
    perform bdc_dynpro using 'SAPMF02K' '0320'.
    perform bdc_field using 'BDC_CURSOR'
    'WYT3-PARVW(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
    MODE 'A'
    UPDATE 'S'
    MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-PROGRAM = PROG.
    IT_BDCDATA-DYNPRO = SCR.
    IT_BDCDATA-DYNBEGIN = 'X'.
    APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-FNAM = FNAM.
    IT_BDCDATA-FVAL = FVAL.
    APPEND IT_BDCDATA.
    ENDFORM.
    Regards Kaushik Datta

  • Standard text entry for Service line items using BDC

    Hi,
         I want to enter standard texts for service line items of RFQ created using BDC, if it is a line item i can pass RFQ_number+line_item number as TDNAME in SAVE_TEXT function module, but for Service line item what value we need to pass in TDNAME.
    Is there anyway we can capture the package number in BDC of ME41?
    Regards
    Bala Krishna

    .

  • Creation of po with mutiple line items using BDC

    Hi Gurus,
          Can any body hav notes for creating po's using BDC with multiple line items in transaction ME21. I hav created po for single line item but if i tried to create multiple line items, it ll create multiple po's...
    thanks in advance
    arun

    See the Below Logic for me22 and it is also same for me21
    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
    Reward Points if it is helpful
    Thanks
    Seshu

  • Po line items in bdc

    requirment: to load a file filed with ean no and populate line item of me23n with the respective eans number and their quan and it shuld populate the line items and not save them so user can check a few things and then save it manually while creating the sto (return). iam running a bdc in error mode so that it popultes the sto line item s wtih matnr and quantity and stop at the po screen so it can be saved manually.
    but iam unable to populate all the line item. they only populate till number 13 how can i populate further on . i even tried recording a page down.
    any ideas?

    Hi,
    The number of displayed items depends on the screen resolution.
    In fact a solution consist in filling the field "position" (RM06E-EBELP) at the bottom of the screen for <u>each</u> item.
    * Code to position on the right line :
      PERFORM FIELD_BDC TABLES WT_BDCDATA USING
         'RM06E-EBELP' WT_POSITION .
      PERFORM FIELD_BDC TABLES WT_BDCDATA USING
         'BDC_OKCODE' '/00' '0'.
    Hope it helps,
    Ps : ME22 for BDC, not ME22N.
    Erwan.
    Message was edited by: Erwan LE BRUN

  • 999 Line items for bdc f-02

    Hi experts,
    I have one validation its like suppose if u have 999 line items then that record should b closed and the both +ve, -ve values should be equal to 0 n new record should start again.
    if any body can help me in this regard then i will b thankful to them.
    Regards
    Bohra

    Because there may be automatic entries created, you shouldn't go to 999 entries. It should be OK to use 950.
    Let's say you have 1100 entries. the first 950 total 10,000 credit. You create the first transaction with 950 entries and then an entry to a control account for 10,000 debit. Then another transaction with the remaining 150 entries and an entry to the same control account for 10,000 credit.
    Rob

  • LSMW- line items thru bdc recording

    I m creating a lsmw thru bdc recodring for me21.
    the prob is ...how to upload the line items ? if i do in general it will only upload one line item for order....help  me in solving this.

    Hi
    When you do the recording in LSMW then if the options for multiple line items are available in ME21 then you can do the same with the LSMW recording also.
    All you have to do is map the line items fields of the SAP structure to the line items of your upload source structure.
    The Source Structure has to be defined as HEADER structure and the LINE item strucuture at the next level.
    Then in the HEADER structure in the Source Field steps ,Name the first field as Record Identiifer and for the properties of the field give the value for Identifying Field Content as 'HEADER'.
    Similarily for the LINE structure in the Source Field steps ,Name the first field as Record Identiifer and for the properties of the field give the value for Identifying Field Content as 'LINE'.
    This would allow you to identify the HEADER and LINE for the files to be uploaded.
    Please check this link also
    Conversion - Doc with multiple line items - LSMW
    Hope this is clear and is helpful.

  • Regarding Line item dimensions

    Hi all,
    In our project for one of the cube 3 line item dimensions are maintained already , But still we have to create one more line item dimension for that infocube because the percentage for the one of the  dimension and fact table is reached to 90%.So is it preferable to have more  line item dimensions? If not please provide the alternative suggestion.
    we maintained relative infoobects in dimensions.
    Thanks & Regards,
    Swarna.P

    Hi,
    If there is no other alternative to swap the Chars in between Dimensions, then go for Line Item Dimension. It won't be a problem if you have more then 2 or 3 Line Item Dimensions. I Used 4 Line Item Diemsions becasue the Ratio is crossing 90%. So Line Item is solution for my problem, first check the Chars in Dimensions and re-arrange it then check the Ratio, if it doesn't work then go for Line Item Dimension.
    Thanks
    Reddy

  • Regarding Line Item Selection and product category

    Hi Experts,
    We are having a requirement in Line Item Selection in Oppurtunity.The requirement is that we need to display only the product categories belonging to that particular company(for eg Product Categories belonging to Company X) by restricting the display of product IDs.Please provide me some pointers on this as this is a high priority requirement.
    Requirement:Line item selection of an opportunity will be at a 'X' category from the product hierarchy level.

    Hi Amar,
      You have to retrieve all you rproduct ids based on your criteria before the execution of the below step in your method.
    result = qs->get_query_result( ).
    Once you have all your product Id's then default your search criteria with your product id's using the below code.
    ls_selection-attr_name = 'PRODUCT_ID'.
          ls_selection-sign = 'I'.
          ls_selection-option = 'EQ'.
          LOOP AT it_product INTO v_productid WHERE comt_product_id CP ls_search_criteria-low.
            CLEAR ls_selection-low.
            ls_selection-low = v_productid.
            CALL METHOD qs->add_selection_param
              EXPORTING
                iv_attr_name = ls_selection-attr_name
                iv_sign      = ls_selection-sign
                iv_option    = ls_selection-option
                iv_low       = ls_selection-low.
            CLEAR: v_productid,wa_result.
          ENDLOOP.
    this code should be included in your event handler before calling get_query_result( ).
    Hope this helps.
    Regards,
    Lakshmi.Y
    Edited by: Lakshmi Soujanya on Jul 11, 2011 11:55 AM

  • Handling line items in bdc

    hi,please tell me how to handle the line items i.e the header data and item data in bdc?
    provide me a clear vision?

    go with this sample code
    REPORT zsowja NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA: bdcdat LIKE bdcdata OCCURS 0 WITH  HEADER LINE.
    DATA: BEGIN OF record OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EKORG
            ekorg(004),
    data element: BKGRP
            ekgrp(003),
    data element: EMATNR
            ematn(018),
    data element: BSTMG
            menge(017),
    data element: EWERK
            werks(004),
          END OF record.
    DATA : BEGIN OF head_itab OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EKORG
            ekorg(004),
    data element: BKGRP
            ekgrp(003),
       END OF head_itab.
    DATA : BEGIN OF item_itab OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EMATNR
            ematn(018),
    data element: BSTMG
            menge(017),
    data element: EWERK
            werks(004),
       END OF item_itab.
    CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
            CODEPAGE                = ' '
             filename                = 'c:/hello.txt'
             filetype                = 'ASC'
            HEADLEN                 = ' '
            LINE_EXIT               = ' '
            TRUNCLEN                = ' '
            USER_FORM               = ' '
            USER_PROG               = ' '
            DAT_D_FORMAT            = ' '
       IMPORTING
            FILELENGTH              =
         TABLES
              data_tab                = record
       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.
    LOOP AT record.
      ON CHANGE OF record-lifnr.
        head_itab-lifnr = record-lifnr.
        head_itab-ekorg = record-ekorg.
        head_itab-ekgrp = record-ekgrp.
        APPEND head_itab.
        CLEAR head_itab.
      ENDON.
    TO HAVE LINK BETWEEN HEADER AND ITEM TABLE USE LIFNR AS LINKER
      item_itab-lifnr = record-lifnr.
      item_itab-ematn = record-ematn.
      item_itab-menge = record-menge.
      item_itab-werks = record-werks.
      APPEND item_itab.
      CLEAR item_itab.
    ENDLOOP.
    *TO CHECH THE DATA IN HEADET ITAB AND DETAIL/ITEM ITAB
    *loop at head_itab.
    *write :/ head_itab.
    *endloop.
    *skip 2.
    *loop at item_itab.
    *write:/ item_itab.
    *endloop.
    SORT head_itab BY lifnr ekorg ekgrp.
    SORT item_itab BY lifnr.
    DATA linecount TYPE i.
    START-OF-SELECTION.
      LOOP AT head_itab.
        ON CHANGE OF head_itab-lifnr.
          REFRESH bdcdat.
          CLEAR bdcdat.
          PERFORM bdc_dynpro      USING 'SAPMM06E' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EKKO-LIFNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'EKKO-LIFNR'
                          head_itab-lifnr.
          PERFORM bdc_field       USING 'EKKO-EKORG'
                                        head_itab-ekorg.
          PERFORM bdc_field       USING 'EKKO-EKGRP'
                                        head_itab-ekgrp.
          linecount = 0.
    <b>
          LOOP AT item_itab WHERE lifnr = head_itab-lifnr.
            linecount = linecount + 1.
            IF linecount = 1.</b>
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'EKPO-WERKS(01)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'EKPO-EMATN(01)'
                                            item_itab-ematn.
              PERFORM bdc_field       USING 'EKPO-MENGE(01)'
                                            item_itab-menge.
              PERFORM bdc_field       USING 'EKPO-WERKS(01)'
                                            item_itab-werks.
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            ELSE.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'EKPO-WERKS(02)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=NP'.
              PERFORM bdc_field       USING 'EKPO-EMATN(02)'
                                            item_itab-ematn.
              PERFORM bdc_field       USING 'EKPO-MENGE(02)'
                                            item_itab-menge.
              PERFORM bdc_field       USING 'EKPO-WERKS(02)'
                                            item_itab-werks.
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            ENDIF.
            AT END OF lifnr.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=BU'.
            ENDAT.
          ENDLOOP.
        ENDON.
        CALL TRANSACTION 'ME21' USING bdcdat MODE 'A'.
        REFRESH bdcdat.
      ENDLOOP.
    FORM bdc_dynpro USING value(a) value(b).
      bdcdat-program = a.
      bdcdat-dynpro = b.
      bdcdat-dynbegin = 'X'.
      APPEND bdcdat.
      CLEAR bdcdat.
    ENDFORM.
    FORM bdc_field USING value(c) value(d).
      bdcdat-fnam = c.
      bdcdat-fval = d.
      APPEND bdcdat.
      CLEAR bdcdat.
    ENDFORM.

Maybe you are looking for

  • Error while installing NW 7.4 SR2 in High availability

    Hello Guys, We are installing NW 7.4 SR2 Enterprise Portal with sybase database on windows 2012 R2 server under high availability i.e Microsoft Cluster. JEP is the system ID of the server, SAPJEP is the virtual host and X.X.X.36 is the virtual I.P fo

  • Possible Solution: Rentals Freeze

    First, I have a Powerbook G4. Last week I rented a movie through Itunes. I noticed, as many others have, that rentals seem to freeze quite frequently. In fact, mine was freezing about every 2 minutes. Once I plugged my laptop in, because it was dying

  • What is the problem when the nano changes channels when your on a station or a song

    I can be on a channel and it will change to another channel or even a venue. It stays on one for about 15 seconds then goes wherever it wants???????????????

  • Downloading new itunes problem HELP !

    When i go to download iTunes 7.5 it goes through the download proccess and an error popup that says " This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verif

  • [Solved] Remove Panel Shadow In KDE 4.10

    Hello all, I just moved to KDE 4.10, and everything works smoothly. I have just on little annoyance, I can't figure out how to get rid of the panel shadow. It is going on top of the application window itself, and makes it harder to read content, I'm