Get database result as a type of complex object

Hi,
I would like to make a query and send the results with web service to the client by a user defined object type. I send the servis and client code below. My query works fine but I got all array elements of my object equal to null. I could not understand the reason.
Could you look and help me to solve it please?
Server Code:
import com.sun.rowset.CachedRowSetImpl;
import java.sql.SQLException;
public class deneme3 {
public datayeni hesapla(datayeni don){
int counter = 0;
CachedRowSetImpl crs=null;
SQLInterface iface = new SQLInterface();
if (!iface.execQuery("SELECT isim, soyisim, email, " +
"kart FROM musteri"))
System.exit(1);
// create CachedRowSet and output data to object data
try
crs = new CachedRowSetImpl();
crs = iface.getRowSet();
     if(crs != null)
     while (crs.next())
     counter++;
     int j = 1;     
     int i = 0;                         
     don.setisim(i,crs.getString(j++)) ;
     System.out.println (don.getisim(i));
     don.setsoyisim(i,crs.getString(j++)) ;
     System.out.println (don.getsoyisim(i));
     don.setemail(i,crs.getString(j++)) ;
     System.out.println (don.getemail(i));
     don.setkart(i,crs.getString(j++)) ;
     System.out.println (don.getkart(i));          
     i++;
} catch (SQLException se) {        
     return don;
The Client Code:
import org.apache.axis.AxisFault;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.utils.Options;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
public class deneme3_Client {
public static void main(String [] args) throws Exception {
Options options = new Options(args);
String ad[]=new String[10];
String soyad[]=new String[10];
String eposta[]=new String[10];
String card[]=new String[10];
datayeni obje_return = new datayeni();
Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName( "urn:BeanService", "datayeni" );
call.registerTypeMapping(datayeni.class, qn,
new org.apache.axis.encoding.ser.BeanSerializerFactory(datayeni.class, qn),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(datayeni.class, qn));
call.setTargetEndpointAddress( new java.net.URL(options.getURL()) );
call.setOperationName( new QName("deneme3", "hesapla") );
call.addParameter( "arg1", qn, ParameterMode.INOUT );
call.setReturnType( qn );
datayeni ret = new datayeni();
obje_return = (datayeni) call.invoke( new Object[] {obje_return} );
int i = 0;
for (i = 0;i<4;i++)
     ad[i] = obje_return.getisim(i);
     System.out.println(ad);     
     soyad[i] = obje_return.getsoyisim(i);
     System.out.println(soyad[i]);
     eposta[i] = obje_return.getemail(i);
     System.out.println(eposta[i]);
     card[i] = obje_return.getkart(i);
     System.out.println(card[i]);
And the code for the class datayeni:
public class datayeni{
//attributes
private String isim[]=new String[10];
private String soyisim[]=new String[10];
private String email[]=new String[10];
private String kart[]=new String[10];
//setter methods
public void setisim (int index,String isim)
     this.isim[index] = isim;
public void setsoyisim (int index,String soyisim)
     this.soyisim[index] = soyisim;
public void setemail (int index,String email)
     this.email[index] = email;
public void setkart (int index,String kart)
     this.kart[index] = kart;
//getter methods
public String getisim(int index)
     return this.isim[index];
public String getsoyisim(int index)
     return this.soyisim[index];
public String getemail(int index)
     return this.email[index];
public String getkart(int index)
     return this.kart[index];
Thank You!!!

I really wonder, how ur code got compiled ...
Try removing this four lines from ur clinet side code:
String ad[]=new String[10];
String soyad[]=new String[10];
String eposta[]=new String[10];
String card[]=new String[10];Now
your all get methods return String...but u are assigning that string to
array of strings like :
ad = obje_return.getisim(i);
soyad = obje_return.getsoyisim(i);
eposta = obje_return.getemail(i);
card = obje_return.getkart(i);instead write it like this:
String ad = obje_return.getisim(i);
String soyad = obje_return.getsoyisim(i);
String eposta = obje_return.getemail(i);
String card = obje_return.getkart(i);If above thing doesnt work ....
I am very sure problem is not with webservice..its between jumbling of string/int and arrays of respective...
because when u define new array of objects(in ur case: array of Strings), all newborn strings are initlialized to null.

Similar Messages

  • Database results not showing

    Anyone know why database results would show up blank on a
    dynamic page. The recordset used to make the page tested Ok. The
    search results used to test the recordset result in blank spaces
    where the data results should be. Any ideas?

    Create a DSN in the ColdFusion administrator to the database.
    You should use
    that instead of the path to the database. Then use the
    tablename in the
    query
    Tom Muck
    Dreamweaver Extensions/Articles --
    http://www.tom-muck.com/
    Cartweaver Development Team -
    http://www.cartweaver.com
    Extending Knowledge Daily -
    http://www.communitymx.com/
    "Rusyt9073" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi, thank you for the reply
    >
    > I used dreamweaver and coldfusion to create the
    index.cfm and results.cfm
    > pages following the "Adobe Wildlife Project" tutorial.
    > I am running this on my own computer as a local host.
    Here is the code for
    > the
    > search page and results page. Can you see any problems?
    Please help if you
    > can
    > :(
    >
    > SEARCH PAGE (index.cfm)
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    > <html>
    > <head>
    > <title>The Wildlife Project</title>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > </head>
    >
    > <body>
    > <form name="form1" method="get"
    action="results.cfm">
    > <input type="text" name="textfield">
    >  
    > <input type="submit" name="Submit" value="SEARCH">
    > </form>
    >
    > </body>
    > </html>
    >
    >
    >
    >
    >
    >
    >
    > RESULT PAGE (results.cfm)
    >
    > <cfparam name="URL.DESC" default="1">
    > <cfparam name="URL.STATE" default="1">
    >
    > <cfquery name="rs_wildlife" datasource="wildlife">
    > SELECT "DESC", LINK, IMAGE FROM
    F:\adobe\data\wildlife.wildlife WHERE
    > "DESC"
    > LIKE
    > '%#URL.DESC#%' ORDER BY "DESC" ASC
    > </cfquery>
    > <cfquery name="newwildlife"
    datasource="newwildlife">
    > SELECT CONTACT, STREET, CITY, "STATE" FROM
    > F:\adobe\newwildlife.CONTACT_INFORMATION
    > WHERE "STATE" LIKE '%#URL.STATE#%' ORDER BY CITY ASC
    > </cfquery>
    > <html>
    > <head>
    > <title>The Wildlife Project</title>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > </head>
    >
    > <body bgcolor="#000000" text="#FFFFFF" leftmargin="0"
    topmargin="0"
    > marginwidth="0" marginheight="0">
    > <table width="607" height="40" border="0"
    cellpadding="0" cellspacing="0">
    > <tr>
    > <td height="40"><img name="banner2"
    src="images/banner2.jpg"
    > width="607"
    > height="40" border="0" alt="Wildlife Project
    Logo"></td>
    > </tr>
    > </table>
    > <font size="2" face="Georgia, Times New Roman, Times,
    serif"><br>
    > <br>
    > </font>
    > <table width="607" border="0">
    >
    >
    > <tr>
    > <td><font size="2" face="Georgia, Times New
    Roman, Times,
    > serif"> </font></td>
    > </tr>
    > </table>
    >
    >
    >
    > <table width="607" border="0">
    > <tr>
    > <td><font size="2" face="Georgia, Times New
    Roman, Times,
    > serif"><strong>Here
    > is the contact information you
    requested:</strong></font></td>
    > </tr>
    > </table>
    >
    > <br>
    > <font size="2" face="Georgia, Times New Roman, Times,
    serif"> </font>
    >
    > <table width="607" border="0">
    > <tr>
    > <td width="574"> <p><font size="2"
    face="Georgia, Times New Roman,
    > Times,
    > serif">The
    > Wildlife Project<br>
    >
    <cfoutput>#newwildlife.CONTACT#</cfoutput><br>
    > <a
    >
    href="<cfoutput>#rs_wildlife.LINK#</cfoutput>"><cfoutput>#newwildlife.STREET#</c
    > foutput></a><br>
    > CITY,  STATE  ZIP_CODE<br>
    > PHONE<br>
    > <br>
    > </font></p></td>
    > </tr>
    > </table>
    >
    > </body>
    > </html>
    >

  • Database Adapter: cannot access table with complex record type as columns

    Hi all,
    I cannot perform any operations on a table that has columns with complex record type.
    I have created a table to store purchase order details.
    Sample script:
    CREATE type XX_CUST_INFO_TYP as object
    ssn VARCHAR2(20),
    rating NUMBER(15)
    CREATE type XX_ITEM_TYP as object
    item_name VARCHAR2(20),
    unit_price NUMBER(15),
    quantity NUMBER(15)
    CREATE table XX_PORDER (cust XX_CUST_INFO_TYP, porder XX_ITEM_TYP);
    When i try to access the table X_PORDER in jdev through a database Adapter, i receive the error as
    "some tables contains columns that are not recognized by the database adpter"
    1.) so in this case, how to include such tables that have complex types?
    Also, check out this scenario also..
    1. add a table through a database adapter
    2. drop the table in backend
    3. i can still see the table and its structure in the database adapter wizard even after restarting Jdeveloper.. How is it possible?
    These are some really interesting scenarios to experiment. Please suggest your ideas on this..
    Thanks All!

    Hi Hem,
    for a select you could select against a view. And for inserts you could create a stored procedure. They support complex types since 10.1.2. Complex types support in tables/views was added for 11 (next major release).
    You might be able to use PureSQL as a workaround too, i.e.
    insert into XX_PORDER values (XX_CUST_INFO_TYP(?,?), XX_ITEM_TYP(?, ?, ?))
    As for your other problem, in 10.1.2/10.1.3 the DBAdapter wizard sits on top of the Jdev Offline Tables and TopLink Mapping Workbench components. When you remove a table in the wizard it won't delete the Offline DB component. It was added by the wizard, but afterwards it is public to the entire Jdev project. You must remove it from Jdev yourself. This has been improved for the next major release too, no artifacts from underlying components are created.
    To remove it select:
    Offline DB Objects -> <schema> -> <table> and try File.. Erase From Disk.
    Thanks
    Steve

  • LDB (Logical Database) results

    Dear All,
    I have an requirement where I have get the selection screen fields list of logical database(LDB) in my custom program.
    Also after getting the selection screen fields, whatever criteria is filled in those, once again i have to take those inputs and get the  results by executing the LDB.
    Is anyone can help me......
    Regards
    Munish Garg

    You will need to call LDB_PROCESS, but you will have to map the data from LDB to internal table (how do your report "knows" which nodes and which fields from those nodes are to be included in the internal table ?)
    So many dynamic statements like CREATE DATA <dref> TYPE REF TO (LBDA-DDIC_TYPE) using the parameter <formname> = LBDA-LDBNODE in a generic FORM <formname> USING <nodename> LIKE LDBCB-LDBNODE and then many ASSIGN statements to map the desired fields to the returned internal table records. At each call of this generic FORM, map each and every "corresponding" fields, add the record to the internal table at the lower level node.
    Regards,
    Raymond

  • How to write a query to get this result?

    I have four tables. how to get the result meet the following condition?
    1,select all from USERACC_FOR_DOM_REP table.
    2,then take out(filter out) the username from EXCEPTION_ACC table where EXCEPTION_ACC.username=USERACC_FOR_DOM_REP.username and
    EXCEPTION_ACC.TARGET_DB=USERACC_FOR_DOM_REP.TARGET_DB
    3, then take out(filter out) the username from MAX_USER_LOGIN table where MAX_USER_LOGIN.username=USERACC_FOR_DOM_REP.username and
    MAX_USER_LOGIN.TARGET_DB=USERACC_FOR_DOM_REP.TARGET_DB and MAX_USER_LOGIN.LAST_LOGIN < sysdate -90).
    4, then take out(filter out) the username from MYTABLE table where MYTABLE.username=USERACC_FOR_DOM_REP.username and
    MYTABLE.TARGET_DB=USERACC_FOR_DOM_REP.TARGET_DB
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    SQL> desc USERACC_FOR_DOM_REP
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    ACCOUNT_STATUS NOT NULL VARCHAR2(32)
    TARGET_DB VARCHAR2(9)
    SQL> desc EXCEPTION_ACC
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    TARGET_DB VARCHAR2(15)
    SQL> desc MAX_USER_LOGIN
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    TARGET_DB VARCHAR2(9)
    LAST_LOGIN DATE
    INSERT_DATE DATE
    SQL> desc MYTABLE
    Name Null? Type
    USERNAME VARCHAR2(20)
    TARGET_DB VARCHAR2(20)

    sorry if i didn't make this clear.
    here is the problem. i have three tables. like below. i also give some sample data
    USERS, USER_MAX_LOGIN, EXCEPTION_USER
    USERS table has all the user information for each user in each database.
    USER_MAX_LOGIN has those users who logged in within 1 year (we keep 1 year audit data)
    EXCEPTION_USER has user which should be excluded from the report.
    My report need to find all users in all databases who has not logged in for more than 90 days.
    USERS
    username     target_db     profile     
    u1     d1     user     
    u2     d1     user     
    u3     d2     user     
    u1     d2     user     
    u2     d2     user     
    u3     d1     user     
    USER_MAX_LOGIN
    username     target_db     last_login_date     
    u1     d1     02-Jan-12     
    u3     d2     06-Aug-11     
    u1     d2     06-Aug-11     
    u2     d2     06-Sep-11     
    EXCEPTION_USER
    username     target_db          
    u2     d1          
    THIS IS THE REPORT I NEED TO BE LOOK LIKE.               
    username     target_db     last_login     profile
    u3     d2     06-Aug-11     user
    u1     d2     06-Aug-11     user
    u2     d2     06-Sep-11     user
    u3     d1     UNKNOWN     user <<----- the unknown means we don't know when the user logged in last time. the user_max_login table does not have its information.

  • How to get the results in one line

    Hi
    if i use the script below i get the name of path and then : and in next line i get the results.is there a way to get the results from every path after the : and not in the next line?
    another question - is there a way that the script will not show the server name on every path?
    (Get-Counter -ListSet LogicalDisk).PathsWithInstances | Get-Counter
    THC

    If you take you script and pipe it to get member, it will give you a list of various script properties.
    (Get-Counter -ListSet LogicalDisk).PathsWithInstances | Get-Counter | get-member
    You will see that the object type returned by "Get-Counter" is Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet.
    TypeName:
    Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet
    Name MemberType Definition
    Equals Method bool Equals(System.Object obj)
    GetHashCode Method int GetHashCode()
    GetType Method type GetType()
    ToString Method string ToString()
    CounterSamples Property Microsoft.PowerShell.Commands.GetCounter.Perfo...
    Timestamp Property datetime Timestamp {get;set;}
    Readings ScriptProperty System.Object Readings {get=$strPaths = ""...
    You can try grabbing different properties, and they will print out differently, displaying the data on the same line in some cases. For example, pipe your output to a "foreach-object" block, and then for each object print out the CounterSamples property.
    (Get-Counter -ListSet LogicalDisk).PathsWithInstances | Get-Counter | foreach-object { ($_).CounterSamples }
    This should all print on one line now. However, you also asked if there was a way to not have the server print out on every line. The way to control the format of these outputs is to use the "format-table" cmdlet. So you would pipe your output to format-table
    and then give it various options. This is how you would pipe it (without any options).
    (Get-Counter -ListSet LogicalDisk).PathsWithInstances |
    Get-Counter | object { ($_).CounterSamples | format-table }#OR USE YOUR ORIGINAL CODE(Get-Counter -ListSet LogicalDisk).PathsWithInstances |
    Get-Counter | format-table }
    Now, it's up to you to give format-table the options you want. With no options, output will look unchanged. To see what options are available to you, use get-help.
    get-help format-table
    I hope this helps!
    Thank for all the info...

  • Having problem with UDF, getting unwanted result Ljava.lang.String;@25c560

    Hi,
    This is atually a follow-up to other post in the same forum: <b>Sending XMl message as text (Mail body) by receiver mail adapter</b>
    We are having problem with UDF to get correct output.
    We are getting <b>result of UDF</b> as below:
    [[Ljava.lang.String;@f37573 [Ljava.lang.String;@1a409ed [Ljava.lang.String;@87c011 [Ljava.lang.String;@52a077 [Ljava.lang.String;@a4e8e5<BR>[Ljava.lang.String;@f37573 [Ljava.lang.String;@1a409ed [Ljava.lang.String;@87c011 [Ljava.lang.String;@52a077 [Ljava.lang.String;@a4e8e5<BR>[Ljava.lang.String;@f37573 [Ljava.lang.String;@1a409ed [Ljava.lang.String;@87c011 [Ljava.lang.String;@52a077 [Ljava.lang.String;@a4e8e5<BR>[Ljava.lang.String;@f37573 [Ljava.lang.String;@1a409ed [Ljava.lang.String;@87c011 [Ljava.lang.String;@52a077 [Ljava.lang.String;@a4e8e5<BR>]
    Does any body know what it mean?
    Following are the source ans target XSD's:
    Here is the <b>source xsd:</b>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://NameSpace" targetNamespace="NameSpace">
    <xsd:complexType name="row">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    5e090470385011db9654000e7f22e9d4
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="DeliveryNumber">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a0377b11db91dbf237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="10" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="DeliveryLineItem">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a1377b11db98aaf237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="6" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="OrderNumber">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a2377b11dbc5c4f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="10" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="OrderLineItem">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a3377b11db9d84f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="6" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="BillToID">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a4377b11dbb49bf237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="17" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="BillToName">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a5377b11dbb38ff237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="40" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ShipToID">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a6377b11db9370f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="17" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ShipToName">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a7377b11dbb66cf237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="40" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ProductCode">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a8377b11db8f94f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="18" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ProductDesc">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0a9377b11db929ff237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="40" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ScheduledLoadDate">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0aa377b11db8d1df237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="8" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="ScheduledLoadTime">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0ab377b11dba57ff237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="6" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Carrier">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0ac377b11dbcc03f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="40" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="CustomerPO">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0ad377b11dbb5a2f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="35" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="OutYard">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0ae377b11dbcc51f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="16" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="OrderedQty">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0af377b11dbbe6cf237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="15" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="OrderUofM">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0b0377b11db9264f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="3" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="LabConc">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0b1377b11dbb0e7f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="50" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GrossMT">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0b2377b11db99f1f237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="4" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="GrossST">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0b3377b11db9b6ff237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="4" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="BilledQty">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0b4377b11db8a9af237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="8" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Status">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    9d3ac0b5377b11dba39cf237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:length value="10" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="resultset">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    5e044980385011dbb2d3000e7f22e9d4
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="row" type="row" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    c1cb8fd0377b11db912af237ac102206
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    <b>Target xsd:</b>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/Mail/30" targetNamespace="http://sap.com/xi/XI/Mail/30">
    <xsd:element name="Mail">
    <xsd:annotation>
    <xsd:documentation>
    Mail package for XI - Mail Adapter
    </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Subject" type="xsd:string" minOccurs="0" />
    <xsd:element name="From" type="xsd:string" minOccurs="0" />
    <xsd:element name="To" type="xsd:string" minOccurs="0" />
    <xsd:element name="Reply_To" type="xsd:string" minOccurs="0" />
    <xsd:element name="Content_Type" type="xsd:string" minOccurs="0" />
    <xsd:element name="Date" type="xsd:dateTime" minOccurs="0" />
    <xsd:element name="Message_ID" type="xsd:string" minOccurs="0" />
    <xsd:element name="X_Mailer" type="xsd:string" minOccurs="0" />
    <xsd:element name="Content" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:documentation>
    any type
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="encoding" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    And <b>following is the UDF we are using</b>:
      =========================================
    String mailBody = new String();
    int inta, intb, intc, intd, inte;
    inta = a.length;
    intb = b.length;
    intc = c.length;
    intd = d.length;
    inte = e.length;
    for(int i = 0;  i < a.length; i++)
      mailBody = mailBody + a + " " + b + " " + c + " " + d + " " + e + "<BR>";
    result.addValue(mailBody);
    ====================================
    <b>Any help to resolve this would be very helpful.</b>
    Thanx
    Sue

    Hi Bhavesh,
    We are getting following error if we use the UDF you given below:
    Check Result for Object test   Source code has syntax error:  D:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapf2026120390a11db9d1f000e7f22e9d4/source/com/sap/xi/tf/_test_.java:75: a is already defined in testUDF$(java.lang.String[],java.lang.String[],java.lang.String[],java.lang.String[],java.lang.String[],com.sap.aii.mappingtool.tf3.rt.ResultList,com.sap.aii.mappingtool.tf3.rt.Container) int a = a.length(); ^ D:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapf2026120390a11db9d1f000e7f22e9d4/source/com/sap/xi/tf/_test_.java:75: int cannot be dereferenced int a = a.length(); ^
    We have no knowledge of java at all.
    We did some modifications to it as below:
    String mailBody = new String();
    int a = a.length();
    int b = b.length();
    int c = c.length();
    int d = d.length();
    int e = e.length();
    for(int i = 0; i < a.length(); i++)
    mailBody = mailBody + a + " " + b + " " + c + " " + d + " " + e + "<BR>";
    result.addValue(mailBody);
    It it didn't work. Think we are missing something. Can please help us to figure it out.
    Thanx
    Sue

  • How to get the result set in batches

    I have a query which results into large data. This data i want to display in a group of 20. After every 20 records i want to add header and footer to it.
    Is it possible to get the result set data into batch of 20 ? means can i specify start and end index of query ?
    regards
    Manisha

    What I am saying is that a big query with lots of
    joins will probably be slow, and as such would be a
    ripe candidate for batching the responses, if it were
    not possible to speed/optimize it. Batching is nice
    to look at for the user, but is not a solution for
    performance problems. In essence it is irrelevant
    that it adds a little performance deficit, as it
    appears to be running a lot quicker, and gives more
    feedback to the user.Then let me say it again....
    - "Join" is a term that applies to a method of doing queries in the database....
    - Query 1 which uses a join and returns 15 rows
    - Query 2 which does not use a join and returns 1500 rows.
    Given the above then Query 1 will provide better overall performance for the system than Query 2 in a properly configured database.
    If it doesn't then the database is not set up correctly.
    And again this will be irrespective of whether the query is scrollable or not.

  • How to get the result of a method on a page

    I use JDeveloper 11g
    I want the result of a method (String) in the ApplicationModule on a page (jspx)
    What I have done is:
    1. make a method (getValue) in the ApplicationModule Algemeen (also in Client interface)
    2. make a pagedef-file with executables and bindings, see
    <executables>
    <invokeAction id="doGetValue" Binds="getValue"
    Refresh="renderModel"/>
    <variableIterator id="variables" Refresh="renderModel">
    <variable Type="java.lang.String" Name="getValueReturn"
    IsQueriable="false" IsUpdateable="0"
    DefaultValue="${bindings.getValue.result}"/>
    </variableIterator>
    </executables>
    <bindings>
    <methodAction id="getValue" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="getValue"
    IsViewObjectMethod="false" DataControl="AlgemeenDataControl"
    InstanceName="AlgemeenDataControl.dataProvider"
    ReturnName="AlgemeenDataControl.methodResults.getValue_AlgemeenDataControl_dataProvider_getValue_result"/>
    <attributeValues IterBinding="variables" id="ValueReturn">
    <AttrNames>
    <Item Value="getValueReturn"/>
    </AttrNames>
    </attributeValues>
    </bindings>
    3. on the page (jspx) I have an outputText-component:
    <h:outputText value="#{bindings.ValueReturn.inputValue}"/>
    But, it does not work, I don't get the result of the method on the screen.
    Who can help me with this?

    Hi,
    Simple example below:
    Suppose you have this method in AppmoduleImpl:
    public void testHello( ) {
    return "Hello";
    1.After you expose this to clientInterface,drop this method on the jspx page as ADF Parameter
    form
    2.Drop the return String as outputText
    3.Run the page,click on the commandButton & the outputText returns 'Hello'
    Regards,
    Shantala

  • How to get the resulting XML as string

    Hello,
    I think my question is very simple but i'm new in this area.
    What i'm try to do is to parse a XML document with the DOM parser. Then i manipulate the DOM tree. After finishing the process i want to get the resulting XML document as an InputStream to give to another application for storing back into the database.
    Until know i print the resulting XML to System.out or I write it to a file.
    Do you know where i can find more information about this? Sample code??
    Thanks!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    You can try following code. It is not the simplest way, but it works for me:
    // Print to temp buffer
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream output = new DataOutputStream(baos);
    Xml_doc.print(output);
    String outtemp=baos.toString();
    System.out.println(outtemp);
    include following line for the lib:
    import java.io.*;<HR></BLOCKQUOTE>
    Many thanks for the reply. It works!

  • How to get the split period wage type amount in payslip?

    How to get the split period wage type amount in payslip?
    Payroll period for 01.01.09 to 31.01.09.
    1.     Employee is active from 1.1.09 to 10.01.09
    2.     Employee is inactive from 11.01.09 to 20.01.09
    3.     Employee is again active from 21.01.09 to 31.01.09
    In Result Table three split periods are created.
    From 01.01.09 to 10.01.09 u2018Basic Salaryu2019 Wtype  1101 amt is 20.00
    From 11.01.09 to 20.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 00.00
    From 21.01.09 to 31.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 10.00
    My requirement is to print only the last split period in payslip from 21.01.09 to 31.01.09. May you please help me in this regard.
    Thanks in advance
    Regards,
    Rajesh.

    Hi
    Try to read the below:
    WPBPC : Distribute Lump Sum Wage Elements to WPBP Periods
      Object
        Operation
      Use
        Operation WPBPC distributes the amount of the current wage type to the
        active WPBP periods in the payroll period.
      Input
        The current wage type in the header entry of table OT is used as input
        for this operation.
      Procedure
        Within payroll, wage types are assigned to a fixed WPBP period by
        infotype 0014 Recurring Payments/Deductions, for example. However, you
        may want to distribute this payment to all active WPBP periods, which is
        what would happen if the wage type were entered in basic pay. Therefore,
        various specifications exist for parameter S:
        o   If the specification is 'A', and if several active WPBP periods
            exist, the amount is simultaneously reduced on a calendar-day basis.
        o   If the specification is 'D', the wage type is distributed to all
            existing WPBP periods without the amount being reduced.
        o   If the specification is 'S', and if the validity period starts or
            ends during the period, the entry in table WPBP is split using this
            date. The wage type is stored in table OT for the corresponding WPBP
            period.
            This parameter is only allowed if processing was accessed using
           function P0014.
           In this case, infotype 0014 must be processed before absence
           valuation and function PARTT. Otherwise, rejections occur during
           payroll processing.
       o   Specification 'X' is the combination of 'A' and 'S'.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is 'W', and if the validity period starts or
           ends during the period, the entry in table WPBP is split using this
           date (as with option 'S'). Unlike 'S', the wage type is not stored
           in table OT.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is ' ', the wage type is stored in table OT for
           each WPBP period in which the validity interval fits.
           This parameter is only allowed if processing was accessed using
           functions P0014 or P0015.
       If the WPBP split is set for a wage type, the wage type is stored
       without changes in table OT. If you specify a different wage type name
       in the second parameter, the wage type is stored with this name in table
       OT. Before you execute operation WPBPC, you may therefore need to delete
       the split using operation ELIMI.
       If a country-specific split (C1, C2, or C3 split) is set, the operation
       interprets it as an error. The employee in question is rejected by
       payroll. All other splits are transferred as they are.
      Output
        The processed wage type, or the wage type specified in the operation
        call, is written to table OT (output table) with the appropriate split
        indicator and reduced amount as operation output for each WPBP period.
        Parameter specification 'W' is the only exception.
      Syntax
        OOOOOSVVVV
        OOOOO       WPBPC       Operation name
        S
                    blank       distribute to all WPBP periods
                    S           split and distribute WPBP
                    W           split but do not distribute WPBP
                    A           distribute to active WPBP periods
                                with calendar-day reductions
                    D           distribute to all existing
                                WPBP periods
                    X           combination of 'S' and 'A'
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        Wage type before operation:
        WType       WPBP        Amount
        M100        00          3000.-
        M200        02          2000.-
        Operation:   WPBPCA
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          2000.-
        M100        02          1000.-
        M200        02          2000.-
        Operation:   WPBPC
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          3000.-
        M100        02          3000.-
        M200        02          2000.-
    Regards
    Team Member.

  • How can I get spool result for background mode AFAB

    Dear experts,
    Could you help me? My users run AFAB without run that in test mode. Therefore sometimes I have a difference in ledger (main book) and FI-AA. I am wanting to write coat for AFAB where I am runing programme in test mode and then run that in workering mode. AFAB run in background.
    How can I get result first (test) run from spool? Could you tell me any solutions for that problem?
    Thanks and Best Regards

    You can create one warpper program which can submit the report in the background job with option to send the output to MEMORY. You can use the JOB_OPEN and JOB_CLOSE FMs to schedule a background job.
    Than you can use the FM 'LIST_FROM_MEMORY'  to get the results from the memory.
    Like:
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = list_tab.
    ENDIF.
    Regards,
    Naimesh Patel

  • Can we get database creation script using any packages?

    Hi Friends,
    we will get table creation script using dbms_metadata.get_ddl package. just like that is there any way to get database creation script? i know that we can add some lines to controlfile trace to convert it into database creation script. but i would like to know whether it is possible through packages?
    thanks in advance.

    I think there's no package to use it for getting database creation script. But anyway, you can search it in [Oracle Database PL/SQL Packages and Types Reference|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/toc.htm]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • CAUFVD gets initialized result in dump with error Production ord not found

    Hi All,
    We want to make change of start date and end date of a production order via CO02 (Production order change). Based on these changes we want to update an existing a Purchasing Planned Order  Start Dt and Finsih Dt (MD12) 
    We are using Enhancement component (PPCO0007) : Exit when saving production order
    Within this exit we are using BAPI_PALNNEDORDER_CHANGE  to update some other purchasing  planned order dates.
    The BAPI_PALNNEDORDER_CHANGE  is executing succesfully however the production order structure (CAUFVD)  gets initialized resulting in dump with error Production order not found
    How can we update and save a purchased planned order and also the  production order
    Barada
    Edited by: barada satapathy on Dec 8, 2010 9:14 AM

    Hi Max,
    Thanks for the reply...
    The error details are as below:
    Dump gets generated via program : (SAPLCOBT).
    Exception condition ORDER_NOT_FOUND raised.
    include = LCOBPU16.
    Row No: = 21.
    Module Type = (Function)
    Module Name = CO_BT_ORDER_DET_TEMP
    We also give brief details on what is happening:
    My exit calls from Standard (LCOZVU01) :
    CALL CUSTOMER-FUNCTION '001'
               EXPORTING
                    header_imp = caufvd
               IMPORTING
                    header_exp = caufvd_tmp
                    no_update  = answer.
    *     Check if update of header necessary and allowed
          IF caufvd-aufnr EQ caufvd_tmp-aufnr AND
             caufvd       NE caufvd_tmp.
            PERFORM caufv_upd(saplcobh) USING caufvd_tmp.
          ENDIF
    When BAPI for planned order is executed within the exit, the structure (caufvd) values are found refreshed. This structure is further updating the production order.

  • Getting no result while executing RFC-enabled function module

    Hi folks,
    Iam having a remote-enable function module which
    divides two numbers and gives out the result.
    For this i have created two import parameters A and B
    of type CHAR10 and one export parameter C.
    In the source code i've given the code as C = A / B.
    when i execute this function module by providing the
    appropriate RFC TARGET SYS and values for A and B respectively,
    Iam getting no result!!
    The RFC destination used here is of type T and is working fine!
    Where iam going wrong in getting the desired result for the parameter C ?
    Lookin forward for your quick response..
    cheers ...
    Ram

    First, are you changing the values to numeric types inside the FM?
    Second, if you are doing so check the FM in SE37 that it is giving result or not?
    Regards,
    Amit
    Reward all helpful replies.

Maybe you are looking for

  • Mobile Account Nightmares!

    Ok so Mobile accounts looks to be the answer to everything. I am looking for an easy backup solution that will allow people to sync files over the network and also let them take their computers home while still being able to access that same account.

  • Re: Change duration of multiple still images in one operation

    I have done this in Premiere CS6. Make sure your selection Tool is selected. Click and drag to select the multiple slides that are ALREADY placed in your timeline that you want to change. Right click on your selection (make sure it's a regular mouse

  • UCCX Screen Pops

    Hello, I am new to the Contact Center environment. I have been task with trying to assist in the collaboration of a 3rd party application (Ticketing System) and UCCX 8.5.1. I am trying to find out where we could place a url in a script. I will need f

  • Issue with Safari closing down mid use - iPad 1

    I have an iPad 1 wifi (not 3G) 64gb and it has all latest updates via iTunes, even done a restore recently but my safari keeps closing down mid use, all the time now. Any ideas on how to fix this?

  • Error in address output (name not filled). Its urgent

    Hello folks, when  i execute smartfrom prog i m getting this error. Error in address output (name not filled). Message no. SSFCOMPOSER323 With regards, Shashank Reddy