on 2024 Nov 27 4:03 PM
Hey guys,
I created a new custom BO. There I can read and change data from the customer like this:
lr_bezN = gp_von.Relationship.Where(n => n.NodeID == lv_node);
lr_bez = lr_bezN.GetFirst();
if (lr_bez.IsSet() == false){this.status = "3"; return; } //fehler beim verarbeiten
neueBez_NodeData.DistributionChannelCode.content = lr_bez.DistributionChannelCode.content ;
neueBez_NodeData.DivisionCode.content = lr_bez.DivisionCode.content;
neueBez_NodeData.RelationshipBusinessPartnerInternalID = lr_bez.RelationshipBusinessPartnerInternalID;
neueBez_NodeData.RelationshipBusinessPartnerUUID.content = lr_bez.RelationshipBusinessPartnerUUID.content;
neueBez_NodeData.RoleCode.content = lr_bez.RoleCode.content;
neueBez_NodeData.SalesOrganisationUUID.content = lr_bez.SalesOrganisationUUID.content;
var neueBez = gp_to.Relationship.Create(neueBez_NodeData);
if (neueBez.IsSet()){
}else{
failure = true;
}
Now I read all opportunities from a customer
var x = gp_von.InternalID;
var OppyVon = Opportunity.QueryByElements;
var OppyVon_SelParams = OppyVon.CreateSelectionParams();
OppyVon_SelParams.Add(OppyVon.PartyPartyKey.PartyID.content, "I", "EQ", x);
var OppyVon_Results = OppyVon.Execute(OppyVon_SelParams);
//my Opportunity
var opportunity2 = OppyVon_Results.Where(n => n.NodeID == lv_node);
There are some results, but when I try to change the party from the opportunity..its read only.
When I try to create a opportunity, I got the failure with cross-deployment unit:
Has anybody an idea how to change the customer from the opportunity?
By creating Instance, I got this errors:
KR
Request clarification before answering.
Hi 63abapdeveloper ,
you need to assign your custom BO to a different deployment unit as shown in my screenshot
In fact, to the deployment unit of the Opportunity BusinessObject which is CustomerRelationshipManagement.
By default, the deployment unit of your custom BO is the deployment unit that you selected when you created the solution.
Add annotation [DeploymentUnit(CustomerRelationshipManagement)] in the .bo definition file.
As documented here https://help.sap.com/docs/SAP_CLOUD_APPLICATIONS_STUDIO/cbcebe3cfb1647a8b0322c18dbb0b481/7299254173e...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.