Instanciation of a business object in ABAP?

Hello,
I know that you can call the methods of business objects with BAPIs. But I want to instantiate a business object directly in the ABAP code. Does anybody have a code example for doing this?
In theory I think that I have first do define a reference variable of the objecttype of the buisness object. Than I have to call the Create-Methode of the business object and assign the returned object to the reference variable. Is this correct?
Thanks.
Regards, Lars.

Lars,
Some more info to add to what Peter has already explained well.
If you are going to call a method that has parameters (like a Create method as you mentioned) you would need to create and populate the container as follows.
swc_container wa_container.
   swc_set_element wa_container 'Element1'  'Value'.
   swc_set_table wa_container 'Element2'  Itab.
Also make sure you are not calling a dialog method in a background context!
Cheers,
Ramki Maley.

Similar Messages

  • Business Objects And ABAP Objects ?

    hi all!
    May be this is a repitition but still :
    Can anyone give me a clarification on Business objects and abap objects in termas of difference-relations b/w them.
    regards
    sachin

    Hi Sachin,
    Please refer the below links,
    Business Object Repository and Class Library
    business objects
    Hope this helps.
    Regards,
    Hema.
    Reward points if it is useful.

  • Is there a way to use business objects in the program or function module?

    Hi Experts,
    Is there a way to use business objects in the program or function module.
    Thanks in Advance.
    Naval bhatt

    Hi Naval,
    Ofcourse you can use business objects in your programms/ methods.
    You can use function modules or macros (available from include <cntn01>) for using business objects in your application.
    refere following two links for startup information
    http://www.sap-img.com/abap/reading-attribute-of-a-business-object-in-abap.htm
    http://www.jt77.com/business-warehouse/work-flow-12619.html
    Regards,
    Abhijit

  • Scheduling a Business Objects 4.0 Webi from Abap

    Is there a way to pass in prompts and schedule a Webi report in Business Objects 4.0 from Abap? We have a situation where we want to email out a webi report to each of our sales reps with their particular sales information based on salesid.
    Right now we would have to create and maintain about 250 individual scheduled jobs in Business Objects and that is a maintenance nightmare so I was wondering if we could use our scheduler in our ERP6.0 environment and write an Abap program to pass in the parameters needed to schedule the job in BOBJ.
    For example, every Monday the Abap job would run and collect all salesmen info including salesid and email address and would then use that info to send the info to BOBJ to schedule and run the reports one time.
    Hopefully what I am wanting is clear.
    Thoughts?
    Thanks,
    Mike

    Priyanka,
          You need to STOP the Adaptive Job Server, this will STOP all scheduling jobs.
    Regards,
    Ajay

  • Invocking Business Objects Explorer from ABAP

    hello all,
    Is there any class available in ABAP which can be used to invoke BOE from ABAP so that we can pass the data in our internal tables to it and display it visually using business objects explorer.
    Is there any other such way in which the data in internal tables can be displayed in form of graphs to the user in ABAP
    Warm Regards,
    Naveen M

    Check if this FM is what u r looking for : SWO_TREE_GET_BUSINESS_OBJECTS

  • Integartion of Business objects explorer with ABAP ALV

    Hello all,
    We have a requirement to integrate one of our applications with business objects explorer. The complete details is as listed below:
    1. Our application basically collects feedback provided by users and then displays an ALV with all the feedback ratings received for a topic.
    2. It summarizes to the user the average rating received, number of 1star ratings , 2 star ratings etc.,
    3. Instead of showing this in the ALV format we have requirement where we want to upload this data into the Business Objects explorer so that the user has a more user-friendly and intutive display of the same data rather than in a ALV.
    Any inputs on how we can trigger business objects explorer from ABAP code and pass the data in the internal table used for ALV display to it would be very helpful.
    Warm Regards,
    Naveen M

    HI Naveen,
    there has been a demo of this by Enterprise Geeks during TechED 2009 and the code is posted on their website.
    the other option is to export the data to Excel and then use BusinessObjects Explorer in the cloud for example.
    ingo

  • Issue regarding [Work Flow] Business Object Event Raise in ABAP Program

    Hi All,
    I have one issue regarding [Work Flow] Business Object Event Raise in ABAP Program.
    Actual TDS is as below:
    If E message type written, raise Business object BUS2005 (Production order) Event PickShortage for production order passing warehouse, transfer request
    (BUS2065 Object key) in event container. Also include table of text version of error
    messages for this set of Transfer
    Request.
    Can anybody tell me how can i write it technically in ABAP Code.
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    Can anybody solve above posted issue!
    Thanks,
    Deep.

  • How to Execute the Business objects created in ABAP from webDynpro applicat

    Wht is the steps , or where the help documents are available for accessing the Business objects created in ABAP or R/3 systems from webDynpro project.

    Hello Vishal,
    I couldn't find any useful documents for your purpose.
    However i had a similar requirement and had implemented the same using GCP APIs. But before i send you the code help, i would like to know your exact requirement. What are you trying to achieve? Are you just wanting to execute the BO and get the result? Or is your requirement has got something more to do?
    Regards,
    Sudeep.

  • How can we use business object (e.g. crystal report ) in webdynpro abap

    Hi All,
    We all know that business object has been part of sap products.
    But even though in SAP, I really don't know much about business object.
    and how can we use the great function of BO and integrate into our development to make
    user have much better function and user experience.
    Do we have some learning material of BO?
    Could someone share some material here?
    Thanks and Regards
    Aaron.

    One of the main ways that you can integrate some Business Objects content with WDA is via FlashIslands.  If you are on 7.01 or higher, you have the option to use FlashIslands UI element.  There are many tutorials on FlashIslands available on SDN. FlashIslands work well with Xcelsius content, since the output of Xcelsius is a Flex component.  It is pretty easy to set the Xcelsius interface to External Connection and then write a wrapper Flex Component around the generated output, so that it can be used in the FlashIslands interface.
    For Crystal Reports integration you will need NetWeaver 7.02 (comming early next year).  We have integrated Crystal Reports as an output option in the Web Dynpro ABAP ALV and the Classic Dynpro ALV.  You don't need to do any development to enable this.  You can use two different SAP delivered Crystal Reports templates for the ALV output, or create and add your own templates.
    Some of ther BOBJ integration is still in prototype and demo phase within SAP.  For instance we have a data interface to send data to Explorer onDemand from any ABAP application. We have a prototype FlashIsland for WebI to run in place within Web Dynpro ABAP.  Over future enhancement packages you will see increased integration opportunties with the BOBJ capabilites.

  • Regarding [Work Flow] Business Object Event  Raise in ABAP Program

    Hi All,
    I have one issue regarding [Work Flow] Business Object Event Raise in ABAP Program.
    Actual TDS is as below:
    If E message type written, raise Business object BUS2005 (Production order) Event PickShortage for production order passing warehouse, transfer request
    (BUS2065 Object key) in event container.  Also include table of text version of error
    messages for this set of Transfer
    Request.
    Can anybody tell me how can i write it technically in ABAP Code.
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    Can anybody solve above posted issue!
    Thanks,
    Deep.

  • Business Objects and BAPI (SAP-ABAP)

    Hi Friends,
        Could anyone help me about followings:
          1) what is Business Objects, SAP Business Objects in SAP ?
          2) Why it is used  ?
          3) what is BAPIs, why it is used, How it is works actually ?
          4) we have ALE and EDI to communicate data between SAP-SAP and SAP-NonSAP respectively.why we go for BAPIs?
          5) What is OOPs,how it works in realtime ?
    Please treat it as urgent.
    Thx in Adv.
    Bobby

    Hi Bobby,
    Answers for your OOPS question
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    ++++++++
    Helpful links and examples ........
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    http://www.erpgenie.com/sap/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Thanks, Aby Jacob

  • ABAP ER Switching to Business objects

    Hi ,
    I am ABAP technical Consultant with 5 yrs of Exp. I wanted know whether an ABAPER can swtich to Business Objects.Please help me to take a decision. Do we need to have any prerequisites for swtiching to BO.Please guide me.
    And If Yes, please let me know where to start from? Need your valuble advice.
    Thanks in advance,
    Rinky.

    Hi Ingo,
    Thanks for your positive reply, which has given me a good confidence.Could you please guide me like where to start from? And also is there any prerequisites to learn Business objects? Please guide me and need you valubale advice.
    Thanks a lot,
    Rinky Kesh

  • Calling Business objects Methods from ABAP program

    Hi All,
    Can anyone please tell me the procedure to call methods of business object(Ex: BKPF) from an ABAP program. My requirement is to check the existence of a object key by using the method EXISTENCE CHECK from BKPF. Please help

    Here is an example from the SAP documentation.
    [http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/content.htm]
    Cheers
    Graham Robbo

  • CALLING BUSINESS OBJECT FROM AN ABAP REPORT

    Hi friends,
               I have a business object to which a Custom Function Module is assigned in one of its method.This Function Module calls a Bapi to update a Service Order.I need to capture the status of Idocs regarding success or failure from the function Module in the ABAP Report.I would like to know if there is any way to call this business object from my report and get the status of IDOC.
    Regards,
    Dev Reddy

    sorry I think i was not clear in explaining .I am calling a BAPI to update 'Priority' field of service orders in a custom function module(remote enabled) and I have assigned this bapi to a custom business object. Also I have developed an ALE interface thru BDBG transaction which automatically generates custom basic idoc type,messsage type ,Ale i/b and o/b function modules.
    Actually my requirement deals with a report where we have list of service orders in an internal table and pass each service order to update Priority field.
    Is there any way to create an IDOC from the report and update the priority field and pass back the status of IDOC.
    I have tried calling ALE O/B function function module generated thru BDBG transaction in my report but as a result i am unable to get any of the message whether idoc is created or not.
    Here is my report code.
    data: it_methods type table of BAPI_ALM_ORDER_METHOD with header line,
          it_header type table of BAPI_ALM_ORDER_HEADERS_I with header line,
          it_header_up type table of BAPI_ALM_ORDER_HEADERS_UP with header line,
          RECEIVERS TYPE TABLE OF BDI_LOGSYS WITH HEADER LINE.
    T_METHODS-REFNUMBER = '000001'.
    IT_METHODS-OBJECTTYPE = 'HEADER'.
    IT_METHODS-METHOD = 'CHANGE'.
    IT_METHODS-OBJECTKEY = '000004000768'.
    APPEND IT_METHODS.
    CLEAR IT_METHODS.
    IT_METHODS-REFNUMBER = '000000'.
    IT_METHODS-METHOD = 'SAVE'.
    APPEND IT_METHODS.
    IT_HEADER-ORDERID = '000004000768'.
    IT_HEADER-PRIORITY = '2'.
    APPEND IT_HEADER.
    IT_HEADER_UP-ORDERID = '000004000768'.
    IT_HEADER_UP-PRIORITY = 'X'.
    APPEND IT_HEADER_UP.
    CALL FUNCTION 'ZZ_FM_SM_ORD_PRIOR_UPDATE'
    EXPORTING
       OBJ_TYPE                      = 'ZBOSMPRUPD'
       SERIAL_ID                     = '0'
      TABLES
        ITMETHODS                     = IT_METHODS
        ITHEADER                      = IT_HEADER
        ITHEADERUP                    = IT_HEADER_UP
        RECEIVERS                     = RECEIVERS
      COMMUNICATION_DOCUMENTS       =
      APPLICATION_OBJECTS           =
    EXCEPTIONS
       ERROR_CREATING_IDOCS          = 1
       OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    Dev Reddy

  • Business Object Builder: Instanciating Objects

    Hi everybody,
    is it possible to instanciate a object from BOB in ABAP programm?
    The object should be found in the Business Object Builder.
    regards Mario

    Hello Mario
    The business "objects" in the BOR (business object builder) have nothing to do with OO objects.
    Here are a few example of classes (transaction SE24) related to business objects:
    - CL_REEXC_COMPANY_CODE (company code)
    - CL_WB2_DOC_FACTORY (documents like sales orders, etc.)
    - IF_WB2_DOC (interface for documents)
    Regards
      Uwe

