How to give line items in flatfile while doing BDC for Table control

Hi all,
I am writing BDC for Multiple line items and Transaction  is : FSE5N.
How do i give the data in the flat file. I mean how do we give the multiple line items in flat file , i.e for second line item again we have to header data or not ?
ex:
1015;ALL;demo;kr;INR;01;0001;3000172;100
1015;ALL;demo;kr;INR;01;0001;3000172;200
for first lineitem  : 3000172;100
for 2nd line item : 3000172; 200.
header data : 1015;ALL;demo;kr;INR;01;0001.
Thanks in advance
krupali

Hii ,
u can give in the same format as u have done in the example.
A       B    C     D  E    F   G        H          I
1015;ALL;demo;kr;INR;01;0001;3000172;100
1015;ALL;demo;kr;INR;01;0001;3000172;200
and while writing the loop u can give
loop at it_head.
loop at it_head where a = it_head-A and b = it_head-B ..........upto G = it_head-G.
  endloop.
endloop.
check this
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
Neeraj

Similar Messages

  • Problem while doing bdc for fv60

    Hi frends,
       I got problem while doing BDC for fv60 tcode.i have given
    header items:
    vendor number
    invoice date
    posting date
    amount
    item data:
    g/l acc no: 100000
    amount 1000 whatever
    these are all given in recording
    in recording after all giving this data if we click on park it is telling "parking not possibe duiring batch input".
    can any body tell me the process for recording shdb and after that in bdc how can we give multiple line items for fv60
    thanks,
    naveen.

    I don't think you can use FV60 in batch input. Your options are to use transaction FBV1 or bapi BAPI_INCOMINGINVOICE_PARK.
    Rob

  • How to handle views in material master while doing BDC

    Hi,
    I am doing BDC for three material types and the views are different for all the three types. Please anyone tell me how to handle the views for all these three material types.
    Thanks in advance.

    Hi,
    Refer following code which i have used for MRP 1-2-3-4 view selection
                CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'
                  EXPORTING
                    MATERIAL                  = IT_UPLOAD-MATNR  " Material number
                    MATERIALART               = GI_MARA-MTART          " Material Type
                    SELECTION                 = 'D'              " PSTAT(maintenance status) value for MRP.
                    TCODE                     = 'MM01'           " Tcode where view's are called.
                  TABLES
                    BTCI_D0070                = IT_BDCDATA_VIEW
                  EXCEPTIONS
                    MATERIAL_NOT_FOUND        = 1
                    MATERIAL_NUMBER_MISSING   = 2
                    MATERIAL_TYPE_MISSING     = 3
                    MATERIAL_TYPE_NOT_FOUND   = 4
                    NO_ACTIVE_DYNPRO_SELECTED = 5
                    NO_AUTHORITY              = 6
                    OTHERS                    = 7.
                READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL  = 'X'.
                IF SY-SUBRC = 0.
                  V_SELECTION = IT_BDCDATA_VIEW-FNAM.
                  VAR = IT_BDCDATA_VIEW-FNAM+17(2).
                  CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
                  PERFORM BDC_FIELD       USING VAR1 "'MSICHTAUSW-KZSEL(12)'
                                                'X'.
                  VAR = VAR + 1.
                  CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
                  PERFORM BDC_FIELD       USING VAR1 "'MSICHTAUSW-KZSEL(13)'
                                               'X'.
                  VAR = VAR + 1.
                  CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
                  PERFORM BDC_FIELD       USING VAR1 "'MSICHTAUSW-KZSEL(14)'
                                                'X'.
                  VAR = VAR + 1.
                  CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
                  PERFORM BDC_FIELD       USING VAR1 "'MSICHTAUSW-KZSEL(15)'
                                                'X'.
    Regards,
    Pritish

  • 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

  • Populating Profit Centre Field while doing Transaction for Vendor/Customer

    Dear Experts,
    I have cheked in FSG of GL Code of Vendors/Customers where "Profit Centre " is a optional field.
    I have cheked in OB41 also for posting key relating to vendors/customers "Profit Centre" field is set as optional field.
    We need to make entry in the Profit Centre Field for both Vendors and Customers whicle doing manual posting.
    How can we bring that field which is not populated while doing transaction with posting keys of vedors and customers.
    Regards,
    Alok

    Dear Sayeed,
    I am agree with u, but since in SAP Vendor /Customer Line Item takes automatically profit centre from the other line items.
    Here is an example:-
    We have different profit centre for plant(104001) and coprorate office(106001)
    Customer billing is done at plant then the entry will be:-
    Customer A/c Debit    (by default it will take 104001 profit centre)
    Sales A/c Credit  with Profit Centre 104001
    In Corporate Office We Receive the sales proceeds:-
    In Coming Bank a/c Corporate   Debit  with Profit Centre 106001
    Customer A/c Credit (It will take by default profit centre 106001)
    By this If we genrate Profit Centre Wise Trial Balance then all Customers Debit will lying with Plant Trial
    and Customer Credit Balance will lying in Corporate Treial Balance  giving a mis information to the auditors.
    For solving this we need to populate the Profit Centre field in Customer line item so that while doing the received entry we can selct the Plant Profit Centre (104001) in Customer line item so that the Customer balance become Nil in Plant Trial.
    Hopw you understand our requirement.
    Regards,
    Alok

  • How to give commitment item while changing tax %.

    how to give commitment item while changing tax %.

    Dear shahed
    Can you please be clear in your question??
    Thanks
    G. Lakshmipathi

  • How to give commitment item while posting tax

    how to give commitment item while changing tax %.

    HI
    Commitment Item will be derived from the G/L account. You need not enter the commitment Item. Whenever u create a G/L account go to FMDERIVE and assign the G/L account to the commitment Item.
    Hope this helps. If it helps plz assign points.
    Regards
    Rajaram

  • How to change line item numbers

    HI
    when we are creating sales order, if we enter material number, line item number will be autmaticallly assigned(for eg 10,20,30 ....). if i want to change that number what i have to do(eg: to 1, 4, 5, .....). in standard SAP, the field is grayed out once the no is assigned. so i dont know how to change the no. please help me in this.

    Hello,
    You can give any number manually as the line item when you are creating the sales order.
    While creating the order give the item number also manually, then the system will accept. Once you given the line item number , it will not allow you to change it.
    Then you need to delete the line item and re-insert with the line item number you want.
    Prase

  • How to default Line item display in GL master record???

    Hi..Guys
    How to default Line item display selection in GL master creation.....When we create GL master it will automatically get selected.
    Is it possible to do.
    Plz reply .

    Hi
    With sample account you can succeed your requirement
    Give all the defualt fields whtatever you want then use this sample account while creating GL account
    One more possibility is with SHD0 screen layout change with defaults (this thing i am not sure)
    Reg
    Vishnu

  • Urjent-how to add line items in tcode-FBL3N

    Hi Experts,
      How to add line items customer, customer name,  vendor and vendor name in FBL3N.
    Thanks in advance.
    mahe
    Moderator message - Please do not use words like "urjent". Please ask a specific question. Please search the forum. This question has been asked and answered before. Post locked
    Edited by: Rob Burbank on Apr 29, 2009 11:27 AM
    Edited by: Rob Burbank on Apr 29, 2009 11:28 AM

    Hi,
    Check the BTE's:
    00001020     POST DOCUMENT:       Prior to final checks             SAMPLE_INTERFACE_00001020
    00001025     POST DOCUMENT:       Final checks completed       SAMPLE_INTERFACE_00001025
    00001030     POST DOCUMENT:       Posting of standard data     SAMPLE_INTERFACE_00001030
    00001050     POST DOCUMENT:       Accounting interface           SAMPLE_INTERFACE_00001050
    Thanks & Regards,
    Harish

  • How to transfer Line Items

    Hi
    How to transfer Line Items from One GL account to another GL account.
    We, at the time of changing Non Open Item Manged account to Open Item Manged account, how can we transfer Line items to make this GL account Zero, If suppose line items are more than 200.
    Satish
    Points assured.

    If you are attempting to change the account from Non Open Item managed,  you need to make the account balance zero. The change will be be effective only for future transactions. You need not transfer all line items,  find the balance and  make an  entry to debit or credit to make it zero, to a temporary account. Later, once you have activated, you can reverse that transaction.
    The OSS 606977 refered may be helpful if you are looking for reverse activation. i.e from Open to Non Open. Here is a brief:
    Symptom
    In the G/L account master record, you can activate/deactivate the 'Open item management' indicator if the balance of the account is zero. In this case, the system does not check whether postings exist on the account.
    If postings exist, this could lead to problems, for example, if the clearing is reversed after the change to the indicator is made.
    Other terms
    FS00, FS02, FSS0, FS02, FH190, XOPVW
    Reason and Prerequisites
    The transactions for the maintenance of the G/L account master record did not check whether postings exist on the account. Now the program checks whether postings exist in the current year or previous two fiscal years.
    Solution
    Implement the attached correction or import the corresponding Support Package. Since it could make sense to change an account with balance zero from open item managed to non-open item managed (and vice versa) - despite postings to the account - the message is delivered as customizable (with error as a default setting).
    The check is also carried out, when open-item management is activated, is postings exist on the account.
    If you implement the note you must also carry out the following:
    Use Transaction SE91 to create message 190 in message class FH with the following text:
    Account balance = 0; however, postings exist on the account
    Use Transaction SM30 to insert the following entry into view T100S:
    Application area   FH
    MsgNo              190
    Allowed            EW
    Standard          E
    Afterwards, the message can be customized in View V_T100C. To do this, you can use Transaction OBA5.

  • How to delete line item from sales order ?

    Dear All ,
                               user is having 20 line items from which 3 line items of which prod order confirmation cancellation is done also goods reversal done now as user tries to delete the line items an info box pops up --> Due to cost management the line item can not be deleted . Can u tell me that if these line item is not deleted than how to delete this ?  sos what user had done that he had selected reason for rejection for these 3 line items so now the total wt is reduced but user is not able to delete the lineitems .
    pl help
    sap11

    Hi
    For those line items you can assign a REASON FOR REJECTION. Automatically the status of those line items will be closed.
    Thanks,
    Ravi
    PS : sorry....please ignore my post.
    Edited by: sankar ravi on May 20, 2008 3:45 PM

  • Shopping cart line items are missing while transfering from ITS to EBP

    Hi everyone
    I am Raghu, working on EBP (version 2.0)
    Some shopping cart line items are missing while transferring the shopping cart data from ITS to EBP.
    For example in my shooping cart 4 items are there,during transferring shopping cart data from ITS to EBP all 4 items are getting updated for all the shopping cart related tables except account assignment table.
    In account assignment table for this particular shopping cart only 3 items are updated and usually the first line item gets missed out.Hence the the system fails to create the follow on documents in R/3. 
    This is happening randomly for few of the shopping carts that too most of the cases first item of the shopping cart was not updating reqacct table(this is account assignment table for shooping cart items).
    I have debugged entire scenario,but  couldn't find the cause for this..
    Can any one  please advise me....why this is happening?
    Your immidiate ersponse will surely help me a lot.
    Thanks,
    Raghu

    Hi Yann
    Thanks for your support.
    Yes, we are using EBP2.0/CRM 2.0C & the support pack level is SAPKU20C23.
    Please advice
    Thanks
    Raghu

  • How to get line item net price and net value?

    I have using "BAPI_SALESORDER_SIMULATE" to SIMULATE to create SO,
    the return table
    ORDER_ITEMS_OUT-NET_VALUE is not equals than created by VA01 .
    how to get line item net price and net value?

    Hi,
    Can u elaborate ur query ?
    By this FM you cannot create a SO . Use FM --> BAPI_SALESORDER_CREATEFROMDAT2
    Regards,
    MAdhukar Shetty

  • How to give line height to text in AI Script

    how to give line height to text in AI Script

    I want to increase these three lines line height differently means i want script to increase the line height of outlined text

