cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in select query on table in Custom logic

Vijay
Active Contributor
0 Kudos

I am facing an error in select on standard table in custom logic I am writing in custom fields and logic app .Using custom fields , i have included a field in sales header structure (business context Sales Document) . Now , I am trying to populate this field with custom logic. In the logic I am trying to select custom field ( which again was added using custom field) from business partner table (BUT000) based on sold to party in sales document and at this point I am getting the error “Table BUT000: use of this object is not permitted” . In fact I tried to select data from other tables also but same result . Even select from custom CDS view,I created to fetch this custom field from BUT000 ,is not permitted.

Is this the correct behaviour? If so, is there a way to select data from standard tables in custom logic?

Accepted Solutions (1)

Accepted Solutions (1)

I044433
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi vijay.sharma4 ,

In order to check if this new field is available in the data source and which ones, you need to do following. Only from those data sources you would be able to get this field. If some of them is not enables, you would need to enable the usage. See below -

  1. Choose your custom field in the custom fields and logic app and go inside to check the detail section
  2. Next go the tab - UIs and Reports and from the right click the wheel icon
  3. Next choose the option - Data Source
  4. You will notice that a list of available data sources is now available where this new field can be enabled for usage. Few of them might enabled by default.

Hope this helps!

Feel free to ask if you need more help!

Regards

Rohit

PS. Kindly close the question if answered

Vijay
Active Contributor

Thanks a lot Rohit!! This really helped.

Regards

Vijay

Answers (1)

Answers (1)

I044433
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello vijay.sharma4 ,

For your requirement, you can use the released basic view I_BUSINESSPARTNER. The reason you are not able to use select on DB tables directly is because of the restricted use of ABAP features in ABAP Web Editor. This is to ensure the security and consistency. Also, the DB operations like selects are only allowed from released CDS views. This restriction is there so that any there is no danger to the operation and overall performance and the data integrity of the core application.

You can refer to this link here to know the supported features of the restricted ABAP statements for key-users.

Hope this helps!

Feel free to ask if you need more help!

Regards

Rohit

PS. Kindly close the question if answered

Vijay
Active Contributor
0 Kudos

Thanks Rohit for the response.

But what about the custom filed that i have added in the partner table BUT000. Will i be able to use it if I extent the CDS I_BUSINESSPARTNER to include the custom filed?

Thanks

Vijay