Skip to Content

Creating Custom BO Instance in ABSL from Standard BO Event

Nov 14, 2017 at 02:59 PM


avatar image

HI all,

am developing custom Business object which contains entries or records from Opportunity BO extended TAB.

i have created before-save event, and query on custom Bo to check the consistence.

var query_customer = CustomLG.QueryByElements;

var selparam = query_customer.CreateSelectionParams(); selparam.Add(query_customer.OpportunityID , "I", "EQ", this.ID.content);

var result = query_customer.Execute(selparam);

if (result.Count() == 0) {

var customerRoot : elementsof CustomLG;

customerRoot.OpportunityID = this.ID.content ;

customerRoot.LgStatus = "Requested" ;

customerRoot.LgAmountData.content = this.LgAmount.content ; customerRoot.LgAmountData.currencyCode = this.LgAmount.currencyCode ;

could you please suggest a solution to create statement which adds instance entry using this data??

best Regards,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Tobias Kuhn Nov 15, 2017 at 08:10 AM


I'm not sure if I got your problem right but if your problem is to create an instance of CustomLG with the given data see the following line.

var newCreatedInstance = CustomLG.Create(customerRoot);

Best regards


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

Hi Tobias,

thank you very much for reply,

- Yes you have got what i needed but, by adding this statement to my code, it returns an error says,

(customerRoot) Parameter type 'OpportunityNodeElements' is not Valid.


Best Regards,

capture.png (7.0 kB)

Hello Motaz,

This command will work only if the "elementsof" belong to the BO for which the Create is called.

In your case is the elementsof Opportunity not the same as the BO CustomLG.

. Horst


Hi Horst,

Is that solution works for update OWL screen with data inserted on Standard BO.


Based on your screenshot the line should be

var newCreatedInstance = Opportunity.Create(Root);

Thank you all,

Is that another solution to be able to fill records on custom OWL screen of CustumLG with data inserted on extended new tab in Opportunity BO.


Hello Motaz,

based on the heading you want to create an instance of your custom BO CustomLG where the data is populated from the SAP BO Opportunity?

Then this should do the work:

var CustomLGRootData : elementsof CustomLG;
CustomLGRootData.??? = this.???;
var CustomLGRootNode = CustomLG.Create( CustomLGRootData );

Please replace the "???" with the resp. elements of your CustomBO and the SAP BO.

. Horst