SAPbobsCOM.Documents.Lines Delete/Remove

Is it true that there is still no API to delete line items for Document objects? (I cannot find one in version 6.5)
Does 2004 include this feature? Is there a workaround?
Making the Price and Quantity zero is not an option for me.

Same as My Problem We Cannot Force to Use Recordset. Because it is directly manipulate to the SBO SQl Server (even SAP Manage refuse to say that )
John Mackin said that we can use dummy item. And I have tried that way. It works in header decoument summary (For Total Document,Sum Tax,etc) but in appearance users are dislike to see item that have no price and quantity in Documents Forms Matrix and off course  the cancelled item will be appeared in Report.
==========================================
oOrder.Lines.SetCurrentLine (sFields(1))
              oOrder.Remove
              oOrder.Lines.ItemCode = "Cancelled"
              oOrder.Lines.Price = "0"
              oOrder.Lines.Quantity = "0"
              oOrder.Lines.Currency = sFields(6)
             lRetCode = oOrder.Update
             If lRetCode <> 0 Then
                Call oCompany.GetLastError(nErr, errMsg)
                If (0 <> nErr) Then
                SBOApplication.SetStatusBarMessage "Found error:" + Str(nErr) + "," + errMsg "
                End If
==================================
I dont know what to do , maybe we can wait from SAP Manage how to handle this problem.
Cheers,
Hamdi

