Skip to Content
0

How to create Engineering Change Order in ABSL (SAP Business ByDesign)?

Aug 10, 2017 at 02:01 PM

85

avatar image

Hi,

I need to create BO ECO programmatically (in ABSL), but I did not find how to fill field Valid From.

There is my code which I am stuck on:

var engineeringchangeorderData : elementsof EngineeringChangeOrder;
engineeringchangeorderData.ID.content = newECO;
engineeringchangeorderData.TypeCode = "5"; // Single-Date Code
var engineeringchangeorder = EngineeringChangeOrder.Create ( engineeringchangeorderData );

var validityData : elementsof EngineeringChangeOrder.Validity;
validityData.StartDate = Library::Date.Create ( 2017, 8, 10 );

engineeringchangeorder.MainValidity.StartDate = Library::Date.Create ( 2017, 8, 10 );
 

There is some field StartDate (I believe that is it) in node Validity, but I cannot create the node (Validity) because Validity does not have method Create.

Any ideas?

Thank you.

000087.jpg (37.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Benny Huang Aug 14, 2017 at 01:28 AM
0

Hi Aleksei,

I tested the code:

var engineeringchangeorderData : elementsof EngineeringChangeOrder;
engineeringchangeorderData.ID.content = newECO;
engineeringchangeorderData.TypeCode = "5"; // Single-Date Code
var engineeringchangeorder = EngineeringChangeOrder.Create ( engineeringchangeorderData );

engineeringchangeorder.MainValidity.StartDate = Library::Date.Create ( 2017, 8, 10 );

It is OK, it can create the record and the Valid From is filled.

Best regards

Benny

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Aleksei,

Here is the result, if you add the code at aftermodify, must save by the user:

Best Regards,

Benny

eco02.png (20.0 kB)
0
Aleksei BELOUSOV Aug 14, 2017 at 07:59 AM
0

Hi Bin,

I checked your code and it works!

Many thanks.

Best regards,

Aleksei

Share
10 |10000 characters needed characters left characters exceeded