4

What do you need to check when ‘Value ZZZ of field YY1_ZZZ_COB is not valid’ occ...

 1 year ago
source link: https://blogs.sap.com/2023/05/22/what-do-you-need-to-check-when-value-zzz-of-field-yy1_zzz_cob-is-not-valid-occur/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
May 22, 2023 3 minute read

What do you need to check when ‘Value ZZZ of field YY1_ZZZ_COB is not valid’ occur

There is an issue from customer. And SAP team spent some time to check because of the confusing error. Hope you can check it in the right way if facing the same problem.

Issue:APIs enabled in communication arrangement: ‘Finance – Posting Integration (SAP_COM_0002)’.Error ‘Value L07 of field YY1_businesstype_COB is not valid.’ when creating an accounting document using the Journal Entry – Post (Synchronous) service;

The field ‘YY1_businesstype_COB ’ is a custom field and a value help is set (created by custom CDS, the value has been maintained: L07); the creation of an accounting document on the S4/HAN Cloud app using L07 can successfully create, while the error occurs when posting with API Journal Entry – Post (Synchronous).

Custom%20field%20and%20Value%20help

Custom field and Value help

Search%20help
Search help

Error-1.png

Error

When the issue reached to developer team, they reproduced the issue and analyzed further. First, developer suggested the customer to check the custom fields and value help as customer created several mix-up the custom fields.

“The custom field YY1_businesstype has the value help YY1_ZBUSINESSDATA_HELP which returns values from L01 up to L27. The other custom field YY1_Zbusinesstype has the value help YY1_ZBUSINESS_DATA_NEW_H, which only returns a single value: L01. So when sending a JournalEntryBulkCreateRequest with the custom field YY1_Zbusinesstype set to L07, it resolves in an error since this value does not exist in the value help view YY1_ZBUSINESS_DATA_NEW_H. ”

Fields%20and%20Help%20value

Fields and Help value

After checking that, customer found the setting of field name and value help are both correct. So this is not the root cause. Then developer using the CB user customer provided, then found out the communication user CC0000000999 (DEMO_USER) is not authorized to execute selects on the custom cds view YY1_ZBUSINESSDATA_HELP that selects from the value help view of CBO YY1_ZBUSINESSDATA.

The reason why communication user CC0000000999 currently has no authorization to view the data in the custom business object YY1_ZBUSINESSDATA is that customers have enabled the “Data Access Management” feature for this custom business object. If the “Data Access Management” is enabled for a given custom business object a dedicated authorization object is created under the hood for this custom business object for which users (both business and communication users) need authorizations in order to access records for the custom business object. For this situation, customers have the following two options:

  • Disable the “Data Access Management” feature for custom business object YY1_ZBUSINESSDATA. The main background of the “Data Access Management” feature is to associate lifecycle status values (active vs. completed) with records of the custom business object which is especially useful if personal information is to be stored in the CBO.
  • Create a dedicated communication arrangement for the OData service of CBO YY1_ZBUSINESSDATA and add this communication arrangement to the communication arrangements of communication user CC0000000999. This way, the communication user CC0000000999 will obtain the authorizations required to access the CBO’s records in case customers decide to keep the “Data Access Management” feature enabled.

So from this case, we can learn that the relationship between ‘Data Access Management’ ‘custom business object’ ‘communication user’ and the error displayed in Postman. If you find the error like ‘Value ZZZ of field YY1_ZZZ_COB is not valid’. Please check whether enabled ‘Data Access Management’ and make sure communication user CC0000000999 has authorization to view the data. Also, please check the custom field and related help values. Although the error message was not accurate enough, the initial focus was on value L07. However, this method of verifying the range of excluded values is essential.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK