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.

Similar Messages

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

  • WF Question: Call Transaction From Business Object Not works

    Hi Frinds
    I need some help
    in Business Object ZBUS2012  I have a method that run a report (ALV)
    in the PO nubmer I have a drill down to me23n with parameter BES (EBELN)
    when I click the PO me23n Opened Empty without the PO Number.
    If i try to run the report not from the BO its woks fine.
    it's opened me23n with the right PO Number.
    What can Be The Problem ?
    Thanks in Advance

    Hi Kobi
    Are you passing the parameter from the business object to the method of you ALV report, if in doubt, please post your method code?  Most likely this is what is wrong.  The correct way to reference the PO number within the method is
    object-key-purchaseorder
    Then test using SWO1 to ensure you method is correct before calling through workflow.
    Regards
    Gareth

  • 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

  • Error on Calling Methods Using an Object of a Class

    I keep getting the error cannot resolve variable addStud . I can't figure out why. I've created objects of classes before this way, then called methods within that class like this and it worked fine. I can't discern any difference between the syntax of the program that worked successfully and this one. I commented the parts where the error is when I tried to send a variable to a method in the class Recieve of which addStud is an object of. If you can see something that I can't I'd appreciate it. I've checked the obvious things like making sure the class name and method name is spelled the same way in both my frame and the class file.
    import java.awt.event.*;
    import java.awt.*;     /* Used by IntroTest3.java. */
    import javax.swing.*;
    public class RegFrame extends JInternalFrame
    {   // Begin class RegFrame
    static final int xOffset = 30, yOffset = 30;
         private JLabel nameLabel, displayLabel;  
         private JTextField nameField;
         private JTextArea displayText;
         private JButton addButton;
         private String name;
         private int numStu;
    public RegFrame() {     // Begin RegFrame constructor  
                  super(" Register a New Student ",
                  true, //resizable
                  true, //closable
                  true, //maximizable
                  true);//iconifiable
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            setSize(400,300);        //Set the window's location.
            setLocation(xOffset, yOffset);
            Container content = getContentPane();
            setBackground(Color.white);
            content.setBackground(Color.white);
            content.setLayout( new FlowLayout());
      //*   CREATE LABELS AND TEST ENTRY FIELDS FOR REGISTERING A NEW STUDENT       *
            *  HERE IS WHERE OBJECT OF RECIEVE IS CREATED *
         Recieve addStud = new Recieve();
         nameLabel = new JLabel(" Enter student name: ");
         nameField = new JTextField(20);
         content.add ( nameLabel );
         content.add ( nameField );
         addButton = new JButton( "Add Student" );
         content.add( addButton );
         addButton.addActionListener(
              new ActionListener()
         { // Open ActionListener
              public void actionPerformed (ActionEvent e)
                   getInput();
         } // Close ActionListener
        }   // End RegFrame Constructor
    // get input
        private void getInput()
              numStu++;
              name = nameField.getText();
              JOptionPane.showMessageDialog( null, "NAME: "  + name + "\n"
                    + "Student number:"+ numStu );
                    addStud.addName( name );   /** <--- HERE IS ERROR **/
    } // End class RegFrame;This is the class:
    public class Recieve
    { // Begin class Recieve
        private double stAssign[];
        private double stLab[];   
        private double stProject[];
        private double stQuiz[];
        private double stTest[];
        private String stNames[];       
        int snc;  
    public Recieve ()
            stAssign = new double[10];
            stLab = new double[10];
            stProject = new double[10];
            stQuiz = new double[10];
            stTest = new double[10];
            stNames = new String[10];
            snc = 0;    // Student Name Counter      
    public void addName (String stName)
            stNames[snc] = stName;
            snc++;
    } // End class Recieve

    1- Add the following class variable declaration for RegFrame:
    private Recieve addStud;2- Change in the RegFrame constructor:
    addStud = new Recieve();

  • Is it possible to call methods of JAVA objects from ABAP?

    Hi all,
    Does anyone know if it is possible to call methods of java classes from ABAP?
    Regards,
    Sukru

    Hi,
    Yes we can access the classes of JAVA in ABP.
    This is posible from version ECC 6 onward with NETWEAVER atrhcitecuture.
    Pls go through this link-
    http://help.sap.com/saphelp_nw04s/helpdata/en/84/54953fc405330ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/e1/b5443e02a9ab4186a6e1240a9a2455/frameset.htm
    Here also we use the JCO connector  objects
    These clearly show the methods to use JAVA.
    <removed_by_moderator_together_with_points>
    Regards
    Chandralekha
    Edited by: Julius Bussche on Jul 8, 2008 5:58 PM

  • Call the CALL METHOD and CREATE OBJECT

    Hi Friends,
         How to call the CALL METHOD and CALL OBJECT in the se38 edit program.For example for calling the FUNCTION MODULE we can use the pattern in that using the call function we can get the function module in the se38 edit.but in METHOD hoe to call if you explain me in detail it would be very much usefulfor me.
    Thanks,
    Regards,
    Rajendra Kumar

    Hi rajendra,
    its the same way we do. call pattern ..there will be another radiobutton whcich says 'ABAP objects' , give the method name and the class name there.. this will call the method similar to function module..
    we can also write our own classes and methods...
    say..you created your own class c1 and method m1
    then first create the instance of the object..
    data:obj1 type ref to c1.
    create object obj1.
    call method obj1->m1.
    Regards,
    Vidya.

  • Do I have to implement "Call" method of SOAPConnection object?

    I was trying the example "saaj-simple" that comes with "jwsdp".
    But it gave me NoSuchMethodError for the method "call" of "SOAPConnection" object.
    I opened the "saaj-api.jar" and found that the "call" method is abstract.
    Am I supposed to be implementing this method? I thought I should be using this method as it is.

    Yup! I already have that.
    In fact I have both the jars associated with SAAJ plus other jars related to javax.
    But still it ain't working. It gives runtime error.
    It compiled successfully.

  • How to call webservices in business objects from java

    hi everyone, i am having a scenerio were a program which is written in java, this java program will instantiate when i get the data into my database. the java program need to fire and pass the parameters to the webservices in the business objects to create a file depending upon the parameters which r passed by the java to webservices. how i need to cinfigure in business objects webservicess,to get what i am looking or what r the things i need
    we r using xi 3.1 sp3, web application server tomcat.

    Hi,
    case 1: for WDP, you can create the web service model via "Import Adaptive Web Service" or "Import Web Service Model (deprecated)" by supplying wsdl URL.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2bweb%2bservice
    case 2: In ABAP, create a proxy object at trx code SE80.
    http://help.sap.com/saphelp_nw04s/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm
    Both cases are wizard-based. It's pretty intuitive.
    - julius

  • Best way to call methods on similar objects without an interface

    Hi,
    I have two objects that i need to iterate, they both have the same method i need to call during iteration, but those two objects are from different libraries and i cannot change them to add them as implement interface...
       for (Iterator it = documents.iterator(); it.hasNext();) {
               Document1 document = (Document1) it.next();
               document.getName();
    But I can also get a documents's collection where the object is Document2 and not Document1 that also has getName(), what's the best way to implement this? I mean i know i can just add if conditions to say if (instanceof) do this or that.. but I don't think this is good as everytime there's a new type of doc i'd have to add one more...
    Any suggestions?
    Thanks,

    I have two objects that i need to iterate, they both have the same method i need to call during iteration, but those two objects are from different libraries and i cannot change them to add them as implement interface...
    You already know what you need to do. You just don't want to do it.
    You can't treat two (or more) instances the same if they aren't the same. Here are three methods:
    1. Add code (like you propose) to determine which type you have
    2. Create your own classes that extend those classes and have your own class implement your own interface that has the 'getName' method. When you create instances of your own class the constructor can have code that determines which type you have and then use the appropriate 'getName' method. Your app code would use your own classes instead of the ones from the libraries
    3. Use reflection to call the 'getName' method.

  • Q: Calling Methods from Outside Object??

    I am an old VB programmer trying to convert to JAVA.
    I use a Jframe with a listbox to display and store general messages about the program status, etc. It is like a console or running log of events and messages. In VB, I know the form name and just call the function to add strings (frmDisplay.addString("HELP"). What is the best way in JAVA to send messages to this frame object even though the frame does not inherit or extend any of the other objects in the application? I must be missing something basic.
    Thanks,
    Scott
    [email protected]

    1) You can extend JFrame and simply add a method public void addString(String s)
    that does what you want to.
    2) If you want to add something to the list on the Frame you can keep the name of the listbox and directly add to it.
    3) You can extend Frame like in 1 but this time you add a variable
    public listbox (or whatever) lb;
    then you can access it via <framename>.lb and basically use 2) again.

  • 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 methods from the 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

  • Calling DLLs or Java from Business Objects

    Post Author: nmarks
    CA Forum: Other
    I'm a newbie so please go easy!
    Is it possible to invoke a DLL or Java bean when opening a Business Objects query or report?
    I've just started working for a very large insurance company in the UK.
    Each month the company produces reports for the Directors, for the Auditors and Industry Regulators.
    Most of the results that go into the reports are produced using an extremely expensive application called Prophet. It dumps out files with data in.
    Ideally the company would like to upload the results from Prophet into Business Objects and have nice numbers show on a report the directors can understand.
    The problem is that lots of fiddly adjustment calculations have to be done to the data coming from Prophet before it can be shown on the BO report.
    I have proposed that the adjustment calculations are done using a VB DLL which will be called automatically by Business Objects  when the user wants to see the report. Can this be done?
    Can Business Objects call a DLL?
    Your help is very much appreciated.
    Regards,
    Nick.

    Post Author: thangvq
    CA Forum: Other
    Hello,
    I think it can. At least I have done it with a DLL is compiled by Delphi. You may read the CR Developer's Help for more info. If you have installed the Developer Edition, its location is something like this: C:\Program Files\Business Objects\Crystal Reports 11\Developer Files\Help\En
    Thang

Maybe you are looking for

  • Design view not showing

    I ftp'd the files and went to move the pictures and I cannot see the design view at all. Just code. I need to see the design view. Can you help? Usually my index page is .html not .php. I have learned on my own and I really need to fix this site. Tha

  • ITunes does not open and I've tried almost everything

    Everytime I have tried to open iTunes (I just downloaded the new one) this error pops up... I have tried to repair, uninstall and reinstall Quick Time and iTunes nothing has seemed to work. I have also tried to change my settings in my Control Panel

  • JMS error while configuring SLD

    HI folks, I'm, encountering a tricky problem while connecting the SLD to the SolMan - running on the same host. During making all neccessary steps it was no longer possible to log on to the J2ee-Engine by /nwa or whatever application. It just shows U

  • My ipod touch just stopped working

    My Ipod 4th generation just stopped working - not turning on

  • How to restore contacts on a 4s?

    hi i'm a new baby here how can i copy my present contact from pc (in format vCard file) to iphone 4s? my old sim is not micro sim so cannot copy (not support) from prev phone to sim