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

Similar Messages

  • Add limits to step settings via TestStand API from LabVIEW

    Dear LabVIEW and TestStand Community!
    I'm trying to add FileGlobal Variables as limits to TestStand step NumericLimit programmatically, via LabVIEW, via TS API. I attach screenshot of the code, which I use (part of it - the module, which only sets values to low and high limit of the step), and also I attach, what I manage to get.
    In TS, when I open sequence file, after running of the code, I can see in the description line of the test, that it accepted limits, which I set from LV - you can see it from the screenshot, it is marked with yellow. But in the Tab "Limits", there are still default numeric values, not FileGlobal Variables.
    Could anyone explain, what doest it mean, and how to set up them correctly?
    Thanks a lot in advance!
    Solved!
    Go to Solution.
    Attachments:
    Limits.PNG ‏33 KB
    Add Limits.PNG ‏15 KB

    It's kind of sequence generator what I'm doing now...
    Thank you very much for fast reply, but when I setup "UsexxxExpr" to true, it doesn't change the situation... Could you, please, check my attachment? Maybe, some mistake in syntax?
    Attachments:
    Add Limits.PNG ‏23 KB

  • Unable to modify UDF after creating it via UI-DI API

    Hi,
    I've create UDTs and their relevant UDFs via DI API within a UI application. Now, although it does everything as expected, it does give me the following error if I try to modify any of the newly created UDF's from within SAP B1. The error I get is:
    [User Fields - Description - Edit Type] , 'Field cannot be updated (ODBC -1029)'  [Message 131-183]
    If I try to add default values or modify the field size etc. I get the above error. At this point no transactions have been created within the UDT of the UDF etither.
    Any ideas?

    Hi Gabriela ,
    Thanks for the post.
    I'm not sure though if I understand you correctly. You see I get the error message on every UDT and it's subsequent UDFs I create though code, only IF I try to edit them afterwards manually from within SAP.
    When the Addon starts, it checks to see if the tables exists, if not then it goes and creates them (and their UDFs). I can then write to and refence the fields no problems. It's only when I try to edit the field (even though there are no underlying values in the tables) that I get the error message.
    Now, if I understand you correctly you are suggesting that I delete the field manually (from SAP) and re-create them with the new changes? One problem with that would be then, that if I wanted to add more default values for example in the future AND there was already transactions recorded against that field, I don't think SAP will let me delete the field and re-create it?
    Surely, this sounds like a bug in the DI creation of the UDFs then.. I was hoping that there would be a setting, which I could set when I create the table and/or it's fields via code.
    Thanks for your help.
    Dev

  • How to add UDF table on the Againg AR report.

    Hello,
    I need your help.
    I'm using SAP B1 2007A SP:01 PL:10.
    On the Customer Receivable Aging report (detailed receivables againg report), I'd like to add Database "OINV" of UDF on Sales Order but when I try to select source type-database and I don't see the table "OINV" from the selection....
    Could someone help me this ?
    Thank you.

    Hello,
    This report is one of the hard coded PLD that do not allow you to add UDF.
    Thanks,
    Gordon

  • 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.  

  • How can I add credit to my account via PayPal? I don't have a credit card? Thanks.

    How can I add credit to my account via PayPal? I don't have a credit card? Thanks.

    Open iTunes.  Scroll to the bottom.  Click "Redeem".

  • 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

  • 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 a favicon to iweb via the HTML snippet...how?

    Is there a way to add a favicon to iweb via the HTML snippet?
    My search on google has found many ways to do it by editing the published files, but this is more work than it is worth (since it needs to be done on every new publish).
    Any ideas?
    thanks
    bob

    bob:
    There's been no way to add a favicon via HTML snippet that I've found. Using TextWrangler which can do multi-file find and replace doing it the old fashion way, post publication editing, is a little easier as described in Old Toad's Tutorial #22 - Adding a Favicon to Your Web Site.
    Send a feature request to the iWeb developers via http://www.apple.com/feedback/iweb.html
    OT

Maybe you are looking for

  • Broken Image on SSo Logout Page

    Hi, I'd implemented SSO as Partner Application on an HTML DB application. Everything works great, except for the Status Image on the Logout Page, that is not been showned correctly. How can I fix this problem. Is this a setting on the SSO Server, or

  • Can we include common buttons in Page template......

    Hi, we are on the process of developing a product using ADF. Now we have implemented a page template. Most of our pages contain the common buttons like [SAVE,DELETE,UPDATE,CANCEL,PRINT]. I am entirely new to this area. Can anyone advise whether we ca

  • Top N query with INLIST Iterator performance problem

    I have a top N query that is giving me problems on Oracle 11.2.0.3. First of all, I have a query like the following (simplified from the real query, but produces the same problem):     select /*+ gather_plan_statistics */ * from       select rowid   

  • Locked out of my old Apple ID.

    My first Apple ID was based on an old e-mail account that I no longer have access to.  I used this Apple ID to purchase songs on iTunes from 2005 until 2012 (625 purchases).  Since then, I have been told my password is incorrect and I need to reset i

  • Count (case when) not working in sql

    Hi All, I am trying to find the count of members for a perticular date range, it seems not working correclty. Could any one help me out. here is the query...I am getting same output for all the cases..please help Select t .MemberNbr,t.patcom count(ca