Instance creation using WAPI

Hi,
In our project, there is a requirement to show a UI (JSF which is imported in Global Creation screenflow)which should create an instance in Oracle BPM from an external web application. For this purpose we are using WAPI. Is this approach right?
Also, we need to pass values from external web application to BPM which are used to display on the UI mentioned above. How to acheive this using WAPI?
It will be really helpful if some one provides examples for the same.
Thanks,
Sana

Thanks Dan for the document link.
In the document it is given that
"WAPI provides two different ways to interact with the FuegoBPM Work Portal.
• External to the Work Portal, through the HTML Process API, and
• Internal to the Work Portal, through the URLForAction Java Class."
For my requirement, i have to use HTML Process API since I need to create instance from an External WebApplication. I tried out the example given for HTML Process API. But the url "http://localhost:8585/portal/servlet/ExecutionDispatcher" is not found exception is coming.
What is the corresponding url in Oracle BPM 10g.
This requirement is very urgent. Please give your suggestions.

Similar Messages

  • DB Instance creation using DBCA Gives ERROR

    Hi All,
    I am getting below error while creating a new DB instance using DBCA. Initially I thought it could be a problem of the oracle version. But I checked it is Oracle 10G server version 10.2.0.1. I got it re-installed 3 times, but still same issue. Please help !!!
    ORA-31011: XML parsing failed
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 143

    I remember that issue from long long ago, for that old version, although I didn't encounter it that often.
    If I am not mistaken, I solved it by running @?/rdbms/admin/catqm after creation (a multiple times?) and @?/rdbms/admin/utlrp
    Maybe the following will help/assist in solving the issue: http://www.liberidu.com/blog/2009/07/13/howto-clean-xml-db-install/

  • Class instances creation using MEF

    Hi,
    I have class implementing one interface e.g.
    interface IFoo
    Class Foo : IFoo
    Using ServiceLocator, I want to create multiple instances of class in following manner: -
    1. instance CommonFoo
    2. instance SpecificFoo1
    3. instance SpecificFoo2
    How to export this class in such a way that if I pass "Specific" as parameter to ServiceLocator it will create new instance every time. But if I pass "Common" as parameter, ServiceLocator will create only one instance
    Regards,
    Sharda

    Hi Sharda,
    Per my understanding, you want to determine retrieving Singleton object programmatically. From the description of the following link,
    http://blogs.msdn.com/b/gblock/archive/2009/01/29/managed-extensibility-framework-preview-4-a-grab-bag-of-goodies.aspx, it is supported from MEF version 4. Please check it and try the solution on that blog. Feel free to let me know the result.
    Regards,    
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • WLST Domain Creation using JRF template throws SQLRecoverableException

    I am working on domain creation using templates and included the JRF template to use OPSS functionality.
    I have run the RCU utility to create the required components that will have necessary tables to host OPSS data and also tested that it works with CC_STB user that i will use to connect from WLS.
    I am able to ping the database server having RCU components from the VM where i want to create and configure the domain but when i configure the LocalSvcTblDataSource with the same ip address and try to setup the OPSS datasources, it gives me "Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified Error Code: 17002"
    Below is my WLST python script:
    #=======================================================================================
    # Open a domain template.
    #=======================================================================================
    readTemplate("/u01/app/mw/Oracle_Home/wlserver/common/templates/wls/wls.jar")
    #=======================================================================================
    # Update the domain to enable the WebLogic Server domain with JRF and EM.
    #=======================================================================================
    addTemplate('/u01/app/mw/Oracle_Home/oracle_common/common/templates/wls/oracle.jrf_template_12.1.2.jar')
    addTemplate('/u01/app/mw/Oracle_Home/em/common/templates/wls/oracle.em_wls_template_12.1.2.jar')
    #=======================================================================================
    # Configure the Administration Server and SSL port.
    # To enable access by both local and remote processes, you should not set the
    # listen address for the server instance (that is, it should be left blank or not set).
    # In this case, the server instance will determine the address of the machine and
    # listen on it.
    #=======================================================================================
    cd('Servers/AdminServer')
    set('ListenAddress','')
    set('ListenPort', 7001)
    create('AdminServer','SSL')
    cd('SSL/AdminServer')
    set('Enabled', 'True')
    set('ListenPort', 7002)
    #=======================================================================================
    # Define the user password for weblogic.
    #=======================================================================================
    cd('/')
    cd('Security/base_domain/User/weblogic')
    # Please set password here before using this script, e.g. cmo.setPassword('value')
    cmo.setPassword('password')
    #=======================================================================================
    # Create and configure a JDBC Data Source, and sets the JDBC user.
    #=======================================================================================
    # Get RCU Configuration using RCU service table (STB) schema credentials
    cd('/')
    cd('JDBCSystemResource/LocalSvcTblDataSource/JdbcResource/LocalSvcTblDataSource')
    cd('JDBCDriverParams/NO_NAME_0')
    set('DriverName','oracle.jdbc.OracleDriver')
    set('URL','jdbc:oracle:thin:@XX.XX.XX.XX:15210/xe')
    set('PasswordEncrypted', 'password')
    set('UseXADataSourceInterface', 'false')
    cd('Properties/NO_NAME_0')
    cd('Property/user')
    cmo.setValue('CC_STB')
    getDatabaseDefaults()
    #=======================================================================================
    # Write the domain and close the domain template.
    #=======================================================================================
    setOption('OverwriteDomain', 'true')
    writeDomain('/u01/data/user_projects/domains/cc_domain')
    closeTemplate()
    #=======================================================================================
    # Exit WLST.
    #=======================================================================================
    exit()
    And the complete exception trace.
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
    Error: writeDomain() failed. Do dumpStack() to see details.
    wls:/offline/base_domain>dumpStack();
    com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
    Domain Location: /u01/data/user_projects/domains/cc_domain
    Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
    Exception:
    oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:55)
      at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1967)
      at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.python.core.PyReflectedFunction.__call__(Unknown Source)
      at org.python.core.PyMethod.__call__(Unknown Source)
      at org.python.core.PyObject.__call__(Unknown Source)
      at org.python.core.PyInstance.invoke(Unknown Source)
      at org.python.pycode._pyx5.writeDomain$15(/tmp/WLSTOfflineIni4846195865917165143.py:73)
      at org.python.pycode._pyx5.call_function(/tmp/WLSTOfflineIni4846195865917165143.py)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyFunction.__call__(Unknown Source)
      at org.python.pycode._pyx93.f$0(<console>:1)
      at org.python.pycode._pyx93.call_function(<console>)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyCode.call(Unknown Source)
      at org.python.core.Py.runCode(Unknown Source)
      at org.python.core.Py.exec(Unknown Source)
      at org.python.util.PythonInterpreter.exec(Unknown Source)
      at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
      at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
      at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
      at weblogic.management.scripting.WLST.main(WLST.java:219)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at weblogic.WLST.main(WLST.java:29)
    Caused by: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
    Domain Location: /u01/data/user_projects/domains/cc_domain
    Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
    Exception:
    oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at com.oracle.cie.domain.script.ScriptExecutor.runGenerator(ScriptExecutor.java:3706)
      at com.oracle.cie.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:991)
      at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1117)
      ... 29 more
    Caused by: com.oracle.cie.domain.security.external.ConfigSecurityException: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:129)
      at com.oracle.cie.domain.DomainGenerator.run(DomainGenerator.java:315)
      at java.lang.Thread.run(Thread.java:744)
    Caused by: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:708)
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.configureDBSecurityStore(OpssDomainConfigImpl.java:339)
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.initializeSubsystem(OpssDomainConfigImpl.java:166)
      at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:126)
      ... 2 more
    Caused by: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.processJPAException(JpsDBDataManager.java:2088)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:955)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1459)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1455)
      at oracle.security.jps.internal.common.rdbms.util.JpsDbBootstrapImpl.<init>(JpsDbBootstrapImpl.java:162)
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:679)
      ... 5 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:614)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:282)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getVersion(JpsDBDataManager.java:1027)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getEMFAndSubject(JpsDBDataManager.java:1124)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:907)
      ... 9 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
      at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
      at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
      at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:690)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215)
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:554)
      ... 16 more
    Caused by: java.sql.SQLRecoverableException: IO Error: Unknown host specified
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:465)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:232)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
      at java.sql.DriverManager.getConnection(DriverManager.java:571)
      at java.sql.DriverManager.getConnection(DriverManager.java:187)
      at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
      ... 20 more
    Caused by: oracle.net.ns.NetException: Unknown host specified
      at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:191)
      at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:133)
      at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:416)
      at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
      at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
      at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1109)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:316)
      ... 27 more
    Any help/pointers/hints will be helpful
    Thanks,
    Santosh

    Hi Micheal,
    Thanks a Lot for your response.
    We have checked the OS requirements :
    System Itanium 11i (11.31) B.11.31.0803.318a Base Quality Pack Bundle for HP-UX 11i v3, March 2008+
    Response:
    ======
    We have the higher version installed for this quality pack.
    QPKBASE B.11.31.1109.367a Base Quality Pack Bundle for HP-UX 11i v3, September 2011
    2) Required Packages : HPDesktopDev (version B.11.31.01)
    Response:
    =======
    This package is also installed.
    X11MotifDevKit B.11.31.01 HP-UX Desktop Developer's Toolkit - X11, Motif, and Imake
    3) Required Operating System Patches
    PHKL_36248
    PHKL_36249
    PHSS_37202
    PHSS_37501
    PHCO_38050
    PHSS_38139
    Response:
    ========
    We have the supersets for these patches installed. The installation logs also confirm these patches at the OS level.
    Check Name:Patches
    Check Description:This is a prerequisite condition to test whether the patches recommended for installing the product are available on the system.
    Checking for PHKL_36248; found PHKL_36248. Passed
    Checking for PHKL_36249; found PHKL_36249. Passed
    Checking for PHSS_37202; found PHSS_37202. Passed
    Checking for PHSS_37501; found PHSS_37501. Passed
    Checking for PHCO_38050; found PHCO_38050. Passed
    Checking for PHSS_38139; found PHSS_38139. Passed
    Check complete. The overall result of this check is: Passed
    Regards
    Sumit Kapila

  • Strange error in explicit instance creation

    Dear all,
    using NW2004s I have a strange error while explicit instance creation:
    Let´s say I have a class a in the Class Builder calles c1. With method "check_data".
    In my program I do the following:
    DATA: ref_chk TYPE REF TO object.
    create object ref_chk type ('C1').
    c1->check_data( );
    If I do so I get an syntax error: The method check_data is unknown, private or protected.
    But the method is public.
    I need the explicite instance creation beacuse the class changes and I want to set it with a variable.
    Any idea what´s wrong? How can I solve the problem?
    Regards
    Roman

    Hi Roman,
    The best way to do this would be to use an Interface and then cast the class to an interface type once it has been created. However if this is not possible (i.e. the interface is not fixed for all the different classes you want to create) you can use the following code to call your class.
    DATA: ref_chk TYPE REF TO object.
    create object ref_chk type ('C1').
    call method ref_chk->('CHECK_DATA').
    Just a note the 'CHECK_DATA' in brackets can also be replaced with a variable as in the follwing example:
    DATA: ref_chk TYPE REF TO object.
    DATA: method_name type string.
    create object ref_chk type ('C1').
    method_name = 'CHECK_DATA'.
    call method ref_chk->(method_name).
    Cheers,
      De Wildt

  • Process instance creation on 5.5 from a process A to a process B Dif engine

    Process Instance creation on 5.5 from a Process A to a Process B on different engine.
    I have 5.5 enterprise with 2 engines.
    I want to create a process instance from process a to process b
    this is the example that is working if processes are deployed on the same engine
    argumentos = this.buildInstanceArgs(arg_processID : AltaDeCuentas, arg_xmlObj : xmlObj);
    suc = suc + "/AltaDeCuentasSucursales";
    ProcessInstance.create(processId : suc, arguments : argumentos, argumentsSetName : "BeginIn");
    break;
    This example uses the OU and the process id I also need to set the engine where the process is deployed
    Thanks In advance!
    Nico

    Hi, just an update, at least now I have an error message on the first button,
    there was a condition that I left over preventing it to work,
    I have also amended the JavaScript code removing " from the "dataType"
    Its now
    function PrintSelectedItems()
    var r = confirm("In print selected items");
    apex.server.process('DISPLAY_SELECTED_ITEMS',
    {"x01": "Sent from Page 5",
    dataType: "text"},
    {success: function(data){alert("here->" + data);}}
    and I get Error: parsererror - SyntaxError: JSON.parse: unexpected character

  • Easily fixing parameters for instance creation script

    H all,
    In the classical instance creation scripts numerous parameters are repeated even if they are similar. For example, the directory into which saving the different tablespaces is often the same. Also i'm looking for passing them as parameters. My first tries give the following:
    -> In the .bat launching the creation:
    set MY_DB_USER=sys
    set MY_DB_PWD=change_on_install
    set MY_DB_NAME=DragNFly
    set ORACLE_SID=DragNFly
    set MY_DB_CREATION_SOURCE=F:\Oracle\oradata\Instance_creation_scripts
    set MY_DB_CREATION_DESTINATION=E:\Oracle_DragNFly
    set MY_ORACLE_BIN=F:\oracle\bin
    set MY_ORACLE_HOME=F:\oracle
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SID%\bdump
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SID%\cdump
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SIDD%\create
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SID%\udump
    mkdir %MY_DB_CREATION_DESTINATION%\%ORACLE_SID%
    %MY_ORACLE_BIN%\oradim.exe -new -sid %ORACLE_SID% -startmode m
    %MY_ORACLE_BIN%\oradim.exe -edit -sid %ORACLE_SID% -startmode a
    %MY_ORACLE_BIN%\orapwd.exe file=%MY_ORACLE_HOME%\Database\PWD%MY_DB_NAME%.ora password=%MY_DB_PWD%
    %MY_ORACLE_BIN%\sqlplus /nolog connect %MY_DB_USER%/%MY_DB_PWD% @%ORACLE_SID% as sysdba
    %MY_ORACLE_BIN%\sqlplus /nolog @%MY_DB_CREATION_SOURCE%\StartCreation.sql
    -> Then in the first sql file, fixing all the variables and calling the other ones:
    DEFINE MY_DB_USER=SYS
    DEFINE MY_DB_PWD=change_on_install
    DEFINE MY_DB_NAME=DragNFly
    DEFINE MY_DB_SID=DragNFly
    DEFINE MY_DB_CREATION_DESTINATION=E:\Oracle_DragNFly
    DEFINE MY_DB_CREATION_SOURCE=F:\Oracle\oradata\Instance_creation_scripts
    DEFINE MY_ORACLE_BIN=F:\oracle\bin
    DEFINE MY_ORACLE_HOME=F:\oracle
    connect &&MY_DB_USER/&&MY_DB_PWD as SYSDBA
    -- # The following files have to be stored in the #
    -- # same repertory as the present file #
    @@CreateDBdb &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@CreateDBtbs &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@CreateDBcat &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@postDBcreate &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@CreateDBuser &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    exit;
    -> Finally one example of use in CreateDB.sql is:
    connect &&1/&&2 as SYSDBA
    set echo on
    spool &&5\&&3\Create&&3.db.log
    startup nomount pfile="&&6\init_DB.ora";
    CREATE DATABASE &&3
    MAXINSTANCES 1
    MAXLOGHISTORY 1
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    DATAFILE '&&5\&&3\system_&&3.01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    DEFAULT TEMPORARY TABLESPACE &&3._TMP TEMPFILE '&&5\&&3\temp_&&3.01.dbf' SIZE 1500M REUSE
    UNDO TABLESPACE "&&3._UNDO" DATAFILE '&&5\&&3\undo_&&3.01.dbf' SIZE 500M REUSE
    CHARACTER SET WE8ISO8859P1
    NATIONAL CHARACTER SET AL16UTF16
    LOGFILE GROUP 1 ('&&5\&&3\redo_&&3.01.log', '&&5\&&3\redo_&&3.01bis.log') SIZE 102400K,
    GROUP 2 ('&&5\&&3\redo_&&3.02.log', '&&5\&&3\redo_&&3.02bis.log') SIZE 102400K,
    GROUP 3 ('&&5\&&3\redo_&&3.03.log', '&&5\&&3\redo_&&3.03bis.log') SIZE 102400K;
    spool off;
    As you can see a first problem is that i have to set the variables the first time in the .bat and a second time in the first .sql. I don't know how to use an unique file for setting all the variables i need.
    Second difficulty is: fixing names and directories is a first step but i would like to fix all the different size values in this same file. The goal is to have only one file with dozen of values to change before creating new instances instead of checking all the different parameters inside of the different files.
    What is your mind on this?
    Probably there are better examples that i don't found?
    Regards,
    Tif

    One error i didn't suspect -> don't using SID with lowercase and uppercase in the name.
    Thing i've forgotten to say: variables have to be set both in the .bat and the first .sql but they have to match too with values in the init.ora. That why i would like to simplify all these declarations with unifying them into a single file.
    If somebody can help me, please
    Tif

  • Passing variables from .bat to .sql in instance creation scripts

    Hi all,
    In the classical instance creation scripts numerous parameters are repeated even if they are similar. For example, the directory into which saving the different tablespaces is often the same. Also i'm looking for passing them as parameters from the .bat launching the instance creation. My first tries give the following:
    -> In the .bat launching the creation:
    set MY_DB_USER=sys
    set MY_DB_PWD=change_on_install
    set MY_DB_NAME=DragNFly
    set ORACLE_SID=DragNFly
    set MY_DB_CREATION_SOURCE=F:\Oracle\oradata\Instance_creation_scripts
    set MY_DB_CREATION_DESTINATION=E:\Oracle_DragNFly
    set MY_ORACLE_BIN=F:\oracle\bin
    set MY_ORACLE_HOME=F:\oracle
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SID%\bdump
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SID%\cdump
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SIDD%\create
    mkdir %MY_ORACLE_HOME%\admin\%ORACLE_SID%\udump
    mkdir %MY_DB_CREATION_DESTINATION%\%ORACLE_SID%
    %MY_ORACLE_BIN%\oradim.exe -new -sid %ORACLE_SID% -startmode m
    %MY_ORACLE_BIN%\oradim.exe -edit -sid %ORACLE_SID% -startmode a
    %MY_ORACLE_BIN%\orapwd.exe file=%MY_ORACLE_HOME%\Database\PWD%MY_DB_NAME%.ora password=%MY_DB_PWD%
    %MY_ORACLE_BIN%\sqlplus /nolog connect %MY_DB_USER%/%MY_DB_PWD% @%ORACLE_SID% as sysdba
    %MY_ORACLE_BIN%\sqlplus /nolog @%MY_DB_CREATION_SOURCE%\StartCreation.sql
    -> Then in the first sql file, fixing all the variables and calling the other ones:
    DEFINE MY_DB_USER=SYS
    DEFINE MY_DB_PWD=change_on_install
    DEFINE MY_DB_NAME=DragNFly
    DEFINE MY_DB_SID=DragNFly
    DEFINE MY_DB_CREATION_DESTINATION=E:\Oracle_DragNFly
    DEFINE MY_DB_CREATION_SOURCE=F:\Oracle\oradata\Instance_creation_scripts
    DEFINE MY_ORACLE_BIN=F:\oracle\bin
    DEFINE MY_ORACLE_HOME=F:\oracle
    connect &&MY_DB_USER/&&MY_DB_PWD as SYSDBA
    -- # The following files have to be stored in the #
    -- # same repertory as the present file #
    @@CreateDBdb &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@CreateDBtbs &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@CreateDBcat &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@postDBcreate &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    @@CreateDBuser &&MY_DB_USER &&MY_DB_PWD &&MY_DB_NAME &&MY_DB_SID &&MY_DB_CREATION_DESTINATION &&MY_DB_CREATION_SOURCE &&MY_ORACLE_BIN &&MY_ORACLE_HOME
    exit;
    -> Finally one example of use in CreateDB.sql is:
    connect &&1/&&2 as SYSDBA
    set echo on
    spool &&5\&&3\Create&&3.db.log
    startup nomount pfile="&&6\init_DB.ora";
    CREATE DATABASE &&3
    MAXINSTANCES 1
    MAXLOGHISTORY 1
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    DATAFILE '&&5\&&3\system_&&3.01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    DEFAULT TEMPORARY TABLESPACE &&3._TMP TEMPFILE '&&5\&&3\temp_&&3.01.dbf' SIZE 1500M REUSE
    UNDO TABLESPACE "&&3._UNDO" DATAFILE '&&5\&&3\undo_&&3.01.dbf' SIZE 500M REUSE
    CHARACTER SET WE8ISO8859P1
    NATIONAL CHARACTER SET AL16UTF16
    LOGFILE GROUP 1 ('&&5\&&3\redo_&&3.01.log', '&&5\&&3\redo_&&3.01bis.log') SIZE 102400K,
    GROUP 2 ('&&5\&&3\redo_&&3.02.log', '&&5\&&3\redo_&&3.02bis.log') SIZE 102400K,
    GROUP 3 ('&&5\&&3\redo_&&3.03.log', '&&5\&&3\redo_&&3.03bis.log') SIZE 102400K;
    spool off;
    As you can see a first problem is that i have to set the variables the first time in the .bat and a second time in the first .sql. I don't know how to use an unique file for setting all the variables i need.
    Second difficulty is: fixing names and directories is a first step but i would like to fix all the different size values in this same file. The goal is to have only one file with dozen of values to change before creating new instances instead of checking all the different parameters inside of the different files.
    Third problem: variables are not transmitted to the init.ora. I think that it's possible to generate it using template and the defined variables, but i don't try for the moment.
    What is your mind on this?
    Probably there are better examples that i don't found?
    Regards,
    Tif

    the problem is nothing your showed.   did you see a security warning that you ignored?
    to test, if that's the problem go here and adjust your security settings:  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    if that fails, upload your files to a server and confirm everything works.  then start working on your local configuration.

  • Error in : Purchase order Creation using BAPI_PO_CREATE1

    Hell  guys,
    I am trying to create a PO using a BAPI - BAPI_PO_CREATE1
    I want the new PO to have all the characteristics of an existing PO. whose PO # is  stored in wa_order_split_create-docnr and for the new PO, i want the quantity from wa_order_split_create-qty_acptd and the delivery data to be wa_order_split_create-dly_date. But this process and code below gives a short dump in the std FM - MEPO_DOC_ITEM_GET . It raises an exception of failure. I am trying to create many new PO's in the loop below. If there is just one row, sometimes, it creates the PO even with the exception failure ( which is pretty weird).
    Am i making any mistake while filling the header or item or schedule lines for the BAPI_PO_CREATE1 ? Any tips or clues why I am getting a dump ?
    DATA: i_insert,
            i_create_order,
            i_cycle     TYPE cycle,
            i_qty_acpt  TYPE dzmeng,
            i_dly_date  TYPE vbak-vdatu,
            i_item      TYPE roijnomiio .
      DATA: i_order TYPE symsgv,
            i_return TYPE swd_return .
      DATA: i_vbak      TYPE vbak,
            i_vbap      TYPE vbap,
            i_ekko      TYPE ekko,
            i_ekpo      TYPE ekpo,
            i_bsoh      TYPE bapisdhd1,
            i_bsohx     TYPE bapisdhd1x,
            i_bpoh      TYPE bapimepoheader,
            i_bpohx     TYPE bapimepoheaderx,
            i_vbeln     TYPE vbeln_va,
            i_posnr     TYPE posnr_va,
            i_contr     TYPE vbeln_va,
            i_conit     TYPE posnr_va,
            i_ebeln     TYPE ebeln,
            i_ebelp     TYPE ebelp,
            i_pargr     TYPE pargr,
            i_thead     TYPE thead,
            i_line      TYPE tline,
            i_note      TYPE txw_note,
            i_new_vbeln TYPE vbeln_va,
            i_new_ebeln TYPE ebeln,
            i_wa_bsoi   TYPE bapisditm,
            i_wa_bsoix  TYPE bapisditmx,
            i_wa_bsop   TYPE bapiparnr,
            i_wa_bsos   TYPE bapischdl,
            i_wa_bsosx  TYPE bapischdlx,
            i_wa_vbpa   TYPE vbpa,
            i_wa_vbkd   TYPE vbkd,
            i_wa_bpoi   TYPE bapimepoitem,
            i_wa_bpoix  TYPE bapimepoitemx,
            i_wa_bpos   TYPE bapimeposchedule,
            i_wa_bposx  TYPE bapimeposchedulx,
            i_wa_bpop   TYPE bapiekkop,
            i_wa_ekpa   TYPE ekpa,
            i_message   TYPE char72,
            i_bapiretn  TYPE bapiret2,
            i_bapiret2  TYPE TABLE OF bapiret2 INITIAL SIZE 1,
            i_vbpa      TYPE TABLE OF vbpa INITIAL SIZE 1,
            i_vbkd      TYPE TABLE OF vbkd INITIAL SIZE 1,
            i_ekpa      TYPE TABLE OF ekpa INITIAL SIZE 1,
            i_bsoi      TYPE TABLE OF bapisditm INITIAL SIZE 1,
            i_bsoix     TYPE TABLE OF bapisditmx INITIAL SIZE 1,
            i_bsos      TYPE TABLE OF bapischdl INITIAL SIZE 1,
            i_bsosx     TYPE TABLE OF bapischdlx INITIAL SIZE 1,
            i_bsop      TYPE TABLE OF bapiparnr INITIAL SIZE 1,
            i_bpoi      TYPE TABLE OF bapimepoitem INITIAL SIZE 1,
            i_bpoix     TYPE TABLE OF bapimepoitemx INITIAL SIZE 1,
            i_bpos      TYPE TABLE OF bapimeposchedule INITIAL SIZE 1,
            i_bposx     TYPE TABLE OF bapimeposchedulx INITIAL SIZE 1,
            i_bpop      TYPE TABLE OF bapiekkop INITIAL SIZE 1,
            i_text_tab  TYPE TABLE OF tline INITIAL SIZE 1,
            i_line_tab  TYPE TABLE OF tline INITIAL SIZE 1,
            i_txw_note  TYPE TABLE OF txw_note INITIAL SIZE 1,
            i_oij_el_doc_mot TYPE oij_el_doc_mot .
      CONSTANTS: c_char_c VALUE 'C',
                 c_char_e VALUE 'E',
                 c_char_p VALUE 'P',
                 c_char_g VALUE 'G',
                 c_char_i VALUE 'I',
                 c_char_s VALUE 'S',
                 c_char_x VALUE 'X',
                 c_zsw(3) VALUE 'ZSW',
                 c_nomit_stat(4) VALUE 'ZDNY' .
      DATA : lv_nomtk_split        TYPE oij_nomtk.
      DATA : i_order_split_create  TYPE TABLE OF zsws_order_split.
      DATA : wa_order_split_create TYPE zsws_order_split.
      LOOP AT i_order_split_create INTO wa_order_split_create.
        IF NOT i_create_order IS INITIAL .
          CLEAR: i_create_order .
              MOVE: wa_order_split_create-docnr  TO i_ebeln,
                    wa_order_split_create-docitm TO i_ebelp .
              CALL FUNCTION 'ME_EKKO_SINGLE_READ'
                   EXPORTING
                        pi_ebeln         = i_ebeln
                   IMPORTING
                        po_ekko          = i_ekko
                   EXCEPTIONS
                        no_records_found = 1
                        OTHERS           = 2.
              IF sy-subrc <> 0 .
              ENDIF .
    * Fill PO Header
              i_bpoh-comp_code   = i_ekko-bukrs .
              i_bpoh-doc_type    = i_ekko-bsart .
              i_bpoh-vendor      = i_ekko-lifnr .
              i_bpoh-langu       = i_ekko-spras .
              i_bpoh-pmnttrms    = i_ekko-zterm .
              i_bpoh-purch_org   = i_ekko-ekorg .
              i_bpoh-pur_group   = i_ekko-ekgrp .
              i_bpoh-currency    = i_ekko-waers .
              i_bpoh-agreement   = i_ekko-konnr .
              i_bpoh-incoterms1  = i_ekko-inco1 .
              i_bpoh-incoterms2  = i_ekko-inco2 .
    * Fill PO update indicator 'X'
              i_bpohx-comp_code  = c_char_x .
              i_bpohx-doc_type   = c_char_x .
              i_bpohx-vendor     = c_char_x .
              i_bpohx-langu      = c_char_x .
              i_bpohx-pmnttrms   = c_char_x .
              i_bpohx-purch_org  = c_char_x .
              i_bpohx-pur_group  = c_char_x .
              i_bpohx-currency   = c_char_x .
              i_bpohx-agreement  = c_char_x .
              i_bpohx-incoterms1 = c_char_x .
              i_bpohx-incoterms2 = c_char_x .
              CALL FUNCTION 'ME_EKPO_SINGLE_READ'
                   EXPORTING
                        pi_ebeln         = i_ebeln
                        pi_ebelp         = i_ebelp
                   IMPORTING
                        po_ekpo          = i_ekpo
                   EXCEPTIONS
                        no_records_found = 1
                        OTHERS           = 2.
              IF sy-subrc <> 0 .
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF .
    * Fill PO Item
              i_wa_bpoi-po_item    = i_ekpo-ebelp .
              i_wa_bpoi-material   = i_ekpo-matnr .
              i_wa_bpoi-plant      = i_ekpo-werks .
              i_wa_bpoi-stge_loc   = i_ekpo-lgort .
              i_wa_bpoi-quantity   = wa_order_split_create-qty_acptd .
              i_wa_bpoi-po_unit    = i_ekpo-meins .
              i_wa_bpoi-tax_code   = i_ekpo-mwskz .
              i_wa_bpoi-val_type   = i_ekpo-bwtar .
              i_wa_bpoi-item_cat   = i_ekpo-pstyp .
              i_wa_bpoi-acctasscat = i_ekpo-knttp .
              i_wa_bpoi-agreement  = i_ekpo-konnr .
              i_wa_bpoi-agmt_item  = i_ekpo-ktpnr .
              APPEND i_wa_bpoi TO i_bpoi .
    * Fill PO Item update indicator 'X'
              i_wa_bpoix-po_item    = i_ekpo-ebelp .
              i_wa_bpoix-po_itemx   = c_char_x .
              i_wa_bpoix-material   = c_char_x .
              i_wa_bpoix-plant      = c_char_x .
              i_wa_bpoix-stge_loc   = c_char_x .
              i_wa_bpoix-quantity   = c_char_x .
              i_wa_bpoix-po_unit    = c_char_x .
              i_wa_bpoix-tax_code   = c_char_x .
              i_wa_bpoix-val_type   = c_char_x .
              i_wa_bpoix-item_cat   = c_char_x .
              i_wa_bpoix-acctasscat = c_char_x .
              i_wa_bpoix-agreement  = c_char_x .
              i_wa_bpoix-agmt_item  = c_char_x .
              APPEND i_wa_bpoix TO i_bpoix .
    * Fill PO Item Schedule
              i_wa_bpos-po_item       = i_ekpo-ebelp .
              i_wa_bpos-sched_line    = '0001' .
              i_wa_bpos-delivery_date = wa_order_split_create-dly_date .
              i_wa_bpos-quantity      = wa_order_split_create-qty_acptd .
              APPEND i_wa_bpos TO i_bpos .
    * Fill PO Item schedule update indicator 'X'
              i_wa_bposx-po_item       = i_ekpo-ebelp .
              i_wa_bposx-sched_line    = '0001' .
              i_wa_bposx-delivery_date = c_char_x .
              i_wa_bposx-quantity      = c_char_x .
              APPEND i_wa_bposx TO i_bposx .
              CLEAR: i_pargr .
              SELECT SINGLE pargr
                INTO i_pargr
                FROM t161
               WHERE bstyp = i_ekko-bstyp
                 AND bsart = i_ekko-bsart .
              CLEAR i_ekpa[].
              CALL FUNCTION 'MM_READ_PARTNERS'
                   EXPORTING
                        application = c_char_p
                        ebeln       = i_ebeln
                        bstyp       = i_ekko-bstyp
                        pargr       = i_pargr
                   TABLES
                        x_ekpa      = i_ekpa[].
              LOOP AT i_ekpa INTO i_wa_ekpa .
                i_wa_bpop-partnerdesc = i_wa_ekpa-parvw .
                i_wa_bpop-langu = sy-langu .
                IF NOT i_wa_ekpa-lifn2 IS INITIAL .
                  i_wa_bpop-buspartno = i_wa_ekpa-lifn2 .
                ELSE .
                  i_wa_bpop-buspartno = i_wa_ekpa-parnr .
                ENDIF .
                APPEND i_wa_bpop TO i_bpop .
                CLEAR: i_wa_ekpa, i_wa_bpop .
              ENDLOOP .
              CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
              CALL FUNCTION 'BAPI_PO_CREATE1'
                   EXPORTING
                        poheader         = i_bpoh
                        poheaderx        = i_bpohx
                   IMPORTING
                        exppurchaseorder = i_new_ebeln
                   TABLES
                        return           = i_bapiret2
                        poitem           = i_bpoi[]
                        poitemx          = i_bpoix[]
                        poschedule       = i_bpos[]
                        poschedulex      = i_bposx[].
              i_order = i_new_ebeln .
              SHIFT i_order LEFT DELETING LEADING '0' .
              i_return-errortype = c_char_i .
              i_return-workarea  = c_zsw .
              i_return-message   = '064' .
              i_return-variable1 = i_order .
            loop at i_bapiret2 into i_bapiretn where type ca 'EAX' .
            append i_bapiretn to t_bapi_return .
          endloop .
          if t_bapi_return[] is initial .
             i_create_order = c_char_x .
               CALL FUNCTION 'SWD_POPUP_MESSAGE_SEND'
                   EXPORTING
                        act_return = i_return. "Popup with new PO no.
          ENDCASE .                                     " Docind
        ENDIF .
      ENDLOOP.

    Hi Shareen,
    I think in the following parts of the code,
              CALL FUNCTION 'MM_READ_PARTNERS'
                   EXPORTING
                        application = c_char_p
                        ebeln       = i_ebeln
                        bstyp       = i_ekko-bstyp
                        pargr       = i_pargr
                   TABLES
                        x_ekpa      = i_ekpa[].
    Error in : Purchase order Creation using BAPI_PO_CREATE1
    Posted: Mar 20, 2006 7:39 PM      Reply      E-mail this post 
    Hell guys,
    I am trying to create a PO using a BAPI - BAPI_PO_CREATE1
    I want the new PO to have all the characteristics of an existing PO. whose PO # is stored in wa_order_split_create-docnr and for the new PO, i want the quantity from wa_order_split_create-qty_acptd and the delivery data to be wa_order_split_create-dly_date. But this process and code below gives a short dump in the std FM - MEPO_DOC_ITEM_GET . It raises an exception of failure. I am trying to create many new PO's in the loop below. If there is just one row, sometimes, it creates the PO even with the exception failure ( which is pretty weird).
    Am i making any mistake while filling the header or item or schedule lines for the BAPI_PO_CREATE1 ? Any tips or clues why I am getting a dump ?
    DATA: i_insert,
            i_create_order,
            i_cycle     TYPE cycle,
            i_qty_acpt  TYPE dzmeng,
            i_dly_date  TYPE vbak-vdatu,
            i_item      TYPE roijnomiio .
      DATA: i_order TYPE symsgv,
            i_return TYPE swd_return .
      DATA: i_vbak      TYPE vbak,
            i_vbap      TYPE vbap,
            i_ekko      TYPE ekko,
            i_ekpo      TYPE ekpo,
            i_bsoh      TYPE bapisdhd1,
            i_bsohx     TYPE bapisdhd1x,
            i_bpoh      TYPE bapimepoheader,
            i_bpohx     TYPE bapimepoheaderx,
            i_vbeln     TYPE vbeln_va,
            i_posnr     TYPE posnr_va,
            i_contr     TYPE vbeln_va,
            i_conit     TYPE posnr_va,
            i_ebeln     TYPE ebeln,
            i_ebelp     TYPE ebelp,
            i_pargr     TYPE pargr,
            i_thead     TYPE thead,
            i_line      TYPE tline,
            i_note      TYPE txw_note,
            i_new_vbeln TYPE vbeln_va,
            i_new_ebeln TYPE ebeln,
            i_wa_bsoi   TYPE bapisditm,
            i_wa_bsoix  TYPE bapisditmx,
            i_wa_bsop   TYPE bapiparnr,
            i_wa_bsos   TYPE bapischdl,
            i_wa_bsosx  TYPE bapischdlx,
            i_wa_vbpa   TYPE vbpa,
            i_wa_vbkd   TYPE vbkd,
            i_wa_bpoi   TYPE bapimepoitem,
            i_wa_bpoix  TYPE bapimepoitemx,
            i_wa_bpos   TYPE bapimeposchedule,
            i_wa_bposx  TYPE bapimeposchedulx,
            i_wa_bpop   TYPE bapiekkop,
            i_wa_ekpa   TYPE ekpa,
            i_message   TYPE char72,
            i_bapiretn  TYPE bapiret2,
            i_bapiret2  TYPE TABLE OF bapiret2 INITIAL SIZE 1,
            i_vbpa      TYPE TABLE OF vbpa INITIAL SIZE 1,
            i_vbkd      TYPE TABLE OF vbkd INITIAL SIZE 1,
            i_ekpa      TYPE TABLE OF ekpa INITIAL SIZE 1,
            i_bsoi      TYPE TABLE OF bapisditm INITIAL SIZE 1,
            i_bsoix     TYPE TABLE OF bapisditmx INITIAL SIZE 1,
            i_bsos      TYPE TABLE OF bapischdl INITIAL SIZE 1,
            i_bsosx     TYPE TABLE OF bapischdlx INITIAL SIZE 1,
            i_bsop      TYPE TABLE OF bapiparnr INITIAL SIZE 1,
            i_bpoi      TYPE TABLE OF bapimepoitem INITIAL SIZE 1,
            i_bpoix     TYPE TABLE OF bapimepoitemx INITIAL SIZE 1,
            i_bpos      TYPE TABLE OF bapimeposchedule INITIAL SIZE 1,
            i_bposx     TYPE TABLE OF bapimeposchedulx INITIAL SIZE 1,
            i_bpop      TYPE TABLE OF bapiekkop INITIAL SIZE 1,
            i_text_tab  TYPE TABLE OF tline INITIAL SIZE 1,
            i_line_tab  TYPE TABLE OF tline INITIAL SIZE 1,
            i_txw_note  TYPE TABLE OF txw_note INITIAL SIZE 1,
            i_oij_el_doc_mot TYPE oij_el_doc_mot .
      CONSTANTS: c_char_c VALUE 'C',
                 c_char_e VALUE 'E',
                 c_char_p VALUE 'P',
                 c_char_g VALUE 'G',
                 c_char_i VALUE 'I',
                 c_char_s VALUE 'S',
                 c_char_x VALUE 'X',
                 c_zsw(3) VALUE 'ZSW',
                 c_nomit_stat(4) VALUE 'ZDNY' .
      DATA : lv_nomtk_split        TYPE oij_nomtk.
      DATA : i_order_split_create  TYPE TABLE OF zsws_order_split.
      DATA : wa_order_split_create TYPE zsws_order_split.
      LOOP AT i_order_split_create INTO wa_order_split_create.
        IF NOT i_create_order IS INITIAL .
          CLEAR: i_create_order .
              MOVE: wa_order_split_create-docnr  TO i_ebeln,
                    wa_order_split_create-docitm TO i_ebelp .
              CALL FUNCTION 'ME_EKKO_SINGLE_READ'
                   EXPORTING
                        pi_ebeln         = i_ebeln
                   IMPORTING
                        po_ekko          = i_ekko
                   EXCEPTIONS
                        no_records_found = 1
                        OTHERS           = 2.
              IF sy-subrc <> 0 .
              ENDIF .
    Fill PO Header
              i_bpoh-comp_code   = i_ekko-bukrs .
              i_bpoh-doc_type    = i_ekko-bsart .
              i_bpoh-vendor      = i_ekko-lifnr .
              i_bpoh-langu       = i_ekko-spras .
              i_bpoh-pmnttrms    = i_ekko-zterm .
              i_bpoh-purch_org   = i_ekko-ekorg .
              i_bpoh-pur_group   = i_ekko-ekgrp .
              i_bpoh-currency    = i_ekko-waers .
              i_bpoh-agreement   = i_ekko-konnr .
              i_bpoh-incoterms1  = i_ekko-inco1 .
              i_bpoh-incoterms2  = i_ekko-inco2 .
    Fill PO update indicator 'X'
              i_bpohx-comp_code  = c_char_x .
              i_bpohx-doc_type   = c_char_x .
              i_bpohx-vendor     = c_char_x .
              i_bpohx-langu      = c_char_x .
              i_bpohx-pmnttrms   = c_char_x .
              i_bpohx-purch_org  = c_char_x .
              i_bpohx-pur_group  = c_char_x .
              i_bpohx-currency   = c_char_x .
              i_bpohx-agreement  = c_char_x .
              i_bpohx-incoterms1 = c_char_x .
              i_bpohx-incoterms2 = c_char_x .
              CALL FUNCTION 'ME_EKPO_SINGLE_READ'
                   EXPORTING
                        pi_ebeln         = i_ebeln
                        pi_ebelp         = i_ebelp
                   IMPORTING
                        po_ekpo          = i_ekpo
                   EXCEPTIONS
                        no_records_found = 1
                        OTHERS           = 2.
              IF sy-subrc <> 0 .
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF .
    Fill PO Item
              i_wa_bpoi-po_item    = i_ekpo-ebelp .
              i_wa_bpoi-material   = i_ekpo-matnr .
              i_wa_bpoi-plant      = i_ekpo-werks .
              i_wa_bpoi-stge_loc   = i_ekpo-lgort .
              i_wa_bpoi-quantity   = wa_order_split_create-qty_acptd .
              i_wa_bpoi-po_unit    = i_ekpo-meins .
              i_wa_bpoi-tax_code   = i_ekpo-mwskz .
              i_wa_bpoi-val_type   = i_ekpo-bwtar .
              i_wa_bpoi-item_cat   = i_ekpo-pstyp .
              i_wa_bpoi-acctasscat = i_ekpo-knttp .
              i_wa_bpoi-agreement  = i_ekpo-konnr .
              i_wa_bpoi-agmt_item  = i_ekpo-ktpnr .
              APPEND i_wa_bpoi TO i_bpoi .
    Fill PO Item update indicator 'X'
              i_wa_bpoix-po_item    = i_ekpo-ebelp .
              i_wa_bpoix-po_itemx   = c_char_x .
              i_wa_bpoix-material   = c_char_x .
              i_wa_bpoix-plant      = c_char_x .
              i_wa_bpoix-stge_loc   = c_char_x .
              i_wa_bpoix-quantity   = c_char_x .
              i_wa_bpoix-po_unit    = c_char_x .
              i_wa_bpoix-tax_code   = c_char_x .
              i_wa_bpoix-val_type   = c_char_x .
              i_wa_bpoix-item_cat   = c_char_x .
              i_wa_bpoix-acctasscat = c_char_x .
              i_wa_bpoix-agreement  = c_char_x .
              i_wa_bpoix-agmt_item  = c_char_x .
              APPEND i_wa_bpoix TO i_bpoix .
    Fill PO Item Schedule
              i_wa_bpos-po_item       = i_ekpo-ebelp .
              i_wa_bpos-sched_line    = '0001' .
              i_wa_bpos-delivery_date = wa_order_split_create-dly_date .
              i_wa_bpos-quantity      = wa_order_split_create-qty_acptd .
              APPEND i_wa_bpos TO i_bpos .
    Fill PO Item schedule update indicator 'X'
              i_wa_bposx-po_item       = i_ekpo-ebelp .
              i_wa_bposx-sched_line    = '0001' .
              i_wa_bposx-delivery_date = c_char_x .
              i_wa_bposx-quantity      = c_char_x .
              APPEND i_wa_bposx TO i_bposx .
              CLEAR: i_pargr .
              SELECT SINGLE pargr
                INTO i_pargr
                FROM t161
               WHERE bstyp = i_ekko-bstyp
                 AND bsart = i_ekko-bsart .
              CLEAR i_ekpa[].
              CALL FUNCTION 'MM_READ_PARTNERS'
                   EXPORTING
                        application = c_char_p
                        ebeln       = i_ebeln
                        bstyp       = i_ekko-bstyp
                        pargr       = i_pargr
                   TABLES
                        x_ekpa      = <b>i_ekpa[].</b>
              LOOP AT i_ekpa INTO i_wa_ekpa .
                i_wa_bpop-partnerdesc = i_wa_ekpa-parvw .
                i_wa_bpop-langu = sy-langu .
                IF NOT i_wa_ekpa-lifn2 IS INITIAL .
                  i_wa_bpop-buspartno = i_wa_ekpa-lifn2 .
                ELSE .
                  i_wa_bpop-buspartno = i_wa_ekpa-parnr .
                ENDIF .
                APPEND i_wa_bpop TO i_bpop .
                CLEAR: i_wa_ekpa, i_wa_bpop .
              ENDLOOP .
              CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
              CALL FUNCTION 'BAPI_PO_CREATE1'
                   EXPORTING
                        poheader         = i_bpoh
                        poheaderx        = i_bpohx
                   IMPORTING
                        exppurchaseorder = i_new_ebeln
                   TABLES
                        return           = i_bapiret2
                    <b>    poitem           = i_bpoi[]
                        poitemx          = i_bpoix[]
                        poschedule       = i_bpos[]
                        poschedulex      = i_bposx[].</b>
    it should be only i_bpoi, i_bpoix, i_bpos, i_bposx but not  i_bpoi[], i_bpoix[], i_bpos[], i_bposx[].
    CHange the code as follows:
    DATA: i_insert,
            i_create_order,
            i_cycle     TYPE cycle,
            i_qty_acpt  TYPE dzmeng,
            i_dly_date  TYPE vbak-vdatu,
            i_item      TYPE roijnomiio .
      DATA: i_order TYPE symsgv,
            i_return TYPE swd_return .
      DATA: i_vbak      TYPE vbak,
            i_vbap      TYPE vbap,
            i_ekko      TYPE ekko,
            i_ekpo      TYPE ekpo,
            i_bsoh      TYPE bapisdhd1,
            i_bsohx     TYPE bapisdhd1x,
            i_bpoh      TYPE bapimepoheader,
            i_bpohx     TYPE bapimepoheaderx,
            i_vbeln     TYPE vbeln_va,
            i_posnr     TYPE posnr_va,
            i_contr     TYPE vbeln_va,
            i_conit     TYPE posnr_va,
            i_ebeln     TYPE ebeln,
            i_ebelp     TYPE ebelp,
            i_pargr     TYPE pargr,
            i_thead     TYPE thead,
            i_line      TYPE tline,
            i_note      TYPE txw_note,
            i_new_vbeln TYPE vbeln_va,
            i_new_ebeln TYPE ebeln,
            i_wa_bsoi   TYPE bapisditm,
            i_wa_bsoix  TYPE bapisditmx,
            i_wa_bsop   TYPE bapiparnr,
            i_wa_bsos   TYPE bapischdl,
            i_wa_bsosx  TYPE bapischdlx,
            i_wa_vbpa   TYPE vbpa,
            i_wa_vbkd   TYPE vbkd,
            i_wa_bpoi   TYPE bapimepoitem,
            i_wa_bpoix  TYPE bapimepoitemx,
            i_wa_bpos   TYPE bapimeposchedule,
            i_wa_bposx  TYPE bapimeposchedulx,
            i_wa_bpop   TYPE bapiekkop,
            i_wa_ekpa   TYPE ekpa,
            i_message   TYPE char72,
            i_bapiretn  TYPE bapiret2,
            i_bapiret2  TYPE TABLE OF bapiret2 INITIAL SIZE 1,
            i_vbpa      TYPE TABLE OF vbpa INITIAL SIZE 1,
            i_vbkd      TYPE TABLE OF vbkd INITIAL SIZE 1,
            i_ekpa      TYPE TABLE OF ekpa INITIAL SIZE 1,
            i_bsoi      TYPE TABLE OF bapisditm INITIAL SIZE 1,
            i_bsoix     TYPE TABLE OF bapisditmx INITIAL SIZE 1,
            i_bsos      TYPE TABLE OF bapischdl INITIAL SIZE 1,
            i_bsosx     TYPE TABLE OF bapischdlx INITIAL SIZE 1,
            i_bsop      TYPE TABLE OF bapiparnr INITIAL SIZE 1,
            i_bpoi      TYPE TABLE OF bapimepoitem INITIAL SIZE 1,
            i_bpoix     TYPE TABLE OF bapimepoitemx INITIAL SIZE 1,
            i_bpos      TYPE TABLE OF bapimeposchedule INITIAL SIZE 1,
            i_bposx     TYPE TABLE OF bapimeposchedulx INITIAL SIZE 1,
            i_bpop      TYPE TABLE OF bapiekkop INITIAL SIZE 1,
            i_text_tab  TYPE TABLE OF tline INITIAL SIZE 1,
            i_line_tab  TYPE TABLE OF tline INITIAL SIZE 1,
            i_txw_note  TYPE TABLE OF txw_note INITIAL SIZE 1,
            i_oij_el_doc_mot TYPE oij_el_doc_mot .
      CONSTANTS: c_char_c VALUE 'C',
                 c_char_e VALUE 'E',
                 c_char_p VALUE 'P',
                 c_char_g VALUE 'G',
                 c_char_i VALUE 'I',
                 c_char_s VALUE 'S',
                 c_char_x VALUE 'X',
                 c_zsw(3) VALUE 'ZSW',
                 c_nomit_stat(4) VALUE 'ZDNY' .
      DATA : lv_nomtk_split        TYPE oij_nomtk.
      DATA : i_order_split_create  TYPE TABLE OF zsws_order_split.
      DATA : wa_order_split_create TYPE zsws_order_split.
      LOOP AT i_order_split_create INTO wa_order_split_create.
        IF NOT i_create_order IS INITIAL .
          CLEAR: i_create_order .
              MOVE: wa_order_split_create-docnr  TO i_ebeln,
                    wa_order_split_create-docitm TO i_ebelp .
              CALL FUNCTION 'ME_EKKO_SINGLE_READ'
                   EXPORTING
                        pi_ebeln         = i_ebeln
                   IMPORTING
                        po_ekko          = i_ekko
                   EXCEPTIONS
                        no_records_found = 1
                        OTHERS           = 2.
              IF sy-subrc <> 0 .
              ENDIF .
    Fill PO Header
              i_bpoh-comp_code   = i_ekko-bukrs .
              i_bpoh-doc_type    = i_ekko-bsart .
              i_bpoh-vendor      = i_ekko-lifnr .
              i_bpoh-langu       = i_ekko-spras .
              i_bpoh-pmnttrms    = i_ekko-zterm .
              i_bpoh-purch_org   = i_ekko-ekorg .
              i_bpoh-pur_group   = i_ekko-ekgrp .
              i_bpoh-currency    = i_ekko-waers .
              i_bpoh-agreement   = i_ekko-konnr .
              i_bpoh-incoterms1  = i_ekko-inco1 .
              i_bpoh-incoterms2  = i_ekko-inco2 .
    Fill PO update indicator 'X'
              i_bpohx-comp_code  = c_char_x .
              i_bpohx-doc_type   = c_char_x .
              i_bpohx-vendor     = c_char_x .
              i_bpohx-langu      = c_char_x .
              i_bpohx-pmnttrms   = c_char_x .
              i_bpohx-purch_org  = c_char_x .
              i_bpohx-pur_group  = c_char_x .
              i_bpohx-currency   = c_char_x .
              i_bpohx-agreement  = c_char_x .
              i_bpohx-incoterms1 = c_char_x .
              i_bpohx-incoterms2 = c_char_x .
              CALL FUNCTION 'ME_EKPO_SINGLE_READ'
                   EXPORTING
                        pi_ebeln         = i_ebeln
                        pi_ebelp         = i_ebelp
                   IMPORTING
                        po_ekpo          = i_ekpo
                   EXCEPTIONS
                        no_records_found = 1
                        OTHERS           = 2.
              IF sy-subrc <> 0 .
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF .
    Fill PO Item
              i_wa_bpoi-po_item    = i_ekpo-ebelp .
              i_wa_bpoi-material   = i_ekpo-matnr .
              i_wa_bpoi-plant      = i_ekpo-werks .
              i_wa_bpoi-stge_loc   = i_ekpo-lgort .
              i_wa_bpoi-quantity   = wa_order_split_create-qty_acptd .
              i_wa_bpoi-po_unit    = i_ekpo-meins .
              i_wa_bpoi-tax_code   = i_ekpo-mwskz .
              i_wa_bpoi-val_type   = i_ekpo-bwtar .
              i_wa_bpoi-item_cat   = i_ekpo-pstyp .
              i_wa_bpoi-acctasscat = i_ekpo-knttp .
              i_wa_bpoi-agreement  = i_ekpo-konnr .
              i_wa_bpoi-agmt_item  = i_ekpo-ktpnr .
              APPEND i_wa_bpoi TO i_bpoi .
    Fill PO Item update indicator 'X'
              i_wa_bpoix-po_item    = i_ekpo-ebelp .
              i_wa_bpoix-po_itemx   = c_char_x .
              i_wa_bpoix-material   = c_char_x .
              i_wa_bpoix-plant      = c_char_x .
              i_wa_bpoix-stge_loc   = c_char_x .
              i_wa_bpoix-quantity   = c_char_x .
              i_wa_bpoix-po_unit    = c_char_x .
              i_wa_bpoix-tax_code   = c_char_x .
              i_wa_bpoix-val_type   = c_char_x .
              i_wa_bpoix-item_cat   = c_char_x .
              i_wa_bpoix-acctasscat = c_char_x .
              i_wa_bpoix-agreement  = c_char_x .
              i_wa_bpoix-agmt_item  = c_char_x .
              APPEND i_wa_bpoix TO i_bpoix .
    Fill PO Item Schedule
              i_wa_bpos-po_item       = i_ekpo-ebelp .
              i_wa_bpos-sched_line    = '0001' .
              i_wa_bpos-delivery_date = wa_order_split_create-dly_date .
              i_wa_bpos-quantity      = wa_order_split_create-qty_acptd .
              APPEND i_wa_bpos TO i_bpos .
    Fill PO Item schedule update indicator 'X'
              i_wa_bposx-po_item       = i_ekpo-ebelp .
              i_wa_bposx-sched_line    = '0001' .
              i_wa_bposx-delivery_date = c_char_x .
              i_wa_bposx-quantity      = c_char_x .
              APPEND i_wa_bposx TO i_bposx .
              CLEAR: i_pargr .
              SELECT SINGLE pargr
                INTO i_pargr
                FROM t161
               WHERE bstyp = i_ekko-bstyp
                 AND bsart = i_ekko-bsart .
              CLEAR i_ekpa[].
              CALL FUNCTION 'MM_READ_PARTNERS'
                   EXPORTING
                        application = c_char_p
                        ebeln       = i_ebeln
                        bstyp       = i_ekko-bstyp
                        pargr       = i_pargr
                   TABLES
                        x_ekpa      = i_ekpa.
              LOOP AT i_ekpa INTO i_wa_ekpa .
                i_wa_bpop-partnerdesc = i_wa_ekpa-parvw .
                i_wa_bpop-langu = sy-langu .
                IF NOT i_wa_ekpa-lifn2 IS INITIAL .
                  i_wa_bpop-buspartno = i_wa_ekpa-lifn2 .
                ELSE .
                  i_wa_bpop-buspartno = i_wa_ekpa-parnr .
                ENDIF .
                APPEND i_wa_bpop TO i_bpop .
                CLEAR: i_wa_ekpa, i_wa_bpop .
              ENDLOOP .
              CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
              CALL FUNCTION 'BAPI_PO_CREATE1'
                   EXPORTING
                        poheader         = i_bpoh
                        poheaderx        = i_bpohx
                   IMPORTING
                        exppurchaseorder = i_new_ebeln
                   TABLES
                        return           = i_bapiret2
                        poitem           = i_bpoi
                        poitemx          = i_bpoix
                        poschedule       = i_bpos
                        poschedulex      = i_bposx.
              i_order = i_new_ebeln .
              SHIFT i_order LEFT DELETING LEADING '0' .
              i_return-errortype = c_char_i .
              i_return-workarea  = c_zsw .
              i_return-message   = '064' .
              i_return-variable1 = i_order .
            loop at i_bapiret2 into i_bapiretn where type ca 'EAX' .
            append i_bapiretn to t_bapi_return .
          endloop .
          if t_bapi_return[] is initial .
             i_create_order = c_char_x .
               CALL FUNCTION 'SWD_POPUP_MESSAGE_SEND'
                   EXPORTING
                        act_return = i_return. "Popup with new PO no.
          ENDCASE .                                     " Docind
        ENDIF .
      ENDLOOP.

  • Error with quantity field:Datasource Creation Using Function Module method

    Problem with DATASOURCE Creation using Function Module method :
    I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
    Let me know if my explanation is not clear enough.
    Thanks in advance,
    Neha.
    Z table definition is as below :
    MATNR MATNR CHAR 18 0 Material Number
    BWKEY BWKEY CHAR 4 0 Valuation area
    LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
    STPRS STPRS CURR 11 2 Standard Price   " Here the currency field is WAERS and table T001
    PEINH PEINH DEC 5 0 Price Unit
    VJSTP VJSTP CURR 11 2 Standard price in previous year
    VJPEI VJPEI DEC 5 0 Price unit of previous year.
    Edited by: Neha Rathi on Jan 30, 2009 3:03 PM

    Hi,
    You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
    Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
    also if you want to populate it then you will have to write the code for this fields as well.
    Thanks
    Ajeet

  • Custom List Form creation using Powershell - SharePoint 2013

    Hi,
    I have a custom List called 'IssuesList' with 4 fields - "IssueTitle","IssueID","IssueDesc","Status"
    While displaying display form I should show 3 fields expect Issue ID i.e. IssueID should be hidden.
    and on edit form only Status field should be editable. So using SharePoint designer I created respective Edit form and display forms and changed XSLT to control the display mode on the fields.
    I have everything scripted in powershell till now - creation of custom list, publishing pages, webparts etc. however I am looking for how to provision or associate these 2 list forms with IssuesList after I create the list in new site.
    I have restrictions on using wsp and site/list template due to business needs. So I need to know if there is any way I can upload these 2 files after I create custom list in powershell and associate them as defaultdisplay and defauteditforms?
    Please advise.

    Hi,
    Per my understanding, you might need to apply these custom forms to a list after list creation using PowerShell.
    With PowerShell with SharePoint Object Model, we can hide fields on list forms.
    The similar thread below with code snippet will provide more information about this:
    https://social.technet.microsoft.com/Forums/en-US/ee6fc2eb-197f-4144-94fa-8a4e438675d9/hide-a-field-from-edit-form-list?forum=sharepointgeneralprevious
    If there may be other requirements except for hiding fields, as you have limitation on using custom solution package(which should be preferable in such scenario),
    a workaround I can provide is that, after list creation, you can add Content Editor Web Part contains the CSS style or JavaScript to the form pages of a specific list, it will help you hide/disable the specific elements, this can be achieved programmatically.
    The code below can add a Content Editor Web Part to the DisplayForm of a list(though in C#):
    public static void AddCEWP()
    SPLimitedWebPartManager manager = null;
    SPFile file = null;
    using (SPSite site = new SPSite("http://sp"))
    using (SPWeb web = site.RootWeb)
    try
    web.AllowUnsafeUpdates = true;
    file = web.GetFile(web.Url + "/Lists/List018/DispForm.aspx");
    manager = file.GetLimitedWebPartManager(PersonalizationScope.Shared);
    ContentEditorWebPart webPart = new ContentEditorWebPart();
    XmlDocument xmlDoc = new XmlDocument();
    XmlElement xmlElement = xmlDoc.CreateElement("HtmlContent");
    //xmlElement.InnerText = "<strong>Hello World!</strong>";
    //write the custom CSS style or JavaScript here
    string content = "<style>your custom style here...</style>";
    xmlElement.InnerText = content;
    webPart.Content = xmlElement;
    manager.AddWebPart(webPart, "Top", 0);
    manager.SaveChanges(webPart);
    web.Update();
    catch (Exception ex)
    //Utility.SPTraceLogError(ex);
    finally
    if (manager != null)
    manager.Dispose();
    web.AllowUnsafeUpdates = false;
    About how to hide fields on Standard List Forms using jQuery:
    http://social.technet.microsoft.com/wiki/contents/articles/21730.sharepoint-2010-conditionally-hide-fields-on-standard-list-forms-using-jquery.aspx
    http://stackoverflow.com/questions/10010405/how-to-hide-a-field-in-sharepoint-display-form-based-on-the-field-name-jquery
    Thanks
    Patrick Liang
    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 [email protected]
    Patrick Liang
    TechNet Community Support

  • Restrict Item Category Item Creation using Reference Only

    Hi All
    Here is the scenario, I want  "Restrict Item Category Item Creation using Reference Only"
    a.Retrieve document number VBELN from sales order header table VBAK for the current order. Check if the sales order is of type ‘ZAB’ referencing field AUART in table VBAK.
    note : Any changes to existing sales order "ZAB" will be performed in thesame sales order type(ZAB) in VA02 transaction.
    b.If step a is passed, check internal table structure for sales order item level as XVBAP-PSTYV for possible item category values of 'ZDEF' for the entered line item and document number (XVBAP-VBELN).
    c.If the cancel/change item category values are found on the line item, check internal table structure for document flow (XVBFA) if the cancel/change item category was created as reference:
    i.Check if entry exists in XVBFA for the preceding document number field VBELV with value equal to value in the subsequent document number field VBELN. This value must equal the current sales document number VBELN in table VBAK.
    ii.The above check must be done in conjunction with the following check:
                1.Check if entry exists in XVBFA for the preceding document type field VBTYP_V with value ‘C’ equals subsequent document type field VBTYP_N with value of ‘C’.
    d.Once the above checks are passed, collect the item number from internal table XVBAP (Field: POSNR) for the change/cancel item category line item added to the sales order.
    e.Check if the item number retrieved in the previous step exists in table VBAP (Field: POSNR) with an item category that is not part of the list of cancel/change item category defined in step b.
    f. Check if the item number collected in the previous step exists in the subsequent item number (Field : POSNN) in internal table XVBFA for the row that passed checks in steps b and c.
    g.If item number exists, check if this subsequent item number field equals the preceding item number field value (Field: POSNV) in table XVBFA.
    h.If step g fails, generate an error message stating that the user needs to the create the cancel/change item category line item with reference to the original line item and do not allow the user to proceed with the transaction.
    i.If step g succeeds, allow the user to proceed with the transaction.
    can any one send me the logic for this scenario.
    Rgds
    Chinna

    Hi Chinna,
      Please use BADI "BADI_SD_SALES_ITEM" to achieve your requirement..
      Let me know if you have further questions..
    BR
    Rakesh

  • Material Creation Using BDCs.

    Hi all,
    I have developed a program for Material Creation using BDC.
    Material is Being created and that is working well and good.Here i have a Requirement to update the Newly creted material in Ztable.So when i use call transaction mathod,i have written code for updation under the line CALL TRANSACTION.where in iam getting newly creatde material from MARA table,and so it is working perfectly fine..
    But our requirement should be sessions method,so when i use sessions method and exeute the program..we face the problem of updation.
    the piece of code for updation is updating previously created material.
    Literally speaking only the sessions are created ,when the program is executed,material is not created when program is run.Material is only created when the sessions are processed using SM35,
    So how should i do here,where should be the updation code written and where will we get the newly created material in sessions method..
    Pls Help me in solving this problem

    hai priyanaka it might be due to configuration problem
    bcos manulay also ur gettign this , so just consult ur MM consultant for soem setting
    regards
    afzal

  • HU creation using HUPP3

    I have following doubt on Planned HU creation using HUPP3 (since i am using this transaction for the first time and not sure if the client has done any modifications)
    1. Is it standard to pack more than one sales order line items in one HU using HUPP3
    I have a scenario in which business is creating one HU for more than one line items of a sales order (shipping point for all the line items is same).
    The issue is in HU the VEKP_NTGEW & VEKP_BRGEW fields takes the weight of first line items of the HU only.
    Customer modified the program SAP standard program.Here they can select multiple line items in single HU but while displaying HU through HUMO t-code it showing only first line item details like net weight.But client want it should show total weight of HU.
    Can anybody tell me how to achieve above requirement.

    Hi All,
    Thanks for viewing the query. I have found out the issue
    The client had made some modifications to the program.
    In standard SAP through HUPP3 only one line item of a sales order can be packed into one HU

  • Auto PO  creation using purchase requisition

    Hi,
    I have tried the following steps for auto PO creation using purchase requisition.
    i. Maintain Auto PO in Material master Purchasing view
    ii. Select Automatic purchase order in Vendor master- Purchase data
    iii. Maintain info-record
    iv. Create PR through ME51
    v. enable source determination during creation of PR
    vi. Execute using ME59N
    But Auto PO is creating with the same document type (e.g NB) which is used while creating purchase requisition (e.g NB). Following steps have done in SPRO.
    1. SPRO - MM - Purchasing - purchase requisition - define  document type
    a. NB- PR document type LINK TO DI01- PO document type
    2. SPRO - MM - Purchasing - Purchase order - Define document type
    a. DI01- PO document type LINK TO NB- PR document type
    3. There is no linking from NB - NB & DI01 - DI01 but still it is creating auto PO with document type NB iif requisition has been created with document type NB.
    Please suggest on this . waiting for ur quick response.
    Thanks...
    ARATI.
    Thanks!
    Arati.
    Edited by: Rakesh Gupta on Aug 20, 2009 11:00 AM

    Hi
    Please check the below thread
    PR to PO  via  ME59 -Doc type issue
    Thanks/karthik

Maybe you are looking for

  • Oracle JDBC Driver 10.1.0.4.0 and IndexOutOfBounds-Exception

    Hello all, we´ve experienced a weird problem using the Oracle JDBC driver version 10.1.0.4.0. While executing SELECT statement we get an ArrayIndexOutOfBounds exception from the JDBC driver. Here´s the stacktrace: java.lang.ArrayIndexOutOfBoundsExcep

  • Minimum subset of a set, whose union is same as original set?

    hi, if you have a Set of Sets called S, e.g. {{1,2},{2,3},{3,4}} and want to find the/a minimum subset of S called S', which has the property that union(S)==union(S') eg union({{1,2},{2,3},{3,4}})==union({{1,2},{3,4}}) where union(S) means the union

  • Problem setting up router

    Okay, I have a WRT54G router. However, I can't get it setup. I've tried at LEAST 10 times following the instructions on the setup CD exactly. The setup wizard currently says: The router is not able to connect to the Internet. Try turning the Cable/DS

  • Skype is stuck on endless spinning circles when lo...

    Excuese me,I've posted in 「Modern Windows (from Windows Store)」 area before;However,there were no responce with the previous topic I posted.Thus I turned back here to post it again. Thanks. Excuese me,here is a huge problem I encountered. As I mentio

  • Display message once inside loop

    Hi, I'm trying to display 2 messages to the user indicating 2 distinct conditions in my program. However, since the entire program runs in a single while loop, the messages appear over and over again. If I take the message boxes out of the loop, they