Missing Data in Table passed as Function Parameter

I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system.
Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tables before sending.
The no. of rows in the table is 0 always on the JCO side. I tried to dunp the content of the Function & Table with writeHTML() & it shows no data too.
I am able to pass simple strings & integers, but the tables doesn't work. Can anyone tell me where might be the problem.

Hi,
   I am bit confused, You are not getting the data in the Function module when you make a call from Java or the data returned by the function module is not reaching the Java side. If you are not getting the data which you pass from java in the function module then I have faced this problem before.
In that case the problem was when you pass data as table parameters to the function module you have to check the size of table parameter I was using INITIAL to check if there is any data in the table parameter. If this is the same problem may be by checking the size of the table will solve your problem.
Regards,
Sesh

Similar Messages

  • Missing Data in JCO.Table passed as Function Parameter

    I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system.
    Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tables before sending.
    The no. of rows in the table is 0 always on the JCO side. I tried to dunp the content of the Function & Table with writeHTML() & it shows no data too.
    I am able to pass simple strings & integers, but the tables doesn't work. Can anyone tell me where might be the problem.

    Can you post the code you have used !

  • Find out missing dates in table

    Hi,
    I've a table that sould have a record for day with sales info, but for some reason there are missing dates, is there any way i could find out witch dates are missing.
    Table Example:
    sales_date | value
    2010-01-01 | 20
    2010-01-02 | 30
    2010-01-04 | 40
    The output of the query for the example above sould return only the missing date (2010-01-03).
    Thanks in advance

    How about (I wouldn't use this if your concerned about speed!)...
    WITH src_data
           AS (SELECT TO_DATE('2010-01-01', 'YYYY-MM-DD') sales_date FROM DUAL
               UNION ALL
               SELECT TO_DATE('2010-01-02', 'YYYY-MM-DD') sales_date FROM DUAL
               UNION ALL
               SELECT TO_DATE('2010-01-04', 'YYYY-MM-DD') sales_date FROM DUAL),
        date_table
           AS (SELECT     LEVEL, MAX(sales_date) - LEVEL + 1 my_date
               FROM       src_data
               CONNECT BY LEVEL <=
                             (SELECT MAX(sales_date) - MIN(sales_date) + 1
                              FROM   src_data)
               GROUP BY   LEVEL
               ORDER BY   my_date ASC)
    SELECT *
    FROM   date_table
    WHERE  NOT EXISTS (SELECT 1
                       FROM   src_data
                       WHERE  sales_date = my_date)Cheers
    Ben

  • File to RFC - Missing data in table parameter

    Hello,
    I have a file-to-rfc scenario.  My RFC function contains both inbound parameters and a table parameter.
    When the RFC function is called, my data is passed correctly to the inbound parameters, however the
    table is empty.  I have tested my mapping and it is working properly.  I have also check the
    payload and all the data is there including the table data. 
    Has anyone run across this before?
    I would appreciate any help.
    Thank you.

    in MONI you have any error??
    in the R3 side, insert  this code:
    DATA: i_aux type i Value 1.
    While i_aux = 1.
    endwhile.
    execute your scenario. later go to SM50 ans look for your process and debug it. now in debug mode check wether the parameters from PI reach to RFC.
    if the parameters does not reach and there no any connection problem you have configure bad your connection parameters. check wether the connection parameter of RFC adapter are rigth in ID: Client,Server
    is it Clear??
    Thanks
    Rodrigo
    Thanks
    Rodrigo.

  • Can someone explain the tables tab under function parameter declaration ?

    Hello,
    when declaring a function, part of its parameter interface is the tables tab. So if in FUNCTION1 i  declare a table: tdraw like draw  (optional)
    what does that mean ? does this mean that tdraw will be a table of type draw and at the same time it will be filled up with the same contents as draw has ?
    then how can other function (func2) use FUNCTION1 and its table ?
    so if inside func2  i also have an internal table AA like draw :
    so inside func2 i say:
    call function1
    tables:tdraw = AA
    does this mean that it will assign the result tdraw table of function1 to AA ?
    can someone explain details of internal tables and passing them as parameters ?
    and which table is assigned to which ?
    thank you

    Hi hassan,
    If you are talking about the tables parameter in SE37, when you declare a table tdraw like draw it only means you are declaring an internal table of type draw but the contents are not filled into it.
    In the source code of the program you have to write the code to fetch the data to tdraw and do the manipulations accordingly.
    Also, the tables you are declaring can be like the input table or can be used for output table.
    suppose u have 2 tables tab1 and tab2, tab1 you are going to input the values to it and the calculated values have to be in another table, you can use tab2 as the result table.
    hope it helps.
    award points if it helps.

  • Polling for new Data in Tables with SQL-functions

    Hi
    In my table I have 2 columns:
    event_state : integer (0 = unread, 1 = read)
    min_process_time : date
    In the DB-Adapter-Wizard I can configure my event_state-Field for using as logical delete field. In the SQL-Query there is a
    ... WHERE event_state=0
    But, I only want to query all new entries in this table, where
    min_process_time > SYSDATE.
    How can I configure my toplink-mapping, that SYSDATE can be used in the polling-query? If I use plain-sql instead of the expression from the Wizard (last page), then this sql-statement is ignored. In an expression I only can use a constant-value.
    Any idea?
    Thanks
    Gregor

    Hi
    I am creating a database Polling (logical delete OPEN to CLOSED) adapter that polls a table for records which have a "SCHEDULED" date field.
    The Polling Adapter should pick up those records where the status is OPEN and SCHEDULED<=SYSDATE.
    DB Adapter wizard does not allows this where clause(SCHEDULED<=SYSDATE) to be set; so i tried modifying the Toplink SQL with custom SQL. But it does not works. Please suggest a workaround.
    Please help.
    Thanks
    Debashis

  • Nameless Nested Classes passed in Function Parameter?

    I am trying to get my head around the following code example:
    javax.swing.SwingUtilities.invokeLater( new Runnable() { public void run() { createAndShowGUI(); }});What is actually getting passed to the SwingUtilities.invokeLater() function?
    Can anyone explain all of the parts and pieces of :
    new Runnable() { public void run() { createAndShowGUI(); }} ?
    Here is my best guess:
    1) { public void run() { createAndShowGUI(); }} is an unnamed nested class that is instantiated using the Runnable() interface.
    2) this class has one method called run() that executes createAndShowGUI();
    Is my best guess even close to what is really going on?

    richard.broersma wrote:
    1) { public void run() { createAndShowGUI(); }} is an unnamed nested class that is instantiated using the Runnable() interface.Yes, that's essentially correct. It's called an anonymous inner class.
    This is similar to doing
    // a non-anonymous inner class
    private class MyClass implements Runnable
      public void run()
        createAndShowGUI();
    MyClass myclass = new MyClass();
    javax.swing.SwingUtilities.invokeLater(myclass);
    2) this class has one method called run() that executes createAndShowGUI();Yes. It must have a parameterless public void run method since it implements the Runnable interface.
    Is my best guess even close to what is really going on?Yes, you're catching on.

  • Can I pass a table function parameter like this?

    This works. Notice I am passing the required table function parameter using the declared variable.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(@Date) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date
    But I guess you can't do this?... because I'm getting an error saying h.SomeDate cannot be bound. Notice in this one, I am attempting to pass in the table function parameter from the SomeTable it is joined to by ID.
    DECLARE @Date DATE = '2014-02-21'
    SELECT
    h.*, i.SomeColumn
    FROM SomeTable h
    LEFT OUTER JOIN SomeTableFunction(h.SomeDate) I ON i.ID = h.ID
    WHERE h.SomeDate = @Date

    Hi
    NO you cant pass a table function parameter like this?
    As When you declare @date assign value to it and pass as a parameter it will return table which you can use for join as you did it in first code 
    But when you pass date from some other table for generating table from your funtion it doesnt have date as it is not available there
    Ref :
    http://www.codeproject.com/Articles/167399/Using-Table-Valued-Functions-in-SQL-Server
    http://technet.microsoft.com/en-us/library/aa214485(v=sql.80).aspx
    http://msdn.microsoft.com/en-us/library/ms186755.aspx
    https://www.simple-talk.com/sql/t-sql-programming/sql-server-functions-the-basics/
    http://www.sqlteam.com/article/intro-to-user-defined-functions-updated
    Mark
    as answer if you find it useful
    Shridhar J Joshi Thanks a lot

  • Pass table name as a parameter to function

    Is there a way to pass table name as a parameter to functions? Then update the table in the function.
    Thanks a lot.
    Jiaxin

    Hi, Harm,
    Thank you very much for your suggestion and example. But to get my program work, i need to realise code like follows:
    CREATE OR REPLACE FUNCTION delstu_func(stuno char) RETURN NUMBER AS
    BEGIN
    EXECUTE IMMEDIATE 'DELETE FROM student s' ||
    'WHERE' || 's.student_number' || '=' || stuno;
    LOOP
    DBMS_OUTPUT.PUT_LINE('record deleted');
    END LOOP;
    END;
    SELECT delstu_func('s11') FROM STUDENT;
    The intention is to check if such a function can perform operations such as update, delete and insert on occurence of certain values. When executing the above statement, the system returns an error message:
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    ORA-06512: at "SCMJD1.DELSTU_FUNC", line 3
    Could you tell me where is wrong?
    Jiaxin

  • How to get data from table to pass into alvgrid function module

    i want to get some data from below table to pass into function module of alvgrid
    how can i get data please help.
    thanks in advanced.
    form get_data.
    select * into corresponding fields of table itab
             from  J_1IEXCHDR
                     inner join  J_1IEXCDTL
                        on  J_1IEXCDTLlifnr =  J_1IEXCHDRlifnr
                     where  J_1IEXCHDr~status = 'P'.
       append itab.
    endform.

    Pass your final table(internal table which you want to display) along with fieldcatalog to FM reuse_alv_grid_display.:\
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = i_repid
       IT_SORT               = gt_sort
          it_fieldcat        = lt_fieldcat[]
        TABLES
          t_outtab           = lt_final
        EXCEPTIONS
          program_error      = 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.

  • Select-option parameter passed to function module

    hi,
    I have passed the select-option parameter as a table to my function module,
    suppose i have passed it as date(it contains field date-high and date-low)
    In my function module while i am looping the table and selecting the data according to date_low,it is going to select only the data according to date_low.
    since the table contains only one row.
    loop at date.
    select the data according to date_low.
    date_low = date_low +1.
    modify date_low.
    endloop.
    how can i select all the data from date_low and date_high?

    Hi,
    there is issue  design of ur FM .
    You have to put 2 table parametrs or 2 import paremeters in the FM ,after that with in the Function module fill the internal table of type ranges (say itab).
    After filling the ranges internal table, this can be used in ur select stament just as select option ( select ...where podat in itab)
    revrt back if any issues.
    regards,
    Naveen

  • Error in Java Program when passing table to RFC function . JCO is used

    Hai All,
    I developed a JAVA application to update data into SAP using JCO via RFC. When i pass table to the function module i am getting the below error
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Conversion from type T to D not supported.
    Please let me know how to solve this.
    Below is my code
    IRepository m_Repository;
    IFunctionTemplate ftemplate;
    JCO.Table PwdReq;
    JCO.Function function;
    m_Repository = JCO.createRepository("MYRepository", client);
                ftemplate = m_Repository.getFunctionTemplate("Z_GESEFM_UPD_PWD_RESET_REQUEST");
    // Create a function from the template
    function = new JCO.Function(ftemplate);
    // Feeding in input parameters
    PwdReq = function.getTableParameterList().getTable("RESULT2");
    String userid = "PATCHTEST14 ", reqDate = "",reqNo = "01",reqStatus = "03", boxID = "09",ind2 = "X",
                        lcode = "abcd",rem = "One record testing";
    PwdReq.appendRow();
                    PwdReq.setValue(userid, "USERID");
                    PwdReq.setValue(reqNo,"REQ_NO");
                    PwdReq.setValue(reqStatus,"REQ_STATUS");
                    PwdReq.setValue(boxID,"BOX_ID");
                    PwdReq.setValue(ind2,"IND2");
                    PwdReq.setValue(lcode,"LCODE");
                    PwdReq.setValue(rem,"OTHER_REMARKS");
                // execute the function with the input parameters
                client.execute(function);
    Thanks & Regards,
    H.K.Hayath Basha.

    hi,
    I am not very good in Java.
    but try this code to giving input parameter.
    function.getImportParameterList().setValue(userid, "USERID");
    if you are not using Try and Catch blok then use Try and Catch blok,
    Regards
    Manoj

  • Pass rowtype as function parameter, as a Object like type. How?

    Hi.
    I have the following question.
    I have 3 tables:
    TAB1
    TAB2
    TAB3
    I declare 3 rowtypes variables, one for each table:
    v_tab1 TAB1%ROWTYPE;
    v_tab2 TAB2%ROWTYPE;
    v_tab3 TAB3%ROWTYPE;
    I want to pass a rowtype as a function parameter, but i want the function to allow any rowtype to be passed as parameter, and then inside the function convert that "object" to the correct rowtype.
    Is that possible?
    In another language like C# for example, i would pass the rowtype as a object type, and then cast it to the correct data type.
    I hope you can help me.
    Cheers.

    To do this they would have to be object types, and have a common supertype.Alternatively unrelated object types could be abstracted away with ANYDATA.
    There is no such functionality exposed / documented for records - although the signatures of several built-in packages suggest that a mechanism for passing ADTs as formal parameters does actually exist.

  • How to pass "EnterpriseManagementObject" Type as Function parameter?

    Hello, dear Colleagues.
    I'm trying to  pass "EnterpriseManagementObject" as Function parameter.
    Here is the piece of code:
    $SCSM = 'SERVER_NAME'
    function Add-Comment {
    param (
    [parameter(Mandatory=$true,Position=0)][Alias('Id')][String]$pSRId,
    [parameter(Mandatory=$true,Position=1)][Alias('Comment')][String]$pComment,
    [parameter(Mandatory=$true,Position=2)][Alias('EnteredBy')][String]$pEnteredBy,
    [parameter(Mandatory=$true,Position=3)][Alias('IsAnalyst')][Bool]$AnalystComment,
    [parameter(Mandatory=$true,Position=4)][Alias('IRObject')][EnterpriseManagementObject]$IRObject
    if ($IRObject) {
    $NewGUID = ([guid]::NewGuid()).ToString()
    if ($AnalystComment)
    $Projection = @{__CLASS = "System.WorkItem.Incident";
    __SEED = $IRObject;
    AnalystComments = @{__CLASS = "System.WorkItem.TroubleTicket.AnalystCommentLog";
    __OBJECT = @{"Id" = $NewGUID;
    Comment = $pComment;
    DisplayName = $NewGUID;
    EnteredBy = $pEnteredBy;
    EnteredDate = (Get-Date).ToUniversalTime();
    IsPrivate = $false
    New-SCSMObjectProjection -Type System.WorkItem.IncidentPortalProjection -Projection $Projection -ComputerName $SCSM -ErrorAction stop
    } else {
    Write-Host $pSRId "could not be found"
    $IncidentClass = Get-SCSMClass -name System.WorkItem.Incident$ -ComputerName $SCSM
    $Incident = Get-SCSMObject -Class $IncidentClass -Filter "name -eq $c" -ComputerName $SCSM
    Add-Comment -Id $c -Comment $text -EnteredBy $name -IsAnalyst $False -IRObject $Incident -ErrorAction stop
    With GetType() I watched $Incident is "EnterpriseManagementObject":
    IsPublic IsSerial Name BaseType
    True True EnterpriseManagementObject Microsoft.EnterpriseManagement.Common.EnterpriseManagementObjectBaseWithProperties
    But PS script returns error TypeNotFound:
    Add-Comment : Unable to find type [EnterpriseManagementObject]. Make sure that the assembly that contains this type is loaded.
    At C:\script.ps1:146 char:13
    + Add-Comment -Id $c -Comment $text -EnteredBy $name -IsAnalyst $True ...
    + ~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (EnterpriseManagementObject:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound
    Is there a way to  pass "EnterpriseManagementObject" as Function parameter?
    Thanks.

    First of all the error indicates that you haven't loaded the assembly which contains the class you're trying to load.
    Try loading the assembly by running:
    [Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.Core") | Out-Null
    Secondly if you want to use type based parameters restrictions you should use full type name, which can be found with the command:
    $SomeObject.GetType().FullName
    You should end up with: Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject

  • TO_DATE - How do I pass the date and time to the function

    Hi,
    I am writing a PL/SQL code. The code has a simple cursor,
    For the criteria, I am using a column called 'created' which is a date column, and the to_date function.
    I would like to pass the date and time to the to_date fuction as a parameter, date_value, as shown below.
    CURSOR opty is
    select a.name, a.id
    from s_opty a
    where a.created > to_date(date_value, 'DD/MM/YYYY HH24:MI:SS');
    I've tried declaring a bind variable,
    date_value date := '&1'
    but no joy.
    Any ideas would be welcomed.
    Thanks in antcipation
    Mukesh

    Can this help you?
    SQL> create or replace procedure sample_proc
      2  as
      3  cursor c1(v_value varchar2) is
      4          select 'YES' from dual
      5            where trunc(sysdate) = trunc(to_date(v_value, 'DD/MM/YYYY HH24:MI:SS'));
      6  v_char varchar2(10);
      7  begin
      8     open c1('08/03/2006 11:35:20');
      9     fetch C1 into v_char;
    10     dbms_output.put_line('Is it today''s date?> '||v_char);
    11     close c1;
    12  end;
    13  /
    Procedure created.
    SQL> begin
      2    sample_proc;
      3  end;
      4  /
    Is it today's date?> YES
    PL/SQL procedure successfully completed.
    SQL> If you are not very particular about the time, you can use TRUNC on both sides like :
    where trunc(a.created) > trunc(to_date(date_value, 'DD/MM/YYYY HH24:MI:SS'));Cheers
    Sarma.

Maybe you are looking for

  • Scroll bar moved layout slightly to left

    If content on ALL of my site either did or didn't require a scroll bar, the transitions when clicking from page to page would all look smooth. Unfortunately I have some pages that are short (and so the browser displays no display bar) and other pages

  • Connecting iphone 4s to lapto

    when i connect my iphone 4s into the usb on my laptop it isnt being recognised by the laptop/itunes and isnt even charging. it used to work but for some reason wont now and i have tried two different usb leads??

  • Android team

    I have a Samsung Galaxy S5. I do not know how to delete contacts in cloud b4 I sync n back up. long story but they doubled. can you help please

  • Installing Windows 7 through bootcamp with new iMac

    I was able to get to the partition and the Windows 7 installer.  Once the installation process began, it immediately asked me for drivers.  I browsed the usb drive that bootcamp created but could not find anything to keep the installation process pro

  • Facing problem while migrating sap scripts

    Hi all, My scenario is to migrate the script from one server to another server using the program RSTXSCRP. Iam able to import the txt file,iam getting message that "Object imported and activated". But when i try to open the same form in se71,its givi