Maybe you are looking for

  • Crystal Reports 2008 XML & Web Services

    Hi Experts, I am using Crystal reports Basic 2008 for SAP Business One Version 12.1.3.1028 I just wanted to use a web services in my report. My data source connectivity does not list xml & web services. Can anyone advise if I am able to get XML and w

  • Need clarifications on BW statistics.

    Hi All, I need following clarifications on BW statistics. 1. I need to identify the pre-defined quries from the techincal content that will help me to show the system health in general. 2. Also how do I see what is the query id for the query I have m

  • Does SOA Suite 11g include OSB?

    What's the difference between OSB and ESB. ESB is a component of SOA Suite and it can connect to different services. OSB has more functions such as dynamic routing and Message Enrichment. If I just buy SOA suite, can I use OSB? Or I must buy OSB if I

  • Codecs for Adobe Photoshop Elements 10 slideshow music downloads

    I cannot download purchased MP3 files from Amazon to my slideshows in Photoshop Elements 10. It says the computer does not have the proper codec to download the file. How do I resolve this?

  • My cursor has disappeared in Word

    I've recently updated my iMac to OS X 10.9.3 (13D65) and I've noticed I can not see my cursor when using Word.  I am in the middle of writing an essay so as you can imagine its very frustrating. Please someone help!