Where to create Methods of Biz Obj in BAPI

where to create Methods of Biz Obj in BAPI rather than FM,
points will be rewarded
thank you,
Regards,
Jagrut BharatKumar Shukla

Hi Jagrut,
BAPI stands for Business Application Programming Interface.
<b>There are 5 different steps in BAPI.
- Create BAPI Structure  
- Create BAPI Function Module or API Method.  
- Create BAPI object  
- Release BAPI Function Module.  
- Release BAPI object.</b>    
Step1. Creating BAPI Structure:  
- Go to <SE11>. 
- Select Data Type & Enter a name. 
- Click on Create.
- Note: Always BAPI should be in a development class with request number (Not Local Object).
- Select Structure & hit ENTER.
- Enter the fields from your database. Make sure that the first field is the Primary Key Field.
- Then SAVE & ACTIVATE.
Step 2. Creating BAPI module: 
- Enter TR.CODE <SE37>.
- Before entering any thing, from the present screen that you are in, select the menu
   Goto -> Function Groups -> Create Group.
   Enter a name (Note: This name Must start with ZBAPI)
   Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
   Click on the Third ICON that says Inactive Objects. 
   Select the group that you just created and click on Activate. 
   Notice that the group you created will disappear from the list of inactive objects.
- Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
Then click on the second tab that says [IMPORT].
Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
Then click on tab that says [EXPORT].
Enter the following as is in the first three fields 
  RETURN        TYPE        BAPIRETURN (These 3 field values are always same)
  Here also select ‘Pa’ meaning Pass by value.
Note: BAPIRETURN contains structure with message fields.
Then SAVE and ACTIVATE.
Step 3. Creating BAPI object: 
- Enter Tr.Code <SWO1>   (Note. It is letter ‘O’ and not Zero).
- Enter a name and then click on create. Enter details. 
NOTE: Make sure that that Object Type and Program name are SAME.   
- Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom. 
- Then hit <ENTER>. 
- Now we have to add ‘Methods’. High light METHODS and then select the following from the menu: 
Goto Utilities -> API Methods -> Add Methods.
- Enter function Module name and hit <ENTER>.
- Select the second FORWARD ARROW button (>)to go to next step. 
- Check if every thing looks ok and again click on FORWARD ARROW button (>).
- Then select ‘YES’ and click on <SAVE>.
-  Now on a different screen goto TR.CODE <SE37>.  Enter Function Module name and select from the top menu  Function Module -> Release -> Release.
- Goback to TR.CODE <SWO1>.
Here select the menu combination shown below in the same order.
- Edit -> Change Release Status -> Object Type Component -> To Implemented.
- Edit -> Change Release Status -> Object Type Component -> To Released.
- Edit -> Change Release Status -> Object Type -> To Implemented.
- Edit -> Change Release Status -> Object Type -> To Released.
- Then click on <SAVE>.
- Then click on Generate Button (4th button from left hand side looks like spinning wheel).
- Then Click on the button that says ‘PROGRAM’ to see the source code.
To check if this is present in work flow goto TR.CODE <BAPI>. 
Here it shows business object repository.
- First click on the middle button and then select “ALL” and hit ENTER.
- Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully.
<b>reward pts if found usefull:)</b>
Regards
Sathish

