Skip to Content
0

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

Jun 30, 2017 at 07:47 AM

165

avatar image
Former Member

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!

ec-country.png (75.4 kB)
10 |10000 characters needed characters left characters exceeded
Former Member

I forgot to say a point:

My custom BO:association ToCustomer to Customer;

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Horst Schaude
Jun 30, 2017 at 01:52 PM
0

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

Show 11 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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


0
Former Member
Horst Schaude

Hello Horst ,

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

retrieve.png (145.3 kB)
retrieve1.png (144.3 kB)
0

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

0
Former Member
Horst Schaude

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

0

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

0
Former Member
Horst Schaude

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

0
Show more comments
Former Member

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

0

Hello Boaxiang,

Okay, in that case raise an incident. :-(

Sorry,
. Horst

0
Former Member
Horst Schaude

Hi Horst,

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

Baoxiang

0
Benny Huang Aug 17, 2017 at 07:54 AM
0

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


inport.png (38.6 kB)
outport.png (45.5 kB)
trans.png (28.5 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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)

0