Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Create model with '0' value

I'm creating model instances in a for loop ( 0 - 6 )...

Everything works fine apart from when DayOfWeek = 0, in which case a default value is entered into the model, not the correct value of 0.

Any ideas?

for (var i = 0; i < 7 ; i++) {

  var oEntry = {};

  oEntry.DayOfWeek = i;

  oModel.create("/CalendarSet", oEntry, {

  success : success,

  error : error

  });

  oModel.submitChanges(success, error);

  }

Not what you were looking for? View more on this topic or Ask a question