Similar Messages

  • Using ADF View object create method in Data Action

    I need to know how to create a new row in an application module method and get the attributes from the ADF input form.
    If i Drag drop the create method in the data action form it is working fine. But how to do this programmatically, I have a need where i need to execute a query on another view object and set the create method.
    Thanks.

    Steven:
    (My application does not need to show all records and provide Edit/ Remove buttons at row level, navgational buttons and Create button for inserting new record. Instead, I would just open a blank record for entry, and commit)
    As per your post, I followed the following steps (action class) to insert blank record:
    DCBindingContainer bindings = actionContext.getBindingContainer();
    DCControlBinding binding = bindings.findCtrlBinding("Id");
    Row row = binding.getRowIterator().createRow();
    row.setNewRowState(row.STATUS_INITIALIZED);
    RowSetIterator rs =(RowSetIterator)
    binding.getRowIterator();
    rs.insertRow(row);
    End Results: It works fine and a new blank record is created. The only problem is <html:errors/> in JSP throws error for the first time. I do not want to elliminate error object from JSP.
    Please help!
    Thanks in advance

  • How to write a create method for a table Not null fields

    Hi all,
    I have a table with four columns,
    process
    prs_seqid NUMBER(4) NOT NULL,
    prs_sbs VARCHAR2(2) NOT NULL,
    prs_name VARCHAR2(64) NOT NULL,
    description VARCHAR2(128)
    Where prs_seqid is primary key and prs_sbs is foreign key.
    I tried to create a CMP bean for this table. I am unable to write a record in table while I can read
    Records from table. These are the create methods
    public Long ejbCreate() throws CreateException {
    return null;
    public Long ejbCreate(Long newPrs_seqid, String newPrs_sbs, String newPrs_name) throws CreateException {
    prs_seqid = newPrs_seqid;
    newPrs_sbs = prs_sbs;
    prs_name = newPrs_name;
    return null;
    public void ejbPostCreate() {
    public void ejbPostCreate(Long newPrs_seqid, String newPrs_sbs, String newPrs_name) {
    When I run the client code �home.create(pk, "AB", "ABC");�
    It throws
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.RemoteException: Transaction aborted (possibly due to transacti
    on time out).; nested exception is: javax.transaction.RollbackException; nested
    exception is:
    javax.transaction.RollbackException
    java.rmi.RemoteException: Transaction aborted (possibly due to transaction time
    out).; nested exception is: javax.transaction.RollbackException; nested exceptio
    n is:
    javax.transaction.RollbackException
    javax.transaction.RollbackException
    <<no stack trace available>>
    In log file I got
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
         at com.sun.ejb.persistence.PersistenceManagerImpl.createRow(PersistenceManagerImpl.java:630)
         at com.sun.ejb.persistence.PersistenceManagerImpl.storeRow(PersistenceManagerImpl.java:412)
         at com.sun.ejb.persistence.PartitionImpl.ejbStore(PartitionImpl.java:555)
         at com.telesenskscl.processes.ProcessesBean_PM.ejbStore(ProcessesBean_PM.java:103)
         at com.sun.ejb.containers.EntityContainer.callEJBStore(EntityContainer.java:1581)
         at com.sun.ejb.containers.EntityContainer.enlistResourcesAndStore(EntityContainer.java:868)
         at com.sun.ejb.containers.EntityContainer.beforeCompletion(EntityContainer.java:853)
         at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:65)
         at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:48)
         at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:108)
         at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2289)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:233)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:208)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:386)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:208)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:434)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1460)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1278)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:397)
         at com.telesenskscl.processes.ProcessesBean_PM_RemoteHomeImpl.create(ProcessesBean_PM_RemoteHomeImpl.java:41)
         at com.telesenskscl.processes._ProcessesBean_PM_RemoteHomeImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    javax.ejb.EJBException: nested exception is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
    javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
         at com.sun.ejb.persistence.PersistenceManagerImpl.createRow(PersistenceManagerImpl.java:630)
         at com.sun.ejb.persistence.PersistenceManagerImpl.storeRow(PersistenceManagerImpl.java:412)
         at com.sun.ejb.persistence.PartitionImpl.ejbStore(PartitionImpl.java:555)
         at com.telesenskscl.processes.ProcessesBean_PM.ejbStore(ProcessesBean_PM.java:103)
         at com.sun.ejb.containers.EntityContainer.callEJBStore(EntityContainer.java:1581)
         at com.sun.ejb.containers.EntityContainer.enlistResourcesAndStore(EntityContainer.java:868)
         at com.sun.ejb.containers.EntityContainer.beforeCompletion(EntityContainer.java:853)
         at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:65)
         at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:48)
         at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:108)
         at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2289)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:233)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:208)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:386)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:208)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:434)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1460)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1278)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:397)
         at com.telesenskscl.processes.ProcessesBean_PM_RemoteHomeImpl.create(ProcessesBean_PM_RemoteHomeImpl.java:41)
         at com.telesenskscl.processes._ProcessesBean_PM_RemoteHomeImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    Please help me ASAP. Thanks in advance

    I found problem was with my code. I wrote
    newPrs_sbs = prs_sbs; instead of
    prs_sbs = newPrs_sbs;
    This solves my problem
    Thanks to all.....

  • Get row id after EJB create method.

    Hi,
    does any one know how to get an id of new created by CMP ejb row? When I create new object it's id is 0, when i call ejb create it creates new row in DB and crates new ID by increasing the old one, but how can I get this new ID after create has finished?
    Now I have to look equals by some fields object in DB after creation, looks ugly.

    So here is my CMP :
    * @ejb.bean name="Dividend"
    * type="CMP"
    * view-type="local"
    * primkey-field="id"
    * schema="dividends"
    * cmp-version="2.x"
    * @ejb.value-object name="Dividend"
    * match="*"
    * @ejb.transaction type="Required"
    * @ejb.persistence table-name="dividends"
    * @ejb.finder signature="Collection findAll()"
    * query="SELECT OBJECT(d) FROM dividends d"
    * @jboss.query signature="Collection findAll()"
    * @ejb.finder signature="Dividend findByActivityId(java.lang.Integer activityId)"
    * query="SELECT OBJECT(d) FROM dividends d WHERE d.activityId = ?1"
    * @jboss.query signature="Dividend findByActivityId(java.lang.Integer activityId)"
    * strategy="on-load"
    * @jboss.persistence create-table="false"
    * remove-table="false"
    * datasource="java:/ChronimDS"
    * datasource-mapping="mySQL"
    public abstract class DividendBean implements EntityBean {
    //~ Methods ----------------------------------------------------------------
    //==========================================
    // Business methods
    //==========================================
    * @ejb.interface-method
    public Dividend getDividend() {
    Dividend dividend = new Dividend();
    dividend.setId(this.getId());
    dividend.setActivityId(this.getActivityId());
    dividend.setLower(this.getIsLower());
    dividend.setLowerAmount(this.getLowerAmount());
    return dividend;
    * @ejb.interface-method
    public void setDividend(Dividend dividend) {
    this.setActivityId(dividend.getActivityId());
    this.setIsLower(dividend.isLower());
    this.setLowerAmount(dividend.getLowerAmount());
    //==========================================
    // CMP fields
    //==========================================
    * @ejb.pk-field
    * @ejb.persistence column-name="id"
    * jdbc-type="INTEGER"
    * sql-type="INTEGER"
    * @ejb.interface-method
    * @ejb.transaction type="NotSupported"
    public abstract Integer getId();
    public abstract void setId(Integer id);
    * @ejb.persistence column-name="activityId"
    * jdbc-type="INTEGER"
    * sql-type="INTEGER"
    public abstract Integer getActivityId();
    public abstract void setActivityId(Integer activityId);
    * @ejb.persistence column-name="isLower"
    * jdbc-type="TINYINT"
    * sql-type="TINYINT"
    public abstract boolean getIsLower();
    public abstract void setIsLower(boolean isLower);
    * @ejb.persistence column-name="lowerAmount"
    * jdbc-type="INTEGER"
    * sql-type="INTEGER"
    public abstract Integer getLowerAmount();
    public abstract void setLowerAmount(Integer lowerAmount);
    //==========================================
    // EJB callbacks
    //==========================================
    * @ejb.create-method
    public Integer ejbCreate(Dividend dividend)
    throws CreateException {
    this.setId(dividend.getId());
    this.setIsLower(dividend.isLower());
    this.setLowerAmount(dividend.getLowerAmount());
    this.setActivityId(dividend.getActivityId());
    return null;
    public void ejbPostCreate(Dividend dividend)
    throws CreateException {
    // EntityBean (empty) implementation
    public void setEntityContext(javax.ejb.EntityContext ec) {
    public void unsetEntityContext() {
    public void ejbLoad() {
    public void ejbStore() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void ejbRemove() {
    As you can see I'm using xdoclets.
    Suppose I need to create new row of this object :
    Dividend d = new Dividend();
    // fill dividend by values here but do not set it's id it is 0 before creation
    // SQL server will set it automaticly
    Object ref = context.lookup("DividendLocal");
    DividendLocalHome dividendLocal = (DividendLocalHome) ref;
    dividendLocal.create(dividend)
    I create new row of dividend in my DB and want to get an ID of the new created row, I thought that dividend object will get this ID after creation automaticly, but no, his id is 0.
    so here id will be 0 :
    dividendLocal.create(dividend);
    int id = dividend.getId(); // 0
    and if I write this
    dividendLocal.create(dividend).getId();
    I get :
    2007-06-25 14:44:02,384 ERROR [org.jboss.ejb.plugins.LogInterceptor]
    EJBException in method: public abstract java.lang.Integer
    com.xxx.xxx.ejb.SessionFacade.createDividend(
    xxx.xxx.model.Contract) throws java.rmi.RemoteException:
    javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=0

  • CMP bean : 'create' method fails - SQL Syntax error

    I'm using SilverStream 3.7.3 server on Win 2K.
    In a CMP entity bean, call to any create method ( default using primary key or with any other list of parameters ) fails , giving this error :
    javax.ejb.CreateException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    <<no stack trace available>>
    I've doubly checked for mismatch between types of database columns & parameters passed, but there is no difference. ( Another BMP bean uses same types and it's working perfectly )
    Interestingly, the 'finder' & other business methods are working without any problem.
    Any idea about cause of this error / options to solve / get around the prob?
    TIA,
    Subodh

    Hi,
    See if you can get SilverStream to give you the JDBC statements it is sending to Access. If SilverStream can't do that, try using P6Spy to get hold of the JDBC. Once you have the SQL, you should be able to figure out where the prolbem is... and if you can do anything about it.
    Does access actually accept any form of Standard SQL?
    Daniel.

  • COM Exception when using DocumentSet.Create() method

    I am trying to create a Document Set in a library that's in a different site collection from the one the user is logged in to (and where the code is executing), and I'm getting the following error:
    Stack Trace:
    [COMException (0x81070e97): <nativehr>0x80004005</nativehr><nativestack></nativestack>Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.]
    Microsoft.SharePoint.Library.SPRequestInternalClass.UpdateFileOrFolderProperties(String bstrWebUrl, String bstrWebRelativeUrl, Object varProperties, Int32 fMigrationSemantics, Int32 fReGhost, Byte& piLevel) +0
    Microsoft.SharePoint.Library.SPRequest.UpdateFileOrFolderProperties(String bstrWebUrl, String bstrWebRelativeUrl, Object varProperties, Int32 fMigrationSemantics, Int32 fReGhost, Byte& piLevel) +170
    [SPException: Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.]
    AIR_Shared_Elements.NewContentFolderRedirect.NewContentFolderRedirect.OnLoad(EventArgs e) +1743
    System.Web.UI.Control.LoadRecursive() +66
    System.Web.UI.Control.LoadRecursive() +191
    System.Web.UI.Control.LoadRecursive() +191
    System.Web.UI.Control.LoadRecursive() +191
    System.Web.UI.Control.LoadRecursive() +191
    System.Web.UI.Control.LoadRecursive() +191
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
    Even though this exception gets thrown by the DocumentSet.Create() method, a document set with the correct name is created in the right place.  It just doesn't have the correct properties, and it looks to me by the stack trace that what SharePoint is
    choking on is the part of the process where it updates the properties of the newly created document set.
    Now, the exception says I need to allow unsafe updates on the web, but that's already happening.  I'm running the code with elevated privileges, and allowing unsafe updates on the remote web that is the parent web to the list where I'm trying to
    create the document set.
    Here is some pseudo code showing the process:
    protected void MoveContentFolder()
    try
    SPSecurity.RunWithElevatedPrivileges(delegate
    // reach into the other site collection
    using (SPSite site = SPContext.Current.Site.WebApplication.Sites["other/sitecollection/url"])
    using (SPWeb remoteWeb = site.OpenWeb())
    remoteWeb.AllowUnsafeUpdates = true;
    // find the document library we want
    SPList remoteLib = remoteWeb.Lists[libraryName];
    if (remoteLib != null)
    // get a reference to the library's root folder where we want to put the document set
    SPFolder libraryRoot = remoteLib.RootFolder;
    // get the library's local copy of the doc set's content type ID
    SPContentTypeId docLibMatchId = GetCTypeIdFromList(myDocSetCTypeParentID, remoteLib);
    // set properties and name parameters for the Create() method
    System.Collections.Hashtable properties = some_properties;
    string name = "a name";
    // create the doc set in the remote library
    DocumentSet newDocSet = DocumentSet.Create(libraryRoot, name, docLibMatchId, properties, false);
    // return to a different page
    Page.Response.Redirect("some/other/url"));
    else
    throw new ArgumentNullException("remoteLib", "The document library specified could not be found.");
    remoteWeb.AllowUnsafeUpdates = false; }
    catch (Exception ex)
    throw ex;
    So does anyone know what's going on here?  Why is an exception being thrown that says I need to allow unsafe updates when I already am allowing unsafe updates?  Why is part of the document set creation process working, but the part where the doc
    set item's properties are being set fails?
    Thanks!

    Hi Dylan,
    While creating a DocumentSet from code, SharePoint need to UpdateFileOrFolderProperties by calling COM. In the call, SharePoint may need to update some settings. But these updates are not allowed from Get request. That is why the issue happens.
    Based on my experience, the issue generally happens when updating HttpThrottleSettings. Update HttpThrottleSettings from a web request(GET) is not allowed.
    In this case, you can check from the ULS log, if there is error related to HttpThrottleSettings when "Updates are currently disallowed on GET requests. " happened. If so, please execute the following PowerShell from SharePoint 2010 Management Shell at first:
    $web = get-spwebapplication http://nameofproblemwebapp
    $web.HttpThrottleSettings
    $web.Update()
    If you have any more questions, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)

  • Creating methods in an applet

    I am confused on how to create methods in an applet. I know how to create them in an application. However, if an applet, do you create the methods in the Class Header, after the init() method, or the paint (Graphics g) method.
    I am trying to create a method called StudentName where the Student name and class.
    I originally had the method in the class body but I received error messages -- mainly because I hadn't started the paint method yet.
    thanks for your help.
    Here is a sample of the code I am using:
    import javax.swing.*;
    import java.awt.Graphics;
    public class ClassAverageApplet extends JApplet
          String first,second, third, fourth,fifth, name, className;
          double a,b,c,d,e,f, sum;
        public void init() 
          ClassAverageApplet student = new ClassAverageApplet();
          name = JOptionPane.showInputDialog("Student's name please");
          className = JOptionPane.showInputDialog("Class");
          first = JOptionPane.showInputDialog("Please enter first Grade");
          a = Double.parseDouble(first);
          second = JOptionPane.showInputDialog("please enter second Grade");
          b = Double.parseDouble(second);
          third = JOptionPane.showInputDialog("please enter Third Grade");
          c = Double.parseDouble(third);
          fourth = JOptionPane.showInputDialog("please enter Fourth Grade");
          d = Double.parseDouble(fourth);
          fifth= JOptionPane.showInputDialog("please enter Fifth Grade");
          e = Double.parseDouble(fifth);
          f = (a + b + c + d + e)/5;
          sum = a + b + c + d + e;
       public void paint(Graphics g)
          public void StudentName()
             g.drawString("Student:    " + name,25,25);
             g.drawLine(25,25,70,25);
             g.drawString("Class:      " + className,25,40);
             g.drawLine(25,40,60,40);
           g.drawRect(15,10,300,150);
       if(f  > 89)
         student.StudentName();
    //I am replacing these next four statements with the StudentName method
       // g.drawString("Student:    " + name,25,25);
       // g.drawLine(25,25,70,25);
       // g.drawString("Class:      " + className,25,40);
       // g.drawLine(25,40,60,40);
        g.drawString("Your final grade is an A ",25,50);
        g.drawString("The sum of your grades out of 500 points is " + sum ,25,60);
        g.drawString("The grade average is " + f,25,70);
        g.drawString("Here are your grades for the class",70,90);
        g.drawLine(70,90,255,90);
        g.drawString("First Grade:    " + a,25,110);
        g.drawLine(25,110,90,110);
        g.drawString("Second Grade:   " + b ,25,120);
        g.drawLine(25,120,90,120);
        g.drawString("Third Grade:    " + c,25,130);
        g.drawLine(25,130,90,130);
        g.drawString("Fourth Grade:   " + d ,25,140);
        g.drawLine(25,140,90,140);
        g.drawString("Fifth Grade:    " + e,25,150);
        g.drawLine(25,150,90,150);
        }

    i don't think you know what you're talking about. there's no difference between the way you write an applet or application. one has an init() method one has main(String[] args) method. one extends applet, but i won't tell you which.
    i'm sure you need to define half of your methods inside the paint() method and the other half inside the init() method. it does matter what goes where as long as it's half and half. the important thing is to make sure you have an even number of methods, otherwise your applet will behave oddly.

  • Where to create an applets GUI?

    Hi, i'm interested in some comments on where to create an applets GUI.
    Recently, i had to use JBuilder 7 to create an applet, and the wizard creates a jbInit() method to create the GUI and calls this method inside the applets constructor.
    Up to now, i used to build the applets GUI inside the applets init() method (as practiced by the Java Tutorial).
    Any comments on these two different approaches?
    Thanks in advance.
    Markus

    Just for the files: after reading the following paragraph in the Java Tutorial, i have decided to go with the init method:
    'The init method is useful for one-time initialization that doesn't take very long. In general, the init method should contain the code that you would normally put into a constructor. The reason applets shouldn't usually have constructors is that an applet isn't guaranteed to have a full environment until its init method is called. For example, the Applet image loading methods simply don't work inside of a applet constructor. The init method, on the other hand, is a great place to call the image loading methods, since the methods return quickly.' (Trail: Writing Applets, Lesson: Overview of Applets, Methods for Milestones)
    HTH, Markus

  • Create method call

    this.getDepartmentsLocalHome().create
    (dept.getDepartmentId(), dept.getDepartmentName());
    (the example from: http://www.oracle.com/technology/obe/obe_as_1012/j2ee/develop/endtoend/defaultejbscope/defaultejb.htm#t4)
    does the create method called like that allow to insert a new record with all its attributs setted in the controller layer?? or should i define a new create which takes all the attributes as parameters?
    thank u!

    it s the first time i develop with EJB technology.
    i dont know how to use the create method.
    i m trying the following code to add a new row in myObject table:
    public void addMyObject(MyObjectLocalDTO parametre)
    try
    MyObjectDTO obj = this.getMyObjectLocalHome().create();
    obj.setAttr1(parametre.getAttr1());
    obj.setAttr2(parametre.getAttr2());
    obj.setAttr3(parametre.getAttr3());
    obj.setRelationship_idmyobjectDTO(parametre.getRelationship_idmyobjectDTO());
    catch (NamingException e)
    System.out.println(e.toString());
    throw new javax.ejb.EJBException(e);
    catch (CreateException e)
    System.out.println(e.toString());
    throw new javax.ejb.EJBException(e);
    is that correct and enaugh to insert my row? or is there a better way to do that?
    thank u.
    regards

  • CL_RSPLS_CR_EXIT_BASE  how to use the create method

    Hi everybody
    I am using a copy of CL_RSPLS_CR_EXIT_BASE in the relationships derivation of our planning project. I do not understand how CL_RSPLS_CR_EXIT_BASE works.
    Here is the problem:
    I use the class to derivate 0COSTCENTER from 0CO_AREA and 0COORDER. In one planning function everything works fine. With the use of the relationships the class is called and in the DERIVATE Method I can select the responsible costcenter from the 0COORDER data with 0COORDER and 0CO_AREA.
    But I also have a planning sequence which is also using the relationships but on step 7 (costcenter from co_area and coorder) it directely calls the DERIVATE method. But in the DERIVATE Method I do not have the source fields COORDER and CO_AREA as source data available....
    How does this work? Where do I get the source data from? In the first case I have it all in the parameter c_s_chas.... but in the CREATE method I can't find the source data.
    Thanks for any input.
    Have a nice day
    regeards
    Christophe

    Hi Gregor
    thanks for your reply. I definitely am or was pretty confused about DERIVE and CREATE. Can you confirm the following so that I know if I got it now:
    In CREATE i select data from the master table (for example COSTCENTER COORDER and CO_AREA if those are the characteristics I use in the exit relation (source = COORDER, target = COSTCENTER and CO_AREA). Those are also the lines I find in the selection criteria table i_tsx_seldr.
    I fill all the selected combinations into the internal table e_th_chas (in the same order of fields like they are in i_tsx_seldr).
    That's it and then the system gets the necessery data from this selection?
    In this way I get a new error message in my planning sequence:
    Nachwert-Einschränkung 1 zu Teilvorgang 1 bewirkt folgenden Fehler
    Es konnte keine Kombination erzeugt werden
    What am still doing wrong?
    Thanks a lot!
    best regards
    christophe

  • Hi How do we create Methods inside the Business objects of Z

    Hi Abapers,
                        How do we create Methods inside the Business objects (z objects) and how *** an import parameter or export parameter  to be defined for the new Methods.
    Regards
    Bhaskar Rao.M

    Hi Bhaskar,
    that ´s not difficult.
    Open your Bus.Obj. in SWO1 with CHANGE/EDIT
    Click on the "Methods" header line and then use the button for "Create".
    If you want to add the method on basis of a function module, choose next in the next pop up. Then the system will offer you the ex/import parameter from the function module. So this is a really simple way.
    If you don´t have a FM, it is a little bit more difficult.
    Choose No on the quetion about a FM, fill in the next pop up  methode name (no blanks allowed).
    Dialogue is for user related method (call screen...) synchronous for methods which have to give back a result directly in to the workflow.
    After completing the screen the method will be displayed as new method at the end of method list. Now add parameters (first click on the method name, then choose parameter button, same functionality to add program to the method).
    Programm:
    Code snip:
    BEGIN_METHOD ZWFCHECKMIRO CHANGING CONTAINER.
    DATA:
          ZBELNR TYPE RBKP-BELNR,
          ZGJAHR TYPE RBKP-GJAHR,
          RESULT TYPE HRP1001-ISTAT,
          BELNR TYPE BKPF-BELNR,
          GJAHR TYPE BKPF-GJAHR,
          BUKRS TYPE BKPF-BUKRS.
    to import parameter
      SWC_GET_ELEMENT CONTAINER 'Zbelnr' ZBELNR.
      SWC_GET_ELEMENT CONTAINER 'Zgjahr' ZGJAHR.
    *(or SWC_GET_TABLE)
    here add the functionality of your method!
    to export parameter
    SWC_SET_ELEMENT CONTAINER 'Result' RESULT.
      SWC_SET_ELEMENT CONTAINER 'Belnr' BELNR.
    *(or SWC_SET_TABLE)
    !!! Important: naming convention!!! Use same writing of parameter names in
    PARAM area (button PARAMETER) and here in code.
    To use your method, change it to implemented after adding your code.
    -> Edit -> Change release status -> object type component -> into implemented
    (Sorry , have a german screen here, possibly terms are a little bit different.
    Hope this helps a little bit.!
    regards
    Dirk

  • How to customizer entity create() method and doDML() just ?

    hi,
    I want to customizer entity create() method out of entityimpl java class,just like customer validator rule ,it will be used by many entity,so I can programly control default value such as database function or procedure,and more i want to write customer doDML() procedure with parameter,where and how can i do?
    thanks very much
    lixz
    2006.12.11

    hi,thank you frank
    but what you said is not what i want.eg,I have two entities,users(userid,last_name,first_name),product(prodid,name,specification) ,I want to set useid,last_name by set some property :Inparameter(a,b),setField(userid,last_name),Function_name(set_default_value) and can set product entity some field defaul value,and i only need to supply inparameter(a,b,c),setField(name,specification) ,function_name(another_set_default_value).customer validator (srdemoadfbc datemustcomeafter rule) can do the very thing what i want ,but can it only execute during validating,do you unstand what i say and give me some help?
    thanks
    lixz 2006/12/12

  • Multiple create methods of entity beans in single transcation

    Hi,
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transaction type is Container Managed for all its methods.
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creating two entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch block.
    I want that the entire operation be under just one transcation so i have also given the transaction attribute as Required for all methods of Session bean and Entity Beans.
    However if i pass invalid parameters to second create method so that it generates exception then still the first create statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?

    Hi Ashwini,
    "Ashwini" <[email protected]> wrote in message news:400291af$[email protected]..
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transactiontype is Container Managed for all its methods.
    >
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creatingtwo entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch
    block.
    >
    I want that the entire operation be under just one transcation so i have also given the transaction attribute asRequired for all methods of Session bean and Entity Beans.
    >
    However if i pass invalid parameters to second create method so that it generates exception then still the firstcreate statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?o Do you use TXDatasource with your entity beans?
    o In CMT transactions are automatically rolled back only when RuntimeExceptions
    are thrown. What kind of exception is thrown in your case?
    Regards,
    Slava Imeshev

  • How to override the create method invoked by a create form?

    Hello everyone, I'm using ADF Faces and have the next question:
    How can I override the create method which is invoked by a create form to preset an attribute in the new row (the preset value is not fixed, I have to send it to the method as a parameter as it is obtained using an EL expression)?
    In the ADF guide I read how to override a declarative method (Section 17.5.1 How to override a declarative method), but this explains how to do it with a method that is called by a button. I don't know how to do the same with a method which is called automatically when the page is loaded.
    I also tried overriding the view object's createRow() method to receive a parameter with the preset values but it didn't work, I believe that was because the declarative create method is not the same as the view object's createRow. This caused the form to display another row from the viewobject and not the newly created one (I also set the new row into STATUS_INITIALIZED after setting the attribute).
    Well, I hope my problem is clear enough for somebody to help me.
    Thank you!

    Hello,
    I'm not sure you can do it with standard generated Create Form.
    In your view object you'll need to create your own create method with parameters, publish it to client interface and invoke instead of standard generated create action in page definition.
    Rado

  • Can I have a pack path in the XmlWriter.Create() method?

    Hi Everyone,
    This piece of code is throwing "The given path's format is not supported" error!
    var settings = new XmlWriterSettings();
    settings.Indent = true;
    var writer = XmlWriter.Create("pack://application:,,,/Languages;component/English.xaml", settings);
    System.Windows.Markup.XamlWriter.Save(rd, writer);
    writer.Close();
    Is there restrictions on the type of path we can provide in Create() ?
    Please Mark as Answered If this answers your question Or
    UnMark as Answered if it did not.
    Happy to Help :)
    My Site

    >>Can I have a pack path in the XmlWriter.Create() method?
    No you can't. Pack URIs are resource identifiers and the XmlWriter.Create method accepts an output file path and this path is relative to the directory of the running executable (.exe), i.e. the method simply creates a file on the disk.
    Whether this file is actually resides in your project folder or not doesn't matter at all as far as the XmlWriter is concerned.
    Please remember to mark helpful posts as answer and/or helpful and please start a new thread if you have a new question.

Maybe you are looking for

  • How to copy a file from Client to Application Server

    Hello, My requirement is user selects a file from Browse button on oracle form - this location is on client side, and have to copy this file on Application server. I tried using webutil_file.copy_file function but it gives error - copy_file is not a

  • Error while uploading HR master data from inQuality server

    Hi, Expert. While uploading of MAster data from Developement to Quality by BDC. When program starts for Tcode PA40, selecting Hiring Action, it is goining to the Action Screen. Here while taking the position from HR template, it gives error as Positi

  • The Web Dynpro Application 'XssMenu' has expired

    Hi, we implement an ESS Scenario, with One Enterprise Portal 6.0 SP17, a mySAP ECC 5.0 System with ERP2004 and a seperate server with a java stack, because our customer don´t want to install and use a java stack on their HR/ERP systems. They want to

  • Backupping from single-user mode

    I am currently only able to use the single-user mode, and am looking for possibilities to take some backup of certain files before I venture reinstalling or something. Is it possible to write to disk from S-U mode? How? Can I do it in another way, e.

  • WebIntelligence with BW as DataSource

    Hi everyone, Im getting the next error when i execute a query from webintelligence in a popup window: Query 1 - Unverse1 A database error occured. The database error text is: The MDX query SELECT  { .[0CRM_NUMDOC] }  ON COLUMNS FROM   failed to execu