cancel
Showing results for 
Search instead for 
Did you mean: 

SAP C4C how to get Standard BO cache data when I create EC item which binding in this Standard BO

Former Member
0 Kudos
776

Hello everyone,

As my topic say,I bound a EC to Account ,when I create new EC item by QC,I want to get Account current country(at this point, it has not been saved to the database)

Process:Open a Account(old country code"CN")->change Account country(new country code"US")->create a EC item before save(I want to get "US" but not "CN")

I have tried the following two ways but I got the "CN" but not "US"

Wish someone can help me!

Thanks in advance!

Former Member
0 Kudos

I forgot to say a point:

My custom BO:association ToCustomer to Customer;

Accepted Solutions (0)

Answers (2)

Answers (2)

HorstSchaude
Product and Topic Expert
Product and Topic Expert

Hello Baoxiang,

The query wont work as a Query.Execute(...) is always going to the database.

But: If you changed the CountryCode of the resp. Account and performed a round-trip this new value should be i the Account buffer. Thus retrieving the data via Account.Retrieve( <nodeID> ) should do it.

Bye,
. Horst

Former Member
0 Kudos

Hi Horst,

I use the code "this.ToCustomer = Customer.Retrieve(this.DistributorID);"to retieving the account to my Association Node ToCustomer,but I failed to get the new value.

Thanks

Baoxiang

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Baoxiang,

With the ABSL code above you simply set the association. You will not retrieve any data. 😞

If the "ToCustomer" is already set you can simply use

var currentCustomerData = Customer.Retrieve( this.ToCustomer);

Else if the "this.DistrbutorID" represent the customer too

var currentCustomerData = Customer.Retrieve( this.DistributorID);

HTH;
. Horst


Former Member
0 Kudos

Hello Horst ,

Yeah,I try your code and you can see the result in my picture,I am so confused...Bad mood

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Baoxiang,

You are working with the "CurrentCommon" node of the BusinessPartner. This is a different game.

AFAIK the data from the buffer is only written after the Save to the CurrentCommon.

First try it with some extension fields, please.

Bye,
. Horst

Former Member
0 Kudos

Hi Horst,

But I also can't get the change CountryCode value from "this.DistributorCountry = Customer.Retrieve(this.DistributorID).CurrentDefaultAddressInformation.Address.DefaultPostalAddressRepresentation.CountryCode;"

What's the matter?

Thanks for your reply

Baoxiang

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Baoxiang,

Maybe this customer does not have a postal address?

Or this address is not complete?

Did you verify if you can access data which is visible on the UI?

Bye,
. Horst

Former Member
0 Kudos

Hi Horst,

Yes , the Country is mandatory field in Account,I can get the old value but not new buffer value by using my ABSL.

Can you help me test access the Account buffer data and give me same sample code which can be run successful?

I'm so stupid,I just want to get Account buffer data by using some way like SAP CRM BOL..........

Thanks

Baoxiang

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Baoxiang,

First add an extension element to the Common node of the Customer BO and place this element on the UI.

Ensure that you can access this extension element within your ABSL coding.

Then maintain values for this element and save the changes.

Now call up the instance with the data maintained, change the value of the extension element and verify if the new value is available in the ABSL coding.

HTH,
. Horst

Former Member
0 Kudos

Hi Horst,

Thanks for your reply very much

I got your point and follow your steps one by one but I can't get the new value

this.Remarks = Customer.Retrieve(this.DistributorID).Common.GetFirst().GSTNo;
this.Remarks = Customer.Retrieve(this.DistributorID).CurrentCommon.GSTNo;

I used two ways to get the new value .

Thanks

Baoxiang

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Boaxiang,

Okay, in that case raise an incident. 😞

Sorry,
. Horst

Former Member
0 Kudos

Hi Horst,

Express thanks again ,I will raise an incident and let you know the result too.

Baoxiang

former_member200995
Contributor
0 Kudos

Hi baoxiang,

You can trans parameter from the TI to the EC using the outport and inport.
Then trans parameter from the EC to the QC using the outport and inport, too.

Best Regards,

Benny

Former Member
0 Kudos

Hi ,

Thanks,can you provide the parameters navigation which TI binded EC,and outport of COD_ACCOUNT_TI you used to transfer AccountID and CountryCode at the same time(I can't choose two COD_ACCOUNT_TI outport to tansfer AccountID and CountryCode meanwhile)