ADF Calendar : java code to create activity

Dear All,
I need to create an activity in the calendar from java code and not from the create popup.
actually i need to create a new activity when i drag a activity from a table to the calendar but the oracle demo is too complicated !!
Can anyone advice how ?
Thanks

Hi,
Always mention your JDev version.
Are you talking about the component demo ? Calendar Drop Target Demo ?
Which part of it you are finding it complicated? Have you downloaded the source and went through the code?
-Arun

Similar Messages

  • JAVA CODE  NOT CREATING IDOC

    Hi all
    I m facing problem to upload data through idoc.the scenario is like we receive electric meter reading in flat file format. And to upload that data JAVA code is written which will create an IDOC FILE this authorization is only give to 2-3 person in organization and to basis guy also as user changed it’s password in SAP and in JAVA the java code is not going to create the IDOC file and data is not going to upload. after changing user password in sap system ,user not able to upload the data.
    ISU_MR_UPLOAD01 is the idoc file generated. So is there any authorization issue, password issue how to see and view IDOC IN SAP, can any one help me out into this.
    The error with java throws is as;
    1ST ERROR IN TRACE FILE
    ERROR file opened at 20061109 133610 India Standard, SAP-REL 640,0,59 RFC-VER 3  MT-SL
    T:2736 ======> User TR has no RFC authorization for function group SYST .
    T:2736 <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
    2ND ERROR ON COMMAND PROMT
    C:\j2sdk1.4.2_07>cd bin
    C:\j2sdk1.4.2_07\bin>java sandsupload
    Creating IDoc...Exception in thread "main" com.sap.mw.idoc.IDoc$Exception: (2) I
    DOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "ISU_MR_UPLOAD01
    " is unavailable.
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:233)
            at com.sap.mw.idoc.jco.JCoIDoc$JCoDocument.<init>(JCoIDoc.java:187)
            at com.sap.mw.idoc.jco.JCoIDoc.createDocument(JCoIDoc.java:10521)
            at sandsupload.main(sandsupload.java:35)
    the part of java code
    try {
                //create a JCo client pool
                JCO.addClientPool( "MyPool",    //pool name
                                   3,           //maximum pool connections
                                   "333",       //SAP client
                                   " TR",    //user ID
                                   " XYZ",  //password
                                   "EN",        //language
                                   " 1.1.1.1   ", //app server host name
                                   "00" );   //system number
                //create an IDoc repository
                IDoc.Repository idocRep = JCoIDoc.createRepository("MyIDocRepository", "MyPool");
                //create a new and empty MATMAS02 document
                System.out.print("Creating IDoc...");
         Line where it shows error
                IDoc.Document doc = JCoIDoc.createDocument(idocRep, "ISU_MR_UPLOAD01");
                //get the root segment from the document
                //The root segment does not contain any fields or data. It is only
                //used as the standard parent segment and won't be transmitted when
                //the document is sent to an SAP system.
                IDoc.Segment segment = doc.getRootSegment();
                //create and add a new and empty child segment of type E1MARAM
                //and fill the segment data

    Hi Gaurav,
    Same exception on the same line has been reported and marked as solved here :
    IDOC_ERROR_METADATA_UNAVAILABLE:
    Btw, I think this forum is not visited often by JCO and ABAP connectivity experts, so maybe you could get a faster response to your problems while posting in "Java Programming" or maybe in some forum under the category ABAP Development.
    HTH
    Peter

  • Java code to create a new .txt file in FTP server  --- Help

    Hi,
    I wrote a standalone java app which creates a .txt file in my local machine and transfers it to FTP server. But my requirement now is to create a new .txt file with the same content in FTP server itself instead of creating locally with basic java code.
    I'm aware of transfering file from local machine to the FTP server using STOR command of FTP. But i never tried creating a new file & writing content into that in FTP server.
    So, if any one did this before please help me out with source code or any idea ???
    Thank you.
    Vj.

    simply_vijay wrote:
    thanks for your reply. yes i've seen the Apache Commons NET API , but there is no method or class to create a new file in FTP server. I'm really worried how to solve this problem ???Sure there is.
    There's a method where you can write data to a file on the server using an OutputStream, right? Well, instead of writing to a FileOutputStream, write to that OutputStream instead. Remember to close the OutputStream and call the method which says you're finished with the command (I forget what it's called).

  • Need JAVA code to create OIM ITresource-connection values are in a csv file

    Hi,
    Could any one plz help me with the java code used / tested before to create OIM IT resource dynamically, for the reference. IT resource parameter (connection) values in a .csv file, where in I've multiple environments.
    Thanks,
    Ramesh
    Edited by: user13267745 on Aug 19, 2010 12:37 AM

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • ABAP/Java Code to create ID configuration

    Hi Experts ,
    It is our project requirement that we need to create the mass ID Configs like ( Receiver determination / Interface determination) from the code (ABAP/JAVA)...
    I have seen on the SAP docs that there is some web services available to do that .
    Has anybody has this sort of exposure ...
    Kind regards
    Goutam

    Hi,
    For ID objects, I did not see any article yet.
    But for IR objects or SLD objects, the answer is Yes.
    Please check following blog:
    XI - Reverse Engineering #1 – Software Component
    /people/felix.jeyareuben/blog/2007/03/20/xi--reverse-engineering-1-150-software-component
    XI – Reverse Engineering #2 – Dependencies in SWC & adding a namespace
    /people/felix.jeyareuben/blog/2007/03/22/xi-150-reverse-engineering-2-150-dependencies-in-swc-amp-adding-a-namespace
    What you can do is to check the author of the blog to see if this is possible.
    Regards.
    Liang

  • Unable to create a folder through java code on weblogic server 10GR3

    Hi,
    I have java code which creates a folder and writes an XML file in to it.
    File saveDirectory = new File(storePath);
    if(!saveDirectory.exists()){
    System.out.println("directory doesnt exists");
    boolean isDirectoryCreated = saveDirectory.mkdir();
    System.out.println("directory doesnt exist creating status :"+isDirectoryCreated);
    This code works fine on my local weblogic server.Whereas the one installed on Unix box is not.
    saveDirectory.mkdir() is unable to create a directory at the given path.
    I feel there is some permission problems.
    Please let me know what can be done.
    Thanks,

    I have my Linux/Unix Admin either add me to a group that can do this or create one that can and add me to it.
    If you command prompt can you manually do it now?
    Best Regards
    mseberg

  • Start Workflow Java Code

    Hello
    I want to initiate WLI 8.1 Process Flow from a java client. I ahev searched BEA/Google
    without any results. Please anyone pull me out of this.
    Thanks in advance.
    Re,
    Pranay P Parsatwar

    Function activities of type "External Java" were first introduced in Release 2.6. To use this type of activity, you would need to upgrade
    to a higher version of Oracle Workflow.
    Note: Although you can use a Release 2.6 or higher Workflow Builder with a server running Release 2.5, you cannot use any features such as external Java function activities that
    were not part of Release 2.5. For details, see:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/workflow.920/a95265/dfwf09.htm#owbsrvver
    I can use Java Workflow API to create and start Process in Java Code ,
    but the Activity Function define As "External Java" doesn't work ...
    The Workflow Engine is v.2.5.1 and I think It's running on the same machine with DB (O8i 8.1.6) Server...

  • How to kill a system process from java code.

    Hi,
    i need to kill or remove windows system process like cmd.exe from java code.
    like removing it from end process in task mgr.
    i tried below code but its not removed.
    is there a better way we can do this.
    killing a system process from java code will create any issues?
       public static void main(String[] args) throws Exception {
       String[] cmd = { "cmd.exe" };
       Process p = Runtime.getRuntime().exec(cmd);
       p.destroy();
    any suggestions or ideas are really appreciated.
    thanks.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • Code to create AccessPolicy

    Hi
    I'm writing a java code to create access policy on OIM. I have a problem to add responsabilities. The responsabilities is add to resource eBusiness Suite in the Access Policy but when the access policy is triggered, only the account is created but the responsability isn't added to user. Can someone help me ?
    AccessPolicyResourceData data = new AccessPolicyResourceData( 87,"eBusiness Suite User",8,"UD_EBS_USER","P"); //87 code object- 8 is code parent table
    //add responsabilities
    HashMap<String, String> hashResp = new HashMap();
    hashResp.put("UD_EBS_RESP_RESP_NAME", "4~222~50751");
    data.addChildTableRecord("9","UD_EBS_RESP","Add",hashResp); // 9 is code child table
    AccessPolicyResourceData[] resourceData={data};
    tcAccessPolicyOperationsIntf accessOpr= Platform.getService(tcAccessPolicyOperationsIntf.class);
    HashMap hashParamAP = new HashMap();
    hashParamAP.put("Access Policies.Description","Access Policy By Custom Code");
    hashParamAP.put("Access Policies.Name","eBusiness Suite AccessPolicy");
    hashParamAP.put("Access Policies.Note","");
    hashParamAP.put("Access Policies.Retrofit Flag","0");
    hashParamAP.put("Access Policies.By Request","0");
    long[] denyObg={};
    boolean[] revokeObgIsNotAplly ={true};
    long[] keyRole={24};
    long[] keyObj={87};
    accessOpr.createAccessPolicy(hashParamAP,keyObj,revokeObgIsNotAplly,denyObg,keyRole,resourceData);
    Thanks
    Edited by: 825715 on Jan 28, 2013 12:45 PM

    OIM API Access Policy creation

  • Tcode to create activity group and authorization check,

    hi,
      can any one say me the transaction code to create activity group and authorization check.

    Hi
    I'm not sure about what you want to do, anyway have you try the trxs SU20 and SU21?
    Max

  • Accessing ACTIVE DIRECTORY FROM JAVA CODE

    I am trying to access the Active DIrectory user through a java code.
    Kindly let me know the steps apart from creating the user in ADS to be followed so that the following java code may work.
    presently it is giving the following error.
    problem serching the directory
    //package com.axa;
    import java.util.Hashtable;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    import javax.naming.*;
    public class AdHelper
         public static void main(String args[])
    System.out.println("1");
              Hashtable env = new Hashtable();
              String adminName = "CN=user,CN=Users,DC=BDC4AXA.CO.IN";
              String adminPassword = "user";
              String ldapURL = "ldap://10.1.242.51:636";
    System.out.println("2");
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              env.put(Context.PROVIDER_URL,ldapURL);
    System.out.println("3");
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialLdapContext(env,null);
    System.out.println("4");
                   SearchControls searchCtls = new SearchControls();
              System.out.println("5");
                   //Specify the attributes to return
                   String returnedAtts[]={"sn","givenName","mail"};
                   searchCtls.setReturningAttributes(returnedAtts);
                   //Specify the search scope
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(mail=*))";
    System.out.println("6");
                   //Specify the Base for the search
                   String searchBase = "DC=ANTIPODES,DC=COM";
    System.out.println("7");
                   //initialize counter to total the results
                   int totalResults = 0;
                   // Search for objects using the filter
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
    System.out.println("8");               //Loop through the search results
                   while (answer.hasMoreElements()) {
              SearchResult sr = (SearchResult)answer.next();
                   totalResults++;
    System.out.println("9");
                   System.out.println(">>>" + sr.getName());
                   Attributes attrs = sr.getAttributes();
                        if (attrs != null) {
                             try {
                             System.out.println(" surname: " + attrs.get("sn").get());
                             System.out.println(" firstname: " + attrs.get("givenName").get());
                             System.out.println(" mail: " + attrs.get("mail").get());
                             catch (NullPointerException e)     {
                             System.out.println("Errors listing attributes: " + e);
                   System.out.println("Total results: " + totalResults);
                   ctx.close();
                   catch (NamingException e) {
                   System.err.println("Problem searching directory: " + e);
              catch(Exception e)
                   System.out.println("Unhandled Exception: " + e);
    }

    This is what I have for my LDAP connection.
    public Hashtable<String, String> env = null;
         public LdapContext ldapContext = null;
         public Control[] connCtls = null;
         Context ctx;
         DirContext dirContext;
    public LDAPAuth(String ldapurl) {
              ldapurl = "ldap://" + serverIP + ":389";
              try {
                   env = new Hashtable<String, String>();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,
                             "com.sun.jndi.ldap.LdapCtxFactory");
                   env.put(Context.SECURITY_AUTHENTICATION, "simple");
                   env.put(Context.PROVIDER_URL, ldapurl);
                   env.put(Context.SECURITY_PRINCIPAL, "cn=username,cn=users" + baseName);
                   env.put(Context.SECURITY_CREDENTIALS, "password" + baseName);
                   env.put(Context.SECURITY_PROTOCOL, "ssl");
                   ctx = new InitialContext(env);
              } catch (Exception e) {
                   System.out.println(" bind error: " + e);
                   e.printStackTrace();
              try {
                   ldapContext = new InitialLdapContext(env, connCtls);
              } catch (AuthenticationException e) {
                   System.out.println("Authentication exception " + e);
              } catch (NamingException e) {
                   System.out.println("Naming exception " + e);
         public Attributes fetch(String username) throws NamingException {
              DirContext ctx = new InitialDirContext(env);
              Attributes attributes = ctx.getAttributes(username);
              try {
                   System.out.println("fetching: " + username);
                   Object obj = ctx.lookup("cn=" + username
                             + baseName);
                   System.out.println("cn=" + username + baseName + "is bound to: " + obj);
                   //attributes = obj.getAttributes("");
                   for (NamingEnumeration<?> ae = attributes.getAll(); ae
                             .hasMoreElements();) {
                        Attribute attr = (Attribute) ae.next();
                        String attrId = attr.getID();
                        for (NamingEnumeration<?> vals = attr.getAll(); vals.hasMore();) {
                             String value = vals.next().toString();
                             System.out.println(attrId + ": " + value);
              } catch (NamingException e) {
                   System.out.println(" Problem looking up " + username + baseName + ". " + e);
              return attributes;
    Now, I'm sure it has something to do with how I'm passing in the username and the groups. But I want to have ANY user log in, not just this test. I may be a little confused on how this works, but if anyone could explain to me why what I am trying to do doesn't work, I would greatly appreciate it.
    Thanks in advance,
    Tetsuya.
    Edited by: tetsuyamasamune on Sep 8, 2008 3:55 PM

  • Access ViewObject from Java code in ADF

    Hello everyone,
    I've got one problem with ADF, which I can't deal with on my own.
    I've created web application that consists of two UI components:
    - table that displays data from database (i've created entity object/view object/application module and drag onto JSF page)
    - button that can refresh table / change data in it (i've got java bean method, that do some logic on view object, which is added as a action to a button)
    My problem is, that i've got SQL query, for example: "select * from dept" and I want to my view object (which I've created before) displays result of this query. How can I do it?
    I don't know how from a java code (in my java bean method) access a view object and execute a sql query on it? I've got some code:
    ViewObject dynamicVO = this.findViewObject("VO1");
    dynamicVO.remove();
    dynamicVO = this.createViewObjectFromQueryStmt("VO1", "SELECT * FROM dept");
    dynamicVO.executeQuery();
    but the dynamicVO is always null.
    Thanks for any help.

    Ok, my jdev version is: Studio Edition Version 11.1.2.2.0.
    I've got some problems which i can't deal with, access ViewObject in my Java class.
    I will show you my project file tree:
    http://i46.tinypic.com/2myxkwz.png
    and
    my TestClass.java:
    package model;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.Number;
    public class TestClass {
        public TestClass() {
            super();
        public static void main(String[] args) {
            String amDef = "models";
            String config = "AppModule";
            Configuration.createRootApplicationModule(amDef, config);
    }which causes error:
    Error Configuration File bc4j.xcfg is not found in the classpath
    cle.jbo.client.Configuration.loadFromClassPath(Configuration.java:471)
    at oracle.jbo.common.ampool.PoolMgr.loadConfiguration(PoolMgr.java:600)
    at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:526)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1513)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1490)
    at model.TestClass.main(TestClass.java:16)I found some similar topics to my, but none of them can help to solve my problem.

  • Develop an environment: Activity diagram to corresponding JAVA code

    we are doing a poject to convert UML Activity diagram to corresponding JAVA code.
    How can we develop a plug-in, that can embedded in the an IDE..(UML environment with standard symbols... etc.)
    There are already has some IDEs that can use to do this...
    -SDE for NetBeans
    -SDE for Sun ONE etc.
    From where can we find out more details about : how those stuff are created:working.
    Any ideas,white papers, research papers on this issues welcome!

    Poke around at Eclipse.org. Their stuff is usually talked about/written about.

  • Create a new File from java code

    Hi,
    I'd like to create a new File on IFS, using Java code. Moreover, this file will be an image file, and I'd like to store meta data with this file... and then execute a search on this meta data.
    I know it must not be very difficult to do, but I can't find any code sample.
    Does anyone could give me some usefull link or advice ?
    thanks in advance,
    Roger.

    First of all, you need to create your custom class. You can do it using iFS Manager, extending the class DOCUMENT. Let's call this class IMAGE with the attributes "length", "width", "colorDepth". Take a look at the code that creates one instance:
    You need one instance of LibrarySession (that appears in the code named "ifsSession").
    You need also the InputStream of the image you want to store (that appears in the code named "contentStream").
    // Setting the attributes
    DocumentDefinition def = new DocumentDefinition(ifsSession);
    def.setClassname("IMAGE");
    def.setAttribute("NAME", AttributeValue.newAttributeValue("nameOfTheImage"));
    def.setAttribute("LENGTH", AttributeValue.newAttributeValue(100));
    def.setAttribute("WIDTH", AttributeValue.newAttributeValue(230));
    def.setAttribute("COLORDEPTH", AttributeValue.newAttributeValue(1024));
    def.setContentStream(contentStream);
    // Creation
    Document doc = (Document) ifsSession.createPublicObject(def);
    I hope this helps,
    Fabio Nunes

  • Creating a folder in current workspace using java code

    Hi Experts,
    I need to create a folder and some file in the workspace of NWDS user. Can someone please suggest how can i find out the workspace of user using JAVA code.
    IWorkspaceRoot is not working in NWDS.
    Regards
    Pranav

    Hi Pranav,
    Tell me if you want to create this folder at run time or in NWDS while developing application.
    If you want to create it at the time of development just change your perspective to Java perspective and from there you can see the entire project structure and from there you can create desired files / folders.
    Ninad

Maybe you are looking for

  • Itunes from hard drive to new computer

    Hi All I have the following issue, I have my itunes (all music, tv shows,films andf iphone 4 back up) on an external hard drive that has 232GB of space I have read that i need to consolidate the libary to move it, but i have 137GB of information and

  • How to escape apostrophe in Oracle PL/SQL  dynamic queries

    I have an script that receives an string as a parameter, for example: @C:/myScript.sql "AXEL"; @C:/myScript.sql "AXEL DAVID"; @C:/myScript.sql "o'neal"; my scripts basically constructs a Parameterized query an execute it. That's all. It works most of

  • Uplod of file with Kingsoft Spreadsheet

    Dear all, We are having an existing T-CODE "ZMM01" for uploading the material master. As this t-code is uploading the files perfectly when file format is in Microsoft excel. But it is not uploading the same file if that is in Kingsoft Spreadsheet. Fu

  • My ipad photos cannot be rotated.  How can Ido this through Windows Photo Viewer?

    I would like to burn my ipad photos to disk, but when I plug it into my Dell, I cannot rotate photos or burn to disk.  How dod I do this?

  • Flex  XML

    Hi i m devlopping an HMI with flex offers to users to create object, the user has to describe objects, (name , attribute...) and all informations must be exported in xml file ..... so someone has a idea ????