Document Lines

Hi Experts,
Is there any way I could loop through a SAPbobsCOM.Document.Lines? If I'm going to post a oDraft delivery document to a oDelivery document.
Thanks.

Hello Roger
For i as integer = 0 to oDoc.Lines.Count-1
  oDoc.Lines.SetCurrentLine(i)
next i
Regards
János

Similar Messages

  • Document line item text in Clearing document

    Dear All,
    Document line item text
    My client want the vendor invoice line item text(BSIK-SGTXT) to be captured in the corresponding clearing document line item text field(BSAK-SGTXT).
    (i.e) The vendor invoice and its payment clearing document should have the same text in the document line item text filed.
    According to me i can use  a substition rule and a user exit to assign the values. but here comes a problem* i have one clearing document against 3 to 4 vendor invoice documents* so my programming logic has got stucked here? like which vendor invoice line item text the clearing document should pick up?
    is there any other enhancements possible or can some one help me with the programming logic to be applied here.
    Thank you
    Regards,
    Vasanth D

    like which vendor invoice line item text the clearing document should pick up?
    is there any other enhancements possible or can some one help me with the programming logic to be applied here
    Why don't you discuss the issue with your client?  As you said, if you pay 5 invoices in a single run, the payment document item text can't carry all of those texts unless you use the long text.  What is the reason for the requirement?  Perhaps there's another solution.

  • How to Use document.Lines.SetCurrentLine

    Hi there, due to an enormous amount of time spent on this issue, I thought I would share how to use the SetCurrentLine method as posted to me by SAP support:
    It seems very cumbersome, as I have now to do an extra Recorset look up to get all the lines if I want to get the correct index - but at least it works (hopefully).
    Daniel
    SUPPORTS MESSAGE ****
    the way the SetCurrentLine works is as following:
    You do not have to use neither the LineNum nor the VisOrder as your
    parameterfor the setCurrentLine method.
    The system will use the corresponding index (starting at zero)linked to
    that line when running a query on the database and sorting the lines by
    LineNum.
    #,,DocEntry,, Item ,,LineNum,,Price,,VisOrder
    1,,11669,, A1001,,,, 600,00,,
    2,,11669,, A1003,,2,, 3,00,, 2
    3,,11669,, A1005,,3,, 600,00,,1
    See example above, that is the result of querying the database on that
    sales order and sorting by LineNum.
    The order in which the items are displayed in the application is based
    on the VisOrder. In this example items are displayed A1001, A1005 amd
    A1003.
    In order to update Item A1005 I will need to create a recordset, query
    the database and then loop the recordset to find the corresponding item
    and then use that index from the recordset to set the value for the
    SetCurrentLine method. In the example above index 0 from recordset
    points at item A1001, index 1 points at item A1003 and index 2 points at
    A1005 so your code should use setCurrentLine(2) to update item A1005.
    If you try to use LineNum (3 in this case) you will get an error message
    as index 3 does not exist in the recordset collection ( only 3 items
    with indexes 0,1 and 2). If you use visOrder 1(for item A1005) then the
    system will update item A1003 as 1 is the index for A1003 in the
    recordset.
    END OF SUPPORTS MESSAGE ********

    Hi Curtis,
    Your situation sounds a little different to mine, in that I know the LinNum of the documentline that I need to update - that is what the lineNumber variable is...
    To update all the rows, I guess you would just iterate through all the lines sequencially (ie starting at 0 and ending at document.lines.count:
    for(int i = 0; i < doc.Lines.Count; i++)
        doc.Lines.SetCurrentLine(i);
        // do your thing here...
    How do you know what lines you want to update??
    Dan

  • Tcode FV50: How to find long text in FI Document line item Before Saving.

    Hi,
    How to find long text in FI Document line item.
    During Parking of the FI document through Tcode FV50 i m giving the some text in the long text not in the text field.
    I would like to validate the Long Text Before Saving in user exit "U300" under  the  "Sunstitution" .
    Please anybody can be help me out where exactly this long text is going to be stored or in which internal table or memory id.
    Please give me the answer as soon as possible .
    Note:- Read_Text function module is not useful. Because Read_text useful after saving document.

    Hi Amit,
    In application area FINANCIAL ACCOUNTING , go for node LINE ITEM. Here create a step & maintain the prerequisite as per your requirement & in the check you can mention the code or you can direct it to a custom program like ZFI_RGGBR000.
    Here while maintaining the check you will get structures BKPF & BSEG in which you will get the desired field you are looking for.
    Just try to explore in your system how the other validations are maintained.
    After you are done with all your code, you have to run the regeneration program RGUGBR00.
    Here utmost care should be taken while running regeneration program, you should select all the checkboxes in the selection screen except  GENERATE SETS, GEN SUBSTN ROUTNS IN ALL CLNTS  & TRACE PROG. GENERATE CALLS .
    Hope this make your doubt clear.
    Regards
    Abhii

  • How to read long text in Document line item

    Hi,
    How to read long text in FI Document line item.

    Use Read_text function module.
    you need to pass
    ID
    LANGUAGE
    NAME
    OBJECT   to the function moduel
    To find the Text id name language and object these are the following steps. Example: FB02
    1. goto FB02, Enter Document number
    2. from menuselect Goto>Header-->header Text..... New window will be displayed 
    3. select the Header Text. here you can see all the text. 
    4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper. 
    5. in the Next window you will find Text Name. Text ID, Language. etc...
    Regards,
    Lalit Mohan Gupta.

  • Remove symbol # for long text in document line item

    Dear Experts,
    I enter some information in the long text field in document line item. For the area that I use "Tab" button, system will display as # symbol. Therefore when we print the information, the output will include the #### symbol which is not correct.
    Please help.
    Thanks.
    -Syaban-

    Dear Gaurav Aggarwal,
    Thanks for the reply, can you guide me the step to perform the suggested solutions? currently, we are using ECC6.
    Thanks.
    syaban

  • Wbs in customer/vendor and gl document lines during initial balance upload

    Hi gurus,
    Can we enter wbs in customer/vendor and gl documents lines during upload of opening balance upload?
    What is the impact of this?? Do we need to run project settlement on 1st day after go live to get data in cost center from ar, ap and gl????
    Thanks

    Hi Mohit,
    Why do you want to udpate WBS element for vendor and customer line items. Basic concept of said cost object (WBS element) is transfer values to Fixed assets or GL accounts or any other cost objects like cost center ,Internal order,sales order like that.
    You can update WBS element for all fixed expenses based on settlement rule and allocation types,which you created in customization and assigned cost elements or cost elment group over there. You can update WBS elements for said line items settle after opening balance update.  Please note ,it may not possible to update WBS element for vendor and customer line items.
    Basic cocnept of WBS element is cost collector ( You may use to collect revenue also as per nusiness processes) ,collects the cost from various resources and settle to said above objects. Vendor and customer balances are balance sheet accounts,which can settle through payments.
    Regards
    ManiKumar

  • Document line with price zero in SBO 2007 A

    Hi All
    We have a DI API AddOn that occationally has to create a document line with the total price of zero.
    In SBO 2005 A we just set SBODocument.Lines.Price = 0, but that doesn't work in SBO 2007 A.
    In 2007A when we set SBODocument.Lines.Price = 0 it takes the price from the pricelist as though we had not entered a price at all. If we set SBODocument.Lines.Price to something else that zero it does correctly take the price we entered.
    We have tried to set SBODocument.Lines.UnitPrice or SBODocument.Lines.LineTotal to zero in stead but it gives the same result.
    Any help appriciated.
    Rgds
    Jesper Carstensen

    Sorry, my mistake.
    The solution WAS indeed to set SBODocument.Lines.UnitPrice = 0
    Rgds
    Jesper Carstensen

  • Customer Invoice/Billing Document  Line Item Details

    I have be trying to get the line item details incuding Description, Qty, Ea pricing, etc., for an invoice for several days.   I am successfuly able to us the RFC FI_DOCUMENT_READ  to get a plethora of data back in several tables,  but none that contain the details I need.  I can see the informationI need usinf VF03 and the Document Number.  
    Here is the call I am making (Output tables defaulted in the .net connector wsdl file)
                Dim sAWORG As String = ""
                Dim sAWREF As String = ""
                Dim sAWSYS As String = ""
                Dim sAWTYP As String = ""
                SapBillingProxy1.Fi_Document_Read("", _
                     Me.txtDocNumber.Text, _
                    "VBRK", _
                    "MPMP", _
                    sAWORG, _
                    sAWREF, _
                    sAWSYS, _
                    sAWTYP)
    Am I asking for the wrong information or ??? 
    Please help or point me in the right direction.
    Thanks in advance for the help!

    Hi,
    If you are looking for Billing document line item details and if you have range of sales document reference numbers try using 'BAPI_BILLINGDOC_GETLIST' function module.It is remote call enabled.
    Regards,
    Sreekanth

  • PO item text is copied to the Financial Document line item text

    A user have requested that the PO item text is copied to the Financial
    document line item text, to aid them in analysis of the GR/IR account.
    is there any solution to implement this ?

    There is no standard setting for this requirement. Check with your ABAP team for this.

  • SD - Accounting document line items are generating for each item

    Hi all of you,
    We have done account determination for SD. Accounting documents are also generating, but with in the invoice accounting document, number of line items are generating for each item with in the sales order, standard invoice type is F2 like -
    Item 001 - X Material
    Item 002 - Y Material
    Item 003 - Z Material
    The accounting document is -
    Line Item 001 - Customer Ac Dr
    Line Item 002 - Discount A/c Dr
    Line Item 003 - Sales revenue
    Line Item 004 - Discount A/c Dr
    Line Item 005 - Sales Revenue
    Line Item 006 - Discount A/c Dr
    Line Item 007 - Sales revenue
    Line Item 008 - VAT
    Even, in my experience I did not find this type of entry and the sales revenue and discount accounts are same with in the COA and is posted with in the plant.
    Please give me your valuable suggestion to rectify the above issue.
    Regards,
    Ramki
    Edited by: Ramki on Nov 5, 2009 10:06 AM

    Dear Ramki,
    This is SAP Standard. System generates Accounting document line item for each Line items in Invoice.
    This is standard & also required bacuase say you have different Material types in single Invoice (e.g.Material & Service items, Trading Goods, etc). The valuation class assigned to these Material Types may be different & you might want to post revenues from these Line items in different GL Accounts.
    Hope this helps. .
    Thanks,
    Jignesh mehta

  • Post long text for document line item via FI-GL Inbound IDoc

    Hi guru,
    I am trying post extension ZFIDCP02 linked basic type FIDCCP02 and message type FIDCC2 IDoc in R/3 (4.6c) via IBM Websphere (Inbound IDoc),
    I am use inbound function module IDOC_INPUT_FIDCC2 and activate exit 008 (EXIT_SAPLF050_008) and exit 002 (EXIT_SAPLF050_002),
    In the extension ZFIDCP02 and under E1FISEG, I am add my segment  ZITEXT include field TDSPRAS, TDID, TDOBJECT, TDLINE.
    I am send  ZFIDCP02 IDoc via IBM Websphere no error  but all field TDSPRAS, TDID, TDOBJECT, TDLINE in my segment  ZITEXT not post in FI-GL.
    How can I  post long text for document line item (ZITEXT) in FI-GL ?.
    and I'm mean post ZITEXT to bank statement via IDOC.
    Please throw light on this  and  may be I  'm want solution or example ABAP code for exit 002 (EXIT_SAPLF050_002).
    Thanks in advance,
    Akkapong Pirachai
    CAT Telecom
    Edited by: Akkapong Pirachai on Aug 20, 2008 7:40 AM

    Close question because long time for answer.

  • Material Quantity difference document line item for HU

    Dear Experts,
    When I try to clear differences in LI21,  i get the error message as above.
    Error Message : 'Material Quantity difference document line item for HU'
    Any idea why this error occurs?
    Regards,
    Shetty

    Hello Shetty,
    It may be due to some stock inconsistency. You may try iin case of  a non HU managed storage location HU to run LX23 and it can fix discrepancy overwrting MM-IM with LE-WM data. But if it is a HU managed then you can run HUDIFF transaction but only to see if there is stock differences not to fix anything, usually SAP Support (Development Support) does that job.
    Have a nice day !!

  • Remove tax field in Document Line

    Hi
    In document Line we don't want tax field. is there any setting in sap b1 for that
    reagards

    Muna,
    You would need to setup a tax code for "Exempt" or something like that that all Business Partners use and set the tax amount on the code to zero.
    Eddy

  • SD document line items Vs FICA accounting document line items

    Hello All,
    What is the interface we use in SAP,  between the SD and FICA which will determine line items in FICA document with regard to SD line items.
    SD : How we do configuration or mapping between sd sales order and billing document to determine billing document line items  based on sales order line items ( for example : material group, profit center, cost center ?)
    FICA: what interface / Configuration we use to determine how many line items should appear in the FICA document based on billing document line items.
    Regards,
    John.

    Integeration of SD to FICA is based on the img settings done under the node - SPRO - Financial accounting ( new ) - Contract accounts receivable and payable - integration - Sales and distribution .
    Creation of FICA document based on SD is routed through the event 4000 and the details are detrived through event 4030 .
    Would suggest you to go through events 4000 and 4030 .
    Regards ,
    Dewang

  • How to define a document line as Withholding Tax Liable?

    Hi,
    Does anyone knows how to manipulate the Withholding Tax liable property in a document line?
    The property "WTLiable" in the Document_Lines object is a read property. So i can't set a value to this field via DI API.
    I'm working with SBO version 2004.
    Kind Regards,
    Ivan

    Luis:
    Thats because you cannot change the WTLiable status in the SBO either.
    To set the Withholding tax, you must change it in the Business Partner master data.
    Harold Gómez V.

Maybe you are looking for

  • Installation CS4 Master Collection (Trial) ab Netzwerk-Laufwerk? Nur auf portugiesisch?

    Für eine Evaluation bei einem Kunden sollte ich auf ein paar Arbeitsstationen (XP, SP3) die Master Collection CS4 installieren. Deshalb habe ich die ersten 3 DVDs auf ein Netzwerklaufwerk kopiert, weil ich annahm, dass die Installation damit schnelle

  • IMac doesn't recognise iPod

    iTunes and my computer does not recognise my 3G iPod. I've gone through a lot of the posts and tried all the various remedies (5R's, uninstalling iTunes, etc). I have no idea what the problem is - my iPod still works but I can't sync it. Now I'm nerv

  • Asset master remove in list

    Dear Experts, Can you tell me , i posted one asset with 5 years dep , now that dep is completed it comes to zero value . but it shows in s_alr_87012041 list view here it shows asset name and values in zero . is it possible to remeove that asset name

  • Partner profile are not available.

    Hi, Iam doing file to idoc scenario. when i execute the scenario  idoc is created with error 56 showing partenr profile are not  avaialble. what will be the exact reason partenr profile  in R/3 input parameter is added but still showing the error . C

  • Why does the new itunes freeze when i open it

    i bearly downloaded it and i open it and it just freezes!