How to avoid Line Items(fields) in BAPI mapping.

Hi
Does any body help me for mapping between header and line items in BAPI..
my scenario is filerfcmail(wokflow)!
File is CSV based :
(ex: 001150,,1123,JERM,08122006,,,
     ,,,ANN,,01082006,
If you look at example csv file , there is some fields mixed with header and line items. But in RFC header can be 1 to 1 and line item should be 0 to Unbound.
Now my problem is if I sent above example csv file as source :
The payload coming like this(sxmb_moni) :
</HEADERDATA>
- <GLACCOUNTDATA>
- <item>
  <COSTCENTER />
  <PROFIT_CTR />
  </item>
- <item>
  <GL_ACCOUNT>738100</GL_ACCOUNT>
  <ITEM_AMOUNT>60000</ITEM_AMOUNT>
  <COMP_CODE>001150</COMP_CODE>
  <ITEM_TEXT>*777-8030-861</ITEM_TEXT>
  <COSTCENTER>7320</COSTCENTER>
  <PROFIT_CTR>7320</PROFIT_CTR>
  <ALLOC_NMBR />
  </item>
- <item>
  <GL_ACCOUNT>738100</GL_ACCOUNT>
  <ITEM_AMOUNT>40000</ITEM_AMOUNT>
  <COMP_CODE>001151</COMP_CODE>
  <ITEM_TEXT>*777-8030-861</ITEM_TEXT>
  <COSTCENTER>6010</COSTCENTER>
  <PROFIT_CTR>6010</PROFIT_CTR>
  <ALLOC_NMBR />
  </item>
  <item />
  </GLACCOUNTDATA>
You can find there is one more item coming after headerdata with null values. It means map reading first line and one by one , if any field found in rows which belogs to GLAccount(Line item), then it writing one more item after headerdata with that fields only.
Remainig GLAccount data coming as per map after the item .
Can you tell me how to avoid extra line items.
Thanks,
Sankar

Yes, It exist..
I cross checked ..with out givig fileds and giving some fields...its writing another items in after headerdata tag.
hope you understand , what my problem..
See: GLACCOUNTDATA under subnode
      item is 0 to unbound in BAPI side, because of this its reading all rows , and if find any field which belongs to GLAccount , then it writing another item tag after headerr data.
Thnaks,
Sankar

Similar Messages

  • 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 avoid line break ( br ) while exporting Interactive report in Excel

    Hi,
    I have a Interative report and I am using Apex download format as CSV.
    I have defined some of the column heading in multiple line using break < br >
    when I export this into the excel sheet..the column heading contains break also..
    - Any idea how to avoid line break while exporting in excel.
    - also how to put the columns heading in BOLD when exported in excel.
    Thanks,
    Deepak

    Hi Jari,
    I tried this but still getting the
    <br>Interactive Report
    Column Attributes Heading - Employee<br>Detail AddressWhen I download the Report in CSV Format
    I am getting the heading with <br>.
    I am looking for heading as - Employee Detail Address // with no <br> tagThanks,
    Deepak

  • 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 clean line items

    Hi,
    This is in 11.5.10.2.
    For Balance Sheet review/clean up of GL Accounts, we are facing following Problems.
    When we query a particular GL account the number of lines fetches are more than 6 lakhs line items due to which we are not able to extract complete dump .
    The data Extracted is not getting classified into open and cleared items (Clearing) at GL level and therefore the data line items are enormous. Can you suggest something in this regard as to how to proceed further? IF you can share the methodology being adopted by any of you, it will be a great help.
    Thanks

    Hello.
    Can you please try the following query? I'm not sure were are you keeping the data that indicates that the lines are not adjusted so i included the JGZZ_RECON_STATUS field but you can adjust the query to your needs.
    SELECT l.effective_date,
    h.je_source,
    h.je_category,
    l.description,
    nvl(sum(l.accounted_dr),0),
    nvl(sum(l.accounted_cr),0),
    l.jgzz_recon_status
    FROM gl_je_lines l,
    gl_je_headers h
    WHERE l.je_header_id = h.je_header_id
    AND l.set_of_books_id = <your set_of_books_id>
    AND l.effective_date >= '1-jul-09'
    AND l.effective_date <= '2-jul-09'
    GROUP BY l.effective_date,
    h.je_source,
    h.je_category,
    l.description,
    l.jgzz_recon_status
    Hope this helps, otherwise repost.
    Octavio

  • Vendor line item fields

    Hi,
    I am using ECC6.0 version. When I am clicking the vendor open Invoice (document type RE ) in the vendor ledger (fbl1n) ,following Fields are not coming.
    the fields are:
    1. payment terms
    2.base line date
    3.discount base
    Can any one tell why this is happening and how to get those fields? and for that reason I am not able to change the Payment terms.
    Please help me out.
    NOTE:I have checked T.code SU53 for display authorization and it was found Successful.
    <removed_by_moderator>
    with Regards,
    Sudipto

    I think you may need to do some configuration in SPRO to achieve what you are looking for.
    Try the following:
    Go to SPRO
    Look under Financial Accounting (New), Document, Rules for Changing Documents.
    I think you want to then click on "Document Change Rules, Line Item"
    Under AccTy enter a K for vendor, leave your transaction type blank, then add in the "table-field" name you are wanting to either view or allowed to be changed.
    example: Baseline Payment date is:  BSEG-ZFBDT and Payment Method is BSEG-ZLSCH
    Once you finish your configuration you should then be able to drill down in FbL1n and then be able to change those fields.
    Let me know if that works for you!
    Cindy

  • Line Item Field "Assignment" not populating

    I am posting a KR doc. The assignment field in the line item is not populating with the date on the document is being posted in either of the line items, posting key 31 posting to Vendor and posting key 40 posting to an expense G/L account. The assignment field remains empty. I have checked some documents in the other company codes where this field is being populated with the date in the yyyymmdd.
    Please let me know what controls this and how can I make this field populate.

    Th Sory key for the GL for that company code should have the document date as the sort key.... check in FS00

  • Order creation logic how to pass line items

    experts
    i have the following data in iternal table itab.
    po number ,customer number, matnr,quantity ,order date.
    1212838383  7494749  8383938833   20  20032009
    1212838383  7494749  8383938832   10  20032009
    1212838382  7494749  8383938833   20  20032009
    1212838384  7494745  8383938823   30  22032009
    1212838384  7494745  8584858588   05  22032009
    now i want to populate this data into idocs orders segement .
    for all po the customer will be the same and i need to create one order for that.
    in the above data first 2 lines have same po so i need to create order with 2 line items.
    sales org,division,distribution channnel,ordertype will be same for all the records.
    loop at itab into workarea.
    at new po. "for same po, same header data so i am using AT NEW
    edi_dd40-segnum = 1.
    edi_dd40-segnam = 'E2EDK14 '.
    edi_dd40-mandt = sy-mandt.
    edi_dd40-psgnum = psgnum.
    e2edk14-qualf = '008' .
    e2edk14-orgid = 'NN21.
    MOVE e2edk14 TO edi_dd40-sdata.
    append edi_dd40 to itab_output.
    edi_dd40-segnum = 1.
    edi_dd40-segnam = 'E2EDK14 '.
    edi_dd40-mandt = sy-mandt.
    edi_dd40-psgnum = psgnum.
    e2edk14-qualf = '006' .
    e2edk14-orgid = 'ni.
    MOVE e2edk14 TO edi_dd40-sdata.
    append edi_dd40 to itab_output.
    endat.
    now the item data comes , so i need to create items with same po.and afetr this i need to submit this data to fm before another diffent  po comes.below same customer and po so need to consider as one sales order and submit to fm.
    item1  1212838383  7494749  8383938833   20  20032009
    item2  1212838383  7494749  8383938833   20  20032009
    call function 'MAST_IDOC_DISTRIBUTE'
    My concern is how to tell to the system for the same po create the order with multipl line items , do i need to use to AT NEW
    or some other commands above?
    endloop.

    i have used at end of po. but my matnr is becoming *************. no date is showing in the internal table while populating the matnr to segments.
    Loop at itab into workarea.
    at end of po.
    here i am filling the matnr to the segment. here  workarea-matnr is showing ***********  only stars,
    endat.
    endloop.
    If i remove the at end of po , then the matnr is comming .
    Please sugggest me what to do.
    my fields sequence are like this.
    kunnr " customer
    bstnk "po
    matnr " material
    currency
    kwmeng "order quantity
    podate
    orderdate
    so how to handle this please suggest.

  • How to reject Line Items in a Service Contract?

    Hello friends,
    Can anyone help me understand how do we reject items in a Service Contract? I don't see any Reject field. Is it one of the Status I need to configure for Item Level Status Profile? Even if I add a 'Reject' status, how do I link it to Rejection Reason codes? (I know how to add Reason codes in customizing, but how they are linked to a Transaction type is something I am not finding...).
    Please provide any inputs.
    Thanks.

    HI Navaneethan,
    please try following code.
    make  PEKKO should be internal table with appropraite structure..
    Loop at ZBTXT.
          MOVE ZBTXT-LINE TO PEKKO-ZBTXT.
          append  PEKKO.
         clear  PEKKO.
    ENDLOOP.
    loop at pekko.
    write : / PEKKO-zbtxt.
    endloop.
    if above code is helpful, REWARD POINTS.
    Regards,
    Ranjith

  • How to select line items in recording(BDC)

    Hi All,
    we are trying to Recording QP02 transaction ,we have inputs like material,plant,Group,Group Counter.
    after entering these inputs we will get multiful line items(inspection characteristics).we need to check one field for each item.
    How can we get this?
    Please help me?
    Thanks,
    Peddi reddy.

    Hi Kamesh,
    Thanks.
    After selecting line items i am selecting control indicators Tab.
    then Pop up screen called as (Edit characteristic control indicators) will open ,..then just pressing enter..the it will show another pop up ..here i am selecting one field(Long term Inspection)..the process has to do for all line items.
    In My program i have copied BDC performs which i got from Recording.
    Do i need to change tha performs or will it work?
    i tested in foreground with another material .... upto 3 or 4 line items its working fine.after that sytem does.t say anything.
    if i need to chage performs please help me .

  • How to show line items repeating n times alternatively or assa sets

    Dear All
    Situation: Here is my problem. I have have editable ALV which saves the
    data on pressing save. The no. of qty against an invoce gets repeated on
    the basis of input from the selection screen.
    Problem Area: For example if user entered invoce number and 2 at one field
    in selection screen so if there were 2 line items against the invoce both of
    them should be repated 2 and 2 times. Right now if there are 2 line items
    and user entered 4 so first line item will be shown 1 times and second will
    be repeated 3 times.
    Question how can I have both the line items to appear 4 and 4 times
    instead of the current situation described above.
    I would appreciate help all the senior members of the ABAP group.
    Regards,
    Anurag Jain

    Dear All
    Situation: Here is my problem. I have have editable ALV which saves the
    data on pressing save. The no. of qty against an invoce gets repeated on
    the basis of input from the selection screen.
    Problem Area: For example if user entered invoce number and 2 at one field
    in selection screen so if there were 2 line items against the invoce both of
    them should be repated 2 and 2 times. Right now if there are 2 line items
    and user entered 4 so first line item will be shown 1 times and second will
    be repeated 3 times.
    Question how can I have both the line items to appear 4 and 4 times
    instead of the current situation described above.
    I would appreciate help all the senior members of the ABAP group.
    Regards,
    Anurag Jain

  • Insert/Update/Delete Non-PO Invoice Line Item via FM/BAPI?

    Does anyone know of a way to insert/update/delete an Invoice Line item (Non-PO Accounting Invoice - Transaction FB60 or FV60) using a BAPI or Function Module (or set of function modules) using ABAP? I have been trying to find some code to accomplish this and am stuck on a couple of issues.
    I have found PRELIMINARY_POSTING_FB01 and PP_CHANGE_DOCUMENT_ENJ but both seem to submit the details to background processes. This is an issue because it gives the user a success message after execution but later delivers the error to Workflow. This is for an interfacing program so the results should be as real time as possible.
    Has anyone accomplished this via FM or BAPI and if so would you mind sharing your experiences?
    Thank you very much,
    Andy

    SG- Thank you for the reply.
    I have been playing with BAPI_INCOMINGINVOICE_PARK and I'm not sure if it is doing exactly what we want, but it is something that I have considered in the past. I plan on looking into BAPI_ACC_INVOICE_RECEIPT_POST this morning, hopefully that will provide some more for us.
    If possible I'd like to avoid BDC sessions because this program could hypothetically interface with multiple SAP systems with different configurations.
    I will check into those FM's and thank you very much.

  • Unable to create PO with multiple line items through LSMW-BAPI method

    Hi All,
    I have a requirement of creating PO through LSMW. I can't use LSMW standard batch input program since there are some fileds not available and also it has many limitations. I'm using LSMW-BAPI method ( Business object BUS2012) which create IDOC and uses BAPI_PO_CREATE1 to ultimately post the PO in the system. I am trying to create PO from a single file which contains both Header and Item data.
    Now my problem is that everytime PO is being created with Single line item only. Everytime I am giving multiple item data in the source file LSMW is preparing multiple IDOCs for multiple line items. As per my understanding this is happenng since header and item is in the same hierarchy level of IDOC type PORDCR102 and the control record is inserted for every line item in the source file.
    It seems that through LSMW-BAPI  it is not possible to create PO with multiple line items. Can anybody provide some input regarding this? Thanks in advance.
    BR,
    Atanu Mukherjee

    Solved by myself.
    Earlier the problem was that LSMW was not being able to recognize items under same header. It was creating new IDOCs every time it gets a new item. To enable this we need to create two structure HEADERDATA and ITEMDATA.  Two additional identifier fields with identifier value 'H' and 'I' should be added in these two structures respectively. Then we need one sequential file with the identifiers field followed by the header and Item data. Example:
    H~header data
    I~item data
    I~item data 
    This would help the standard program to understand what are the items under same header and ultimately create PO with multiple line items.
    BR,
    Atanu Mukherjee

Maybe you are looking for