Business object reference in ABAP Classes

Hi All,
Here is my requirement.
1) I have a Business Object (say e.g BUS2012) instance in my workflow container
2)  I have a task in my workflow referring to a Z-Class and its method (M1)
3)  I want to access the attributes of the above Business Object (BUS2012)in the method (M1)of the class.
Please let me know how ?  Sample code will be more helpful.
Thanks,
Deb

Hi Deb,
Please check the following [thread|Re: Creating instance of Business Objects;
Hope this helps!
Regards,
Saumya

Similar Messages

  • How to Handle Business Object event in ABAP class

    Hello Everybody,
    I wanted to know if it was possible to reference BOR objects in ABAP class and handle BOR events in ABAP Objects.
    Thanks in advance.

    Hi,
    Catch the et_VALIDATE event, when InnerEvent = False and ItemChanged = True.
                If pVal.EventType = BoEventTypes.et_VALIDATE Then
                    If pVal.InnerEvent = False And pVal.ItemChanged Then
                        'TODO Your code here...
                    End If
                End If
    Regards,
    Vítor Vieira

  • 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

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

  • BOR reference in ABAP Class

    Hello,
    I am writing method in ABAP class which I will link to the Workflow Step. I want  to access values of one of the Workflow Element which is Multiline and refering to BOR Object Type. My queries are as below:
    1. How should I define Importing Parameter of Method which will import values from the Workflow Element which is Multiline and refering to BOR object type.
    2. If I change value of that Workflow Element (Multipline refering to BOR object type)  in ABAP class method, will it be automatically reflected in Workflow Container due to binding?
    Edited by: Ashwin Sonkusare on Apr 1, 2011 3:35 PM

    Hi,
    1. How should I define Importing Parameter of Method which will import values from the Workflow Element which is Multiline and refering to BOR object type.
    Please create a table type same as workflow multiline element type. ( You can also use standard table if present ).
    Then use this table type as the type of the import parameter of the class.
    Then u can pass the multiline element of workflow to  abab calss
    2. If I change value of that Workflow Element (Multipline refering to BOR object type) in ABAP class method, will it be automatically reflected in Workflow Container due to binding?
    If u change the Workflow Element (Multipline refering to BOR object type) in ABAP class method, then  u need to update the values of the workflow multiline element through reverse binging ( binding abap class to WF ).
    Thanks and regards,
    SNJY

  • 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

  • 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

  • Get information about business object from view implementation class

    Hi,
    i´d like to develop some button behavior in a view. How can i get the information of the related business object like the order or the position. I like to disable buttons if specific status are set.
    Bye Richard

    hi,
    Is needed field available in context nodes or not?
    for example:
    If you want to read STATUS_DESCR attribute from the context node SELECTEDDOC , then code like this
    lr_selected ?=  me->typed_context->SELECTEDDOC->collection_wrapper->get_current( ).
    if lr_selected is bound.
      lv_status = lr_selected->get_property_as_string( 'STATUS_DESCR' ).
    endif.
    activtae the debugging in IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS method and check the values for context nodes and attributes.
    I mean debugging for:
    me->typed_context
    me->typed_context->SELECTEDDOC
    comp_controller
    regards
    ismail

  • [WF Attributes] DDIC vs ABAP class

    Hi,
    I am having a hard time understanding which CL (ABAP Class) does not behave like DDIC structure.
    I use both in my Workflow but I cannot manage to pass data (meaning reference) and trigger the Workflow
    - from the FM 'SAP_WAPI_START_WORKFLOW'
    - from an event
    Am I forced to use the IF_WORKFLOW (I don't see why I have to use the FIND_BY_LPOR method ??) ?
    -> if the static method FIND_BY_LPOR is returning the value, what has gone all the job in the first place ?)
    I have simply created a customer-specific class that would avoid me adding new structure to the Workflow container and the Workflow Tasks again and again... simply extend the class and the element will all follow.
    Many thanks in advance for your help.
    Best regards,
    Guillaume

    Hello Guillaume,
    I know this is closed but an interesting discussion nevertheless. The first part I am confused about is what exactly you are trying to accomplish and why:
    >
    Guillaume Garcia wrote:
    I have simply created a customer-specific class that would avoid me adding new structure to the Workflow container and the Workflow Tasks again and again... simply extend the class and the element will all follow.
    Why can you not do this with a DDIC structure? I use this a lot. Particularly useful if you work with MOVE CORRESPONDING in your code. Just extend the structure and new fields are automatically transported (if they exist in the DB of course).
    OO in WF is generally used in the same way as a BOR. The distinction is Business Object versus an OO class as you would use in an ABAP program.
    >
    Karri Kemppi wrote:
    As far as I know (and understand your point) it is not possible. Maybe someone disagrees with me, but I am happy to hear about that. The object instantiates itself whenever it is needed in the workflow. And during the instantiation you need to populate the attributes of the object, etc...
    Correct, but.... if you are really determined, there are some tricks you can use: Who cares whether your object really exists in the DB, as long as your FIND_BY_LPOR always returns an instance. If this is always the same instance it can work. The thing to be careful of is that you MUST have an unbroken chain of tasks that execute in the same logon/RFC session. Once that session ends (e.g. by switching users/background tasks) the data is gone. Needless to say you need to know exactly what you're doing.
    Cheers,
    Mike

  • Calling Portal event from ABAP class

    Hi Experts,
    I need a following clarificatrion, Please help,
    1. Is it possible to call a webdynpro method from a normal ABAP class?
    2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    3. Is there any ways with which we can call portal event from ABAP class?
    Thanks,
    Shabir

    >1. Is it possible to call a webdynpro method from a normal ABAP class?
    I wouldn't necessarily recommend this approach. You shouldn't try to trigger events or any of the standard WDDO* methods from outside the WD Component itself.  That said, you can pass the object reference (like the WD_COMP_CONTROLLER object reference or the View Object Reference) into methods of normal classes.  Be careful if you are finding yourself calling a lot of your added methods from outside WD.  This is probably a sign that these methods should be in the Assistance Class or some other Class functioning as a Model Object.
    >2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    What exactly do you want to do here?  Do you just want to get the relaxation script?  For what purpose?  You should never need to inject the relaxation script into WDA. 
    >3. Is there any ways with which we can call portal event from ABAP class?
    To what purpose.  Do you just want to delegate the triggering of the event that is inside WD Component to be called from a class?  If so you can pass the portal API object reference into a class from the WD Component.  However this only works while running within WD.
    How is this class used?  Are you running in WD?  Are you trying to generate some HTML code that runs in the portal independent of WD?

  • Passing object references via methods

    Why is the JFrame object not being created in the following code:
    public class Main {
      public static void main(String[] args) {
        Main main = new Main();
        JFrame frame = null;
        main.createFrame(frame);  // <-- does not create the "frame" object
        frame.pack();
        frame.setVisible(true);
      private void createFrame(JFrame frame) {
        frame = new JFrame("createFrame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }Thanks.

    These explanations are great; real eye openers.
    OK. This could be a "way out in left field" question. I am just starting out with Java. But I want to ask:
    Objects are stored in the heap?
    Object references and primitives are stored on the stack?
    Adjusting heap size is straight-forward. A larger heap can store more/larger objects. What about stack sizes?
    C:\Dev\java -Xss1024k Main
    I assume this refers to method's stacks. But, what about object scoped, and class scoped, object references?
    public class Main {
      private static List list = new ArrayList(); // class scoped
      private JFrame frame = new JFrame();  // object scoped
      public static void main(String[] args) { ...... }
      private void createFrame() { .... }
    }How is the reference to list and frame stored, with regard to memory management?
    Do objects have stacks?
    Do classes have stacks?
    If not, how are the list and frame references stored (which helps me understand reference scoping).
    Would the overflow of a method stack (ex. via recurssion) also overflow the method's object and the method's class stacks?
    If these questions are stupid, "out of left field", don't matter, etc. Just ignore them.
    But the knowledge could help me avoid future memory related mistakes, and maybe pass a "Java Certified Developer" exam?
    My original question is already answered, so thanks to all.

  • Object references and array of integers

    Hello,
    Taking some java test, I came across the following question:
    Given the below (UML) diagram, how many of the ClassA attributes will be object references when this class is implemented in the Java language?:
           ClassA                                         <<enumeration>>   
                                  ------------------->         Enum1
          var1 : int                                              
          var2 : String                                         Elem1
          var3 : int[]                                          Elem2
          var4 : float                                          Elem3
          var5 : Double                                         Elem4
          var6 : Enum1   I answered 3, but the correct answer was 4. The one which I did not include was var3. Why will var3 be an object reference?
    Thank you,
    Mihai

    That is true, my mistake. Arrays are object references (you do indeed instantiate an array by using the new keyword), but I was thrown off by what the array holds, namely primitive types, not object references.
    Thank you,
    Mihai

  • SES: Making Business Object 2032 searchable

    Hello,
    I tried to make the Business Object u201Ccustomer orderu201D (Bus2032) searchable with TREX 7.1 and ERP System 6.0, but the indexing failed.
    I made what is described in the following thread:
    SES - Making New Business Objects Searchable?
    I copied the class CL_COM_SE_BUSOBJ_TEST_FLIGHT. So I had a class that implements the interface IF_COM_SE_BUSOBJ. Then I entered the Business Object and the new class in the table COM_SE_BUSOBJ, first with the transaction se11 and after that with spro.
    But in the SES_Admin the Business Object has no title.
    And when I tried to create an index with the SES_Admin the indexing failed with errorcode 000.
    Can anyone help me?
    Is it possible to make the BO bus2032 searchable? How?
    kind regards
    Ramona

    Hi Ramona,
    >> Is it possible to make the BO bus2032 searchable?
    I do not see any reason, why it should not be.
    If you followed the documentation and the linked SDN thread there must be some error in the details.
    Please let me know, if I should hook you up with some SAP employed consultants to assist. Their service, however, may not be for free...
    Best, Karsten

  • Field-symbols v/s Object references in OO-ABAP

    Hi,
    can anyone please tell me what is the difference between using field-symbols and object references in OO ABAP? Is there a specific need for field-symbols now that we have references?
    Thanks.
    Shakul.

    Hi ,
    Please note that both Field symbols & Object References are different .
    You can use Field symbols during the following situations
    1) When you want to modify the value of internal table, the field symbol would be useful since you do not have to use any Modify statement as in case of work area. The Field symbol works as a pointer and any changes to the field symbol will directly affect the value of the internal table
    2) Make sure that you do not reassign the field symbol within a Loop iteration
    3) Field symbols are useful when you work with dynamic internal tables ( tables whose structure is determined during run time)
    4) After Read an internal table ( Read itab...) into a Field symbol, make sure you do a Sy-subrc check or check if the field symbol is assigned.IF not this will give you a run time error
    You can use Object References while creating an object to a class. They are instances of a class.
    Thanks,
    Chakram Govindarajan

Maybe you are looking for

  • G/l Account Balances Report with Cost Center

    hi all, In F.08 T-code i need to place a Parameter of Cost Center in G/L Account Selection and after executing the report i need to place populated cost center field at the last column. Please help me in creating this report with different possibilit

  • Total payment due calculations in PO

    Hi, Can anyone tell about the calculations involved in total payment due,tax,freight, discount and total before discount in PO? waiting for ur hopeful answers.......

  • How to raise debit note to third party

    Hi, I have done service for Cmpany X.  Company X paid the amount to me instead of Company Y.  But Company X has to claim the service amount from Company Y. How to raise the debit note toCompany Y from Company X? If anybody knows, pl. help me immediat

  • SIP REFER with UCCE and CUPS SIP Proxy

    I am running UCCE 8.0.1 with CVP and CUPS as the SIP proxy.  I am looking to transfer calls to PSTN and release from CVP to free CVP ports.  I am using the rfxxxxxxx method in the ICM script, which seems to work fine from CVP.  However the SIP proxy

  • Update camera raw for cs5

    i am trying to update my camera raw. I have purchased a nikon 5200. I can't find the version of raw i may already have . i am using CS5 can someone please help i need it for my assignment