How to use business object Bus0002 to create a company code?

Dear all,
I wanna create a companycode with BO BUS0002 , And I want to transfer the necessary data such as description and currency without the maintain screen.
But the parameters of the CREATE method does not contain these kind of parameters. my question is how can i create a BO with completed data.
I found the BO BUS0002 have several attributes such as description and currency
and so on. Can I set these attributes? But how?
Your kindly help will be greate appreciated.

Hi
your program must be having the include which contains all the macros (swc_get_element) you are using
in your program. if you are using include <cntain>, it does not contain the macro "swc_call_method" to execute BOR methods. so remove this include from ur program and add include <cntn01>. or simply call the function module used in that macro, it is : 'SWO_INVOKE'. replace &1, &2, &3 with the variables you r passing in macro.
  call function 'SWO_INVOKE'
       exporting
            access     = 'C'
            object     = &1-handle
            verb       = &2
            persistent = ' '
       importing
            return     = swo_%return
       tables
            container  = &3.
Regards
Vishal Kapoor

Similar Messages

  • How to use  Business Object like Vendor or PurchasingInfo

    Hi,
    How to use Business Object ( like Vendor or PurchasingInfo ) from my Object?
    For example:
    CLASS myEntity DEFINITION.
              PUBLIC SECTION.
                   METHODS: getVendor EXPORTING pVendor TYPE Vendor.
               PRIVATE SECTION.
               DATA: aVendor TYPE REF TO Vendor.
    ENDCLASS.
    CLASS myEntity IMPLEMENTATION.
    METHOD getVendor
               pVendor = aVendor .
    ENDMETHOD.
    ENDCLASS

    Hi,
    I am giving u a demo Program for ur doubt.
    REPORT demo_class_counter .
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS: set IMPORTING value(set_value) TYPE i,
                 increment,
                 get EXPORTING value(get_value) TYPE i.
      PRIVATE SECTION.
        DATA count TYPE i.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD set.
        count = set_value.
      ENDMETHOD.
      METHOD increment.
        ADD 1 TO count.
      ENDMETHOD.
      METHOD get.
        get_value = count.
      ENDMETHOD.
    ENDCLASS.
    DATA number TYPE i VALUE 5.
    DATA cnt TYPE REF TO counter.
    START-OF-SELECTION.
      CREATE OBJECT cnt.
      CALL METHOD cnt->set EXPORTING set_value = number.
      DO 3 TIMES.
        CALL METHOD cnt->increment.
      ENDDO.
      CALL METHOD cnt->get IMPORTING get_value = number.
      WRITE number.
    For more demo programs type 'abapdocu' in the command field
    U will be getting some demo programs.
    There select the abap objects.
    Regards,
    Jagadish

  • How to use Business Objects in program

    Hi All,
    What are Business Objects? if i want to create PurchaseOrders how can i use this Business Object in my program.i know how to create PO through Bapi's.how can i use this Business Objects ??
    Thank you,
    Madhu Rao.

    Hi Madhu,
    The below links 2 will really help
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae4477488f11d189490000e829fbbd/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae4484488f11d189490000e829fbbd/frameset.htm
    Cheers!!
    VEnk@
    Edited by: Venkat Reddy on Oct 29, 2008 2:21 PM

  • Comraden! How to use business objects in Netweaver?

    And more specifically, how to import(put) some data in to business object from business process? For example a have process, wich i have released in Netweavwer developing studio, by using the perspective "process developing", "web dynpro", "composite application perspective", e.t.c.
    So my process is work perfectly, and i have created business objects, but i need on some steps of process input some data in to my business objects (for example from data contexts, or may be directly from user interfaces).
    Thank you, my friends!

    Hi Madhu,
    The below links 2 will really help
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae4477488f11d189490000e829fbbd/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae4484488f11d189490000e829fbbd/frameset.htm
    Cheers!!
    VEnk@
    Edited by: Venkat Reddy on Oct 29, 2008 2:21 PM

  • Extract account Based COPA from R/3 using Business Object data services

    Hello,
    We have a requirement to extract Account Based COPA from SAP R/3 to Teradata using Business Objects data services.
    I have read couple of white papers which give information on Rapid Marts( which are built in packages) already available for some applications like inventory, GL, AP, AR etc. But I could not find anything for COPA.
    Would anyone give me any information on how to use BO data services for COPA?
    Also if there is no rapid mart available for COPA, does anyone know how to create custom data marts in BO Data services?
    Is there any document available on this?
    Please respond as soon as possible.
    Thanks.

    Hi,
    this forum is for the SAP Integration Kit. Would suggest you post your question into the EIM area for Data Services.
    Ingo

  • How to Call Business Objects in Program

    Hi All,
    if i want to create PurchaseOrders how can i use Business Object in my program.i know how to create PO through Bapi's.how can i use this Business Objects and how to pass Vlaues into them?
    any Sample code>
    What are the diffrence between both PO upload bapi and business Object for PO.??
    Thank you,
    Madhu Rao.
    Edited by: madhubabu rao on Oct 29, 2008 10:41 AM

    Hi Madhu,
    Business Objects can be triggered via Work flow tasks. When ever you create a Purchase Order, check whether any standard event is getting triggered.
    Now create a work flow task with the above task as starting event, and link your BOR object to this.
    Or try to use the Function module SAP_WAPI_CREATE_EVENT.
    Regards,
    Subhani.

  • Hi expert, i am new i want to know how to start business object

    Hi all,
    I am working in sap b1. i want to use business object for my client.
    how to use and code in that if any one give ans very appreciate.
    how use excel in that.
    how to connect database with map and how to use selectors.
    how to use chart and connect with database
    Regards
    RajkumarGupta

    Hi Ravi,
    you can download all documents related to bo from help.sap.com. in that select business objects tab-> select all products -> from drop down list box select businessobjects-> based on requirement i.e. which version you want you can get all docs.
    If I understand correctly I think you want to create a report form excel. If that is the case then download Desktop Intelligence docs w.r.to our version and start practicing it.
    Thanks & Regards,
    Suresh Aluri.

  • SSO2DB / Use Business Objects Credential Mapping

    Hi,
    We standardized our universe connections to SQL Server on "Use Single Sign On when refreshing reports at view time". There however is an issue with this when scheduling reports, see
    1199774 - How to schedule Web Intelligence documents based on SSO2DB universes for Oracle and SQL Server to avoid scheduling issues
    Given the solution proposed there is not optimal for us, we are looking at an alternative by standardizing on: "Use Business Objects Credential Mapping" on the universe connection. We want to use OLE DB (SQL Server native connection) for querying.
    There are 2 ways to do this:
    1. On universe connection, in the tab "Database Middleware", we directly select OLE DB. This way we do not need to create a DSN. We however get: A database error occured. The database error text is: Microsoft SQL Native Client : Login failed for user '<user>'.. (WIS 10901)
    Apparently the default authentication mode to SQL server is "native". SQL server specific user. When we create a native SQL server <user> with same password as in the mapped database credentials in the CMC, it works fine. Indicating native SQL server authentication is used instead Integrated Windows authentication.
    Can we somehow change the authentication mode towards SQL server to Win AD?
    Can we get to the SSO2DB functionality in this way?
    2. When selecting ODBC on universe connection in tab"Database Middleware", we can still use OLE DB by creating a DSN based on the SQL Server native drivers. This also allows use to fix the DSN on authentication setting "With Integrated Windows authentication".
    When we run a WebI report from InfoView and select as one of the objects the "system_User", we get the service account running the SIA. This account is also running the WebIntelligenceProcessingServer.
    Does the credential mapping setting not work in this setup?
    We expected the DBUSER/DBPWD to be passed.
    See also SSO2DB / Use Database Credentials
    Quote "Use DB credentials is not kerberos it uses DBuser/DBpass variable for accounts if they are populated. I currently have an escalation in on this with SQL there may be a bug with AD users although SQL users work fine."
    Thx in advance!
    Raf

    Ganesh, using BO credentials will only work if you have BO logins that map to specific users in SAP BW.
    It may be that you wish to section the BW reporting differently to the SAP reporting or that there are specific requirements for a particular reporting area where you can in effect use an "overrule" to replace an individual's log in with one that has a wider set of access privileges for reporting purposes. Quite why you'd let them report on more than they can see in SAP, I don't know, but there you go!
    It's more traditionally used in database-based universes for a variety of reasons, particularly access.

  • Y AND HOW TO USE BUSINESS WORKPLACE

    Y AND HOW TO USE BUSINESS WORKPLACE
    IF U HAV SOME SNAPSHOT OR A SITE PLZ FWD ME
    POINT WLL B REWARDED
    REGARDS
    RONEI

    Hi,
    I am giving u a demo Program for ur doubt.
    REPORT demo_class_counter .
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS: set IMPORTING value(set_value) TYPE i,
                 increment,
                 get EXPORTING value(get_value) TYPE i.
      PRIVATE SECTION.
        DATA count TYPE i.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD set.
        count = set_value.
      ENDMETHOD.
      METHOD increment.
        ADD 1 TO count.
      ENDMETHOD.
      METHOD get.
        get_value = count.
      ENDMETHOD.
    ENDCLASS.
    DATA number TYPE i VALUE 5.
    DATA cnt TYPE REF TO counter.
    START-OF-SELECTION.
      CREATE OBJECT cnt.
      CALL METHOD cnt->set EXPORTING set_value = number.
      DO 3 TIMES.
        CALL METHOD cnt->increment.
      ENDDO.
      CALL METHOD cnt->get IMPORTING get_value = number.
      WRITE number.
    For more demo programs type 'abapdocu' in the command field
    U will be getting some demo programs.
    There select the abap objects.
    Regards,
    Jagadish

  • Restriction when using Business object

    hi all,
    Currently i want to use Business Object to create a new Company code. After searching the Business object in Transaction SWO1, I find 'BUS0002' can realize it. But there is only one import parameter of method 'create' , that's the company code key id. 
    Is there any solution to import other parameters,such as description of the company code, currency etc. when using the business object to create the company code?
    Thanks in advance.
    Vivi

    hi RS
       just writes a test program :
      DATA: BEGIN OF objectkey,
             bukrs LIKE t001-bukrs,
             butxt LIKE t001-butxt,
             ort01 LIKE t001-ort01,
             land1 LIKE t001-land1,
             waers LIKE t001-waers,
             spras LIKE t001-spras,
           END OF objectkey.
      objectkey-bukrs = '2010'.
      objectkey-butxt = 'My company code description'.
      objectkey-ort01 = 'NEW YORK'.
      objectkey-land1 = 'US'.
      objectkey-waers = 'USD'.
      objectkey-spras = 'EN'.
      swc_container container.
      lv_object_type = 'BUS0002'.
      swc_create_object obj lv_object_type ''.
      swc_create_container container.
      swc_set_element container 'objectkey' objectkey.
      swc_set_element container 'CORR_NUMBER' 'EB2K900952'.
      swc_set_element container 'SUPPRESSDIALOG' ' '.
      swc_call_method obj 'Create' container.
    At runtime session, there is no value transfered to the maintainence view except the company code id.
    When i go through the program of 'create' method,
    i found that:
    Call maintenance of CompanyCodeId
      CLEAR V_T001.
      V_T001-MANDT = SY-MANDT.
      V_T001-BUKRS = OBJECT-KEY-COMPANYCODEID.
      CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
           EXPORTING
                ACTION                       = 'INS '
                CORR_NUMBER                  = CORR_NUMBER
                VIEW_NAME                    = 'V_T001'
                SUPPRESSDIALOG               = SUPPRESSDIALOG
                INSERT_KEY_NOT_FIXED         = INSERT_KEY_NOT_FIX
           IMPORTING
                CORR_NUMBER                  = CORR_NUMBER
           CHANGING
                ENTRY                        = V_T001.
    so i guess, it should be enhanced some coding here, something like
    V_T001-BUTXT = OBJECT-KEY-description  ?
    but i am not sure about it.
    What do you think about it?
    Thanks again for your kindly help.
    Regards
    Vivi
    Message was edited by:
            Vivi Sun

  • How to Find Business Objects for any Tranaction .

    Hi Abapers,
                        How to find Business objects for any transcation.....  and how to connect the Work flow to  any  Trancation  so that for example any body changes the date of Birth ...... so that the work flow should trigger .
    Thanks & Regards
    Bhaskar Rao.M

    Hi Bhaskar,
    For finding business object,you can try transaction SWO4 and by checking the documentation in it you can find your required business object.
    Another method is:
    1) Go to Trx SWE4 and switch on the event trace.
    2) Run your transaction which you want to use for triggering your workflow.
    3) Run transaction SWEL and find your Business Object and related event in it.
    For connnecting your WF to your transaction you have to create a start event in your WF in SWDD,where in you specify the Business Object and start event which you find using above method.
    Eg.You want your WF to be triggered whenever you have an error in your idoc.For this your BO will be IDOCAPPL and your event will be (inputErrorOccurred).This you will give in header data in SWDD.
    Neerja

  • SAP Cloud SDK : Creation of Form using Business Object Error

    Hi Experts,
    I have created custom business object with object based screen and i want to create form for this custom business object.
    I have tried using this.
    Step 1. Right Click on Business Object and select Create Form option.
    Step 2. Enter the require information and click on Next 
    Step 3.  Select the element from the business object you need to display in the form
    Step 4. Select the default language English and Next and Finish it,
    After finish it the form open in adobe reader automatically but i am getting error as shown below.
    and In the solution explorer i can see this.
    Can anyone help me why it display the error while open the newly created form.
    What are the software i need to install or add-ons in my system to open the from or remove this error.
    I have installed the Adobe Life Cycle Designer For SAP Business ByDesign 135.0XXX, Adobe Reader X(10.1.3) , SAP Business ByDesgin Add-In Adobe Life Cycle designer.
    Kindly any software missing or any add-ons require to be install or upgrade?
    Many Thanks,
    Mithun

    Hello Alessandro,
    I have solved the multiple line display in the table.
    I have issue to display the no of character in the table.
    I have Create custom business object and create the form i am using the TectCollection type in table level in businessobject node.
    Case 1. This is my Entry1 in the business object and it display as shown below.
    Here in the table "Undefined Text" is my 1000+ character text.
    When i click on preview button the data display under the PDF as shown below.
    Here the above screen we can see that the data comes perfectly in the PDF without missing data in table level.(Please i have not rename the columns name).
    Case 2.  When i Create new entry 2 and enter the multiple lines into the table as shown below.
    Here in the above screen we can see that i have multiple row under the table.
    When i click on preview button the PDF display with all the line under the table but the data is missing under the third column as shown below.
    Here above screen display the same result but the in the yellow highlighted part full data not display as previous case 1.
    Why the full data display in Case 1 and not in Case 2?
    Is there any configuration to display data ?
    Also i can not change the property of the page in form to "Allow Page Break with Content" this option is disable.
    Kindly suggest me what is wrong in this PDF design.
    Regards,
    Mithun

  • How to use lock object? what we lock either total ztable or only record?

    Hi
    How to use lock object? what we lock either total ztable or only particular record?
    Don't tell create lock object on se11 with E letter & acll it in program with eENQUEUE & DEQUEUE.
    just tell me we will lock only particular record or total ztable?
    specify with example.
    Thanks.

    Hi
      Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.

  • Need to use business objects with a project, please guide on basics.

    Hello
    I am a dotnet developer (asp.net with C#). I am sorry I dont know much about Business objects. Our client a financial firm wants to use Business object with a web based application. I couldn't got a clear and good understanding of Business object. The client just said Business objects allows dynamically creating reports even clients can create reports very easily even without knowing SQL.
    Kindly guide me about Business Object product and its what component I should check for using it. Please mention some links that can give me introduction.
    Thanks a lot,
    haansi

    Hi
    Business Objects is not just one tool. You should ask your client what they will use e.g. Crystal Reports or Web Intelligence.
    Here you can see half an hour Webinars that give you a good understanding of Business Objects:
    Webinars
    Regards
    Roland

  • Add datas to UDT using business objects

    Hi,
    How to add datas to user defined tables using Business Objects.
    Regards,
    M.Dhivya.

    Hi,
    Check for following provided bt SAP...
    Dim ret As Long
    d
    Private Sub Add_Table_Click()
        Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
        Set oUserTablesMD = oCompany.GetBusinessObject(oUserTables)
        ' When adding user tables or fields, use a prefix
        ' identifying your partner name space. This will
        ' prevent collisions from different partner add-ons
        ' SAP's name space prefix is "BE_"
        'Set the two mandatory fields
        oUserTablesMD.TableName = "T1"
        oUserTablesMD.TableDescription = "Table1"
        'Add the table (which contains 2 default, mandatory fields, 'Code' and 'Name')
        ret = oUserTablesMD.Add
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Table: " & oUserTablesMD.TableName & " was added successfully"
        End If
    End Sub
    Private Sub Add_UDF_Click()
        Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
        Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)
        oUserFieldsMD.TableName = "T1"
        oUserFieldsMD.Name = "AlbUDF"
        oUserFieldsMD.Description = "Albert UDF"
        'Add the field to the table
        lRetCode = oUserFieldsMD.Add
        If lRetCode <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table"
        End If
    End Sub
    Private Sub Add_Data_Click()
        Dim oUserTable As SAPbobsCOM.UserTable
        Set oUserTable = oCompany.UserTables.Item(1)
        oUserTable.GetByKey ("T1")
        'Set default, mandatory fields
        oUserTable.Code = "A"
        oUserTable.Name = "Albert"
        'Set user field
        oUserTable.UserFields.Fields.Item("U_AlbUDF").Value = "1"
        oUserTable.Add
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table"
        End If
    End Sub
    Hope this helps,
    Vasu Natari.
    Edited by: vasu natari on Jun 12, 2009 11:21 AM
    Edited by: vasu natari on Jun 12, 2009 11:21 AM

Maybe you are looking for