How to create UDO by code?

Hi,
the UDO is very useful,but how to create udo by code ?
who has the samples ? can you send It to me by email or  can you paste it in here ? thanks .
pls ,someone have said It can find in the path "C:\Program Files\SAP Manage\SAP Business One SDK\Samples  " ,but I can't find it . there are only 'COMUI' and 'Utility Projects' files .and I also have installed the DI API .
so please email it to [email protected]
Thanks again.

Hi Adele,
Thanks ,I have got the email.
and my version is 'SAP Business One 2004.2 B (7.30.224)  SP: 00  PL: 30'
this is my code that have writed before.
Public Sub AddUDO()
    Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
    Set oUserObjectMD = SBO_Company_DI.GetBusinessObject(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 = tNO
    oUserObjectMD.CanYearTransfer = tYES
    oUserObjectMD.ManageSeries = tYES
    oUserObjectMD.ChildTables.TableName = "APS1"
    oUserObjectMD.Code = "OAPS"
    oUserObjectMD.ManageSeries = tYES
    oUserObjectMD.Name = "OAPS"
    oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
    oUserObjectMD.TableName = "OAPS"
    oUserObjectMD.FormColumns.FormColumnAlias = "Code"
    oUserObjectMD.FormColumns.FormColumnDescription = "Code"
    '子UDO
    lRetCode = oUserObjectMD.Add()
        '// check for errors in the process
    If lRetCode <> 0 Then
            SBO_Company_DI.GetLastError lRetCode, sErrMsg
            SBO_Application.StatusBar.SetText sErrMsg, bmt_Short, smt_Error
    Else
            SBO_Application.StatusBar.SetText "success", bmt_Short, smt_Success
    End If
    Set oUserObjectMD = Nothing
End Sub
and the error message is 'N' ,It's very stange.
but why I can't find it in Tools -> User-defined-object -> default form ?
anyway ,thanks a lot !
Message was edited by: wei wang

Similar Messages

  • How to create an address code for PO delivery address?

    Hi Guys,
    How to create an address code for the delivery address in the purchase order? Please explain me with details.....
    Thanks
    Raja

    delivery adress records can be created with transaction MEAN.
    the number is purely internal.
    In ME21N you can then search by name (you will certainly not know the number)

  • How to create a transaction code for a function group with screen 100 as st

    Hello ,
    I have requirement where I need to create a function group and create screen 100, 200, 300 and include the function in the screens.
    Customer asked me to create a transaction with the screen 100 as the starting screen.
    Can you please let me know how to create a transaction code for a function group with screen 100 as starting screen.
    [ It is not a module pool program ].
    Thanks
    Prashanth.
    Moderator message - Please ask a specific question and do not ask the forum to do your work for you - post locked
    Edited by: Rob Burbank on Jun 2, 2009 11:49 AM

    Go to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
    Name of screen field:                               Value
    D_SREPOVARI-REPORTTYPE                RW
    D_SREPOVARI-REPORT                        ZPCA
    Save and transport accordingly.

  • How to create a Transaction code for a Report Painter Report

    Hi All,
    Can any one let me know the procedure as to how to create a t-code for a user defined PCA report. I have created a PCA report (copied the existing report (8a26-001) and named it as zpca and assigned the same in a new Report Group ZPCA (the group is created by copying 8a26 group) and assigned it under the library 8a2. We have added few fields required by the user to the Z report.
    Now i need to create a transaction code for that zpca report. can anyone suggest how to go about it.
    Useful answers will be appropirately rewarded.
    regards,
    radhika

    Go to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
    Name of screen field:                               Value
    D_SREPOVARI-REPORTTYPE                RW
    D_SREPOVARI-REPORT                        ZPCA
    Save and transport accordingly.

  • How to create new tax codes

    how to create new tax codes
    Service Tax 4% on 33% VAT 4% on 90% Non Deductible
    Service Tax 12.24% on 33% VAT 4% on 90% Non Deductible
    regards
    anil

    Hi Anil,
    This is an example from Italy:
    Local purchases 20% 40% recoverable
    Base Amount                                                     100    0         BASB
    Round.Up Output Tax             MWS                    110    100       MWAI
    Input Tax Round.up                VST        8.000      120    100       MWVI
    N.d.input tax                         NAV                      140    100       MWNI
    Non-ded.InputTax -RU            NVV       12.000     150    100       MWZI
    Acqu.Tax Outgoing-RU          ESA                       200    100       NLAI
    Acqu.Tax Inc.- Ro.up             ESE                       210    100       NLVI
    VST is the deductible tax and NVV the Non Deductible tax.
    I hope that you can use this and that you don't have to change your calculation procedure.
    Paul

  • How to create "valuation group code" in ECC system

    Hi,
    How to create" valuation group code" in ecc system and what is the path to create valuation grp code
    Thanks&regards
    kishore kumar

    Use the following IMG path.
    MM -> Valuation and Account Assignment -> Account Determination -> Account Determination without wizard -> Group together valuation areas (T Code OMWD).  The Val.Grpg Code in this customizing is a freely definable 4-character code.  You can then use this as valuation modifier in MM-FI account determination (OBYC).
    Assign pts. if this answers your question!

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

  • HOW to create new transaction code in SAP

    Dear All
    Thanking you for your cooperation
    Pls help,
    how to create a new transaction code and link with the process??????????
    Thanking you

    Hi
    you can crete Transaction code in Transaction SE93.
    To create a transaction code:
    Enter a transaction code (up to 20 characters).
    Choose Create.
    A dialog box appears. Enter a short text and choose the transaction type.
    The transaction type can be as follows:
    Dialog Transactions
    Report Transactions
    Object-Oriented Transactions
    Variant Transactions
    Parameter Transactions
    In a report transaction, you use a transaction code to start an executable program (type 1). An executable program usually has three steps - data entry (selection screen), data processing (often using a logical database ), and data output (list).
    To create a report transaction, use the Transaction Maintenance transaction (SE93). Once you have entered a transaction code and short description, choose transaction type Program and selection screen (report transaction).
    When you define a report transaction, you can specify the selection screen and variant with which you want it to start.
    You can also protect the report transaction against unauthorized use. To do this, enter the name of an authorization object in the corresponding field.
    Dialog Transactions
    In a dialog transaction, the flow of the program is determined by a sequence of screens. The screens that are called within a transaction should belong to a single ABAP program, usually a module pool (type M program).
    To create a dialog transaction, use the Transaction Maintenance transaction (SE93). Once you have entered a transaction code and short description, choose transaction type Program and screen (dialog transaction).
    You can create transaction codes for Custom query;s created using SQVI also
    Thanks & Regards
    Kishore

  • How to create an Undefined Code Combination from API? (Urgent)

    Hi All,
    I used the following API to create the code combinations in a Inventory custom form.
    SELECT CHART_OF_ACCOUNTS_ID INTO :PARAMETER.CHART_OF_ACCOUNTS_ID
    FROM ORG_ORGANIZATION_DEFINITIONS
    WHERE ORGANIZATION_ID = :PARAMETER.ORG_ID;
    FND_KEY_FLEX.DEFINE(
    BLOCK => 'XX_MRN_TRX_HEADERS',
    FIELD => 'TO_ACCOUNT',
    CODE => 'GL#',
    APPL_SHORT_NAME =>'SQLGL',
    NUM => ':PARAMETER.CHART_OF_ACCOUNTS_ID',
    ID => 'TO_ACCOUNT_ID',
    VRULE => '\\nSUMMARY_FLAG\\nI\\nAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWED\\nN\\0GL_GLOBAL\\nDETAIL_POSTING_ALLOWED\\nE\\nAPPL=INV;NAME=INV_VRULE_POSTING
    nN',
    REQUIRED => 'N',
    DINSERT => 'Y',
    VALIDATE => 'FULL',
    USEDBFLDS => 'N');
    This creates the correct ccid if the combination is already available in GL (gl_code_combinations_kfv), But when its a new combination it returns '-1'.
    How can I create an Undefined Code Combination from API in custom forms?
    If any one one can help me on this it'll be a great help.
    Thanks

    Solved by Using FND_FLEX_EXT.GET_COMBINATION_ID.
    Thanks

  • How to create 2 transaction codes for same report program with diff title

    Hi All -
      I have created report program and create 2 transaction codes with different short description. I want to display the Tcodes decriptions instead of program attributes title.
    Can anyone pls tell me how to do this?
    Thanks,
    Kannan

    Hi Kannan,
    define 2 titlebars t1 and t2 for the report. In report initialization,
    IF sy-tcode = 't1'
      SET TITLE t1.
    ELSE.
      SET TITLE t2.
    ENDIF.
    Regards,
    Clemens

  • How to create New TaX Code

    Dear Expert,
    I am new in SAP so can U plz tell me each steps how to create a new tax code, i have gone through sdn forum but this is not sufficient
    my co. requirement is
    BED 10%, Cess 2%, HS E Cess 1%, VAT_D 3% (Input).
    Kindly tell me every step I will gv U full points.
    Thanks in Advance

    Hi Expert,
    As mentioned above, Go to T-Code: OBYZ,
    Firstly select the Conditions, here should define the condition types for the Tax Procedure.
    Secondly we have a Access Sequence, were we use pre-defined.
    Thirdly we have to create a Tax Procedure, here we need to assign the created condition types and Account Type.
    Where Account Types are used to trigger the GL Accounts, we assign GL Accounts in T-Code: OB40 with respect to Account Types.
    In T-Code: FTXP, We create a Tax Code and this Tax Code in used in T-Code: FV11, Her we maintain the percentage with respect to the Combination and Tax Code, this combination are pre-defined(i.e., Access Sequence)
    and Configure complete CIN Settings from the below link:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207dd2ad-bf92-2b10-a88b-e3a4a01ca7fc?QuickLink=index&overridelayout=true
    Maintain CIN Master Data in T-Code: J1ID and for India Localization Menu in T-Code: J1ILN
    Regards,
    GK
    SAP

  • How to create a tax code?

    Hi Experts,
    Please help me to create the Tax code step by step.
    CENVATECSHSECS+13.5 % CST (NON CREDITABLE)
    Regards,
    Sumeya

    Hello
    For your desired sequence or calculation of Tax in TAX code, then
    1. you need to have a proper Tax Procedure.
    2. after that you have to create a Tax code in Tcode FTXP (either Output or Input) with your relevant Tax % in respect tax.
    Refer the following link on Tax Procedure & Tax Code:
    - [Customizing For Tax Procedure- TAXINN|http://it.toolbox.com/wiki/index.php/SAP_CIN-MM_Customizing_For_Tax_Procedure-TAXINN#Customizing_for_Tax_Procedure_.E2.80.93_TAXINN|Take help of MM or SD consultant for this]
    Thanks & Regards
    JP

  • How to Create a T-Code for a Table ?

    Hi,
    I had a doubt - can we create a T-code for a user defined  table.
    Because in SE93 , there is no such specific option specified.
    Kindly Clarify.
    Advance Thanks.

    hi harini,
    this is the way u create.
    In transaction SE11, in the attribute tab of your z table check table maintenance check box. Go to SM30 transaction, enter the ztable name and click on maintain button.  Here you can enter new entries into the ztable .
    Or
    You can create a PARAMETER TRANSACTION for the transaction for SM30 . 
    Follow these steps :
    1. go to transaction SE93 , give your own transaction code say ztran_tab, for maintaining your ztable.
    2. Click on create button and check the radio button Transaction with parameters (PARAMETER TRANSACTION) and click on the tick button.
    3. In the next screen enter default values:
                            transaction : SM30
                            check the check box skip initial screen
    4. Scroll down you will find a table control for default values
            Name of the screen field      |       value
        VIEWNAME                          |       your ztable name
        SHOW                                    |         X
    Save your work.
    Now as you have created a custom transaction for maintaining your ztable this transaction can be called from any program with CALL transaction 'XXX'
    with regards,
    magesh

  • How to Create a trigger code for turning on light bulbs in flash and animate images professional cs6

    hi,
        i designed a very interactive music website in illustrator and photoshop and i am trying to animate the main page design in flash professional and eventually publish it as HTML5. There are couple of questions i need to ask before starting
    1) should i import my design in differnet layers from illustrator into flash professional in order to make it easier to isolate and animate specific parts of the web page?
    2) i want to have a roll over effect that allows certain features in the page to turn on and off when the mouse hovers over them. can you explain how to do that? any tutorial videos i could follow
    3) what format should i use when importing my illustrator design into flash professional
    4) how should i animate the content pop out from the safe box into the main screen in flash professional (i have never used this program before, so i will be going off video tutorials and whatever suggestions/help you would have)
    **The idea is to have a content frame fly out of the safe into the screen (the size will increase rapidly and it will fade into the screen as well while rotating 360 degrees for one revolution). The content is a basic rectangular frame i designed in illustrator. The body of this frame will be transparent allowing me to embed the main page features into it eg music, videos, bio etc. All this will be done in the later process, the main issue is figuring out how to animate the content frame into the screen and also creating a click feature that allows the content to fly back into the safe and then the safe closing in.
    Secondly, the trigger code rollover effect that allows certain features light to turn on when the mouse hovers over it and turn over when its not.****

    I think you'll get most flexibility by turning on the feature that lets you keep your Illustrator layers as Flash layers. You'll also want to check the box that lets you make an Illustrator object into a MovieClip for anything that you want to interact with or address through code.
    Add an event listener for MOUSE_OVER that triggers whatever functions you need to create to turn on the features. This means that your object that you will mouse over will need to be a MC, as well as any other objects that will be addressed (for example, calling play()) will need to be a MC. You'll want to have a matching MOUSE_OUT handler that stops MC's, hides them, or whatever.
    You should probably organize your Illustrator file so that the objects you need to address are on their own layers. This includes nested objects. Name things informatively. Remember, if the first import doesn't give you exactly what you want, you don't have to save the change--you can edit your settings or the Illustrator file and try again.
    Look into motion tweens. I highly recommend the books "How to Cheat at Flash" and "Animation with Scripting." I don't really think the way they tell you to script will advance your career if you want to be a software architect, but if you just want to animate the occasional widget, it's fine.

  • How to create NLBCluster from code (C#)

    Hi,
    I am trying to create and configure NLB Cluster (Network Load Balancing Cluster) and add node from C# app. At this moment I'm trying to use WMI class MicrosoftNLB, but there are only administrative methods.
    If i try to use this for instance
    ManagementScope NLBScope = new ManagementScope("\\\\localhost\\root\\MSCluster");
    ManagementPath mgmtPath = new ManagementPath("MSCluster_Cluster");
    ObjectGetOptions objGetOptions = new ObjectGetOptions();
    ManagementClass mgmtClass = new ManagementClass(NLBScope, mgmtPath, objGetOptions);
    ManagementBaseObject inParams = mgmtClass.GetMethodParameters("CreateCluster");
    but there is an exception "Invalid namespace" - and looks like smth is wront with that ManagmentPath.
    I appreciate any help here.
    Regards

    There's no direct way to load x64 powershell into a C# process.  You could execute your code through x64 powershell from a x86 process with some rerouting of pipelines like is done in the sample code for the blog post I wrote about
    routing powershell commands through other users' sessions in remote desktop services, but that's far more complicated than is necessary to accomplish what you're trying to do.
    Your simpler options off the top of my head:
    1.  Compile your app 64-bit or MSIL without 32-bit preferred checked if you have no 32-bit dependencies
    2.  Use the WMI/CIM queries directly.
    3.  Load the NetworkLoadBalancingCluster module manually in your powershell session by giving it the full path to the 32-bit version when loading it (if it exists - depending on your version of Powershell it has different searching capabilities if you
    don't give it the full path)
    WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

Maybe you are looking for

  • Importing IProcurement project in JDeveloper

    Hi, I am using Oracle APPS 11i. My JDEV_HOME_USER = C:\JDev\Jdeveloper9i\jdevbin\jdev\bin I followed all the steps as mentioned in http://oracle.anilpassi.com/running-oa-framework-page-from-jdeveloper-audio-video-demo.html. I copied the $JAVA_TOP/ora

  • It won't show any of my artwork... PLEASE HELP!

    Anyone know what I can do? I manually put all the album covers in each song and it won't show on my Ipod nano..

  • How to make my websites look good in iPhone and iPad?

    I have problem to make my website in iWeb look good in webbrowsers in iPhone or iPad... The background (JPEG-file)are dublicating several times! But that's not a problem for all my different sides, thou it was build in the same way. Here's the site (

  • Can I use a USB superdrive DVD reader/writer with a mac pro?

    The internal CD/DVD read/writer in my macpro (2 x 2.66 ghz dual-core xeon) broke, so I purchased an external USB superdrive, thinking I could use it as an external drive. It does nothing when plugged into the mac pro, I cant even insert a disk. It se

  • Only in a admin session works InDesign and Illustrator!

    When I open some products (Indesgin for example) in a session without admin permission, it doesn't work. All is well y I open the software in a admin session but I don't like to use admin session normally, only for instalations. It's not so safe to w