Returning array of char with NewStringUTF

�Can anybody tell me how NewStringUTF creates a java string from an array of characters? �It stops when he founds a null character on the array or not? I dont want return the whole array but only the first significants characters.
Thanks in advance.

!!PLEASE HELP!!
NewStringUtf returns more characters than expected
#define MAX_RCV_BUF 1920
char sendbuf,rcvbuf;
char devuelve[1920];
rcvbuf = (char *)tpalloc("X_OCTET", NULL, MAX_RCV_BUF)
/** (Im working with Tuxedo API)
memset(rcvbuf,'\0',MAX_RCV_BUF);
/**/I initialize the string to nulls so i thik i dont need put a null character later but...
strncpy(devuelve,rcvbuf,lRcvLen);
devuelve[lRcvLen]='\0';
tpfree(rcvbuf);
return (*env)->NewStringUTF(env,devuelve);
/** So NewStringUTF should return lRcvLen characters but, but it returns more!!!

Similar Messages

  • Return array of chars

    hi, i'm from Brasil.
    i make a code which use JNI and call a function in C. The function in C print all oppeneds window's names.
    but i want whick the function in C return array of char with the names of the windows.
    //code in java
    public class WindowList {
         private native void listAllWindows();
         public static void main(String[] args) {
              WindowList wl = new WindowList();
              wl.listAllWindows();
         static{
              System.loadLibrary("WindowList");
    //code in C
    #include <windows.h>
    #include <stdio.h>
    #include "WindowList.h"
    JNIEXPORT void JNICALL Java_WindowList_listAllWindows(JNIEnv *env, jobject obj)
        char vetor[50][256];      //i want return this array.
        int i = 0;
        HWND janela = NULL;
        janela = GetDesktopWindow();
        janela = GetWindow(janela, GW_CHILD);
        while(janela != NULL){
            if(IsWindowVisible(janela)){
                SendMessage(janela,WM_GETTEXT,256,(LPARAM)vetor);
    printf("%s\n", vetor[i]);
    i++;
    janela = GetWindow(janela, GW_HWNDNEXT);
    how return the array of chars?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    souarte wrote:
    but i want whick the function in C return array of char with the names of the windows. I doubt that.
    What you want is to return an array of strings.
    Conceptually it is the same as if you were doing it in java.
    - Get a size
    - Create the array with that size
    - Iterate through the array and for each index...
    ....-Create a string with data
    ....-Assign to the array.
    Naturally it is going to take a lot more code to do this in C than in java.

  • How to return array of String to a java program.! ??

    Hi All,
    I am new to JNI programming. so trying with simple example. I am having one problem. I have one array of String in my Java program. I want to reverse all the elements in this array and want back this new array in the same form i.e. array of string. So how can I do this ??
    Please guide me.....
    The function of defination of array in my java code is
    public native String[] getReverseStringArray(String[] arrString);
    where as my array is like:
    String[] arrStr = {"one", "two", "three", "four", "��������","�c��","�J�^�J�i"};
    and I am calling function in C file like:
    arrStr = employee.getReverseStringArray(arrStr);
    and the function defination in my c file is
    JNIEXPORT jobjectArray JNICALL
    Java_Emp_getReverseStringArray (JNIEnv *env, jobject obj, jobjectArray arr)
    // some code will come here......
    So can anybody tell me how to do this ??
    Thanx in advance...
    Pandurang
    [email protected]

    Hi,
    this is quite simple. Here an example function that works like this:
    JNIEXPORT jobjectArray JNICALL Java_cadagent_ugopen_UgAssembly_jni_1getStructure
    (JNIEnv *env, jclass cls, jstring part)
    jobjectArray retvals = NULL;
    jstring j_val = NULL;
    int child_count = 5;
    /* initialize return array */
    j_val = (*env)->NewStringUTF(env, "");
    retvals = (*env)->NewObjectArray(env, child_count, (*env)->FindClass(env, "java/lang/String"), j_val);
    for (i=0;i<child_count;i++)
    j_val = (*env)->NewStringUTF(env, "some text");
    (*env)->SetObjectArrayElement(env, retvals,i, j_val);
    return retvals;
    Hope this answers you question.

  • Stored Procedure: Function returns Array

    I was just wondering if following scenario is possible in a stored procedure.
    I have a package, which includes 4 different functions and 1 procedure. Procdure uses ref cursor to return values in my reporting tool. What I am trying to do is to write a function which takes input and return array of varchar. Something like..
    Package ABC
    Function student_classes (student_no in Varchar2) return [array]
    begin
    select class_nbr into [array]
    from student_table
    where student_nbr = student_no;
    return [array];
    end student_classes;
    procedure students_info (rpt_cursor IN OUT rpt_type)
    begin
    OPEN rpt_cursor FOR
    select
    student_name,
    student_nbr,
    student_address,
    student_classes (student_nbr) --returns array
    from student_table;
    end student_info; --end of procedure
    end abc; --end of pacakge.
    I used [array], as I am ont sure how to define (syntax) it in spec part of package or in body. I will really appreciate if someone could help me with this function.
    Thank you

    Thanks for the reply Tonguc Y.
    I declared an array in my package declaration
    CREATE OR REPLACE PACKAGE rpt_TESTING_pkg
    AS TYPE rpt_type IS REF CURSOR;
         TYPE DIAGARRAY IS VARRAY(20) OF VARCHAR2(6);
         FUNCTION DIA_CODES (MNO IN VARCHAR2) RETURN DIAGARRAY;
         PROCEDURE member (rpt_cursor IN OUT rpt_type);
    END rpt_TESTING_pkg;
    but then when I try to use it in my function it gives me error that I should declare DIAGARRAY.
    CREATE OR REPLACE PACKAGE BODY rpt_TESTING_pkg
    as
    FUNCTION DIA_CODES (MNO IN VARCHAR2)
                   RETURN DIGARRAY AS diags DIGARRAY;
    begin
    <sql block>
    end dia_codes;
    end rpt_TESTING_pkg;
    Any suggestions.

  • SOAP Webservice returns Array - how to setup Xcelsius?

    Hello,
    after a lot of tests I have recognized that Xcelsius is not able to handle Webservices which return arrays with an undefined size. So I edited the schema file in the way that the size is defined.
    Here is an extract of the schema file:
    <xsd:sequence>
                <xsd:element name="row0" type="tns:Row" maxOccurs="10" minOccurs="10" ></xsd:element>
    </xsd:sequence>
    With that configuration Xcelsius is able to import the wsdl. But the preview window is showing only one Row Folder, I have excpected "10".  My question is, is my config the right way to handle arrays with Xcelsius and when it is, how I have to set up the range in the Excel Map to make the data avaiable???
    Thank you in advance.
    Best regards,
    Conrad

    Here is an example, you can compare what is different. From the look of it the recipient info is missing from yours. Does it say which INI option is missing when you get an error?
    <doPublishRequest xsi:type="doPublishReq_Import" xmlns="http://webservices.docucorp.com/ewps/schema/2005-12-01">
            <LibraryId>CONFIGNAME</LibraryId>
            <DistributionOptions xsi:type="DistributionOptions_ADHOC" source="ADHOC">
              <Priority>REALTIME</Priority>
              <Channel xsi:type="Channel_IMMEDIATE">
                <PublishType>PDF</PublishType>
                <DistributionType>IMMEDIATE</DistributionType>
                <Disposition location="ATTACH" />
                <Recipient name="ORIGINAL">
                  <Props>
                    <Prop name="" />
                  </Props>
                  <Copies />
                  <Story StoryName="" id="" alias="" />
                </Recipient>
              </Channel>
            </DistributionOptions>
            <SourceType>IMPORT</SourceType>
            <Import>
              <ImportFile xsi:type="ImportFile_ATTACH" d6p1:contentType="" location="ATTACH" xmlns:d6p1="http://www.w3.org/2005/05/xmlmime">O05hdXRpbH.......</ImportFile>
            </Import>
          </doPublishRequest>

  • Oracle 8i array DML operations with LOB objects

    Hi all,
    I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind:
    INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2)
    where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs array DML functionality to insert multiple records with a single statement execution. I have allocated an array of LOB locators, initialized them with OCIDescriptorAlloc(), and bound them to COL2 where mode is set to OCI_DATA_AT_EXEC and dty (IN) is set to SQLT_BLOB. It is after this where I am getting confused.
    To send the LOB data, I have tried using the user-defined callback method, registering the callback function via OCIBindDynamic(). I initialize icbfps arguments as I would if I were dealing with RAW/LONG RAW data. When execution passes from the callback function, I encounter a memory exception within an Oracle dll. Where dvoid **indpp equals 0 and the object is of type RAW/LONG RAW, the function works fine. Is this not a valid methodology for CLOB/BLOB objects?
    Next, I tried performing piecewise INSERTs using OCIStmtGetPieceInfo() and OCIStmtSetPieceInfo(). When using this method, I use OCILobWrite() along with a user-defined callback designed for LOBs to send LOB data to the database. Here everything works fine until I exit the user-defined LOB write callback function where an OCI_INVALID_HANDLE error is encountered. I understand that both OCILobWrite() and OCIStmtExecute() return OCI_NEED_DATA. And it does seem to me that the two statements work separately rather than in conjunction with each other. So I rather doubt this is the proper methodology.
    As you can see, the correct method has evaded me. I have looked through the OCI LOB samples, but have not found any code that helps answer my question. Oracles OCI documentation has not been of much help either. So if anyone could offer some insight I would greatly appreciate it.
    Chris Simms
    [email protected]
    null

    Before 9i, you will have to first insert empty locators using EMPTY_CLOB() inlined in the SQL and using RETURNING clause to return the locator. Then use OCILobWrite to write to the locators in a streamed fashion.
    From 9i, you can actually bind a long buffer to each lob position without first inserting an empty locator, retrieving it and then writing to it.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by CSimms:
    Hi all,
    I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind:
    INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2)
    where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs array DML functionality to insert multiple records with a single statement execution. I have allocated an array of LOB locators, initialized them with OCIDescriptorAlloc(), and bound them to COL2 where mode is set to OCI_DATA_AT_EXEC and dty (IN) is set to SQLT_BLOB. It is after this where I am getting confused.
    To send the LOB data, I have tried using the user-defined callback method, registering the callback function via OCIBindDynamic(). I initialize icbfps arguments as I would if I were dealing with RAW/LONG RAW data. When execution passes from the callback function, I encounter a memory exception within an Oracle dll. Where dvoid **indpp equals 0 and the object is of type RAW/LONG RAW, the function works fine. Is this not a valid methodology for CLOB/BLOB objects?
    Next, I tried performing piecewise INSERTs using OCIStmtGetPieceInfo() and OCIStmtSetPieceInfo(). When using this method, I use OCILobWrite() along with a user-defined callback designed for LOBs to send LOB data to the database. Here everything works fine until I exit the user-defined LOB write callback function where an OCI_INVALID_HANDLE error is encountered. I understand that both OCILobWrite() and OCIStmtExecute() return OCI_NEED_DATA. And it does seem to me that the two statements work separately rather than in conjunction with each other. So I rather doubt this is the proper methodology.
    As you can see, the correct method has evaded me. I have looked through the OCI LOB samples, but have not found any code that helps answer my question. Oracles OCI documentation has not been of much help either. So if anyone could offer some insight I would greatly appreciate it.
    Chris Simms
    [email protected]
    <HR></BLOCKQUOTE>
    null

  • Return array value based on selection criteria

    I have one data field that holds text data similar to below:
    "Meeting Room 1 (Projector), Meeting Room 2 (Whiteboard), Meeting Room 3 (Video Conferencing)"
    "Meeting Room 3 (LCD Display), Meeting Room 1 (Video Conferencing), Meeting Room 2 (Whiteboard)"
    The meeting rooms are not always in the same order, I cant count on Meeting Room 1 being followed by Meeting Room 2 etc.
    My objective is to only return the meeting room that has the Whiteboard.
    I'm aware that I can use SPLIT to seperate the Meeting Rooms by the comma and place their components into an array.
    What I'm not sure how to do is return the meeting room with the Whiteboard when that could be [1] in the Array or [2] or [3] in the array.
    I need to return the array value based on its contents. Could someone help me 'search' the array created by the SPLIT command and always return that value with the word 'Whiteboard'

    This works
    whileprintingrecords;
    global stringvar x:='';
    global numbervar n:=1;
    While n <= Ubound(split('......, Meeting Room X (Whiteboard),..............', ",")) Do
    if split('..........., Meeting Room X (Whiteboard), ............', ",")[n] like '*Whiteboard*'
    then x:=split('.............., Meeting Room X (Whiteboard), ..............', ",")[n];
    n := n + 1;
    x;
    Just replace my string with your field.
    Ian

  • Please help how to get return array from rpg program on java code?

    Hi
    I have created a rpg program that returns 2 parameter 1 is the id and another one is list of array, when I called this program I passed two programparameter from my java code (see the code below) but when i checked what value would be return it is returned only first value of array. how will i get all array values ?
    please suggest me regarding this issues I amn't so much aware on java & AS400.
    try
    ProgramParameter[] parmList = new ProgramParameter[2];
    AS400Text p1 = new AS400Text(10);
    AS400Text p2 = new AS400Text(30);
    try
    parmList[0] = new ProgramParameter(10);
    parmList[1] = new ProgramParameter(30);
    parmList[0].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
    parmList[1].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
    parmList[0].setInputData(p1.toBytes("Pune"));
    parmList[1].setInputData(p2.toBytes(" "));
    catch(Exception ex)
    ProgramCall pgm = new ProgramCall(o);
    pgm.setProgram("/QSYS.LIB/XXX/XXX.PGM",parmList);
    if (pgm.run())
    byte s[] = parmList[1].getOutputData(); // HERE I got only first value of returning array.
    parmList[1].getOutputDataLength();
    //String sts = ((String) (new AS400Text(10,o).toBytes(s[0])));
    else
    AS400Message[] messageList = pgm.getMessageList();
    for (int msg = 0; msg < messageList.length; msg++) {
    catch(Exception ex)
    AS400Message[] messageList = null;
    finally
    o.disconnectAllServices();
    Reply With Quote

    Try this :
    try
    ProgramParameter[] parmList = new ProgramParameter[2];
    AS400Text p1 = new AS400Text(10);
    AS400Text p2 = new AS400Text(30);
    AS400Array arrP2 = new AS400Array(p2, 4);
    try
    parmList[0] = new ProgramParameter(10);
    parmList[1] = new ProgramParameter(30);
    parmList[0].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
    parmList[1].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
    parmList[0].setInputData(p1.toBytes("Pune"));
    parmList[1].setInputData(arrP2.toBytes({"","","",""}));
    catch(Exception ex)
    ProgramCall pgm = new ProgramCall(o);
    pgm.setProgram("/QSYS.LIB/XXX/XXX.PGM",parmList);
    if (pgm.run())
         Object[] objArr =  (Object [])arrP2.toObject( parmList[1].getOutputData() );
         for(int i =0; i<objArr.length;i++){
                System.out.println( " SKU " + i +" : " + objArr.toString());
    else
    AS400Message[] messageList = pgm.getMessageList();
    for (int msg = 0; msg < messageList.length; msg++) {
    catch(Exception ex)
    AS400Message[] messageList = null;
    finally
    o.disconnectAllServices();

  • Reading an array of byte with special delimiter....help me!!

    Hi guys,
    i've developed a java application that has in input a txt file with a standard format
    string string string
    string double double
    string double double
    and stores it into an array of byte with a fixed format,
    that is byte(whitespace)byte(whitespace)byte(;)byte(whitespace)byte(whitespace)byte(;)byte(whitespace)byte(whitespace)byte(;)
    that mean introducing byte whitespace value and byte ; value to separate different columns and different rows.
    Now i have to develop inverse routine,that has to read the array of byte and rebuild its original format.
    Can you help me with some idea ord code?
    I'm inexepert...please help me with clear suggest...
    I post you my routine that converts txt file into an array of byte
    P.S.In my txt file number of columns and rows change for each file,what is standard is a firtst headline that is an array of string and others row with the same format string array of doubles....
    public byte[] getBytes(){
              byte middlerow=' ';
              byte endrow=';';
              Vector temp=new Vector(10000000);
              int i=0;     
              String g=null;
              Riga r;
              Double val[];
              while(i<intest.length){
                   //copio tutto nell'array di byte
                   byte []bytes = intest.getBytes();
    //               memorizza in byte un elemento del vettore alla volta
                   for( Byte aByte : bytes ) {
                   temp.addElement( aByte );
                   temp.addElement( Byte.valueOf( middlerow ) );
                   i++;
              temp.addElement(Byte.valueOf(endrow));
              System.out.println("Intestazione convertita in byte");
              for(int l=0;l<rows.size()-1;l++){
                   r=(Riga)rows.get(l);
                   g=r.getgeneid();
              temp.addElement(g.getBytes());
              temp.addElement(Byte.valueOf(middlerow));
              val=r.getvalues();
              for(int e=0;e<=val.length-1;e++){
              temp.addElement(Byte.valueOf(val[e].byteValue()));
              //val[e].byteValue() fa il casting double in byte
              temp.addElement(Byte.valueOf(middlerow));
         temp.addElement(Byte.valueOf(endrow));
              byte [] b=new byte[temp.size()];
              for (int k=0;i<temp.size();i++){
                   b[k]=(((Byte)temp.elementAt(k)).byteValue());
              return b;
    Thanks for your help...

    Ahh, how is the "array of bytes" being populated, Java code?
    If so which encoding are you using? When you create the bytes (from a string at a guess) the other end which encoding do you use?
    If you are using a db, why not use a db? Why this blob of data?
    If I really was banned from using the DB as a DB, and HAD (on pain of death) to use this wonky blob thing, I would do:
    Writing:
    ByteArrayOutputStream daos = new ByteArrayOutputStream() ;
    DataOutputStream dos = new DataOutputStream( daos );
    dos.writeUTF( "me String" );
    dos.writeDouble( 4.2 );
    dos.close;
    byte[] stickInUglyBlob = daos.toByteArray() ;
    Reading:
    DataInputStream dis = new DataInputStream( new ByteInputStream( blobOfUckyness ) );
    String meString = dis.readUTF();
    double meDouble = dis.readDouble();

  • How to return array of unsigned integer pointer from call library function node & store the data in array in labview

    I want to return array of unsigned integer from call library node.
    If anybody knows please help me
    Thanks & Regards,
    Harish. G.

    Did you take a look at the example that ships with LabVIEW that shows how to do all sorts of data passing to DLLs. I believe your situation is one of the examples listed. You can find the example VI in the "<LabVIEW install directory>\examples\dll\data passing" directory.

  • Search given string array and replace with another string array using Regex

    Hi All,
    I want to search the given string array and replace with another string array using regex in java
    for example,
    String news = "If you wish to search for any of these characters, they must be preceded by the character to be interpreted"
    String fromValue[] = {"you", "search", "for", "any"}
    String toValue[] = {"me", "dont search", "never", "trip"}
    so the string "you" needs to be converted to "me" i.e you --> me. Similarly
    you --> me
    search --> don't search
    for --> never
    any --> trip
    I want a SINGLE Regular Expression with search and replaces and returns a SINGLE String after replacing all.
    I don't like to iterate one by one and applying regex for each from and to value. Instead i want to iterate the array and form a SINGLE Regulare expression and use to replace the contents of the Entire String.
    One Single regular expression which matches the pattern and solve the issue.
    the output should be as:
    If me wish to don't search never trip etc...,
    Please help me to resolve this.
    Thanks In Advance,
    Kathir

    As stated, no, it can't be done. But that doesn't mean you have to make a separate pass over the input for each word you want to replace. You can employ a regex that matches any word, then use the lower-level Matcher methods to replace the word or not depending on what was matched. Here's an example: import java.util.*;
    import java.util.regex.*;
    public class Test
      static final List<String> oldWords =
          Arrays.asList("you", "search", "for", "any");
      static final List<String> newWords =
          Arrays.asList("me", "dont search", "never", "trip");
      public static void main(String[] args) throws Exception
        String str = "If you wish to search for any of these characters, "
            + "they must be preceded by the character to be interpreted";
        System.out.println(doReplace(str));
      public static String doReplace(String str)
        Pattern p = Pattern.compile("\\b\\w+\\b");
        Matcher m = p.matcher(str);
        StringBuffer sb = new StringBuffer();
        while (m.find())
          int pos = oldWords.indexOf(m.group());
          if (pos > -1)
            m.appendReplacement(sb, "");
            sb.append(newWords.get(pos));
        m.appendTail(sb);
        return sb.toString();
    } This is just a demonstration of the technique; a real-world solution would require a more complicated regex, and I would probably use a Map instead of the two Lists (or arrays).

  • Array of Cluster with event structure

    Hi,
    I am having Array of cluster with cluster having 1 String Control , 1 Combo box, 1 Led control and 2 Numeric control. In the combo box i am having two options to select ('Binary' and 'PWM').Whenever Binary is selected then Led control has be enabled and whenever PWM is selected 2 Numeric control has to be enabled.
    Is there any way to do this??
    Pleas help me...
    Regards
    Meenatchi

    actually in my application, the front panel has to have 16 rows of controls (1 string control, 1 combo box, 1 Led control, 2 numeric control).so i planned to keep all those controls in a cluster and create one array.If i didnt so i will have 16x5 controls in my front panel and i have to put 16 event cases for each combo box to do the enable and disable of controls..
    is there any simple way to do this..i have attached my front panel view
    Attachments:
    Untitled10.vi ‏139 KB

  • User event for array of waveforms with attribute

    I have been transferring data in a Producer/Consumer architecture via User Events.  The data consisted of an array of waveforms. When I added an attribute to the waveforms the code breaks with two errors about Create User Event: User event data type is unnamed or has elements with no names or duplicate names, and Contains unwired or bad terminal.
    From reading the help on user events it is not clear that arrays are even allowed: "user event data type is a cluster of elements or an individual element whose data type and label define the data type and name of the user event."
    From experimentation it seems that arrays of numerics and arrays of wavefroms without attributes work. A single waveform with an attribute can also be used. But an array of the same waveform with attribute leads to a broken run arrow. It also appears that I can put the array of waveforms with attributes inside a cluster and then create the user event.
    Is this a bug, an undocumented corner case, or some "feature" that I do not understand?
    Searching for User Event for Array of Waveforms generates some interesting, but mostly irrelevant results.
    Lynn

    tst wrote:
    Another option would be typecasting, but it looks like you can't typecast a waveform. Variant to Data or Coerce to Type might also work, but I haven't tried.
    I have also done the Flatten To String and Unflatten From String to send data around.  It would be preferable to not need to do that though.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How much money would i get back if i returned a droid razer with nothing wrong to it

    how much money will I get back if I return a droid razor with nothing wrong with it

        Hi julann37!
    Are you looking to sell your Droid RAZR? Do you have another device besides that one to use? You can visit http://vz.to/1mfkksD to check the value.
    Thanks,
    ChristinaB_VZW
    Follow us on Twitter @VZWSupport

  • How to return an internal table with methods ?

    Hi,
    I am an Java programmer and very new to ABAP.
    How do I return a internal table with a method? I have the table GP1_PRODUCTS and want to return a copy of this table as an internal table called PRODUCTS.
    Here is my code that does not work:
    class PRODUCTS definition
      public
      final
      create public .
    public section.
    *"* public components of class PRODUCTS
    *"* do not include other source files here!!!
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type GP1_PRODUCTS .
    protected section.
    *"* protected components of class PRODUCTS
    *"* do not include other source files here!!!
    private section.
    *"* private components of class PRODUCTS
    *"* do not include other source files here!!!
    ENDCLASS.
    CLASS PRODUCTS IMPLEMENTATION.
    * <SIGNATURE>---------------------------------------------------------------------------------------+
    * | Instance Public Method PRODUCTS->GET_PRODUCT_LIST
    * +-------------------------------------------------------------------------------------------------+
    * | [<-()] PRODUCTS                       TYPE        GP1_PRODUCTS
    * +--------------------------------------------------------------------------------------</SIGNATURE>
    method GET_PRODUCT_LIST.
    DATA: it_products TYPE STANDARD TABLE OF GP1_PRODUCTS.
    select * from GP1_PRODUCTS into table it_products.
    PRODUCTS = it_products.
    endmethod.
    ENDCLASS.

    You have to create a table type for your table GP1_PRODUCTS.
    If you use global class (created in SE24), than:
    Create a Table Type in SE11
    Go to SE11, Enter a name like ZPRODUCTS in the Data Type
    There will be popup when you press the Create button to decide a type. Select the Table Type
    Enter  GP1_PRODUCTS  in the Line Type.
    * method declaration
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type ZPRODUCTS.
    If you use local class:
    TYPES: ty_products type standard table of GP1_PRODUCTS..
    * method declaration
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type ty_products
    Regards,
    Naimesh Patel

Maybe you are looking for

  • QSS WONT OPEN IN BROWSER---UPGRADED TO 10.3.9 FROM 10.2 NOW NO WORK

    ERROR MSG:: Safari can't open the page "http://127.0.0.1:1220/" because it could not connect to the server "127.0.0.1". does anyone have any idea bout this???????? using for streaming live audio, and my music qss (darwin streaming server) version dow

  • NoSuchMethodError in EJBHomeImpl.findBy() methods

    Hi All, I've searched all past entries relating to java.lang.NoSuchMethodError, but most responses have suggested mere typo errors or, at most, the presence of multiple jars during deployment. I've checked that this is not what happens to my BMP, but

  • Trojan found in Lion and on iPhone 4 backup

    I recently installed MacKeeper on my Mac and Pc's I have been having major issues with Lion - see my discussion  there - But tonight it found a Trojan in my Users/dr/App Support/MobileSync/Backup file  - This was as I was restoring my iphone 4 from t

  • DNL_CUST_BASIS Delta Download

    Is there a delta download for DNL_CUST_BASIS.  We have one for currency, have not been able to find any others.

  • Reinstalling Aperture on New Hard Drive (Downloaded Copy)

    Hello, I have an activated and legitimate copy of Aperture 2.1.2 (with serial number). I will be installing a new hard drive into my Mac Pro at the weekend and doing a clean install of Leopard. 1) do I just download the trial version of Aperture and