Assign methods to Business object

hi gurus..........
Can we assign a Method(BAPI)    to no. of Business objects?

Hi,
So i just want to know that is this possible that we specify a BO for the
workflow but do not specify the event.
Yes, To make things more clear BOR primarily is used to link and rasie the events that are defined in the BOR, but there might be cases where you might not have any events but still you need to start the workflow. The other purpose of the BOR is you create various methods in the BOR and you try to import and export differnet values and various manipulations are done with respect to the dat of the Business object instance.
that there will not be need of assigning any starting event for the workflow
Yes without  any kind of start events you can start the workflow by making use of standard SAP provided function modules SAP_WAPI_START_WORKFLOW all you need to do is pass the workflow template number let say WS99999999 and the values that you want to pass to the workflow container by making use of the tables parameter of the function module simple_container. Its a kind of name/value table.
I tried doing it in BASIC DATA of workflow but it was not possible from there
In this kind of sitituation basic data does not have any kind of significance. All you have to do is try to find a point like when ever end user clicks on submit button or try to find a BADI' or enahncement spot where you can call the workflow by making use of above mentioned function module.
But make sure you have the right interface all the data available at that point where you are calling the function module this is because you may hvae to pass the respectve data to the workflow container.
Regards
Pavan
Edited by: Pavan Bhamidipati on Dec 14, 2011 11:34 PM