Maybe you are looking for

  • Gmail Contacts Import Refuses My .CSV File

    I have created a file in Numbers of contacts for gmail. I have exported it as a .csv file and I selected Western Mac OS Roman (When this failed I tried Unicode and Windows Latin1) Both of those failed to be accepted by gmail too. Each time I try and

  • Help on custom caret painting

    Hello all! I am developing a very custom editor (not only characters, but also drawings, etc) -- therefore need a caret blinking somewhere text exists. Tried out the following code: * Paints only caret. * @param pGraphics * @param pLineHeight private

  • Restore one full backup(need to move), 1 differential backup,2 transaction log backup

    Is following script correct? I don't need to add "move" when do restore differential, log later. Correct? RESTORE DATABASE AdventureWorks FROM DISK = 'C:\AdventureWorks.BAK' WITH MOVE 'Adventureworks_DB' TO 'C:\test\Adventureworks.mdf', MOVE 'Adventu

  • How to move data from one cell/sheet to another

    Hi - Help! I have a spreadsheet with multiple columns & rows for ordering clothes. The first column is  text of each item & it's size. What I want to do is: IF D15 has a number in it, I want that number and the text from A15 to populate into another

  • TS1702 Apps not downloading correctly

    Tried to download Game apps like back in september 2012 and they are still showing Being downloading, and is January 2013. Please help! Thanks.