cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud For Customer Embed Component Steps

Former Member
0 Kudos

Hi Experts,

I want to create custom component and attached to Standard Account_TI screen using embed component.

I have followed the below steps but i am getting error.

Step 1. Creation of Custom Component with object based screen.

here in this component i have declare only 4 elements

businessobject Embed_BO {

        // Root node must not be specified, it is created implicitly

  element AccountID : BusinessPartnerInternalID;

  element Field1 : LANGUAGEINDEPENDENT_MEDIUM_Text;

  element Field2 : LANGUAGEINDEPENDENT_MEDIUM_Text;

  element Field3 : LANGUAGEINDEPENDENT_MEDIUM_Text;

}

I have not configure anything or any screen but i have directly create Embed component from "Add New Item"

After create Embed component i have add 3 element from BO list ( Field 1 , Field 2 , Field 3 )

1) I have add 3 element and Rename as shown below screen ( embed component )

2) In the DataModel i have create DataStructure for "ImportParameter" and add 2 Data Fields AccountID and AccountUUID.

    same for "QueryParameter" and Add 1 Data fields "AccountID".

3) In the Controller Tab I have created Import "EC_Import" and Add 2 Parameter with parameterbinding with previous step created Data Structure "ImportParameter"

Also i have change the Property - :

RequestAutoRefire = True

RequestFireOnInitialization = True

Also i have assign the event OnFire = "ImportHandler"   ( Check Step 4 )

You can see i have highlighted that property and all.

4) I have create EventHandler  = "ImportHandler" for assign to Import created in previous step 3

Under this Event i have Add

"DataOperation"

Operation Type = "assign"

Source Expression = "/Root/ImportParameter/AccountID".

Target Expression =  "/Root/QueryParamete/AccountID".

5) And When we embed the component on Account_TI screen i have bind with 2 parameters

These are the steps that i have followed to create embed component and bind to Account_TI screen but when i open the Account_TI screen and go to that tab and edit value and click on Save it gives error.

I dont know if any code or any ABSL code require to save this embed component table with account value or any step missing or and wrong configuration on EventHandler , Import .

Please anyone have idea about this please share with me

I have only requirement to create embed component with 3 fields and save as respect to account id.

Many Thanks,

Mithun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Why are you not just adding these fields to an Extended Business Object for the Account BO?

Former Member
0 Kudos

This is our client want to add .......

I have already suggest them for same but they want to add embed component they do not want to enhance the standard BO.

.

Many Thanks,

Mithun

Former Member
0 Kudos

What do you do after the data operation in the Import Handler? Do you call the query handler? And what is the handler called "EventHandler"?

And why do you need to retrieve the standard account instance?

Former Member
0 Kudos

Thanks Alessandro,

I can remove from the ImportHandler and also my requirement as shown below.

Create embed component and assign to Account TI and When enter the data under the Embed Component and click on Save button on Top the record save with the embed component data with the respective account.

Many Thanks

Mithun

Former Member
0 Kudos

That's easy.

You don't need to perform any query because in you custom BO you already have the account ID that is coming from the inport.

You just need to read, in the inporthandler, the EXISTING instance of the custom BO, that you need to create in the after modify of the account BO extension (in the creation fase)

Former Member
0 Kudos

I have done the below changes on the custom BO.

Step 1 . In the Event Handler i have change as per the previous reply.

Step 2. Assign that Event to Import OnFire.

I am getting this error when open the Account Screen and go to that Embed Tab.

"Object [object Object] has no method 'getRawValue'".

Kindly check the above steps are correct or any step missing.

Many Thanks,

Mithun

Former Member
0 Kudos

You have to bind the accountID not the structure in the read operation.

Also you need to create an instance of the BO when the account is created via the Quick Create screen

Answers (0)