cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to locate saved data in custom table of SAP public cloud

rutudixit_15
Discoverer
0 Kudos

Hello,
I am referring to below link to uploaded data from excel and save it to custom table which is created in SAP S4 public cloud.


https://community.sap.com/t5/enterprise-resource-planning-q-a/easily-upload-data-from-excel-to-datab...

back  end manage :

managed implementation in class ZBP_R_CPR_ITEM_DB_01 unique;

strict ( 2 ) ;

define behavior for ZR_CPR_ITEM_DB_01 alias AMD_ID//upload // amd_id

persistent table zcpr_item_db_01

etag master LocalLastChangedAt //comment

lock master

early numbering

authorization master( global )

{

determination AmmendamentID on save {create;}

field ( readonly )

Cputm,

Cpudt,

Cngtm,

Chuser,

LocalLastChangedAt;

 

field ( readonly ) //: update )

AmdID;

 

create;

update;

delete;

mapping for ZCPR_ITEM_DB_01

{

AmdID = amdid;

Amdno = amdno;

.

.

.

.

.

.

.

.

}

Front End :

 

onUpdatePriceButton: function(AmdID) {
debugger;
var oModel = this.getOwnerComponent().getModel();

//all excel file data
var items = this.getView().getModel("localModel").getData().items;

var indices = this.byId("ExcellUploadTable").getSelectedIndices();



for (var i = 0; i < indices.length; i++) {
// var obj = items[i];
var obj = items[indices[i]];
var oldfr = this.onDateConvert(obj['Old From']);
var Enddate = this.onDateConvert( obj['End Date']);
var engdt = this.onDateConvert(obj['Entered at']);
var ExcellpayLoad={
"AmdID": parseInt(Math.random()*1000).toString(),
//"AmdID": obj['POAM ID'],
"Amdno": obj['POAM No'] ,
"Lifnr": obj['Vendor'],
"Bstnk": obj['PO Number'],
"Posex" : obj['item'] ,
.

.

.

.

.

.


};

var that =this;
this.oModel.create("/ZCPR_UPLOAD", ExcellpayLoad, {
success: function(response) {
sap.m.MessageToast.show("Excell File Data Saved Successfully.");
},
error: function(error) {
sap.m.MessageToast.show("Failed to save Excell Fil Data.");
}
});

}


I have already created oData and published it. The oData is being consumed from Fiori application. The Fiori application is uploading excel sheet properly and seems like saving data.
I have created another oData to fetch the table content. The same is again used in Fiori application for consumption. The fiori application is displaying data properly.
However, in Eclipse ADT when CDS view is created on the same table to check if the data is saved or not. It's not reflecting.
I am confused, from where the data is stored.
Your help is appreciated.
Regards,
Rutuja.

 

Accepted Solutions (0)

Answers (0)