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 !

Similar Messages

  • 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

  • Insert old missing data from one table to another(databaase trigger)

    Hello,
    i want to do two things
    1)I want to insert old missing data from one table to another through a database trigger but it can't be executed that way i don't know what should i do in case of replacing old data in table_1 into table_2
    2)what should i use :NEW. OR :OLD. instead.
    3) what should i do if i have records exising between the two dates
    i want to surpress the existing records.
    the following code is what i have but no effect occured.
    CREATE OR REPLACE TRIGGER ATTENDANCEE_FOLLOWS
    AFTER INSERT ON ACCESSLOG
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    V_COUNT       NUMBER(2);
    V_TIME_OUT    DATE;
    V_DATE_IN     DATE;
    V_DATE_OUT    DATE;
    V_TIME_IN     DATE;
    V_ATT_FLAG    VARCHAR2(3);
    V_EMP_ID      NUMBER(11);
    CURSOR EMP_FOLLOWS IS
    SELECT   EMPLOYEEID , LOGDATE , LOGTIME , INOUT
    FROM     ACCESSLOG
    WHERE    LOGDATE
    BETWEEN  TO_DATE('18/12/2008','dd/mm/rrrr') 
    AND      TO_DATE('19/12/2008','dd/mm/rrrr');
    BEGIN
    FOR EMP IN EMP_FOLLOWS LOOP
    SELECT COUNT(*)
    INTO  V_COUNT
    FROM  EMP_ATTENDANCEE
    WHERE EMP_ID    =  EMP.EMPLOYEEID
    AND    DATE_IN   =  EMP.LOGDATE
    AND    ATT_FLAG = 'I';
    IF V_COUNT = 0  THEN
    INSERT INTO EMP_ATTENDANCEE (EMP_ID, DATE_IN ,DATE_OUT
                                ,TIME_IN ,TIME_OUT,ATT_FLAG)
         VALUES (TO_NUMBER(TO_CHAR(:NEW.employeeid,99999)),
                 TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'),       -- DATE_IN
                 NULL,
                 TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'),      -- TIME_IN
                 NULL ,'I');
    ELSIF   V_COUNT > 0 THEN
    UPDATE  EMP_ATTENDANCEE
        SET DATE_OUT       =  TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_OUT,
            TIME_OUT       =   TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_OUT
            ATT_FLAG       =   'O'
            WHERE EMP_ID   =   TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
            AND   DATE_IN <=  (SELECT MAX (DATE_IN )
                               FROM EMP_ATTENDANCEE
                               WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
                               AND   DATE_OUT IS NULL
                               AND   TIME_OUT IS NULL )
    AND   DATE_OUT  IS NULL
    AND   TIME_OUT IS NULL  ;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END ATTENDANCEE_FOLLOWS ;
                            Regards,
    Abdetu..

    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;Regards,
    Christian Balz

  • A field is given data type is Table icon in Function Module

    Hi Experts,
    I am developing HCM Reports for that I have one Function Module to retrive data from Source.
    One of my Requirement is to Display One of the fields below
    Field Name:
    Sucessfull Candidate
    Vijay
    Raju
    Ram
    to display like this in my Function Module this fields Data Type is selected Table Icon
    I think because of this the field Sucessfull Candidate is not display in Data Sources.
    quires:
    1. what is the procedure to get data in Reporting like above requirement.
    2. what I will do to appairing the field in Data sources
    3.any changes in Function Module
    Regards
    Vijay

    thanks for all participants

  • Missing Date fields in table maintenance generation

    I have some non-key date fields in my custom table and have noticed that they do not get generated on the overview screen of my two-step table maintenance dialog. They are present on the detail screen.
    If I change the domain of the fields to CHAR they appear.
    If I change the maintenance type to one-step they appear.
    It seems it is standard behaviour for date fields to be omitted from the overview screen.
    Can anyone confirm that this is standard behaviour or give an explanation for date fields being treated in this manner?...or come up with a way of including the fields on the header screen.
    I already know that I can:
    1. customize the screen to include the fields
    2. create a non-date domain for the fields which uses date-type calendar dropdown
    Thanks,
    Neil

    Thankyou Jonathan, I would have been too lazy to go into debug if I didn't have the form name you supplied! It wasn't the reason you suspected but it was failing the following check in that routine:
    maintenance in list screen required?
          CHECK p_tvdir-type = one_step_maint OR
           ( <w_dfies>-keyflag NE space    "force only keyfields
            OR ( 'CHARNUMC' CS <w_dfies>-datatype     "and view char-fields
             AND p_skip_fields = space )
            OR ( 'CHARNUMC' CS <w_dfies>-datatype     "and view char-fields
             AND <w_dfies>-intlen GE 20 )       "int 3263961/2000
            OR <w_dfies>-rollname = 'BEGDA'    "time dependence
            OR <w_dfies>-rollname = 'ENDDA'    "time dependence
            OR <w_dfies>-tabname NE p_gencb-viewname ). "or text table field
    Because the datatype was DATS.......looks like it will only include key fields and CHAR, NUMC non-key fields or those with a rollname of BEGDA/ENDDA or texttable fields. In debug I changed the datatype to CHAR and it generated with my field included. I think there might be an OSS note to fix this but haven't found it yet.

  • Find missing data from parent table

    hI,
    PLEASE IGNORE ABOVE STATEMENT JUST NOW GOT THE RESULTS
    SELECT c.table_name CHILD_TABLE, p.table_name PARENT_TABLE
    FROM user_constraints p, user_constraints c
    WHERE (p.constraint_type = 'P' OR p.constraint_type = 'U')
    AND c.constraint_type = 'R'
    AND p.constraint_name = c.r_constraint_name
    AND c.table_name = UPPER('ODS_TSAF_MES_PC');
    and output is
    child table                     parent table
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PCTYP
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PCSTAT
    i tried
    SELECT A.piecestatus from ods_TSAF_MES_PCSTAT  A
    WHERE NOT EXISTS
       (SELECT * FROM ODS_TSAF_MES_PC B WHERE B.piecestatus = A.piecestatus);
    and i found one piecestatus values is 'I' but i am not getting where it is related to the table  and in which row it is getting affected?
    want to know which row is getting affected
    thanks

    sorry
    hI,
    I have executed the query to find parent child relationship and got the results
    SELECT c.table_name CHILD_TABLE, p.table_name PARENT_TABLE
    FROM user_constraints p, user_constraints c
    WHERE (p.constraint_type = 'P' OR p.constraint_type = 'U')
    AND c.constraint_type = 'R'
    AND p.constraint_name = c.r_constraint_name
    AND c.table_name = UPPER('ODS_TSAF_MES_PC');
    and output is
    child table                     parent table
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PCTYP
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PC
    ODS_TSAF_MES_PCSTAT
    now i wanted to find which exactly row is missing in parent or child table so i executed below mentioned query
    SELECT A.piecestatus from ods_TSAF_MES_PCSTAT  A
    WHERE NOT EXISTS
       (SELECT * FROM ODS_TSAF_MES_PC B WHERE B.piecestatus = A.piecestatus);
    and i found one piecestatus values is 'I' but i am not getting where it is related to the table  and in which row it is getting affected?
    want to know which row is getting affected
    thanks

  • 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.

  • Extracting Multiple Table Data Dynamically..Table is an Input parameter

    Hi All
    Can any one update the Program/design of extracting multiple table data as a list or to an excel sheet
    For eg:- Mutliple Tables are entered in selection screen and upon executing the output should be to an excel sheet sequenctially according to the table names entered in the selection screen
    Awaiting for your update
    Regards
    Shiva
    Edited by: shivakumar bandari on May 29, 2009 9:35 PM

    HI Naimes
    Thanks for youe reply
    your second step says to select data from 'table' here tables are dynamic in nature I mean they are an input parameters..how can I write select on a table..
    I can get the table existence from DD02L table and pass the retrieved tables to FM Get_Component_List to get the fields existing for the particular table,
    But I cannot pass the dynamic table value to select query to retrieve the data..Please update me if you have anything on retrieving data from dynamically inputted value
    Can I do this
    Select * from <dyntable>
    Any suggestions will be appreciated
    thank you

  • 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.

  • To upload a data into SAP Table with the help of RFC function in BODS

    Hi,
    Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
    I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
    In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
    I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
    but it did not help me.
    Thanks,
    Abhishek

    Hi Abhishek,
    Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
    Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
    After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
    I hope this helps.
    Jan.

  • ERM / composite role gener. / Function parameter "Authority_check" unknown

    Dear All GRC AC Women and Men,
    I have a problem to generate a composite role with sap grc ac erm. My GRC version is a 5.3 sp5
    For single roles, it s ok.
    For composite roles, I to a first generation in GRC AC ERM . The error  message is: "Function parameter "AUTHORITY_CHECK" is unknown."
    The role is generated in the back-end and the status in GRC AC ERM is "in progress" (Yellow colour).
    I do a second generation in GRC AC ERM, and the status is "done" (green colour); the role is generated one more time in the back-end.
    The message error in ERM logs is:
    "2010-03-18 15:48:48,393 [Thread-140] ERROR com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Function parameter "AUTHORITY_CHECK" is unknown.
    java.lang.Throwable: Function parameter "AUTHORITY_CHECK" is unknown.
         at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:516)
         at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1514)
         at com.sap.mw.jco.JCO$Client.execute(JCO.java:3980)
         at com.sap.mw.jco.JCO$Client.execute(JCO.java:3417)
         at com.virsa.re.service.sap.dao.GenerateRoleDAO.generateRole(GenerateRoleDAO.java:564)
         at com.virsa.re.bo.impl.GenerateRoleBO.generateRoleAsBackGroundOnMultipleSystems(GenerateRoleBO.java:484)
         at com.virsa.re.backgroundjobs.RiskAnalysisAndRoleGeneration.execute(RiskAnalysisAndRoleGeneration.java:238)
         at com.virsa.service.backgroundjobs.BackgroundTask.run(BackgroundTask.java:53)
         at java.util.TimerThread.mainLoop(Timer.java:432)
         at java.util.TimerThread.run(Timer.java:382)"
    Do you know the origine of this problem? I am "quite" sure that it is not a back-end problem like authorisations missing for the user rfc (used in Jco).
    Best Regards,
    Ronan.

    Hi Ronan,
    This is an issue identified and resolved in SP07.
    Please refere to Note # 1290039 if you don't want to upgrade to SP07.
    Best Regards,
    Sirish Gullapalli.

  • 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

  • How to delete the data in a table using function

    hi all,
    i need to delete the data in a table using four parameters in a function,
    the parameters are passed through shell script.
    How to write the function
    Thanks

    >
    But the only thing is that such function cannot be used in SQL.
    >
    Perhaps you weren't including the use of autonomous transactions?
    CREATE OR REPLACE FUNCTION remove_emp (employee_id NUMBER) RETURN NUMBER AS
    PRAGMA AUTONOMOUS_TRANSACTION;
    tot_emps NUMBER;
    BEGIN
    SELECT COUNT(*) INTO TOT_EMPS FROM EMP3;
    DELETE FROM emp3
    WHERE empno = employee_id;
    COMMIT;
    tot_emps := tot_emps - 1;
    RETURN TOT_EMPS;
    END;
    SQL> SELECT REMOVE_EMP(7499) FROM DUAL;
    REMOVE_EMP(7499)
                  12
    SQL> SELECT REMOVE_EMP(7521) FROM DUAL;
    REMOVE_EMP(7521)
                  11
    SQL> SELECT REMOVE_EMP(7566) FROM DUAL;
    REMOVE_EMP(7566)
                  10
    SQL>

  • How to pass the JCO Table and Structure in a collection List to frontEnd

    hi,
    I have a BAPI which is returns me a Table and a structure. As i have used JCO I will receive it in JCO Table and JCO Structure. Now the question is that how I should pass both these of these using a collection to the frontend for displaying the data from it.
    Thanks' & Regards,
    Samir

    Hi Samir,
    As you are trying to pass the Table and the Structure in the form of collection to the JSP page, you can create a javabean with the structure similar to that of the table/Structure.
    Lets assume you have a table called Employee with Emp_Name, Emp_Age, Emp_Sal as three columns, create a java class by name Employee which implements Serializable and attributes as Emp_Name, Emp_Age and Emp_Sal. Generate the setters and getters for the same. In your EJB code, create an instance of this Employee class and set the attributes and save it in a HashMap in the form of key value pair, Value being your Employee class instance and key be your Employee Name. Return the HashMap in your EJB code.
    Use the HashMap in your JSP. Get the Iterator for the HashMap and Loop through the keys to get the values.
    Hope this helps.
    Regards,
    Rekha Malavathu

  • 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

Maybe you are looking for

  • Calling Adobe Interactive Form from a selection screen

    Hi, I have to design an interactive adobe form online scenario,it goes like this : A certain tcode will call a selection screen when we enter values in the selection screen it will open an adobe form,which will have a submit button,on clicking the bu

  • I can't get my iPad calendar to sync with my iPhone calendar

    eeVen after syncing my systems and transferring iPhone data to iCloud, the iPad won't pick up the calendar info.  I've unchecked, restarted rechecked, et. But nothing appears on the iPad calendar.  Any suggestions?

  • Regularizing Purchase Orders

    There is now a situation where the materials are directly purchased from Vendors without purchase orders from system. But are later regularized with PO.My client also needs to differentiate between normal Po and such Regularization POs. What I though

  • Document manager error

    Hi I am getting Document manager exception(user-defined) in the standard oracle procedure PO_REQAPPROVAL_ACTION.VERIFY_AUTHORITY. Can anyone tell me why this error is coming as the approver authority is correct. thanks, SS

  • How I make make a ringtone in iTunes 12?

    can somebody help me with this issue?