Skip to Content

Hi All,

I know there’s been a lot of questions about creating a BO instance, so I thought I would provide you with an example from one of my projects. Some code is omitted to protect my Customer.

In this script I am checking if a Customer already exists matching my custom User BO. If not, I create an instance of the the Customer BO filled with elements from my custom BO. Anyway, I hope this helps.

// Get customers in User BO

query_customer = Customer.QueryByIdentification;

query_customer_selparam = query_customer.CreateSelectionParams();

query_customer_selparam.Add(query_customer.InternalID , “I”, “EQ”, this.UserID);

query_customer_result = query_customer.Execute(query_customer_selparam);

// If Customer does not exist, create Customer

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

var customerRoot : elementsof Customer;

customerRoot.CategoryCode = “2”; // or 1 or 3

customerRoot.InternalID = this.UserID;

CustomerBO = Customer.Create(customerRoot);

//Customer Indicator

CustomerBO.CurrentBusinessCharacters.CustomerIndicator = true;

CustomerBO.CurrentBusinessCharacters.ProspectIndicator = false;

//Organisation

CustomerBO.CurrentCommon.Organisation.Name.FirstLineName = this.UserName.content;                CustomerBO.CurrentCommon.Organisation.Name.SecondLineName = “”;

CustomerBO.Activate();

}

Judson,

please post these things as blog post or document but not as a question. It’s confusing.

Other than that: Keep on going, man!

I even have a use case for a simple add-on like this:
Create a custom BO for a supplier-request. Lots of companies – especially in the US – let their employees request new suppliers including all the necessary information such as 1099, minority-owned, women-owned, etc.

Add a simple approval workflow with the responsible buyer and there you go.

In addition you could add a website that your employees just send the new supplier a link to for them to fill out this information on their own.

Cheers, Christian

I don’t know this use case from our german customers but I think it could be realized within one some few days…

Public website could be realized with SAP Netveawer Neo 🙂 …a little bit to big for this use case but cool 🙂

Andreas

Yeah, my bad posting as a question. I wanted it to be a discussion. Thanks for the good ideas.

This document was generated from the following discussion: Creating/Saving a BO Instance – Sample ABSL

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply