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

CDS View annotation "@OData.publish: true" is not publishing Odata Service in S4HANA

amal_aravind123
Explorer
0 Likes
38,789

Hello All,

I am trying to create a CDS view in S4HANA and upon activating the view with the annotation @OData.publish: true the OData service is not getting created in the backing and I am getting the error 'The service ZDEV_C_SLSORDINV_CDS does not exist [OData Exposure]' . Please find the the code that I have used below. Awaiting your valuable suggestions.

@AbapCatalog.sqlViewName: 'ZV_SLSORD_INV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Sales Order Invoice'
@VDM.viewType: #CONSUMPTION
@OData.publish: true


define view Zdev_C_Slsordinv as select from P_SalesOrderInDelivDueDate as SOD
{
    key SOD.SalesOrder,
    key SOD.DeliveryDocument,
    key SOD.DeliveryDocumentItem,
 


  //Organization
  SOD.SalesOrganization,
  SOD.DistributionChannel,
  SOD.OrganizationDivision,
  SOD.SalesDocumentType,
   
  //Status&Reasons
  SOD.DeliveryBlockReason,
  SOD.OverallGoodsMovementStatus,
  SOD.GoodsMovementStatus ,
  SOD.OverallDelivReltdBillgStatus,
  SOD.TotalCreditCheckStatus, --"AT250315 not yet existing, but should come :)
  
  SOD.HdrGeneralIncompletionStatus, 
  SOD.HeaderDelivIncompletionStatus,
  SOD.HdrGoodsMvtIncompletionStatus,
  SOD.HeaderPackingIncompletionSts,
  SOD.HeaderPickgIncompletionStatus,
  
  //Dates
  SOD.PlannedGoodsIssueDate,
  SOD.BillingDocumentDate,    
  SOD.OverallPickingStatus,
  SOD.DueDate
}


Regards,

Amal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

U need to activate the OData service in the transaction /IWFND/MAINT_SERVICE. Once its done u can check your service in /iwfnd/gw_client tcode. Check below link:

https://help.sap.com/saphelp_nw75/helpdata/en/1b/023c1cad774eeb8b85b25c86d94f87/content.htm

amal_aravind123
Explorer
0 Likes

Yes, this was the solution. A simple step which was omitted.

shivam123ortan
Participant
0 Likes

Thanks, it was really helpful

Answers (9)

Answers (9)

jaganan
Explorer

Try each of the system alias to locate your service. Because you can't use wildcard to search. I was also trying to figure out where it went. I found it under one system alias.

former_member1321
Participant

You should add a primary key to your CDS view fields, For me it worked !!

I know this is a very late answer to the question but still posting so that someone still getting the error can resolve it.

Davut
Discoverer
0 Likes
thx bro
Davut
Discoverer
0 Likes
thx bro When I added the primary key it worked
venkatesh_veera2
Participant
0 Likes

go to this t code

N/IWFND/MAINT_SERVICE Search your View and activate it. Once it is activated. Open your CDS view you will find your issue got resolved.

Thank you.

Venkatesh

Former Member
0 Likes

Hi Guys,

This warning message is right after you activate CDS view by @OData.publish: true.

You can go to transaction code /IWFND/MAINT_SERVICE to activate this odata service.The service name is like Zdev_C_Slsordinv_CDS.

After this step,you can reopen or refresh CDS view, this warning will disappear.

Of course, you can refer to this blog.

Best Regards

Thomas

Former Member
0 Likes

hello

please find the below link:

https://help.sap.com/saphelp_nw74/helpdata/de/bb/2bfe50645c741ae10000000a423f68/frameset.htm

I had faced the same issue but i resolved please find the above link.

Regards,

Surendra Garapati

former_member615599
Discoverer
0 Likes

Unable to open the link provided.Could you help me in sharing the link as i am facing same issue and need to know what configurations are missing.

Regards,

Rekha

gattumahesh_at
Explorer
0 Likes
how would you do in case of Public cloud ?
bartvandekamp
Explorer
0 Likes

Hi Amail,

I have exactly the same issue. Did you already find a solution? Thanks in advance.

Best Regards,

Bart

former_member615599
Discoverer
0 Likes

Hello Amail,

Is our issue resolved.

How did you resolve as i am also facing same issue.

Is there anything releated to configuration.

Regards,

Rekha

amal_aravind123
Explorer
0 Likes

Hello Sagar,

Thanks for your reply. Yes, the view is activated but the OData service is not getting published. I also found that the same issue persist for the standard views too. Guess some configurations is missing but couldn't figure out the exact reason.

Regards,

Amal

Former Member
0 Likes

Amal,

Can you please check if the CDS view itself is activated and whether or not you are able to see it as a data dictionary object ( with the name - ZV_SLSORD_INV in SE11 ).

Looking at the snapshot provided by you, it appears that the CDS view was not activated due to errors.

Apparently, there already exists an object with the same name as your CDS entity name.

Can you try changing the CDS entity name to a unique value, if it helps.

Thanks,

Sagar J.

amal_aravind123
Explorer
0 Likes

Hello All,

Any suggestions ??

Regards,

Amal Aravind

Former Member
0 Likes

I am also facing same issue. Please post solution if you have. Thanks in advance.