cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a field - Studio?

Former Member
0 Kudos
55

Hi team,

I am trying to work with customerContractIn web service for SAP BY Design, in this web service I do not have access to a filed called "external reference" since I read that I can not enable this field to be called from the web service I thought I could simply extend a field and duplicate the data of "external reference into my new extended field which I can then expose in my web service using the Adapt option.

I help in the matter would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Lemme ask you a question. Don't you have any field in your webservice like BuyerID ???

That is used as ExternalReference in case of CustomerContract!

Former Member
0 Kudos

My issues is not having a field, my issue is duplicating data in a field instead of having to re type it in two fields for example:

External Reference: XYZ

Customer PO : XYZ

at the moment I have to type in XYZ twice in both fields, is there a way for me to connect Customer PO to External Reference so that I do not have to duplicate effort?

Thanks

Former Member
0 Kudos

Can you give more insight on this Customer PO field please?

Is this an extended field from your CustomerContract extended BO ?

Are you trying to fill this field from the value you get from External Ref. that comes from a webservice call?

Former Member
0 Kudos

My main concern is to be able to access the field called External Reference through web services.

This field lives in Contracts under the Sales Order Workcenter.

Since this field (External Reference) is not exposed in the web service, I decided to extend a field using the Adapt mode, this mode enabled me to not only extend a field but also add it to my web service.

Instead of me asking my finance department to type in the Reference number twice or in a new field my intention is to now create the Extension in the SDK and some how link the two (External Reference & Customer PO) fields.  When the External Reference field is filled in the Customer PO should also get the same value.

The External Reference field is filled out by finance when a new contract is created, not through web service.

I need this field exposed in a web service so I can integrate with an external application.  For now it is reading only.

Former Member
0 Kudos

With the assumption that you are working on QueryCustomerContractIn, here are my suggestions.

You need to use the concept ProcessExtensionScenario here. You need to extend the CustomerContract BO with an Scenario annotation to it. Go through the documentation for this.

This will be the Process you need to extend.

You can then write something like this in your BeforeSave.absl event of your XBO:

// create sync

if(this.BuyerID.isInitial()){

  this.BuyerID = this.<your_extended_field>; // filling it for the first time

}

else{

  this.<your_extended_field> = this.BuyerID; //To enable query from service

}

Answers (0)