Similar Messages

  • Error while accessing Method from Business Object

    Hello Experts,
    I have created a business object ZBUS7051 by using BUS7051 as a Supertype. I have crated a method GET_DATA in ZBUS7051. If I use BUS7051, Method GET_DATA in a standard task, getting a message that Method GET_DATA not defined for object type BUS7051.
    Why I am getting this error? Is there way I can use BUS7051-GET_DATA instead of ZBUS7051-GET_DATA.
    The workflow triggering event is BUS7051 u2013 CREATED. In the workflow binding, system is showing a warning that u2018Conversion from BO.BUS7051 to BO.ZBUS7051 can cause data-related errorsu2019. How to fix this? Please let me know.
    - Krishna.

    Thanks to everyone.
    I have delegated the custom business object to super type BO 7051. I triggered the workflow using T.Code: SWUE, BO: BUS7051. Event: CREATED. But the workflow is resulted an error as given below.
    Problems occurred when generating a mail
    Error '9' when calling service 'SO_OBJECT_SEND'
    Work item 000000503335: Object BUS7051 method WAIT_1_MINUTE cannot be executed
    Object does not exist
    Object does not exist
    Object does not exist
    Variables of the work item text cannot be generated
    Syntax error in expression &NOTIFICATION.NUMBER&
    (This is a Wait Step, Created in ZBUS7051, Method: WAIT_1_MINUTE)
    Since the delegation has done, I can say BUS7051 - WAIT_1_MINUTE, instead of ZBUS7051- WAIT_1_MINUTE. Is it correct?
    Could some one please let me know, How to fix the above issue?

  • Calling methods of business objects

    hi
    pls post some docs on calling methods in business obj's from abap programs.
    thkx
    P.S

    Do you share your solution?
    For other people interested, example for FMPSO object:
    INCLUDE <cntn01>.
      DATA : l_lotkz TYPE bkpf-lotkz,
             l_order TYPE swc_object,
             lt_fimsg LIKE fimsg1 OCCURS 0.
      DATA : BEGIN OF ls_key,
            sourcecompanycode LIKE vbkpf-ausbk,
            requestnumber LIKE vbkpf-lotkz,
             END OF ls_key.
        swc_container lt_container.
        ls_key-sourcecompanycode = 'value'.
        ls_key-requestnumber     = 'value'.
        swc_create_object l_order 'FMPSO' ls_key.
        IF sy-subrc EQ 0.
    * Validate
          swc_call_method l_order 'FlagReleaseSet' lt_container.
          IF sy-subrc NE 0.
            MESSAGE  e000(zz).
          ELSE.
    * Post
            swc_call_method l_order 'PostAll' lt_container.
            swc_get_table lt_container 'TFimsg' lt_fimsg.
            IF sy-subrc NE 4 AND sy-subrc NE 0.
               MESSAGE  e000(zz).
           ENDIF.
         ENDIF.
       ENDIF.

  • Calling Methods from Business Object BUS2032

    Hi all,
              Is it possible to call methods from the Business Object BUS2032.
       If so, how can it be done?? 
    Regards,

    Hi Marv,
    you sure can. Here is an extract from the SAP Help. I found it at http://help.sap.com/saphelp_46c/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/frameset.htm
    <b>Programmed Method Call</b>
    Call (fictitious) method Print of object type VBAK (sales document). The method receives the parameters Paperformat and Printertype as input.
    * Call method Print of object type VBAK
    * Data declarations
    DATA: VBAK_REF TYPE SWC_OBJECT.
    SWC_CONTAINER CONTAINER.
    * Create object reference to sales document
    SWC_CREATE_OBJECT VBAK_REF 'VBAK' <KeySalesDoc>
    * Fill input parameters
    SWC_CREATE_CONTAINER CONTAINER.
    SWC_SET_ELEMENT CONTAINER 'Paperformat' 'A4'.
    SWC_SET_ELEMENT CONTAINER 'Printertype' 'Lineprinter'.
    * Call Print method
    SWC_CALL_METHOD VBAK_REF 'Print' CONTAINER.
    * Error handling
    IF SY-SUBRC NE 0.
    ENDIF.
    Cheers
    Graham

  • Error Workflow not assigned to business object

    Hi Team,
        I am working on CRM 7.0 system
         I have a Z business object ,and I have created a new workflow and called one of the method of the z business object.
    And I am trying to trigger this workflow through a action definition based on status.while creating the action definition with respect to workflow I am getting the error "assigned BOR object type is not used in any workflows"  no F4 values
          I have debugged and found that the entry in the table SWDSCNTIDX is not correct.
    Kindly request you to guide me how to assign workflow to business object or how can I refer the workflow what I have created in action definition.
    Regards,
    Poornima

    Hi,
    You have to go the workflow change container element of that BOR e.g. "BUS2010030" and on tab "properties" check the checkbox "IMPORT" and "MANDATORY".
    Doing the above BOR will be available in the F4 help of actions profile wizard or conditions.

  • 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

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

  • Send mail with business object link

    Hi,
    can anyone please tell me, how can i send a mail with an business object as an attachement. when i clik on attachment, it should execute the method of business object which will display the document.
    it will be a great help,if any one can send the code.
    Thanks,
    naresh.

    Hi,
    You need classes CA_SAPUSER_BCS and CL_CAM_ADDRESS_BCS .
    CLASS ca_sapuser_bcs DEFINITION LOAD.
    CLASS cl_cam_address_bcs DEFINITION LOAD.
    You require the following local variables:
    DATA: send_request TYPE REF TO cl_bcs.
    DATA: document TYPE REF TO cl_document_bcs.
    DATA: sender TYPE REF TO cl_sapuser_bcs.
    DATA: recipient TYPE REF TO if_recipient_bcs.
    DATA: exception_info TYPE REF TO if_os_exception_info,
    bcs_exception type ref to cx_bcs.
    DATA: num_rows type i.
    DATA: textlength type SO_OBJ_LEN.
    First create a mail request:
    send_request = cl_bcs=>create_persistent( ).
    Create the mail sender:
    Get sender object
    sender = cl_sapuser_bcs=>create( sy-uname ).
    Add sender
    CALL METHOD send_request->set_sender
    EXPORTING i_sender = sender.
    You can define your mail address in this Web Application Server in the user maintenance.
    The mail can be sent to one or more addresses:
    Create recipient
    data: c_address TYPE ADR6-SMTP_ADDR.
    move mail_address to c_address.
    recipient = cl_cam_address_bcs=>create_internet_address(
    c_address ).
    Add recipient with its respective attributes to send request
    CALL METHOD send_request->add_recipient
    EXPORTING
    i_recipient = recipient
    i_express = ' '
    i_copy = ' '
    i_blind_copy = ' '.
    You receive the mail address as a string and you have to convert in into the required data type.
    The mail is sent to one address only without any additional attributes.
    You can now send the mail and write everything to the database.
    Send document
    CALL METHOD send_request->send( ).
    COMMIT WORK.
    You still have not taken any precautions against error situations.
    You can take care of this by embedding the following code in a TRY – CATCH block:
    try.
    ... Now the code comes after the creation of send_request up to the COMMIT WORK:
    catch cx_bcs into bcs_exception.
    if messages is not initial.
    messages->add_message( condition = 'mail'
    message =
    'Error occurred while sending the mail' )."#EC NOTEXT
    endif.
    exit
    endtry.
    Reward if it is helpful.
    Regards,
    Rajesh

  • Business Objects connection to SAP BI

    Can anybody explain me which communicaton method does Business Objects use to communicate with SAP BI? and what kind of interactions do they have?
    Thanks in advance.

    Hi,
    See if this is of any help.
    Best Practices for implementing Business Objects on top of BW 
    /people/ingo.hilgefort/blog/2008/02/07/businessobjects-and-sap-part-i
    /people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
    /people/ingo.hilgefort/blog/2008/02/27/businessobjects-and-sap-part-3
    /people/ingo.hilgefort/blog/2008/03/23/businessobjects-and-sap-part-4
    /people/ingo.hilgefort/blog/2008/03/24/businessobjects-and-sap-part-5
    /people/scott.jones/blog/2007/09/13/installing-and-configuring-sap-interactive-forms-by-adobe-for-the-sap-netweaver-composition-environment
    Hope this helps.
    Thanks,
    JituK

  • Business Object for MB31

    Hi,
    What is the business object attached to MB31? Thanks a lot!
    ~Mark

    Hi,
    Please check this...
    You can find more in BAPI transaction. and go to material management and then Inventory Management and then Goods receipt and double clik on create from data and checkout .........
    Method               CreateFromData
    Business object      GoodsReceipt
    Short description    Post Goods Movement
    New in Release       45A
    Function module      BAPI_GOODSMVT_CREATE
    ALE message type     Does not exist
    Regards,
    Venkatesh

  • About Business object

    hi experts ,
    what is the primary and secondary methods in Business objects?.
    and what are the primary and secondary methods?
    if helpful points ll be rewarded.
    thanks,
    vel

    There are no primary and secondary methods in BOR objects. All methods are equal. However, you may have secondary methods in a step of a workflow, and you can read more about that <a href="http://help.sap.com/">here</a>.
    The Wiki that was created by Mike Pokraka for <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/sapBusinessWorkflow+FAQ">SAP Business Workflow FAQ</a> (Frequently Asked Questions) is also a good place to start, although not necessarily for this particular question. There you can at least learn a little about the basics, preparing you to explore a little on your own before asking here.

  • How to debug Z-Prgram  defined under Business Object

    Dear Members,
    I have been trying to debug one Z-program which was defined under Business object(ZBUS2032OS) [ the method of business object is called from VA02(sales order Change], but I couldn't get the proper way to go into debug mode.
    I tried by putting break points in the z-program and  in the code of business object(where z-program is being called by SUBMIT statement). But I failed to go into debug mode of the program.
    Could any one please share your experience in this case?
    Thanks,
    Srini

    Hello DJ,
    Thank you for your response.
    I have checked the process (creating sub orders in VA02) by giving parent sales order, the program had been triggerd(Z-program) in back ground and created sub orders. But I did not get the debug mode(break point was set).
    I want to know what is link between Business object type(where program was defined) and Transaction VA02.
    Thanks,
    Vasu

  • EEWB business object

    Hi Experts,
    I am a starter in WebUI. I read a blog - [Enhance CRM views EEWB|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13987]
    In above blog in create extension wizard they are giving input for EEW business object and extension type. Assume I have a account overview screen in CRM and I want to add a custom field for this screen. Can you please tell me how to find the EEW business object and extension type for this scenario. Is there some tcode or some table where EEW bus object for different CRM screens in maintained which can be used in EEWB Tcode. Please share your valuable inputs.
    - Bharath

    Hi bharth,
    There is no separate Tcode to find out EEW business object and extension type ,
    Each extension type contains a structure by enhancing the structure we add new field to that structure .
    all related structure are grouped and assigned to one business object  . for example while working with employee details
    builcontactperson search .
    if you want to check all the relation's then enter tcode Genil_model_browser . there enter component set all and execute
    there u can find all relations.
    Regards
    Siva

  • Business Object Method is not Visible

    Hi Experts,
    I have created a custom business object and created a method for it in t-code SWO1.
    I am trying to use this object's method in one of workflow tasks. I entered the business object and I do not find the method in the method's list.
    I released the business object, still I do not find the method in pull up menu. Am I missing anything?
    Thanks!
    Babu.

    Hi Babu,
    Is this question being answered. If YES then please marked this question as answered.
    I do have some other solution. Hope this will work.
    Well, if you are trying to directly use the method of the Custom BOR in any of the custom task, then check whether the method have been marked as Instance independent?
    Double click in the method.
    Check the box and tick it for the Method to be instance independent.
    Generate it once again and check...
    Reward points if found useful.
    Regards.
    Abhijit.
    [email protected]

  • How to access Business object type attribute from a method/function modul ?

    Hello,
    i have created a business object type object along with attributes and methods. Now inside the method i want to access the attributes. inside the method i am writing:
    data a type XXX.
    a = me->attribute
    this is creating a compilation error.
    Now the method is defined as a function module in some package, so can anyone inform me how to access object attributes from the function module ?
    pointes are awarded
    Regards

    Hello,
    thanks for your answer, but this too did not work, "=>" is for static attributes and the attributes i have are not static. Moreover, i tried it but it gave the same error :
    the abap error was when i was checking the code is :
    the type me=>documenttype is unknown
    as you know in SWO1 i created an object and when i create a method you link it to a function module and this is where you have the implementation of the method, so from this method how can i access the attributes on the main object that i created in SWO1
    regards

Maybe you are looking for

  • Lenovo not working with samsung Lcd TV.need advice...

    I am using a Lenovo 3000 N100 series AQ1 768 laptop.Its got no external graphics card.I want to connect it to my Samsung LA32B550  LCD TV via a vga cable. I have all the hardware fixed but there seems to be something missing on the configuring sectio

  • Formating text via XML

    Hi all, I'm trying to format an XML file so I can have HTML tags on it for bold, italic, underline, etc... but its not working. When I'm not using any HTML tags my subtitle works great but when I put the tags the player reads the time tag not the sut

  • How can I deactivate my Adobe software?

    I sold my old laptop after removing all programs and files. But I did not know I had to deactivate my Photoshop Cs6 and Illustrator Cs6. How can I solve this issue, I cannot install it in my new computer. Cause it says is already on two, and I don't

  • JTables-whats the story with them?

    we are trying to populate a JTable from a mySql database. but are having trouble creating the table. if anyone has any idea how to do this or knows a site which could help that would be great. we are using veactors to create the table, and are having

  • Is TC useful if I don't use Time Machine?

    Long story short, I don't use Time Machine. But I do want storage on my (gigabit, wired) network to which my Macs can backup their internal drives. So if I purchase a TC, how does its drive appear in Finder to my Macs? Is it simply a "drive" I can ac