Adding Territories via DI API

Hi,
I'm trying to add a territory using Territories object of DI API, but I keep getting error -2035, as the territory is always added with TerritoryID = 0, which is restricted. The AutoKey in ONNM table for this object (200) is ok (set to 2).
Is there a solution to this problem? I'm looking forward to your answers.

Hi Piotr,
Could you post up a code sample? If you are setting all mandatory fields it should be working and otherwise might be an issue.
As a workaround, have you tried adding one in the application, and then attempting the add through the DI API again?
Regards,
Niall

Similar Messages

  • Creating a Good Receipt PO via DI API No matching records found (ODBC -2028)

    Hi,
    I trying to create a Good Receipt PO via DI API.  It is working when the user I used to log in to SAP via the DI API is a Professional User but when I changed it to a Limited Logistics User, I'm receiving the No matching records found (ODBC -2028). I have already added the SDK Tools license to that user but still I'm receiving that error.
    So is it that the DI API will only work with a Professional User license or I can still use a Limited Logistics User?

    HI J S L,
    I get same error when I use different user that I just now add the SDK Tools without restarting the database server.  But previous user that I added SDK Tools before restart, no error.
    Today
    User 1 - add SDK Tools, no restart, error
    Last Wednesday
    User 2 - add SDK Tools, no restart, error
    Today - database server restarted this morning
    User 2 - no more error
    Both User 1 and 2 are Limited Logistics User.
    Best regards,
    Dennis

  • Cannot create AR Invoice negative amount with WithHolding Tax negative amount via DI API

    Hi All,
    I tried to create AR Invoice Document via DI API, but with negative amount and negative withholding tax amount.
    Document added successfully, but when i open the document in SAP, and i open WTax Table information, withholding tax amount become zero,
    Please see image below.
    But when i add the same document through SAP Screen, i can fill WTax Amount with negative amount.
    SAP Version 9.0 PL 5
    Please kindly help,
    Thanks
    Best Regards
    Siddharta

    Hello.
    If this is different to the behavior of the B1 application it should be considered a bug - like any such difference between DI API and app.
    HTH

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • Corrupt Credit Note created via DI API

    Hello,
    when i try to create a credit note via di api i get the error message "one of the base documents has been closed", even if the source document is not closed. But this is not the main problem. After this i have a corrupt credit memo in my system, that means a credit memo with out any detail lines. The error occurs only on one customer systems, on a lot of other systems the creation of credit notes works fine. Had anybody the same effect or clue what causes this problem.
    Regards

    Hello we found the problem, i can reproduce it on a belgium database.
    I want you to inform about a critical error in the SBO_SP_TransactionNotification.
    If you check the line data of a document and send an error for this data the front end works fine. But if you use the DI-API the header data of document will be saved and the lines will be not saved.
    if @object_type in ('14','19') and @transaction_type = 'A'
    begin
    declare @corrCRD as varchar(8)
    if @object_type = '14'
    set @corrCRD = (select distinct(correction) from ovtg where code in (select vatgroup from RIN1 where docentry = @list_of_cols_val_tab_del) and correction = 'N')
    else if @object_type = '19'
    set @corrCRD = (select distinct(correction) from ovtg where code in (select vatgroup from RPC1 where docentry = @list_of_cols_val_tab_del) and correction = 'N')
    if @corrCRD = 'N'
    begin
    set @error = 1
    set @error_message = 'You have entered a regular VAT Code on the document, this is not allowed'
    end
    end

  • PO from SO via DI API:Base document card and target document card do not ..

    HI All,
    I am trying to create Purchase Order from Sales Order. This is possible by GUI (on Sales Order on logistics tabs Click On Purcase Orders CheckBox.
    I got the error message: -5002-Base document card and target document card do not match.
    The message itself can be understandable, because the Customer and Supplier has a different CardCode.
    I am sure I am using a correct code
    oPo.Lines.BaseType = BoObjectTypes.oOrders
    oPo.Lines.BaseEntry = sDocEntry
    oPo.Lines.BaseLine = iLineNum
    Where oPo is a Purchase Order document.
    sDocEntry is a Sales Order docentry and iLineNum is a Line number of Sales Order
    For other A/R to A/R and A/P to A/P documents are working fine.
    Has anybody found this error or has anybody created application like this?
    I am using sbo2007PL46
    Regards,
    J.

    Hi guys,
    this is still on the suggestion page:
    Link existing Purchase Orders to (Sales) Orders via DI API : View Idea
    I tryed with 9.1 PL 4 and it didn't work.

  • How to determine host status in a task via python api

    Hello all,
    using the python api I am having some issues trying to determine the status of a host within a task. For example I have a job, with one task and 10 hosts associated with that task. Eight hosts finish the task, 2 fail. However via the api I can only seem to determine the status of the job and the task. What I want is to be able to generate a report that basically matches what you see via the gui (ie 8 hosts ok, 2 hosts failed). The data structure OnStageTaskData gives me a status and a list of hosts, but not a status for each host. (Note I am not using any of the depricated functions/data structures). Currently my code looks like (minus the api init, etc)...
    # list all the jobs for last week
    joblist = api.GetJobs()
    for job in joblist:
    # if the job occured in the last week
    if job.c_time > reportstarttime:
    print "\nJob name %s Time %s " %(job.name, time.ctime(job.c_time))
    try:
    jobdetails = api.GetOnStageJob(job.id)
    except COsApiJobNotFoundException:
    print "Can't find job %s details" %job.name
    continue
    for tasks in jobdetails.job_data.tasks:
    for hostid in tasks.task_data.target:
    try:
    hostinfo = api.GetHostGroup(hostid)
    except OsApiHostNotFoundException:
    print "Can't find host details %s" %tasks.task_data.name
    print "Hostname %s Status %s" %(hostinfo.name, tasks.status)
    which generates output like...
    Job name chg233146-sol9 Time Sun Jan 13 10:31:42 2008
    Hostname tacnomsrv02 Status Failed
    Hostname tacpthsrv01 Status Failed
    anyone have another way to doing this or suggestions? Or is this kind of info not available via the api? Thank you.

    Hi ConnectSolutions,
    As you correctly pointed out, there is some bug in our code
    that keeps the room active and you dont receive any events or
    notification if you are entering as guest and waiting and the host
    arrives. Also, since you havent entered yet i.e your role is still
    5 i.e. UserRoles.LOBBY , you can't access any of the UserManager's
    collections and will get a length of 0 always. We will be fixing
    this with priority .
    But you can get around the problem as of now, by having a
    small shared model of yours ( any collectionNode or sharedModel
    will do) where you create a node and publish a message on it from
    the Owner's side whenever the owner/host enters to notify everyone
    that he has entered. Just remember to set the accessmodel of
    NodeConfiguration of node on which you are publishing to LOBBY ie.
    role = 5 , and make the publishModel = 100 so that only owners can
    publish on this node. In this way , any users waiting will be
    receiving this message and will know the host has arrived. If you
    can't get this sharedModel concept to work, let me know. I will try
    to run on my side.
    And as of our side regarding actual fix, we will fix this use
    case and put in the next drop of SDK and also update in forum about
    it.
    On the host side though, he is always notified when he enters
    if there are pending users knocking to enter. See the KnockingQueue
    example in case you want to explore that.
    Thanks
    Hironmay Basu

  • Unable to start process via GP API in which group is exposed as input

    Hi,
         I am not been able to start process using GP API for the particular senario.
    I created Process at design time.
    In this process I mapped parameters to a group and exposed this group, So that input is required for initiating the process.
    Now I want to initiate this process via GP API.
    I got sucess in starting processes which takes parameters as inputs or which does not need any inputs, but i was not been able to start process where group is exposed.
    it's giving me GP INVOCATION Exception.
    Please Help ASAP
    Regards,
    Pratik

    Pratik,
    I try to simulate with scenario described by you and I got success with my test.
    Follow my java code:
         public boolean initiateProcessSDN () {
              boolean ret = false;
              try {
                   IUser user = UMFactory.getUserFactory().getUserByLogonID("uces");
                   IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);
                   IGPProcess processTemplate
                        = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                                  "8DC0B411957D11DDB7910017F2EBE4A5", userContext);
                   IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
                   IGPStructure params     = GPStructureFactory.getStructure(processTemplate.getInputParameters());
                   params.setAttributeValue("NameGroup", "Pedro");
                   params.setAttributeValue("AddressGroup", "XPTO");
                   IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
                   IGPProcessInstance prInstance
                        = rtm.startProcess(     processTemplate,
                                            "Test 1",
                                            "Test 2",
                                            user,
                                            roles,
                                            params,
                                            user);
                   ret = true;
                   } catch (Exception ex) {
                        ret = false;
              return ret;
    Print screen about my GP design:
    Callable Object with 4 parameters
    http://img530.imageshack.us/img530/16/sdngpgroup001bt5.jpg
    Action grouping CO parameters into 2 groups
    http://img147.imageshack.us/img147/2006/sdngpgroup002xy3.jpg
    Process reflecting these groups as input parameters
    http://img147.imageshack.us/img147/9184/sdngpgroup003pp0.jpg
    Process started by java code above
    http://img530.imageshack.us/img530/8833/sdngpgroup004no4.jpg
    Best Regards,
    Pedro Nunes

  • Duplicate a BO via DI API

    Hello,
    as far as I know the only possible way to duplicate a document (for example a Sales Order) via DI API is to save it as xml and then to open it again. but it doesn't work properly, because I get a message "bad value RDR1.BaseLine line: 1". And if I change the property to one manually, the new document can be saved, but it can't be changed any more. I get a message "table rdr1 was changed by another user". What shall I do, so that it works properly?
    Best Regards,
    Alexander

    Hi,
    anfortunatly there is nothing I could omit. I need the same Document and also links to the base documents. There is a code below I used to duplicate a document.
    Private Function CopyDocument(ByVal oDoc As SAPbobsCOM.Documents) As SAPbobsCOM.Documents
            Dim oXmlDoc As New XmlDocument()
            oXmlDoc.LoadXml(oDoc.GetAsXML())
            For Each oNode As XmlNode In oXmlDoc.SelectNodes("//DocEntry")
                oNode.InnerText = ""
            Next
            oXmlDoc.SelectSingleNode("//DocNum").InnerText = ""
            oXmlDoc.SelectSingleNode("//JrnlMemo").InnerText = ""
            oXmlDoc.Save(Application.StartupPath & "\Document_" & oDoc.DocEntry.ToString() & ".xml")
            CopyDocument = moSBOCompany.GetBusinessObjectFromXML(Application.StartupPath & "\Document_" & oDoc.DocEntry.ToString() & ".xml", 0)
        End Function
    Can somebody help me?
    Best Regards,
    Alexander

  • Open AR Invoice-Drafts via UI-Api

    Hy All!
    Im loocking for a way to open the window of a AR Invoice-DRAFT using the UI.
    I need to open a specific Draft that i added bevore via DI, so i know the DocEntry aso. of my Drafts.
    I can't open the invoice-form, set it to "Search" mode and search for the Draft that i added bevore.
    Does somebody knows a way to do this ?
    Thanks!
    Regards Andreas

    Add an edittext and a link arrow object to a form.
    The link arrow should be linked to the edittext, and have a linkedobject of type lf_Drafts (112)
    You can then use UI code to put the DocEntry into the edittext, and then call the click method of the link arrow.  This will result in the Draft Invoice window (or other window depending on the type of draft document) opening with your record displayed.
    If you don't want to see the link arrow and editext, simply position them off the visible part of the screen.
    John.

  • How to get IPv6 site prefix via Windows API?

    Hello,
    we need urgent help. We have to automatically configure a postgres sql server. For this reason we need to determine the IPv6 site prefix. Using windows command line this is pretty easy:
    netsh interface ipv6 show siteprefix
    We are only interested in the site prefixes themselves, e.g. no lease time is needed. We want to get this information via Windows API.
    For this purpose we use GetAdaptersAddresses function. Within the result of
    FirstPrefix the needed information is included. But it's much to much information and it's not clear for us how to filter the result. We need always
    exact the same result like the command above produces.
    Any help or hint would be very very appreciated.
    Greg

    Hi Valery,
    I mean a Portal Resource..
    Inside portal, when a go to properties  of a specific document, in tab "Access Link" it shows a "Short Id".
    I'd like to know via API how to get this Id, or any other Code that it's unique for every resource or document in portal.
    Thank you!

  • Add UDF to OPOR ,OINV ... via DI API

    Hello...
    i want to add a User Defined Field to Documents via DI API. Is this possible? And if its possible, please show me a way to do it thx
    best regards
    Matthias

    this is just what i have tried.
    But i found the mistake.
    The function always puts an "@" before the tablename if there is none. And thats not good
    thx
    Matthias

  • Extract image and Features from the Catalog via JAVA API

    Hello,
    I would like to Extract image from the Catalog via JAVA API, Can anybody help on that? I also tried to extract the Features field form the Catalog but results in the error "Features field not found" Any ideas what could have wrong?
    Many thanks,
    Dharmi

    Hello,
    Can anybody tell me where i can find the latest JAVAAPI reference guide? I found the one for MDM 5.5 SP 1 but that also refers to the last parameter of the CatalogCache.Init as int and not string.
    I looked up in service.sap.com/instguides -> SAP Netweaver -> Release 4 -> Installation and there only following 3 files are there for MDM 5.5 SP2
    MDM 5.5 SP02 - Configuration Guide  SAP MDM
    MDM 5.5 SP02 - Installation Guide   SAP MDM
    MDM 5.5 SP02 – ERP-MDM Field Mapping and Check Tables
    Regards,
    Dharmi
    Message was edited by: Dharmi Tanna
    Message was edited by: Dharmi Tanna

  • How to call business rules scripts via Java API

    Hi
    I have a problem. I have some scripts (business rules in essbase) that can be seen thru Administration Services Console under Business Rules folder. How can I execute these script using Provider Services (via Java API to EssBase interface)?

    hi
    i look too java api sample for "HBR Lounch"
    you can try found example in EAS folder
    C:\Hyperion\AdminServices\AppServer\InstalledApps\Tomcat\5.0.28\eas\webapps\hbrlauncher\MC_LaunchWindow.jsp
    please back, if you will have resolution :)

  • 2007A PL8 UOMs are missing when creating a document via DI-API

    If a document is created via DI-API the UOMs are missing.
    The behavior till PL8 was that UOMs were taken from the item master when creating a new document.
    Regards

    This is a confirmed Bug. The DI-Api always uses the Inventory UoM. As work around you have to put the Sales UoM into the Inventory UoM.
    I hope they we will fix this soon.
    Regards

Maybe you are looking for

  • What is the diffrence between business Activity and task?

    Hi plz explain business activity and  task Madhavi

  • Snagit Screen Caps not displaying properly

    I am adding pop-up graphics within a Snagit screen capture. The popup graphic has a border around it. I resize the canvas so that there is room for the popup. Looks fien when viewed in Snagit. When the image is displayed in RoboHelp however, any bord

  • JSP Dynpages

    I created a JSP Dynpage via NWDS. based on the sampples at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/19/4554426dd13555e10000000a1550b0/frameset.htm">SAP Help Creating the JSPDynPage</a> When I run it, I got the error: Error in parsing tag

  • Drag and Drop Action

    Hi, I have create a drag and drop slide, i wish to have difference  "Interaction" so that my A B C will have it own right and wrong image. i have try to insert the Action, example:i have create Action for A ,Show Image_17 when Success and show Image_

  • Tried to sync with previously used computer/itunes and lost new photos

    I just synced my Iphone 4 but used my old iphone's setting (already on my computer) Now I have lost my photos from my 4... I'm not sure how to restore to how it was before I tried syncing it with my computer...