cancel
Showing results for 
Search instead for 
Did you mean: 

Auto populate values through value help in Restful ABAP

0 Kudos

Hi Team,

In restful ABAP, I am using value help for a location field. The requirement is when I select value for location at the same time country related to the location should auto populate in the next field in the screen immediately.

Is there any other way to achieve this in restful ABAP.

Regards,

Bhuvana.

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

In case your value help view provides the country information too, you can use the property "additionalBinding" for the Consumption.valueHelpDefintion annotation.

0 Kudos

Hi,

Additional binding will work when we click on save button, I want to show the value immediately means whenever the value help value populated in the location at the same time country field needs to be updated. It is the client requirement.

Regards,

Bhuvana.

pfefferf
Active Contributor
0 Kudos

works only "... when we click on save button ..." -> that is not really true

0 Kudos

Hi,

I have coded as below, let me know if anything i need to do to work as you mentioned.

@UI: { lineItem: [ { position: 70, label: 'Location', importance: #HIGH }], identification: [{ position: 150, label: 'Work location' }],

fieldGroup: [ { qualifier: 'Fieldgroup4', position: 140 } ] }

@Consumption.valueHelpDefinition: [{entity:{element: 'location', name: 'ZP_GCT_LOC' },

additionalBinding: [{ localElement: '_loc.loc_name', element: '_loc.loc_name', usage: #RESULT }] }]

@EndUserText.label: 'Work Location Code'

gpd.work_loc,

@UI: { identification: [{ position: 160, label: 'location Name' }],

fieldGroup: [ { qualifier: 'Fieldgroup4', position: 150 } ] }

// @EndUserText.label: 'Work Location Name'

_loc.loc_name,

Regards,

Bhuvana.

bhaskar_nagula
Participant
0 Kudos

Hi florian.pfeffer,

What if next field value (country in this case) having in association of value help?

Thanks in advance.