Similar Messages

  • SAPbobsCOM.Documents.Lines.Text ReadOnly

    I'm trying to do something like this
    oSapInvoice.Lines.Text = oDocDett.Text
    where oSapInvoice is a SAPbobsCOM.Documents, but the Text property is readonly.
    How can I do to copy the column "Item Details" (Text property) in a document line using the SDK?

    Dear Gianluca D'Alessandro,
    Please try following code to add Item Details:
    oSapInvoice.Lines.ItemDetails = oDocDett.Text
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • 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

  • Can the cell lines be removed from a table inserted in a Pages document?

    Can the cell lines be removed from a table inserted in a Pages document?

    Inspector > Table > Table > Cell Borders
    The buttons immediately below "Cell Borders" allow you to choose left, right, inside, outside etc.
    Choose None from the border style Pop-up.
    Download the Number'09UserGuide from the Help menu in Pages. Search for borders.
    Regards,
    Ian.

  • Can SharePoint automatically remove documents from "Followed Documents" list once the document is deleted?

    Hi,
    SharePoint 2013, I followed a document.  It appears in my "Followed Documents" list.  Now someone deleted the document I followed.  I want the item be automatically removed from my "Followed Documents" list.  How to
    do this?
    Many thanks!

    Hi Sindy,
    According to your description, my understanding is that you want to automatically delete the following documents links after the documents are deleted.
    I tested the same scenario in my environment, and I got the same results as you got.
    It is by design that the links will not be deleted automatically when the documents are deleted.
    We need to click Stop following to clear the links.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Deleting Document Line in 2005 SP1

    When attempting to delete a Purchase Order line using the Delete method of the document_lines object generates the following error after the Update method of the Document object is called:  "Invalid valid value in Enum 'BoTaxTypes'"
    The documentation states that Delete returns a value indicating success but actually no value is returned.  I've tried using the delete method without calling update but then nothing on the document changes. 
    The documentation doen't include any instructions on using the delete method so I'm not sure what other steps are necessary to get it to work.  Does anyone out there have any suggestions on how to get this to work properly?

    Thanks to all who have responded.  I have finally received a resolution from development support on this.  They have confirmed the problem and have promised a fix in the Nov 2006 patch release.  In the interim, they have provided me the following workaround:
    Dear Mr. Joe Huffman
    From the information provided in the message I understand that you're
    working with patch level 4.
    I would recommand you NOT to upgrade to patch level 7 since there is a
    regression in this patch and the lines.delete method doesn't work at
    all in this version (6.8.317.7) with no work around!
    We will fix both bugs (the bug you've reported on and the regression
    in November patch.
    Working with patch level 4 (6.8.317.4) I've noticed that from some
    reason in your DB - After the GetByKey method the TaxType field value
    is changed from tt_NO to tt_YES.
    I have a work around which you can use only in case that you can
    set the TaxType field value to tt_NO.
    If it is possible to you than you can use the following code for
    changing the value for tt_YES to tt_NO:
    'Work around - Fix TaxType value
    For iIndex = 0 To TotalRowCount - 1
    oPO.Lines.SetCurrentLine (iIndex)
    oPO.Lines.TaxType = tt_No
    Next iIndex
    RetVal = oPO.Update
    and only after running this code I delete the wanted line:
    oPO.Lines.SetCurrentLine (0)
    oPO.Lines.Delete
    RetVal = oPO.Update
    I hope that this work around will be suitable for you.
    I'm sorry for the inconvenient.

  • 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

  • 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

  • Deleting/removing offline PDF files in the iPad Adobe Reader app

    Whenever I open a file from the Acrobat.com cloud in the iPad's Adobe Reader app, a local copy is saved which I can read even when not connected to the internet. This is intentional by Adobe, and allows me to read PDFs offline, which is great. My question is, if an offline copy of every PDF I open is saved on the iPad, it will soon run out of disk space. Is there any way that I can delete/remove a specific offline PDF in order to free up disk space? I understand that this would mean that I would not be able to read that file offline anymore until I reconnect to the Acrobat.com cloud and reopen the document from the cloud. Thanks!

    Hi,
    Thank you for reproting the issue. You are right Adobe Reader saves a local copy whenever you opens a file from Acrobat.com. But there is a limitaion to the number of files it saves locally. So whenever the number of files opened from Acrobat.com reaches that value, it removes the first file opened from acrobat.com from its local memory and so on. So there is no chance of running out of memory.
    Secondly, if you want to remove the locally saved files then you can just sign out from Acrobat.com and sign in again. In this case it will remove all the files saved locally. Then you have to download them again to view.
    Hope this helps.
    Thanks,
    Ankit

  • Creating UDO through code  with 1 Docment table & 4 Document Line Tables

    Hi,
    I need to create one Document table and four Document Line tables(child tables) and make them UDO through code. This process is working When I am creating UDO with one Document table and one Document Line table but if I add more than one Child table it is taking only one child.... Can anyone give me some solution or code example related to this problem this problem?
    Regards,
    Sudeshna.

    Hi,
    Firstly Trinidad, unfortunately I could not open that link.
    And secondly, the following is my code... Through this code I am trying to create an UDO with one document table and two document line tables.... here the UDO is being created but it is not taking two line table, its taking only one Document line table.... how can I create udo with more than one Document line tables?
    Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
    oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
    oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.ChildTables.TableName = "childSplitNew1"
    oUserObjectMD.ChildTables.TableName = "childSplitNew2"
    oUserObjectMD.Code = "udoSplitNew"
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.Name = "udoSplitNew"
    oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
    oUserObjectMD.TableName = "masterSplitNew"
    lRetCode = oUserObjectMD.Add()
    Regards,
    Sudeshna.

  • Does deletion of a document also deletes the entries in audit tables?

    Hi,
    Can anyone tell me that if a document is deleted from UCM (say it's archived and then deleted) will this also remove all the audit trails and entries in other tables(docmeta,revisions,workflowhistory.. etc) as well?
    Also if there are custom tables , will the entries be deleted automatically? How does this work?
    I have to generate reports for the documents that are not archived.
    Regards,
    saumya

    Hi,
    Tables like Workflow History need to persist these content items as its purpose is totally different. If a admin wants to know how many content went through a particular workflow, this is the table he could refer to and also know who approved them. It is up to you to truncate records in these tables depending upon the organization need. You can for example truncate records older than 5 years from these tables.
    Regards,
    - Anand

  • PRICE LIST LINE을 DELETE 하는 SAMPLE API

    제품 : MFG_QP
    작성날짜 : 2006-05-23
    PRICE LIST LINE을 DELETE 하는 SAMPLE API
    ========================================
    PURPOSE
    Price List Lines을 delete 할 수 있는 API가 있는지 알아보고 그 사용방법
    을 이해한다.
    Explanation
    아래 설명하는 script는 Price List Lines 만을 delete 하는 sample API
    script 이므로 고객사의 business needs에 맞게 고객사에서 script를 수정하
    여 사용하여야 한다.
    Oracle은 QP_LIST_LINES table에 있는 created_by, creation_date 등을 이용
    하여 관련된 records를 읽을 수 있는 cursor를 생성하영 사용할 것을 권장한
    다.
    QP_LIST_LINES table의 list_line_id를 읽어 delete를 위해
    qpr_price_list_line_tbl에 전달한다.
    참고로 각 1000이 반복될때 마다 commit 하는것을 권한다.
    /*$Header: QPPLXMP3.sql 115.3 2001/11/19 18:15:32 pkm ship $*/
    Sample script which deletes an existing Price List line and the product
    information for the line (Product Information is stored in pricing
    attributes table in product attribute columns).
    This sample price list does not have any qualifiers or price breaks or
    non product-information type of pricing attributes.
    This script must be modified by the user such that the
    qpr_pricing_attr_tbl(J).product_attr_value column is populated with a valid
    inventory_item_id from the instance where this script is run. Also, other user variables are noted within arrows, <>.
    Please read the Oracle Pricing User guide (Appendix A & B) to understand
    the flexfields and seed data.
    -- set environment variables
    set serveroutput on size 1000000
    set verify off
    set feedback off
    set echo off
    set autoprint off
    set arraysize 4
    set pagesize 58
    set term on
    set underline =
    set linesize 100
    declare
    gpr_return_status varchar2(1) := NULL;
    gpr_msg_count number := 0;
    gpr_msg_data varchar2(2000);
    gpr_price_list_rec QP_PRICE_LIST_PUB.Price_List_Rec_Type;
    gpr_price_list_val_rec QP_PRICE_LIST_PUB.Price_List_Val_Rec_Type;
    gpr_price_list_line_tbl QP_PRICE_LIST_PUB.Price_List_Line_Tbl_Type;
    gpr_price_list_line_val_tbl QP_PRICE_LIST_PUB.Price_List_Line_Val_Tbl_Type;
    gpr_qualifiers_tbl QP_Qualifier_Rules_Pub.Qualifiers_Tbl_Type;
    gpr_qualifiers_val_tbl QP_Qualifier_Rules_Pub.Qualifiers_Val_Tbl_Type;
    gpr_pricing_attr_tbl QP_PRICE_LIST_PUB.Pricing_Attr_Tbl_Type;
    gpr_pricing_attr_val_tbl QP_PRICE_LIST_PUB.Pricing_Attr_Val_Tbl_Type;
    ppr_price_list_rec QP_PRICE_LIST_PUB.Price_List_Rec_Type;
    ppr_price_list_val_rec QP_PRICE_LIST_PUB.Price_List_Val_Rec_Type;
    ppr_price_list_line_tbl QP_PRICE_LIST_PUB.Price_List_Line_Tbl_Type;
    ppr_price_list_line_val_tbl QP_PRICE_LIST_PUB.Price_List_Line_Val_Tbl_Type;
    ppr_qualifiers_tbl QP_Qualifier_Rules_Pub.Qualifiers_Tbl_Type;
    ppr_qualifiers_val_tbl QP_Qualifier_Rules_Pub.Qualifiers_Val_Tbl_Type;
    ppr_pricing_attr_tbl QP_PRICE_LIST_PUB.Pricing_Attr_Tbl_Type;
    ppr_pricing_attr_val_tbl QP_PRICE_LIST_PUB.Pricing_Attr_Val_Tbl_Type;
    K number := 1;
    j number := 1;
    begin
    oe_debug_pub.initialize;
    oe_debug_pub.setdebuglevel(5);
    Oe_Msg_Pub.initialize;
    DBMS_OUTPUT.PUT_LINE('Debug File = ' || OE_DEBUG_PUB.G_DIR||'/'||
    OE_DEBUG_PUB.G_FILE);
    --dbms_output.put_line('after get price list ');
    /* setup the list_header rec for update */
    gpr_price_list_rec.list_header_id := <price_list_header_id>;
    gpr_price_list_rec.name := <price_list_name>;
    gpr_price_list_rec.list_type_code := 'PRL';
    gpr_price_list_rec.description := '<price_list_description>;
    gpr_price_list_rec.operation := QP_GLOBALS.G_OPR_UPDATE;
    -- delete the price list line rec
    gpr_price_list_line_tbl(K).list_header_id := <price_list_header_id>;
    gpr_price_list_line_tbl(K).list_line_id := <price_list_line_id>;
    gpr_price_list_line_tbl(K).list_line_type_code := 'PLL';
    gpr_price_list_line_tbl(K).operation := QP_GLOBALS.G_OPR_DELETE;
    --dbms_output.put_line('before process price list ');
    QP_PRICE_LIST_PUB.Process_Price_List
    ( p_api_version_number => 1
    , p_init_msg_list => FND_API.G_FALSE
    , p_return_values => FND_API.G_FALSE
    , p_commit => FND_API.G_FALSE
    , x_return_status => gpr_return_status
    , x_msg_count => gpr_msg_count
    , x_msg_data => gpr_msg_data
    , p_PRICE_LIST_rec => gpr_price_list_rec
    , p_PRICE_LIST_LINE_tbl => gpr_price_list_line_tbl
    , p_PRICING_ATTR_tbl => gpr_pricing_attr_tbl
    , x_PRICE_LIST_rec => ppr_price_list_rec
    , x_PRICE_LIST_val_rec => ppr_price_list_val_rec
    , x_PRICE_LIST_LINE_tbl => ppr_price_list_line_tbl
    , x_PRICE_LIST_LINE_val_tbl => ppr_price_list_line_val_tbl
    , x_QUALIFIERS_tbl => ppr_qualifiers_tbl
    , x_QUALIFIERS_val_tbl => ppr_qualifiers_val_tbl
    , x_PRICING_ATTR_tbl => ppr_pricing_attr_tbl
    , x_PRICING_ATTR_val_tbl => ppr_pricing_attr_val_tbl
    IF ppr_price_list_line_tbl.count > 0 THEN
    FOR k in 1 .. ppr_price_list_line_tbl.count LOOP
    dbms_output.put_line('Record = '|| k ||
    'Return Status = '|| ppr_price_list_line_tbl(k).
    return_status);
    END LOOP;
    END IF;
    IF gpr_return_status <> FND_API.G_RET_STS_SUCCESS THEN
    RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
    END IF;
    dbms_output.put_line('after process price list ');
    for k in 1 .. gpr_msg_count loop
    gpr_msg_data := oe_msg_pub.get( p_msg_index => k,
    p_encoded => 'F');
    dbms_output.put_line('err msg ' || k ||' is: ' || gpr_msg_data);
    null;
    end loop;
    EXCEPTION
    WHEN FND_API.G_EXC_ERROR THEN
    gpr_return_status := FND_API.G_RET_STS_ERROR;
    -- Get message count and data
    --dbms_output.put_line('err msg 1 is : ' || gpr_msg_data);
    WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
    gpr_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
    --dbms_output.put_line(' msg count 2 is : ' || gpr_msg_count);
    for k in 1 .. gpr_msg_count loop
    gpr_msg_data := oe_msg_pub.get( p_msg_index => k,
    p_encoded => 'F');
    -- Get message count and data
    dbms_output.put_line('err msg ' || k ||' is: ' || gpr_msg_data)
    null;
    end loop;
    WHEN OTHERS THEN
    gpr_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
    -- Get message count and data
    --dbms_output.put_line('err msg 3 is : ' || gpr_msg_data);
    end;
    commit;
    --- exit;
    Reference Documents
    Note 362667.1

    Name: Chris Mentch
    Region: US/Americas
    Contact E-mail: chris.mentch at mentchconsulting.com
    Website: http://www.mentchconsulting.com
    Time working with BC: 1.5+ years
    Programming Languages: PHP, JSP, Javascript, Ruby/RoR, Jquery, .Net (if I have to), SOAP API
    Custom BC Client Applications: Integrating custom external applications with Business Catalyst through eCommerce and CRM APIs.
    Name: cindy radford
    Region: Americas Canada
    Contact E-mail: [email protected]
    Website: http://.com
    Logo: Link to your logo image (no larger than BC standard partner image, I will place this at the top of your listing)
    Time working with BC: new
    Programming Languages: Cobol and mainframe, starting web development
    Third Party API Experience: Cobol
    Custom BC Client Applications: None as of yet
    Name: eBridgeConnections
    Region: Americas, APAC, Europe, Africa
    Contact E-mail: [email protected]
    Website: http://www.ebridgeconnections.com
    Logo: http://www.ebridgeconnections.com/images/ebhome/logo.png
    Time working with BC: 1.5 years
    Programming Languages: n/a - Back-office integration with 40+ accounting/ERP systems
    Third Party API Experience: 20+ eCommerce platforms, CRM (SalesForce)
    Custom BC Client Applications: B.C. API integration
    Name: OneSaas (www.OneSaas.com) - Cloud Integrations Made Easy
    Contact E-mail: [email protected]
    Website: http://www.onesaas.com
    Time working with BC: 2 yeras
    Third Party API Experience: We integrate over 35 cloud platforms with BC. We know every API from almost every system.

  • GetAsXML hangs on SAPbobsCOM.Documents invoiceObject

    Hi there. We have recently moved a customer to a new server, and upgraded from SBO 2005 to SP01.
    We have an addon that has worked smoothly before, that loops through invoices for a given date, and generates XML that is then sent to a third party which uses this for electronic invoicing instead of getting them on paper. The addon we use is written in C#, and the code is basically this:
    String sql = "SELECT T0.DocEntry, T0.DocNum, T0.Comments, T0.PaymentRef FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN NNM1 T2 ON T0.Series = T2.Series  WHERE T0.DocDate = '" + date + "' AND T2.SeriesName = 'XML-UF'";
    rs.DoQuery(sql);
    int total = rs.RecordCount;
    String[] xml = new String[total];
    while(rs.EoF == false)
         int docEntry = (int)rs.Fields.Item(0).Value;
         int docNum = (int)rs.Fields.Item(1).Value;
         SAPbobsCOM.Documents invoiceObject = (SAPbobsCOM.Documents)MainClass.SBOCompanyObject.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
         invoiceObject.GetByKey(docEntry);
            xml[t] = invoiceObject.GetAsXML();
         //... more happens here
         rs.MoveNext();
    The problem is this: After moving to a new, improved server, the application hangs after xml[t] = invoiceObject.GetAsXML(); The cpu goes 100%, and it just hangs. After some 5-10 minutes it seems like it continues to the next row. This used to take no time at all on the previous PC where it ran. What might be the problem? Is there some XML-library that is missing on the new computer? Everything else seems to work fine, including other addons, but the GetAsXML() doesn't work as it should anymore.

    I managed to reduce the 15-minutes of fame for the getAsXml() to 2.5 minutes by adjusting SBOCompanyObject.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
    However, that is still waaay too slow. As I said, it took max 7-8 seconds in PL:06, and as there is a lot of invoices, I simply don't have the time to wait even 2 minutes for each.
    Well, as time was running out, I have finally managed to implement a workaround for the problem, sort of. Since getAsXml() did not work as it should in pl45, I had to manually loop through Documents and Document_Lines and make the Xml myself, gladly omitting fields that I don't need. Luckily it seems to work fine. And I'm down to a couple of seconds again. Hopefully the getAsXml() will be fixed so that others don't have to stumble into the same problem as I, but maybe the function will work more smoothly for others, who don't have complex invoices with 200-300 lines based on several different orders.

  • Update document lines user fields

    Hi,
    I'm trying to update a user field of a purchase invoice line through the DI API.
    The Update method returns 0, but the field isn't updated!
    I use this code:
    Dim RetVal As Integer
    Dim Doc As SAPbobsCOM.Documents = DirectCast(Company.GetBusinessObject(oPurchaseInvoices), SAPbobsCOM.Documents)
    If Doc.GetByKey(_CurrentDocId) Then
        Doc.Lines.SetCurrentLine(0)
        Doc.Lines.UserFields.Fields.Item("U_CONAI").Value = "Y"
        Doc.UserFields.Fields.Item("U_IB_OldProtI").Value = 987
        RetVal = Doc.Update()
        If RetVal <> 0 Then Beep()
    End If
    Updating a user field on the document (not on the lines) works fine!
    Can anyone help me please?
    I'm using SAP 8.8 SP 0 PL 11
    Thank you
    Paolo

    Hi Paolo,
    I think the reason behind the inability to change document row data, and also most of the header data, is due to both legal requirements and information transparency (mainly accounting, stock and taxes).
    I share your view that the update function should return a value other then 0 when the document is not updated. You can suggest this change by opening a post in the Product Development Collaboration forum.
    Kind Regards,
    Vítor Vieira

  • How to insert a row in UDO of type document with document line using DIAPI

    Does somebody knows if there is a way to insert a new row in a UDO of type document and document lines using the DI API?
    I tried it by using <i>oCompany.UserTables.Item( "PMX_DOC" )</i> but this was not working.
    Thanks for the help.
    Regards,
    Jeffrey

    We have to insert the row in a server process so it is not possible to use the UIAPI.
    I wanted to do it by writing SQL statements to do the insert/update/deletes but it seems that we are not allowed to do this if you want to certify your addon. Does somebody knows how we can get an addon certified but also updating our own UDO using DIAPI?
    Thanks.
    Regards,
    Jeffrey

Maybe you are looking for