Skip to Content
0
Former Member
Jun 23, 2014 at 08:11 AM

empty tables in ZCL_JSON_HANDLER

91 Views

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

Attachments

function.png (24.9 kB)