Empty tables in ZCL_JSON_HANDLER

Hello,
I try to use your ZCL_JSON_HANDLER (JSON Adapter for ABAP Function Modules) in combination of a complex json string which contain parameters and a table. When I break in my function module I see that the function module accepted the parameters and have an empty table.
Can you tell me why the table is not filled in the function module?
This is the source I use:
createContent : function(oController) {
var inputParametersPss = {IV_PROCESS: "TEST",
IV_EVENT  : "TEST",
IV_WORK_ITEM : "",
IV_ROLE :   "TEST",
IV_OBJECT : "TEST",
IT_FORM_FIELD_VALUES:[{
fieldindex : 0,
fieldname  : "test",
fieldvalue : "a"
IT_ATTACHMENTS:[]
var oModel_test = new sap.ui.model.json.JSONModel();
// oModel_test.setData(data_test);
$.ajax({
url : "/entrada/json/zctr_entrada_pss_event_trigger?$format=json",
type: "POST", //or POST?
dataType: "json",
data : inputParametersPss,
success: function(data){
var jsonString = jQuery.parseJSON( data.OUTPUT );
data_test = jsonString;
oModel_test.setData(jsonString);     
alert(oModel_test.getJSON());
error: function(){alert("error")}
return new sap.m.Page({
title: "Title",
content: [
Import paramaters function module:
Kind Regards,
Richard

Hi Richard,
Using Jquery.ajax like in the example, jquery will try to convert the data to a query string, which is not obviously what we want.
In "data" there must be a correctly formed JSON string. You may try something like the following inside the $.ajax:
    data: JSON.stringify( inputParametersPss ),
    contentType: "application/json",
Setting a string in "data" should enconde it correctly and prevent jquery from trying to convert the data to a query string. If you want to be sure that data is not processed you may add:
    processData: false,
To the list of settings in the jquery call.
It is important that you set correctly the content type of the posted data. Otherwise, jquery sends it as a urlencoded string and this may cause confusion in the adaptor.
Thanks for asking.
Hope this helps,
         César.

Similar Messages

  • How to get list of block identifiers in a empty table and an empty index

    We have an application that has issue with ITL waits: this application is running many INSERT statements on a table that has 2 NUMBER columns and one primary key index. The application is designed to run INSERT statements but they are never committed (this is a software package).
    To check what are the really allocated ITL slots, I know that I can dump data block but I don't know how to get the block identifiers/numbers for an "empty" table and an "empty" index. Does someone knows how to do that ?
    PS: I already had a look to the Metalink notes and I have a Metalink SR for that but maybe OTN forum is faster ?

    You should be able to find the first data/index block with the following, even on an empty table/index.
    select header_file, header_block +1
    from dba_segments
    where segment_name = '<index or table name>';

  • Creating a manual tabular form on an empty table

    Hi all,
    I am trying to create a manual tabular form on an empty table. Is it possible to display textboxes and column headers, when I run the report I get "no data found".
    Regards,

    Hi Denes and thank you for your valuable input.
    My problem is in fact that, I have created the tabular form by using a report region with a SQL query, something like,
    select apex_item.display_and_save(1, p.bolge) bolge,
    apex_item.display_and_save(2, p.hafta) hafta,
    apex_item.display_and_save(3, p.yil) yil,
    apex_item.display_and_save(4, p.mamul) mamul,
    apex_item.display_and_save(5, p.tahmin1) tahmin1,
    apex_item.display_and_save(6, p.tahmin2) tahmin2,
    apex_item.display_and_save(7, p.tahmin3) tahmin3,
    apex_item.display_and_save(8, p.tahmin4) tahmin4,
    apex_item.display_and_save(9, p.tahmin5) tahmin5,
    apex_item.display_and_save(10, p.tahmin6) tahmin6,
    apex_item.display_and_save(11, p.revize4) revize4,
    apex_item.display_and_save(12, p.revize5) revize5,
    apex_item.display_and_save(13, p.revize6) revize6
    from portal_link.v_planlama p
    The problem is that, since there is no data in the table, when I run the page, I cant get the form to be rendered, and I get a nice "no data found". There should be a way to get the form rendered, hence making it available for data input.
    Regards,
    Onur

  • Using Automatic Row Processing on an empty table

    I started with a blank form based on a table. I used the wizrd and now have a good looking form with all the fields. However, I get ORA-01403: no data found - Error Unable to fetch row. when the form runs against an empty table.
    How would I avoid that?
    Thx,
    Pete

    Pete - If you run the page by passing a PK value (into a form item) and that value does not locate a row, you'll get that error. Make sure the item's type is Database Column and that its Source Used attribute is "Always, ...".
    Scott

  • Unable to export empty tables

    I use this command:
    exp userid=clix_db file=clix.dmp log=dump.log consistent=y
    to export all tables from user "clix_db".
    But when I take a look into the log file, I notice that not all tables have been exported. All empty tables are missed.
    e.g. the table "LIC_REPORTLOG" does exists! OK, the table is empty.
    But it is not exported. When I import the clix.dmp into another empty database, there is no table "LIC_REPORTLOG"
    When I export only this table with
    exp userid=clix_db file=clix_lic.dmp log=dump_lic.log consistent=y tables=LIC_REPORTLOG
    I get an error message:
    EXP-00011: CLIX_DB.LIC_REPORTLOG does not exist
    If I take a look into the table "all_tables", everything is fine:
    Enter user-name: clix_db
    Enter password:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select table_name from all_tables where table_name='LIC_REPORTLOG';
    TABLE_NAME
    LIC_REPORTLOG
    SQL> select * from CLIX_DB.LIC_REPORTLOG;
    no rows selected
    Any ideas?

    Hello,
    I think that with such a new release you should use DataPump (expdp/impdb) to
    export Tables.
    For exporting a complete Schema you may use the following syntax:
    expdp {color:red}+user+{color}/{color:red}+password+{color} PARFILE=pfexport.txt_With pfexport.txt as bellow:_
    SCHEMAS={color:red}+schema_name+{color}
    FLASHBACK_TIME="TO_TIMESTAMP(to_char(SYSDATE,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY HH24:MI:SS')"
    CONTENT=ALL
    DIRECTORY=EXP_DIR
    DUMPFILE={color:red}+dump_file_name+{color}
    LOGFILE={color:red}+log_file_name+{color}Then, in this example, you'll get the "dump file" and the "log file" into the EXP_DIR Oracle directory (if it exists).
    You can check your Oracle Directories with the following query:
    select * from dba_directories;Then, you can use one of these Directories or create a new one with the following statement
    CREATE OR REPLACE DIRECTORY {color:red}+directory_name+{color} AS '{color:red}+directory_path+{color}';
    GRANT READ,WRITE ON DIRECTORY {color:red}+directory_name+{color} TO {color:red}+user_name+{color};Hope it can help,
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Nov 28, 2009 12:08 PM

  • Query for Empty Tables.

    Hi All,
    Can someone tell me a Query to find out "EMPTY TABLES i.e. Tables having no Rows" in Oracle 8i ?
    I tried on Google, but results are not satisfactory, may be due to 8i version.
    Please guide me.
    Regards.

    982164 wrote:
    Hi Hoek,
    Actually we upgraded our database to 11g.
    We imported our data from 8i to 11gr2 by the utility IMP successfully.
    It imported our data 100% i.e. when we import 8i dmp data into 11g, there is never problem.
    Problem is arises now when we further use IMP/EXP utility in 11g.So everything in Oracle 8 is working the way you expect. The fact that you also have an Oracle 8 database has nothing to do with this problem. Is that what you're saying?
    When we run EXP utlity in 11g, it doesn't export empty tables.If the problem is entirely in Oracle 11, then you should be able to use something like XMLQUERY to find the 0-row tables, if you really need to. (I think you don't.)
    EXP can export tables with 0 rows. I just tried it in Oracle 11, and part of the feedback I got was:
    . . exporting table                       ZIPCODES          0 rows exported
    . . exporting table                  ZONEORDER_TBL          5 rows exported
    . . exporting table                       ZONE_TBL          6 rows exported
    . . exporting table                            ZOO          2 rows exported
    . . exporting table                    Z_HIERARCHY          3 rows exported
    . . exporting table                         Z_TEST          3 rows exported
    . . exporting table                        Z_TEST4          0 rows exportedIf it's not exporting 0-row tables for you, find out why, and fix that problem. Post your exp control file.
    Someone told me to insert atleast 1 row in the empty tables, then they will be exported.And then, after importing them, TRUNCATE those tables? That's a lot of work.
    That's why I m searching of the Empty Tables.
    Am I going right way ?I don't think so.
    Find and fix the problem with exp.
    If you can't get exp to work, then look into data pump.

  • Show or Hide empty table based on If condition

    I want to show or hide empty table based on condition. The table will be empty with 5 rows,2 cols and should display if <?Rout_Information1_id1?> is blank or null or when XML field is not present. Actually the JDEdwards report will generate XML file. In the XML file if <?Rout_Information1_id1?> is present it will have definitely value like 'PULL' or 'Cut' otherwise sometimes XML field itself will not be present. Need to display the empty table when the <?Rout_Information1_id1?> is not present. I am trying to do as below but the table is not displayed. Can someone tell me how to resolve this.
    <?if:Rout_Information1_id1=' '?>
    5 rows,2 cols table
    <?end if?>
    Thanks,
    Vijay Vattiprolu

    Ok. I used the below syntax from other post and it resolved displaying empty table issue.
    <?if:not(XML_TAG_NAME)?>
    <?end if?>
    Thanks,
    Vijay

  • The return value of sqlcode when select an empty table in a proc code

    Table: test
    there is an empty table. But when I use "select * from test" in a proc code, I found the return value of sqlca.sqlcode is 0, not 1403 (NO MORE DATA). Why ?

    EXEC SQL DECLARE individual_cursor CURSOR for
                   SELECT IATA_C, DELAY, UPDATE_TIME
                   FROM TBL_TIME
                   WHERE IATA_C <> '***' AND
                        FLAG = 1;
    EXEC SQL OPEN individual_cursor;
    while(1) {
    printf("in while");
         if (sqlca.sqlcode == 1403 && individual_flag == 0) {
    printf("no any data");
              return 1;
         } else if (sqlca.sqlcode == SQLNOMORE) {
              break;
         EXEC SQL FETCH individual_without_general_cursor INTO :pnrtime.airline, :pnrtime.delay, :pnrtime.update_time;
    EXEC SQL CLOSE individual_cursor;
    The result is:
    in while
    in while
    no any data
    Since the table is empty, why "in while" is printed twice? And "no any data" is printed in the end? I cannot decide the empty when using "select ... into" in proc unless using "select count(*) from test", right? Thx.

  • How to stop the selection of an empty table?

    Hello , everyone.
    I created a JTable : tableView :
    tableView.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    tableView.getSelectionModel().addListSelectionListener(this);
    tableView is a empty table , that is to say , tableView.getRowCount() returns 0 .
    When the table has focus, I press ENTER key , it will invoke the table's ListSelectionEvent event.
    So , in the ListSelectionEvent interface:
    public void valueChanged(ListSelectionEvent _e)
    I call :
    int selectedRow = tableView.getSelectionModel().getMinSelectionIndex();
    selectedRow value will increase with ENTER key pressed each time .
    My question is how to prevent from ENTER key event when a table is empty ?
    Thanks in advance .

    There is no table, unless you have a mapping table or an overflow segment, so the size is the bytes for the index segment. So yes, your query is probably correct. NB you will only have multiple segments with the same name, if you have partitioning, so you might not need the SUM .. GROUP BY

  • Spry HTML Data Set Gives Empty Table (no data), Spry XML Data Set is Fine

    I am working in Dreamweaver CS5 and in lesson 14 of the "Dreamweaver CS5 Classroom in a Book" and the lesson implements Spry HTML Datasets and XML Datasets. The XML is fine but the HTML dataset produces an empty table. This happens in live view or even when previewing the HTML file in any of the browsers Firefox, Google or IE. I should add that the lesson (as in all the lessons) has a "finished copy file" prepared by the authors to show what things will look like in the end (so it is a file NOT produced by me but included on the CD with the book), and that file also produces the problem. I have uninstalled and reinstalled Dreamweaver, the lessons CD and spent all day trying to figure out why and no clues at all yet. All my browser settings look fine as for allowing content.
    ANY CLUES would be appreciated. Thanks.

    Hello,
    First, thank you very much for your quick response and help.
    I am not sure what you mean by upload the site to a server so you can look. I am working locally in Dreamweaver on the book's exercise. So I figured you may mean CS Live. What a clumsy operation that is. In any case, they said the links below will work for ANYBODY that clicks them! What is especially baffling here is that it seems so straighforward. The file "events_finished.html" (the 1st link below) is everything but the data, produced by the author of "Adobe Dreamweaver CS5 Classroom In A Book" in lesson 14. All paths should be correct. The file referenced by "Spry.Data.HTMLDataSet", "html-data_finished.html" (the data and the 2nd link below) is in the same directory as the first file, all JavaScript files referenced exist and are in their denoted "SpryAssets" folder. As seen in the "screenShot", the HTML dataset table is empty with placeholders; the XMLDataSet is fine and all data nicely represented.
    I hope this helps and thanks for all help and any clues you can provide.
    events_finished.html: https://acrobat.com/#d=J2Aez*f-uXeEICwt2ctjDg
    html-data_finished.html: https://acrobat.com/#d=NugqeOzL6sBtjZw81PNNAg
    screenShot of viewed page in browser: https://acrobat.com/#d=nS5FBcWC-AvXXEGHiWAo6A

  • Oracle returns empty table

    Hello All,I used INCBUILDIM to create dimension, Oracle sometime returns an empty table and IFERROR can't detect the error, end up the dimension is missing.Does anyboby know how to check for this kind of error?

    Arent you supposed to use GUI_UPLOAD?
    GUI_UPLOAD - Text file to internal table.
    GUI_Download - Internal table to text file.

  • To find out empty tables in a database

    Hi all,
            I have a database which gets its daily feed from a ftp file. Now is there any way i can figure out the empty tables in the databese which doesnot get any data on the feed.
    Thanks in advance,

    That's a cool little function.
    In case it ever DOES go away in future versions of SQL Server, this will do the same thing:
    --Here is the command template:  
    declare @cmdtemplate nvarchar(500)  
    set @cmdtemplate='if exists(select * from ?) print ''Table ? is not empty.''' 
    --Set up the batch of commands, one for each table, substituting ? for the table name:  
    declare @cmdbatch nvarchar(max)  
    select @cmdbatch=coalesce(@cmdbatch+'; ','')+replace(@cmdtemplate,'?',TableName)  
    from (select quotename(Table_Schema)+'.'+quotename(Table_Name) as TableName  
          from INFORMATION_SCHEMA.TABLES  
          where Table_Type='BASE TABLE') as q  
    --Execute that batch of commands:  
    exec sp_executesql @cmdbatch  
    --Brad

  • Export empty table

    hi gurus,
    On linux 5 oracle 11g r2, i am trying to export schema. this schema is having some empty tables. but while exporting these are not export empty tables. how we can export these.
    thanks

    899329 wrote:
    hi gurus,
    On linux 5 oracle 11g r2, i am trying to export schema. this schema is having some empty tables. but while exporting these are not export empty tables. how we can export these.expdp help=yes
    CONTENT
    Specifies data to unload.
    Valid keyword values are: [ALL], DATA_ONLY and METADATA_ONLY.

  • Check for empty table row before adding date

    On the form below, when I click the green + button (far right), a new table row is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text the user enters is deleted and new today's date added because it is in the intialize event. How do I script to check and make sure each dated row is empty before adding today's date?
    https://acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw
    Thanks,
    ~Don

    Hi Don,
    One option would be to use the caption area of the textfield for the date and leave the value portion free for the user to input their data:
    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.
    Hope that helps,
    Niall

  • How to delete empty table row in the form using formcalc

    Hi All,
    I am displaying a table in PDF which has a few empty rows in between.  I need to delete those specific rows when the form is generated, so that they do not appear on the form.
    Has anyone worked on this before? If so, can you please share the code or advise.
    Regards
    Aditi

    Hello,
    first: there MUST be same backend you get the data from right? So in this backend there is some data extraction coding, right? So the result of this coding is bad, like some unwanted extra rows are returned in the proper set of rows, right? So why don´t you change this backend coding not to return the unwanted rows?
    IF that is not possible (I don´t believe this!), but just to describe other possibilities, you can place a script on the row subform event like initialize and test if there is something missing there and if so, set the presence of such a row to hidden.
    JS: If (this.fieldA.rowValue == "") { this.presence = "hidden"; }
    Regards, Otto

Maybe you are looking for