on 2023 Jun 21 7:38 AM
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
}
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 22 | |
| 15 | |
| 14 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.