Problem while creating a custom document using JAVA API in the current Folder

I am trying to create an instance of a custome type from the API. I have created a custom type via XML. I have associated a JSP with the custom type thru iFS manager. This jsp provides an interface for the user to enter various data. On submit I call some other jsp also loaded into the /ifs/webui/jsps which calls a method in the java class to create an instance of the above mentioned type. This instance needs to be created in the current directory and not in the home directory of the user. I have written a java program which when run from JDeveloper connects to the repository and creates the object, but not as a foldered object. If I load this class into custom_classes directory, I get an exception. I am attaching the code also here which does the actual processing.
package cms;
import oracle.ifs.agents.common.*;
import oracle.ifs.agents.manager.*;
import oracle.ifs.agents.server.*;
import oracle.ifs.beans.*;
import oracle.ifs.common.*;
public class ContentModule extends Object {
public static final String CLASSNAME = "CONTENT";
public static final String TOPICID_ATTRIBUTE = "TOPICID";
public static final String SITEID_ATTRIBUTE = "SITEID";
LibrarySession m_session;
public ContentModule() {
connectToRepository();
createDocument("AM5","s");
public void connectToRepository(){
try{
LibraryService l_service=new LibraryService();
CleartextCredential l_credential = new CleartextCredential("system","manager");
ConnectOptions l_options=new ConnectOptions();
l_options.setServiceName("IfsDefault");
l_options.setServicePassword("ifssys");
m_session=l_service.connect(l_credential,l_options);
}catch(IfsException ex){
ex.setVerboseMessage(true);
ex.printStackTrace();
public void createDocument(String p_docName,String p_docContent){
try{
DocumentDefinition l_doc=new DocumentDefinition(m_session);
l_doc.setClassname(CLASSNAME);
long newId1=5;
long newId2=5;
FolderPathResolver l_currentPath=new FolderPathResolver(m_session);
Folder l_currentFolder=l_currentPath.getCurrentDirectory();
l_doc.setAddToFolderOption(l_currentFolder);
l_doc.setName(p_docName);
l_doc.setContent(p_docContent);
AttributeValue av1 = AttributeValue.newAttributeValue(newId1);
l_doc.setAttribute(TOPICID_ATTRIBUTE,av1);
AttributeValue av2 = AttributeValue.newAttributeValue(newId2);
l_doc.setAttribute(SITEID_ATTRIBUTE,av2);
Document l_document=(Document) m_session.createPublicObject(l_doc);
}catch(IfsException ex){
ex.setVerboseMessage(true);
ex.printStackTrace();
public static void main(String[] args) {
ContentModule contentModule = new ContentModule();
Any help will be highly appreciated.
Thanks

Please print out the Verbose Stack Trace generated when you run this application.
I suspect that you FolderPathResolver is not pointed at the directory you think it is. You might want to try printing out
I_CurrentFolder.getAnyFolderPath();
and I_CurrentFolder.getName();
null

Similar Messages

  • Create group in OID using java api

    Hi all!
    I need to create group in OID using java api. Java api documentation contains examples for creating users but not for groups. I search oracle.com (and google) and didn't find any hint.
    Anybody know the way?
    thank you.

    Andrew,
    a group is created like any other entry in OID. You need to specify the dn, objectclass(es) and (mandatory) attributes.
    e.g.
    objectclass=groupOfUniqueNames
    with
    uniquemember=cn=orcladmin, cn=Users, dc=de,dc=oracle,dc=com
    as an example take a look at
    cn=iASAdmins, cn=Groups,cn=OracleContext,dc=de,dc=oracle,dc=com
    to see the schema (data) for groupofuniquenames you can either use ODM or query the directory server
    ldapsearch -p 3060 -b "cn=subschemasubentry" -s base "objectclass=*"
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem in creating an account document using BAPI_ACC_DOCUMENT_POST

    Hi Experts,
    I have a porblem while creating an account document from BAPI_ACC_DOCUMENT_POST.
    The problem is acc document is geeting posted and I am getting an document number for that bapi, but its not getting saved to data base and I am getting the following error message
    "Document 1900004327 3000 does not exist in fiscal year 2005
    Message no. F5A397
    System Response
    The required document either does not exist in the fiscal year or is still being posted.
    When the document is read, archived documents are also considered."
    Please sugggest...
    We are using ECC 6.0
    Thanks,
    Suma.

    Hi,
    this means that the posting is not open...
    try with 2008...
    or else ask ur financial consultatto check, whether the 2005 is open or not.
    u also try posting manually using FB01 with same entries u r using for this BAPI...so that u can track the error.
    Also use BAPI_TRAACTION_COMMIT after bapi post.
    check ur subsystem which u r passing for the BAPI..
    wa_general-assetsubno = '0000'. Is it 3000 or 0000
    Try using 0...
    Edited by: Sumi Vasu on May 14, 2008 8:13 AM

  • Problem displaying Arabic characters in PDF using Java APIs

    We are experiencing a problem when attempting to display Arabic characters within a PDF document using the Java APIs.
    The relevant Java code is as follows:
    RTFProcessor processor = new RTFProcessor("example.rtf" );
    processor.setOutput( “example.xsl” );
    processor.setExtractXLIFF(true);
    processor.process();
    ByteArrayOutputStream dataOut = new ByteArrayOutputStream();
    DataProcessor dataProcessor = new DataProcessor();
    dataProcessor.setDataTemplate( example.xdt" );
    if( parameterValues != null && parameterValues.length > 0 )
    setReportParameters( dataProcessor, parameterValues ); // method to set any report parameters from the parameterValues list.
    dataProcessor.setConnection( jdbcConnection );
    dataProcessor.setOutput(dataOut);
    dataProcessor.processData();
    FOProcessor foProcessor = new FOProcessor();
    foProcessor.setLocale( locale );
    foProcessor.setData( new ByteArrayInputStream( dataOut.toByteArray() ) );
    foProcessor.setTemplate( “example.xsl” );
    String xliffFileNameAndPath = getXLIFFFile( “example”, locale );
    if( xliffFileNameAndPath != null )
    foProcessor.setXLIFF( xliffFileNameAndPath );
    foProcessor.setOutput( "example.pdf" );
    foProcessor.setOutputFormat(
    outputFormat == PDF_FORMAT ? FOProcessor.FORMAT_PDF : FOProcessor.FORMAT_HTML );
    foProcessor.generate();
    The method getXLIFFFile( ) gets the relevant XLIFF file for the supplied report locale (if it exists) – the three test files that we used were Italian (example_it_IT.xlf), Spanish (example_es_ES.xlf) and Arabic (example_ar_AE.xlf).
    I imported the following JAR files from the XML Publisher release (version 5.6.2) into my Java application: collections.jar, i18nAPI_v3.jar, versioninfo.jar, xdocore.jar and xmlparserv2.jar.
    The output is OK for all three translations in HTML format, using a charset of UTF-8, and for Italian and Spanish in PDF format. However, the Arabic characters display as question marks in PDF format. The same issue occurs if I stream the output as a byte array straight to the HTTP response rather than save within a file.
    Note that the same RTF, XDT and XLIFF files produce the correct output in both HTML and PDF when executed within XMLPublisher.
    Thank you

    Hi
    I had a similar issue with arabic chars. With PDF layout, chars were appearing properly when preveiwd on local m/c, but as I implement file on server, it was displayed as ?????. I had raised a TAR 5798348.993 with oracle about this and they suggested to apply patch 4028294 Oracle Sourcing J Rollup and then patch 4182914. But later my users changed requirement and i cud not apply the patch to test if it works fine.
    But here, you have suggested that installing fonts would do. Is it really that simple? If yes, dont know what is that patch for which I was told to apply.
    Regards
    Varun

  • Error while creating user id from MDM JAVA API in 7.1 SP7

    Hi,
    We are trying to create user id in MDM 7.1 SP7 using JAVA API in SAP Portal. When trying to create user id, we are getting below error. If you have any solution please let us know.
    com.sap.mdm.commands.CommandException: MDM repository data is out-of-date or is locked by another MDM Server. Refresh the data and try the operation again. If the error persists, contact the system administrator
    Thanks,
    Vinit Pugaliya

    URGENT** How to change  OIM user password from outside OIM

  • Create User in OID using Java API

    I read the documentation, read javadoc for Java API for OID, but still am not clear "how can I create a user in OID using Java API for OID."
    It tells us how to create a java object User, but then how do we write this object to OID ?
    I searched every where, metalink, forums, google...and am still looking for answere...
    Thanks in Advance
    Cheers
    Puneet

    I did it using the Novell LDAP java api:
    import com.novell.ldap.*;
    public class LdapAdmin {
    public static final String ldap_base = "dc=your,dc=company,dc=com";
    public static final String ldap_user_base = "cn=Users," + ldap_base;
    public static final String ldap_portal_base = "cn=PORTAL_GROUPS,cn=Groups," + ldap_base;
    public static final String ldap_extended_base = "cn=Extended Properties,cn=OracleContext," + ldap_base;
    public static final String ldap_dbdomain_base = "cn=OracleDefaultDomain,cn=OracleDBSecurity,cn=Products,cn=OracleContext," + ldap_base;
    public static final String ldap_context_base = "cn=COMMON,cn=OracleDBAppContext," + ldap_dbdomain_base;
    private static final String default_ldap_host = "infrastructure.your.company.com";
    private static final int default_ldap_port = 4032;
    private static final String default_ldap_login = "cn=orcladmin," + ldap_user_base;
    private static final String default_ldap_pwd = "welcome1";
    private static final String default_user_pwd = "secret";
    private static final String[] personclass_values = { "top", "person", "organizationalPerson", "inetOrgPerson", "orcluser", "orcluserv2" };
    public static LDAPConnection getConnection (String host, int port, String user, String pwd) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(host,port);
    lc.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: "+lex.getResultCode()+"-"+lex.getLDAPErrorMessage());
         return lc;
    public static LDAPConnection getConnection (String host, int port) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(host,port);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: "+lex.getResultCode()+"-"+lex.getLDAPErrorMessage());
         return lc;
    public static LDAPConnection getConnection (String user, String pwd) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(default_ldap_host,default_ldap_port);
    lc.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    lex.printStackTrace();
         return lc;
    public static LDAPConnection getConnection () {
    return getConnection(default_ldap_host,default_ldap_port);
    public static void bind (LDAPConnection conn, String user, String pwd) {
    try {
    conn.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in bind: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    lex.printStackTrace();
    private static void bind (LDAPConnection conn) {
    bind(conn,default_ldap_login,default_user_pwd);
    public static void modifyAttribute (LDAPConnection conn, String dn, String attr, String val, int mod) {
    LDAPAttribute attribute = new LDAPAttribute(attr,val);
    LDAPModification[] modification = new LDAPModification[] { new LDAPModification(mod,attribute) };
    try {
    conn.modify(dn,modification);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in modifyAttribute: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void modifyAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.REPLACE);
    public static void addAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.ADD);
    public static void deleteAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.DELETE);
    public static void deleteEntry (LDAPConnection conn, String dn) {
    try {
    conn.delete(dn);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in deleteEntry: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static boolean isValidDn(LDAPConnection conn, String dn) {
    try {
    LDAPSearchResults res = conn.search(dn);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in deleteEntry: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    return false;
    public static void createPerson (LDAPConnection conn, String net_id, String lname, String fname, String office, String email, String id, String fullname) {
         LDAPAttributeSet attributeSet = new LDAPAttributeSet();
    attributeSet.add(new LDAPAttribute("cn", net_id));
    attributeSet.add(new LDAPAttribute("sn", lname));
    attributeSet.add(new LDAPAttribute("objectclass", personclass_values));
    attributeSet.add(new LDAPAttribute("l", office));
    attributeSet.add(new LDAPAttribute("mail", email));
    attributeSet.add(new LDAPAttribute("employeeNumber", id));
    attributeSet.add(new LDAPAttribute("givenName", fname));
    attributeSet.add(new LDAPAttribute("uid", net_id));
    // attributeSet.add(new LDAPAttribute("fullName", fullname));
    attributeSet.add(new LDAPAttribute("orclpkcs12hint", default_user_pwd));
    attributeSet.add(new LDAPAttribute("orclpassword", VerifyPassword.getHash(net_id,default_user_pwd)));
    attributeSet.add(new LDAPAttribute("userpassword", default_user_pwd));
    attributeSet.add(new LDAPAttribute("orcldefaultprofilegroup", "cn=DEFAULT,"+ldap_portal_base));
    LDAPEntry entry = new LDAPEntry("cn="+net_id+","+ldap_user_base,attributeSet);
    try {
    conn.add(entry);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in createPerson: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void updatePerson (LDAPConnection conn, String net_id, String lname, String fname, String office, String email, String id, String fullname) {
    LDAPModification[] mod = new LDAPModification[8];
    mod[0] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("cn", net_id));
    mod[1] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("sn", lname));
    mod[2] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("l", office));
    mod[3] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("mail", email));
    mod[4] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("employeeNumber", id));
    mod[5] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("givenname", fname));
    mod[6] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("fullName", fullname));
    mod[7] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("uid", net_id));
    try {
    conn.modify("cn="+net_id+","+ldap_user_base,mod);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in updatePerson: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void main (String[] args) {
    try {
    LDAPConnection conn = getConnection(default_ldap_login,default_ldap_pwd);
    // updatePerson(conn,"ID1","Somebody","Joe","CLE","[email protected]","1","Joe Somebody 2");
    // modifyAttribute(conn,"cn=ID1,"+ldap_user_base,"fullName","Joe Somebody",LDAPModification.REPLACE);
    // modifyAttribute(conn,"cn=ID1,"+ldap_user_base,"displayName","Joe Somebody");
    createPerson(conn,"ID1","Somebody","Joe","CLE","[email protected]","1","Joe Somebody");
    // deleteEntry(conn,"cn=ID1,"+ldap_user_base);
    conn.disconnect();
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in main: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    }

  • Problem in Creating a jar file using java.util.jar and deploying in jboss 4

    Dear Techies,
    I am facing this peculiar problem. I am creating a jar file programmatically using java.util.jar api. The jar file is created but Jboss AS is unable to deploy this jar file. I have also tested that my created jar file contains the same files. When I create a jar file from the command using jar -cvf command, Jboss is able to deploy. I am sending the code , please review it and let me know the problem. I badly require your help. I am unable to proceeed in this regard. Please help me.
    package com.rrs.corona.solutionsacceleratorstudio.solutionadapter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.jar.JarEntry;
    import java.util.jar.JarOutputStream;
    import java.util.jar.Manifest;
    import com.rrs.corona.solutionsacceleratorstudio.SASConstants;
    * @author Piku Mishra
    public class JarCreation
         * File object
         File file;
         * JarOutputStream object to create a jar file
         JarOutputStream jarOutput ;
         * File of the generated jar file
         String jarFileName = "rrs.jar";
         *To create a Manifest.mf file
         Manifest manifest = null;
         //Attributes atr = null;
         * Default Constructor to specify the path and
         * name of the jar file
         * @param destnPath of type String denoting the path of the generated jar file
         public JarCreation(String destnPath)
         {//This constructor initializes the destination path and file name of the jar file
              try
                   manifest = new Manifest();
                   jarOutput = new JarOutputStream(new FileOutputStream(destnPath+"/"+jarFileName),manifest);
              catch(Exception e)
                   e.printStackTrace();
         public JarCreation()
         * This method is used to obtain the list of files present in a
         * directory
         * @param path of type String specifying the path of directory containing the files
         * @return the list of files from a particular directory
         public File[] getFiles(String path)
         {//This method is used to obtain the list of files in a directory
              try
                   file = new File(path);
              catch(Exception e)
                   e.printStackTrace();
              return file.listFiles();
         * This method is used to create a jar file from a directory
         * @param path of type String specifying the directory to make jar
         public void createJar(String path)
         {//This method is used to create a jar file from
              // a directory. If the directory contains several nested directory
              //it will work.
              try
                   byte[] buff = new byte[2048];
                   File[] fileList = getFiles(path);
                   for(int i=0;i<fileList.length;i++)
                        if(fileList.isDirectory())
                             createJar(fileList[i].getAbsolutePath());//Recusive method to get the files
                        else
                             FileInputStream fin = new FileInputStream(fileList[i]);
                             String temp = fileList[i].getAbsolutePath();
                             String subTemp = temp.substring(temp.indexOf("bin")+4,temp.length());
    //                         System.out.println( subTemp+":"+fin.getChannel().size());
                             jarOutput.putNextEntry(new JarEntry(subTemp));
                             int len ;
                             while((len=fin.read(buff))>0)
                                  jarOutput.write(buff,0,len);
                             fin.close();
              catch( Exception e )
                   e.printStackTrace();
         * Method used to close the object for JarOutputStream
         public void close()
         {//This method is used to close the
              //JarOutputStream
              try
                   jarOutput.flush();
                   jarOutput.close();
              catch(Exception e)
                   e.printStackTrace();
         public static void main( String[] args )
              JarCreation jarCreate = new JarCreation("destnation path where jar file will be created /");
              jarCreate.createJar("put your source directory");
              jarCreate.close();

    Hi,
    I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
    You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved.

  • Problem while creating credit memo request using BAPI

    HI,
    I am trying to create credit memo request using the BAPI_SALESDOCU_CREATEFROMDATA1..
    I am getting the error as " No customer master data is available for the customer". But the customer exists in the KNA1 table. What is the mistake i hv done.. this s my code..
    REPORT  ZSV_CREDITMEMO_TEST1.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                             WITH HEADER LINE.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = 'G2'. 
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = '0001'.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = ''.
      headerx-distr_chan = 'X'.
    Division
      header-division = ''.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    *Complete delivery
        header-COMPL_DLV = ''.
        header-COMPL_DLV = 'X'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = '0000C10130'.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = ''.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = 'C20011'.
      itemx-material = 'X'.
    Plant
      item-plant    = ''.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = '10000'. 
      itemx-target_qty = 'X'.
    item category
      itemx-ITEM_CATEG = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = '10000'.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    can anyone tell what the error is.?

    Hi
    please look at code below code this succefully creating credit memo may some help to you
    header-doc_type = 'ZS4'.
        PERFORM get_plant.
        headerx-doc_type    = 'X'.
        header-sales_org    = wa_temp1-vkorg.
        headerx-sales_org   = 'X'.
        header-purch_no     = wa_temp1-bstnk.
        header-distr_chan   = wa_temp1-vtweg.
        headerx-distr_chan  = 'X'.
        header-division     = wa_temp1-spart.
        header-purch_no_s   = wa_temp1-bstnk.
        headerx-division    = 'X'.
        wa_partner-partn_role = 'AG'.
        wa_partner-partn_numb = wa_temp1-kunnr.
        APPEND wa_partner TO it_partner.
        wa_partner-partn_role = 'WE'.
        wa_partner-partn_numb = wa_temp1-kunnr.
        APPEND wa_partner TO it_partner.
        CLEAR: wa_partner.
        LOOP AT lt_temp2 INTO wa_temp2 WHERE kunnr = wa_temp1-kunnr.
          "AND matnr = wa_temp1-matnr.
    *wa_item-itm_number = wa_temp2-posnr .
          wa_item-material   = wa_temp2-matnr.
          wa_item-plant      = wa_temp2-werks.
          wa_item-req_qty    = wa_temp2-fkimg * 1000.
          wa_item-target_qty = wa_temp2-fkimg * 1000.
          APPEND wa_item TO it_item.
        ENDLOOP.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
          EXPORTING
            order_header_in       = header
    *   WITHOUT_COMMIT            = ' '
    *   CONVERT_PARVW_AUART       = ' '
         IMPORTING
           salesdocument          = v_vbeln
    *   SOLD_TO_PARTY             =
    *   SHIP_TO_PARTY             =
    *   BILLING_PARTY             =
           return                 = return
          TABLES
           order_items_in         = it_item
           order_partners         = it_partner.
        IF v_vbeln <> space.
          wa_vbeln-vbeln = v_vbeln.
          APPEND wa_vbeln TO lt_vbeln.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          HIDE wa_vbeln-vbeln.
          CLEAR: wa_partner,header,v_vbeln, wa_temp2.
          REFRESH: it_partner,it_item.
        ELSE.
    *    LOOP AT return .
          it_error-srno = idx.
          it_error-err_msg = return-message.
          APPEND it_error.
    *    ENDLOOP.
        ENDIF.
        idx = idx + 1.
      ENDLOOP.
    Regards

  • Getting errors while creating model in webdynpro(using JAVA)

    hii ,
    am using EJBs ....n while creating model in webdynpro, while trying to include jars of wrapper class and command bean in model its giving an error that the jars already exist in model classes....
    plz help out....

    hi,
    if you r importing the bean for second or nth time , delete your previous imports from model  in your application and also delete the previous mappings in the component controller and corresponding view controllers and recreate it.(importing the JARs of both EJB and Bean in WD Library and recraete the java build paths,references) .
    revert back if issue persists..
    Thank you
    Shravan.

  • Problem while creating serivce call ..using bapi

    Hi
    I am trying to create a service call using a BAPI(BAPI_FLIGHT_GETLIST) as given in the example...
    while creating the service call in the step Adapt Context  i can see Airline Destination from ,Destination to and max rows,
    i am not getting any choice to select dest from and to...
    and when it is finished.. the node bapi_flights_getlist doesnt have any subnodes like cityfrom country from ... flight list.. as shown in the example...
    Can anyone send me the screenshts of creating a service call specially the step Adapt context...to [email protected]
    points will be given..
    Regards,
    Kiran

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • Problem while creating table maintenance generator using two step

    Hello All,
    I have created a Z table in which I have 7 fields, out of which 6 are character fields and 7th field is of type INT4
    Now when I create the maintenance generator using TWO STEP approach, the 7th field i.e., of type INT4 is not available in the first screen (the table control screen). This screen only has 6 fields for display.
    But when I click NEW ENTRIES button, I get the next screen which has all the 7 fields.
    But if I create the maintenance generator using SINGLE STEP, all 7 fields are displayed in the first screen.
    Please suggest. Let me know if you require some more explaination.
    Thanks & Regards,
    Tarun

    Hi Tarun,
    Go to the layout and increase the size of the Screen. or at the screen attributes change the length and width values.
    You know that initially the screen occupies default size only.
    Hope this would serve your purpose.
    Cheerz
    Ram

  • Problem while deploying WD +MDM7.1 thr java API

    Hi All,
             We are working with MDM 5.5 java API and building WD UI, everything was fine, but when we upgraded to MDM 7.1 we get this error: note when i tried to test the new Java API using java i dont see any problem,
    The initial exception that caused the request to fail, was:
       java.lang.ClassNotFoundException: com.sapportals.connector.connection.ConnectionFailedException -
    Loader Info -
    ClassLoader name: [com.flex.mdm.map/map_global_mfr_supp_cust] Living status: alive Direct parent loaders: [system:Frame] [service:servlet_jsp] [service:ejb] [service:sld] [library:tccmi] [sap.com/tcwdapi] [service:tcjesecurityapi] [library:tcjewebserviceslib] Resources: /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/com.flex.gbl.mdm.apidm_mdm_apiDM_API.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/com.flex.mdm.mapmap_global_mfr_supp_cust.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-admin.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-common.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-core.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-data.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-extension.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-protocol.jar /usr/sap/CED/J00/j2ee/cluster/apps/com.flex.mdm.map/map_global_mfr_supp_cust/servlet_jsp/webdynpro/resources/com.flex.mdm.map/map_global_mfr_supp_cust/root/WEB-INF/lib/mdm-publishing.jar -
        at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:259)
        at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:228)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:353)
        at com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:76)
        at com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:63)
        ... 116 more
    See full exception chain for details.

    Try restarting the portal if possible, otherwise restart the MDM Connector from Portal Visual Admin tool.
    Reason your log contains - " com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:76" which looks like connector issue.

  • Facing Problem while Debugging a custom report using LDB

    Hi Gurus,
    I have requirement to modify a custom report program related to FI. This program used Logical database ZDF ( Copied original DDF) for data fetching.
    when i am trying to see the data in debugging mode, its not allowing to check in start-of-selection event. only in the initialization & end-of-selection i could able to debug.
    when i put breakpoint in initialization, it is allowing to see the flow till a Get Event occurs in the code, once a Get event occur the debugger is coming out and displaying the report.
    If anybody faced this kind of problem when debugging a report using LDB, please share how you resolved it. If there are any other ways to debug a program of this kind please help me.
    Thanks,
    Nanda

    Hi Amith,
    I checked that way also, i put break point in database program of the copied LDB, but its not allowing to check the flow in that program also.
    Please suggest any other ways.
    Thanks,
    Nanda

  • Error on creating Purchase order document using DI API

    Dear all,
    I am getting an error "<b>Server threw an exception</b>"  at the time of initializing object of Purchse order document. code is
    vDrafts = GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)
    I am using SBO 2005B SP 0 PL-20.
    Reply as soon as possible.
    Regards,
    Manish Jha

    Hi Manish,
    I am not sure if I am right, but I remember something about a bug in SBO SDK that gave an error when trying create draft object. Not sure on which patch this was though and am not sure if this is your problem too. Maybe someone else can remember what patch it was on?
    Hope it helps,
    Adele

  • Code to Create and Populate Lookup using Java API

    Hi All,
    I wish to write a java code to first create a lookup in OIM and then populate with some custom values.
    For creating Lookup, I used the following function and it worked:
    tcLookupOperationsIntf useLookup=(tcLookupOperationsIntf)factory.getUtility
    ("Thor.API.Operations.tcLookupOperationsIntf");
    useLookup.addLookupCode("Lookup.Custom");
    However, If I try using the following function to populate this lookup:
    useLookup.addLookupValue("value1","value2",value3",value4");
    I got this error:
    Thor.API.Exception.tcInvalidLookupException
    Please help.
    Cheers,
    Sunny

    You are using the correct API
    ("value1","value2",value3",value4");
    The values which you are providing are wrong.
    TRY THIS
    addLookupValue("Lokkup.Test", codeValue,decodevalues, "en", "US")
    Lookup.Test should be there.

Maybe you are looking for

  • Getting the values of a form (JSP, JavaScript involved)

    Hi, basically I want to read the values from one page to another one, but I have found that when call the jsp from a javascript function it does not work!!! ... if I call the page "getValues.jsp" directly from the <form action>, everything works perf

  • Why can I not open 2 windows (playlists) to view playlist and library at same time

    I cannot open a separate playlist window at the same time I am viewing my library as I have been able to in all previous versions. I want to see all my songs in a separate window, plus a playlist open that I can drag and drop into. Or maybe 2 playlis

  • My iPod loads songs very slowly

    I had some trouble with the battery-life of my iPod, and I thought erasing the whole iPod would cure this, so I've resetted it. After doing this, my iPod, upon connecting it with my PC (Sony Vaio notebook - Windows XP SP2), started loading songs very

  • Need help regarding certification alternative to weblogic portal developnme

    Hi All, I was planning to give weblogic portal certification (1z0-110). But I found that the 1z0-110 certification is retired. Can anybody guide me to some other alternative. I am a JAVA developer who is interested in doing some server certification.

  • Maximum database size Exchange 2013 Standard

    Hi, Does anybody is aware of database size limitation for Exchange 2013 Standard. I remember in older version there was a registry tweak to increase database limits. Thank you  alfa21