Skip to Content
avatar image
Former Member

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

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â„śasons
  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

error1.jpg (42.7 kB)
error2.jpg (12.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 20, 2017 at 07:28 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 12, 2016 at 04:49 AM

    Hello All,

    Any suggestions ??

    Regards,

    Amal Aravind

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 12, 2016 at 11:02 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 13, 2016 at 12:10 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 13, 2017 at 07:53 PM

    Hi Amail,

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

    Best Regards,

    Bart

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 09, 2017 at 08:10 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 02, 2017 at 10:50 PM

    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

    Add comment
    10|10000 characters needed characters exceeded