Calling Stateful & Statless Methods from the same Entity Bean[EJB2.0]?

Dear All,
We using EJB2.0........
Regarding segregation of stateless and stateful methods..These methods are defined in Session bean.Now my question is
Is it a good practice to call Stateful and Stateless business methods from same single entity bean("EntityBean") defined at program level by extending MainBean..
The architecture is like
public class EntityBean extends MainBean
Public Methodxyz
stfobj.MakeConn();
stlobj.getXyz();
stfobj.CloseConn();
Public Class MainBean{lookup("stl");lookup(stf) ;stl_obj=home.create;stf_obj=home.create()............}
ejb-jar.xml
{ <session>
          <description>Entity Bean Employee Example</description>
          <ejb-name>stl</ejb-name>
          <local-home>com.packg.stlHome</local-home>
          <local>com.packg.stl</local>
          <ejb-class>com.packg.stlBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
     </session>
     <session>
          <description>Entity Bean Employee Example for stateful</description>
          <ejb-name>stf</ejb-name>
          <local-home>com.packg.stfHome</local-home>
          <local>com.packg.ejbeans.stf</local>
          <ejb-class>com.packg.stfBean</ejb-class>
          <session-type>Stateful</session-type>
          <transaction-type>Container</transaction-type>
     </session>
     <session>
          <description>Session bean for System Parameters</description>
          <ejb-name>SysParam</ejb-name>
          <local-home>com.packg.Home</local-home>
          <local>com.packg.Param</local>
          <ejb-class>com.packg.Bean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>
          <ejb-local-ref>
          <ejb-ref-name>stl</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
          <local-home>com.packg.stlHome</local-home>
          <local>com.packg.ejbeans.stl</local>
          <ejb-link>stl</ejb-link>
     </ejb-local-ref>
          <ejb-local-ref>
          <ejb-ref-name>stf</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
          <local-home>com.packg.stfHome</local-home>
          <local>com.packg.stf</local>
          <ejb-link>stf</ejb-link>
     </ejb-local-ref>
     </session>
Thanks !!
Edited by: user9052593 on Jun 18, 2012 2:20 AM
Edited by: user9052593 on Jun 18, 2012 2:25 AM

All Business logic resides in session beans[Stateful or Stateless]..For stateful beans we are opening connections in entity bean ,calling business methods and closing connection in entity bean itself..Problem is
I am doing lookup for stateful and stateless both since both objects are called by extending MainBean in same entity bean else will give null pointer exception..
So whenever i call a Stateful or Stateless method from entity bean Which ultimately extends/calling MainBean and thereby calling home.create methods of stateful and stateless both..creating objects..Is this way fine or it will affect the performance?
Do i need to segregate the Calls/invokation to Stateful / Stateless methods at entity bean level too..
For ex:- Whenever i call Methodxyz() method ..at the same time it create 2 objects as its extending MainBean...i want to extend/create 1 object either of stateful or stateless one for stateful and stateless methods call respectively..
See the code in entity bean is like
public class EntityBean extends MainBean
Public Methodxyz
stfobj.MakeConn(); call to stateful method defined in stateful bean
stlobj.getXyz();// call to stateless method defined in stateless bean
stfobj.CloseConn(); call to stateful method defined in stateful bean
------------------------------------------------------------

Similar Messages

  • Multiple instances of the same entity bean?

    I am designing a J2EE application that is made up of a number of separate components that each have a well-defined responsibility. Each component is made up of one or more J2EE components (web clients and EJBs). I want to design the application such that it is easy in the future to deploy each component (or a group of components) on different servers. In order to do this I need to make sure that the interfaces between each component are exposed as remote interfaces (but I will use local interfaces inside each component). However, there are a number of entity beans that need to be accessed by more than one component. I am wondering how best to expose these entity beans. I believe there are a number of options:
    1. Expose remote interfaces on each of the shared entity beans. The disadvantage of this approach is that it is inefficient and that I will not be able to take advantage of container managed relationships. (I am intending to use container managed persistence.)
    2. Create a facade object (stateful session bean) for each of the entity beans which exposes a remote interface and in turn accesses the shared entity beans locally. The disadvantage of this approach is that I have to create some extra EJBs and that I cannot directly make use of container managed relationships etc from the client component.
    3. I don't know if this is an option but I am wondering whether I can deploy a copy of each shared entity bean with each application component. The advantage of this approach is that the component would access the entity locally and could make use of container managed relationships. However, I don't know what the issues are with having more than one instance (per primary-key) of an entity in the same application. I don't know whether this would cause errors of whether they would get out of sync (because different instances with the same primary key would be updated by different clients). Initially each component would be deployed in the same server but later they would be deployed in different servers. In both cases with this option each component (JAR) would have copies of the shared entity bean classes.
    Any suggestions as to the best approach and whether the last option is feasible would be much appreciated.
    Thanks.

    I think 2 beats 1. The main reason being to minimise the number of network calls. You're basically asking, are fascades a good idea? and the answer is yes.
    You can obviously do 3 in different app servers. However you'll need to configure your app servers so they can handle the fact that they're not the only ones updating the database. This is to handle concurrency as you mentioned. How you do this will depend on your app server and will affect performance, but shouldn't be a problem.
    I think you should definately decide up front what's going in different app servers, I dunno if 3 would work in the same app server.
    Why do you would want to use multiple app servers?
    Why not have everything in the same app?
    Is is just the 1 database?
    You can use clustering for scalability.

  • VCS - CPL to block calls routing to and from the same neighbor zone

    Hello all,
    Is there a CPL rule that can be written to block calls originating from a neighbor zone destined to the same neighbor zone?
    We are having issues with calls being sent from CUCM to our VCS, then VCS routes the call back to CUCM, thus resulting in "Too Many Hops". 
    In Example
    Movi user on VCS Control tries to dial CTS endpoint registered to CUCM, but dials incorrectly
    Call does not match search rules for local zone
    Call does not match search rules for VCS Expressway
    Call matches catch all for CUCM (.*)@domain.com
    CUCM does not have a DN or URI for the mis-dialed number and the call gets routed back to VCS Control due to SIP route pattern of *.* on CUCM
    We have to have the catch all to CUCM at the end since we offer PSTN connectivity, as well as our users and phones have alphanumeric URIs assigned to the DNs for Jabber, etc.
    I'm afraid that there really isn't an easy way to do this, as I know since the call hits CPL first, CPL wouldn't know which zone it was destined to.

    It's probably more easily accomomplished with a slight modification to your search rules rather than spraying anthing "@domain" everywhere - something like:
    Direct anything incoming to @domain from the neighbour zone to the local zone (as it's inside your organisation, as if the CUCM hasn't found it and sent it to the VCS it's not going to be on the CUCM, so must be local (or non existant) - and Stop.
    And the opposite of the above - Route anything for @domain from the localzone (as it hasn't been found locally) to the CUCM neighbour - and Stop.
    And do similar for anything that's coming in from other external zones to route to wheverver the endpoints are going to be.  That way, your call shouldn't be bouncing back and forth between the CUCM and VCS and creating the loop you're currently experiencing.
    Of course, if your environmetn is a bit more complex than just the single CUCM and VCSes, this may be a little oversimiplified, but could lead you in the right direction.
    Another thing to consider too - if you put your endpoints in to a directory the users can use - that'll help stopping them from mis-typing stuff :)
    Wayne
    Please remember to rate responses and to mark your question as answered if appropriate.

  • Multiple instances of the same entity bean out of sync

    Env: NT4.0SP6/jdk build 1.3.1-b24/oc4j 1.0.2.2.1
    Scenario:
    A) Session Bean(SB) 1 loads Entity Bean (EB) 1.
    B) Another Session Bean, SB2, loads the same EB1 (same pk).
    (It turns out that oc4j loads 2 instances of the same EB1.)
    C) SB1 changes data of EB1, and shows the data. All ok. The data
    is there in database, shows up fine on the screen.
    NOTE: the second instance of EB1 which is referenced by SB2 does
    not receive any ejbLoad/... etc calls at this time.
    D) Now SB2 tries to load the same EB with a different pk(EB2),
    immediately causing oc4j to issue ejbStore to the 2nd instance
    of EB1 (referenced by SB2), making it overwrite the changes made
    by the EB1 referenced by SB1 (step C above).
    I tried exclusive-write-access=false setting in orion-ejb-
    jar.xml,
    and it solved the above problem by making only one instance of
    the EB with the same pk, and making sure ejbLoad/Store was
    called around each biz. method.
    However, I don't see any reason to turn off the exclusive-write-
    access flag, as no one is writing into the database behind
    oc4j's back.
    Does anyone else see this behaviour (which looks like a major
    bug as the container
    must ensure that the instances of the same EB with same PK are
    in sync)?
    Thanks,
    - nik.

    yes, i have a similar problem with the 2.0.0 technology preview.
    i added some kind of 'code' which demonstrates my problem at the
    end of this message.
    Description: It seems that different instances are not
    synchronized correctly. I set a CMPfield and when I call getXY()
    on this CMPfield from within a different instance of this ejb
    (for example use a finder method to return a remote interface
    for the same pk), then this getter of the CMP field returns an
    old and wrong value.
    bad bug, i guess.
    suggestions?
    Greetings from munich, /thomas
    public TestBean
    public abstract void setCMPField( int i );
    public abstract int getCMPField();
    void testMethod()
    //set the cmpfield
    setCMPField( 5 );
    //call getXY() on 'this'
    System.out.println( getCMPField
    () ); //correct value 5 is returned
    //now get a remote reference of 'this' and call getXY()
    there
    TestBeanRemote rem1 = ejbContext.getEJBObject();
    System.out.println( rem.getCMPField
    () ); //correct value 5 is returned
    //now call a finder and call getXY() on the returned
    remote
    TestBeanRemote rem = ejbContext.getEJBHome
    ().findByPrimaryKey( ejbContext.getEJBObject().getPrimaryKey() );
    System.out.println( rem.getCMPField
    () ); //PROBLEM!! OLD VALUE RETUNRED!!!!!!

  • Calling public class method  from the servlet dopost() implementation

    Hi!
    My application is a simple application where i wrote a JSP page to enter the USERNAME and PASSWORD. And this JSP will call a HttpServlet
    with in which i am calling another Java class ValidateUser which will check aginst the Oracle Database table whether that Username and password combination exists and returns the user's name.
    But when i am trying to call that method is throwing me an error. here is the typical code i wrote.
    servlet
    package isispack;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.io.*;
    public class Login extends HttpServlet{
    public void doPost(HttpServletRequest req, HttpServletResponse res)
                   throws ServletException,IOException{
    String userId = req.getParameter("user_id");
    String password = req.getParameter("user_pass");
    // if uName is null .. user is not authorized.
    String uName = Validate(userId, password);
    and
    Validate class
    package isispack;
    import java.sql.*;
    import java.util.*;
    import java.lang.*;
    public class ValidateUser
    public String ValidateUser(String inputUserid, String inputPwd) throws
    SQLException{
         String returnString = null;
         String dbUserid = "isis"; // our Database user id
         String dbPassword = "isisos" ; // our Database password
         Connection con = DriverManager.getConnection("jdbc:odbc:JdbcOdbcDriver","isis","osiris");
         Statement stmt = con.createStatement();
         String sql= "select user_id from isis_table where user_id = '" inputUserid + "' and user_pass= '" + inputPwd +"' ;" ;
         ResultSet rs = stmt.executeQuery(sql);
         if (rs.next())
         returnString = rs.getString("user_id");
         stmt.close();
         con.close();
         return returnString ;
    The ERROR
    Error(18,18): method ValidateUser(java.lang.String, java.lang.String) not found in class isispack.Login
    One more thing i forgot to tell you. I am trying to run this application on JDeveloper. Please helpme out if you can . Thank you.
    -Sreekanth

    OK! I made it static method
    and tried to call the method as follows
    String uName = ValidateUser.ValidateUser(userId, password);
    even if i create the instence and
    ValidateUser Validate;
    then call
    String uName= Validate.ValidateUser(userId,password)
    In either case is giving me the following error.Tarun, am new to Java programming, please help me out. And can you please tell me where can i find things in consise to brush up my fundamentals?.
    Error(18,43): unreported exception: java.sql.SQLException; must be caught or declared to be thrown

  • FindBy() Method finds the same bean more than once

    I am desperate.
    Can anyone at least tell me if they ever heard of a problem similar to this in a CMP Entity Bean?
    PROBLEM: My findByMemberOrHash(MemberLocal, String) method returns a Collection with FOUR references to the same Entity Bean from a table that has only one Entity Bean persisted in it!
    Yet, my findByMember(MemberLocal) and findByHash(String) both work perfectly and return a Collection with only one element -- the single Entity Bean in the table.
    Here is the relevant code and table info:
    My Entity Beans are named LoggedIn and are persited in a MySql table named loggedings that has but 3 columns:PK:         PrimaryKey (Integer).
    HASH:       persistance field (String).
    members-pk: relationship field (Foreign Key to Member Bean table (Integer)For this test the table persisted a single Bean. Here is the data base SELECT:mysql> SELECT * FROM loggedins;
    +----+------+------------+
    | PK | HASH | members_pk |
    +----+------+------------+
    | 40 | X    |          1 |
    +----+------+------------+
    1 row in set (0.00 sec)Here is my logger output from the server:
    LoggerBean is a Session bean that is processing the login.
    To test, I had it run three findBy()s ... Member Or Hash, Member Only, and Hash OnlyINFO  [LoggerBean] Print out findByMemberOrHash()
    INFO  [LoggerBean] 0:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean] 1:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean] 2:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean] 3:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean]
    INFO  [LoggerBean] Print out findByMember()
    INFO  [LoggerBean] 0:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean]
    INFO  [LoggerBean] Print out findByHash()
    INFO  [LoggerBean]  0:   LoggedInBean: PK(40) Hash(X) Member_pk(1)I am lost for any ideas.
    Its too trivial a test to break it down any further.
    Especially since the single parameter SELECTs work perfectly.
    Here is my ejb-jar.xml code:<query>
         <query-method>
              <method-name>findByMemberOrHash</method-name>
                <method-params>
                  <method-param>
                    org.america3.go.server.ejb.entity.MemberLocal
                  </method-param>
                  <method-param>
                    java.lang.String
                  </method-param>
              </method-params>
         </query-method>
         <ejb-ql>
              SELECT OBJECT(c) FROM LoggedInSchema c
              WHERE c.members_pk = ?1 OR c.hash = ?2
         </ejb-ql>
    </query>

    I am desperate.
    Can anyone at least tell me if they ever heard of a problem similar to this in a CMP Entity Bean?
    PROBLEM: My findByMemberOrHash(MemberLocal, String) method returns a Collection with FOUR references to the same Entity Bean from a table that has only one Entity Bean persisted in it!
    Yet, my findByMember(MemberLocal) and findByHash(String) both work perfectly and return a Collection with only one element -- the single Entity Bean in the table.
    Here is the relevant code and table info:
    My Entity Beans are named LoggedIn and are persited in a MySql table named loggedings that has but 3 columns:PK:         PrimaryKey (Integer).
    HASH:       persistance field (String).
    members-pk: relationship field (Foreign Key to Member Bean table (Integer)For this test the table persisted a single Bean. Here is the data base SELECT:mysql> SELECT * FROM loggedins;
    +----+------+------------+
    | PK | HASH | members_pk |
    +----+------+------------+
    | 40 | X    |          1 |
    +----+------+------------+
    1 row in set (0.00 sec)Here is my logger output from the server:
    LoggerBean is a Session bean that is processing the login.
    To test, I had it run three findBy()s ... Member Or Hash, Member Only, and Hash OnlyINFO  [LoggerBean] Print out findByMemberOrHash()
    INFO  [LoggerBean] 0:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean] 1:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean] 2:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean] 3:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean]
    INFO  [LoggerBean] Print out findByMember()
    INFO  [LoggerBean] 0:   LoggedInBean: PK(40) Hash(X) Member_pk(1)
    INFO  [LoggerBean]
    INFO  [LoggerBean] Print out findByHash()
    INFO  [LoggerBean]  0:   LoggedInBean: PK(40) Hash(X) Member_pk(1)I am lost for any ideas.
    Its too trivial a test to break it down any further.
    Especially since the single parameter SELECTs work perfectly.
    Here is my ejb-jar.xml code:<query>
         <query-method>
              <method-name>findByMemberOrHash</method-name>
                <method-params>
                  <method-param>
                    org.america3.go.server.ejb.entity.MemberLocal
                  </method-param>
                  <method-param>
                    java.lang.String
                  </method-param>
              </method-params>
         </query-method>
         <ejb-ql>
              SELECT OBJECT(c) FROM LoggedInSchema c
              WHERE c.members_pk = ?1 OR c.hash = ?2
         </ejb-ql>
    </query>

  • How do I call methods with the same name from different classes

    I have a user class which needs to make calls to methods with the same name but to ojects of a different type.
    My User class will create an object of type MyDAO or of type RemoteDAO.
    The RemoteDAO class is simply a wrapper class around a MyDAO object type to allow a MyDAO object to be accessed remotely. Note the interface MyInterface which MyDAO must implement cannot throw RemoteExceptions.
    Problem is I have ended up with 2 identical User classes which only differ in the type of object they make calls to, method names and functionality are identical.
    Is there any way I can get around this problem?
    Thanks ... J
    My classes are defined as followes
    interface MyInterface{
         //Does not and CANNOT declare to throw any exceptions
        public String sayHello();
    class MyDAO implements MyInterface{
       public String sayHello(){
              return ("Hello from DAO");
    interface RemoteDAO extends java.rmi.Remote{
         public String sayHello() throws java.rmi.RemoteException;
    class RemoteDAOImpl extends UnicastRemoteObject implements RemoteDAO{
         MyDAO dao = new MyDAO();
        public String sayHello() throws java.rmi.RemoteException{
              return dao.sayHello();
    class User{
       //MyDAO dao = new MyDAO();
       //OR
       RemoteDAO dao = new RemoteDAO();
       public void callDAO(){
              try{
              System.out.println( dao.sayHello() );
              catch( Exception e ){
    }

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How to read the hierarchy data from the same table using loop in AMDP method

    Hi All,
    We have a requirement to get the top partner from BUT050 table.
    Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
    Example:
    For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
    For partner 3523(BUT050-PARTNER1)  there is partner 4544 (BUT050-PARTNER2) last level .
    so in this case for the partner 1234 the Top parent is 4544 .
    I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
    Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
    IV_Parent is the input partner and ev_top_parent is the output value.
    AMDP Procedure Method:
        DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
        DECLARE found INT := 1;
              iv_partner1 =  SELECT partner1 FROM but050
                              WHERE partner2 = iv_partner
                              AND reltyp = :iv_hierarchy
                              AND date_to >=  :lv_date
                              AND date_from <= :lv_date;
         WHILE found <> 0  do
           select partner1 into ev_top_parent from :iv_partner1;
                           iv_partner1 =  SELECT partner1 FROM but050
                           WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
                           AND reltyp = 'ZBP004'
                           AND date_to >= :lv_date
                           AND date_from <= :lv_date;
           select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
        END WHILE;
    This method is working fine, but here it is only taking one single partner and getting the top parent as output.
    Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
    Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
    Thanks.
    Regards,
    Laxman.P

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • Accessing a private variable from a public method of the same class

    can anyone please tell me how to access a private variable, declared in a private method from a public method of the same class?
    here is the code, i'm trying to get the variable int[][][] grids.
    public static int[][] generateS(boolean[][] constraints)
      private static int[][][] sudokuGrids()
        int[][][] grids; // array of arrays!
        grids = new int[][][]
        {

    Are you sure that you want to have everything static here? You're possibly throwing away all the object-oriented goodness that java has to offer.
    Anyway, it seems to me that you can't get to that variable because it is buried within a method -- think scoping rules. I think that if you want to get at that variable your program design may be under the weather and may benefit from a significant refactoring in an OOP-manner.
    If you need more specific help, then ask away, but give us more information please about what you are trying to accomplish here and how you want to do this. Good luck.
    Pete
    Edited by: petes1234 on Nov 16, 2007 7:51 PM

  • I cant call to a mobile number since yesterday, but can receive call from the same number. I am using iphone 4s. Is there any setting error?

    I can't call to a mobile number since yesterday, but still can receive call from the same number. I am using iphone 4s. Is there any setting error?

    you have to make sure that CFWD Bridge Mode under the Line tab of the SPA9000 where the SPA400 is registered is set to ALL...include VMSP Bridge and XFER Bridge Mode as well..power cycle then check if you are still getting one-way audio
    | isolate! isolate! isolate! |

  • I have an iphone 3gs, and i keep getting blocked number calling me (prank calls) im getting really fed up with it all now i have had 12 calls from the same person! i was just wondering if there is any way i could block this caller from calling me?

          i have an iphone 3gs, and i keep getting blocked number calling me (prank calls) im getting really fed up with it all now i have had 12 calls from the same person! i was just wondering if there is any way i could block this caller from calling me?

    Contact your carrier and ask them.

  • 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

  • Action link URL calling from another screen from the same web server not work

    Hi there,
    I have an action link URL calling from another screen from the same web server, used the following syntax:
    /analytics/saw.dll?Go&path=.....
    But it is not working, when open the page, it shows error message
              Oops! Google Chrome could not find analytics
    Any help? Thanks!
    Ling

    That's a +1 from me... same issue and yes, isn't inelegant or a shortcoming for some might be the cause of boldness as they rip their hair off their head so thanks in advance for keeping the refinement of the magic potions making the EA secret magic sauce... which may help stop hairloss
    Cheers!
    tfbkny

  • How to call a set method from within a constructor

    Hello,
    I want to be able to call a set method from within a Scanner, to be used as the argument to pass to the Scanner (from a source file). Here's what i tried:
    private void openFiles()
            input = new Scanner( setSource );              
        and here is the set method:
    public String setSource( String in )
            source = in;
            return source;
        }obviously there will be more code in this method but i'm trying to tackle one problem at a time. Thanks in advance..

    The "String in" declaration says: "Nobody may ever invoke setSource() without specifying a certain String. The content of the String is known at run-time only."
    In no place in your code you say the compiler: "I want the 'in' variable (actually, parameter) of method setSource() to contain the first arg which is passed to the application".
    This is exactly the same mechanism allowing you to write "new Scanner" with something inside the two parentheses.

Maybe you are looking for

  • Browser didn't re-open last session and the drop down option is greyed out!

    I had a lot of tabs open on Firefox, I wanted to open it up and restore from last session so I could make a bookmark folder for them all and then do an update on my computer. However when I opened Firefox I didn't get the option to restore my previou

  • Screwed up Fonts

    After my wife recently updated to Lion, she has a serious font problem.  Seems like some system font is missing or turned off, but we can't figure what one it is.  The font in some, but not all, dialogs is missing (just squares with A's in them).  Th

  • Mail not opening after iOS 6.0.1 update

    Since updating to ios 6.0.1, my email will not open. It closes itself out as soon as I click on it. Same for email, calendar, and contact settings. Click on it and it doesn't open. I've restored and reset. Nothing is working. A lot of other things ar

  • How can i  remove messages from faces context

    hi how can i remove messages from faces context with regards shannu sarma

  • Fail-on-all in CSM

    Hi, In ACE we have fail-on-all inside serverfarm if we want to make AND logic. Do we have equal command in CSM?