cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

There was a problem creating a custom inbound API in the SAP S/4HANA cloud

jayhyun1025
Discoverer
0 Kudos
494

Hello

Referring to url's tutorial below, I created Data Definitionon, which calls data from the standard API I_BusinessPartnerTP_3. However, when several fields are marked Unknown and I_BusinessPartnerTP_2 join to write the code, this time the error "unexpected word" appears in the "{" part How shall I do it? Is there something wrong with that code?

Creating Custom Inbound API in SAP S/4HANA Cloud, public edition | Tutorials for SAP Developers

@EndUserText.label: 'Business partner api'

@AccessControl.authorizationCheck: #NOT_REQUIRED

define root view entity ZBIZP_001

provider contract transactional_query

as projection on I_BusinessPartnerTP_3

association [0..1] to I_BusinessPartnerTP_2 as _BusinessPartnerTP

{

key BusinessPartner,

BusinessPartnerForEdit,

BusinessPartnerCategory,

BusinessPartnerUUID,

CreatedByUser,

CreationDate,

CreationTime,

LastChangedByUser,

LastChangeDate,

LastChangeTime,

BusinessPartnerIsBlocked,

FirstName,

LastName,

OrganizationBPName1,

OrganizationBPName2,

OrganizationBPName3,

OrganizationBPName4,

LegalForm,

OrganizationFoundationDate,

OrganizationLiquidationDate,

Industry,

IsNaturalPerson,

IsMale,

IsFemale,

IsSexUnknown,

FormOfAddressPerson,

FormOfAddressOrganization,

AcademicTitle,

NameFormat,

NameCountry,

InternationalLocationNumber1,

InternationalLocationNumber2,

InternationalLocationNumber3,

ETag,

IsBusinessPurposeCompleted,

AuthorizationGroup,

GenderCodeName,

BusinessPartnerGrouping,

BusinessPartnerType,

CorrespondenceLanguage,

AddressID,

Name,

AdditionalName,

FullName,

BusinessPartnerName,

SearchTerm1,

SearchTerm2,

AssetRedesignSwitchIsActive,

BPFirstNameSearchHelp,

BPLastNameSearchHelp,

BirthDate,

BusinessPartnerBirthDateStatus,

BusinessPartnerBirthplaceName,

BPHasEmployeeRoles,

IndustrySystemType,

TradingPartner,

BusinessPartnerIDByExtSystem,

IsMarkedForArchiving,

IndependentAddressID,

DataProvider,

Score,

/* Associations */

_AcademicTitleText,

_AcademicTitleValueHelp,

_BPAdditionalCustomer,

_BPAdditionalSupplier,

_BPAddressIndependentEmail,

_BPAddressIndependentMobile,

_BPAddressIndependentPhone,

_BPCustAddressDependentInfo,

_BPCustDepartmentAddrDepdnt,

_BPCustomerTaxGrouping,

_BPCustRcvgPtAddrDepdntInfo,

_BPCustReceivingPoint,

_BPCustUnldgPtAddrDepdnt,

_BPDataController,

_BPEmplWorkplaceAddr,

_BPIdentificationNumbers,

_BPIndustry,

_BPSupplierTaxGrouping,

_BusinessPartnerAddrDepILN,

_BusinessPartnerAddress,

_BusinessPartnerBank,

_BusinessPartnerContact,

_BusinessPartnerCustomer,

_BusinessPartnerCustomerCo,

_BusinessPartnerCustomerTxt,

_BusinessPartnerLongText,

_BusinessPartnerPurgOrg,

_BusinessPartnerRole,

_BusinessPartnerSalesArea,

_BusinessPartnerSupplier,

_BusinessPartnerSupplierCo,

_BusinessPartnerSupplierTxt,

_BusinessPartnerTaxNumber,

_BusinessPartnerTaxNumberAdr,

_BusinessPartnerUnloadingPoint,

_BusPartRelationship,

_CreatedByUser,

_CustAddrDepdntExtIdentifier,

_CustomerDepartment,

_LastChangedByUser,

_PaymentCard

}

Accepted Solutions (0)

Answers (1)

Answers (1)

AndreasMuno
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for your question, @jayhyun1025.

Have you tried simplifying your data model to keep entities and projections apart?

From my point of view, there may be a convolution of business partner entities and projections in this part:

"as projection on I_BusinessPartnerTP_3

association [0..1] to I_BusinessPartnerTP_2 as _BusinessPartnerTP".

You may want to follow the respective instructions of the SAP Help, Creating and Activating Data Models | SAP Help Portal. namely, Creating and Activating Data Models | SAP Help Portal.

If this solves your request, please mark accordingly. Thank you.