0

I created two transport requests (TR) for same project while making changes in CDS views after that a duplicate resource error with error code 400 is showing and I'm unable to get any data in my UI5 table.

I transferred the changes which was locked in new TR to old TR but it is still giving the same error.

HTTP request failed400,Bad Request,{"error":{"code":"/IWBEP/CM_MGW_RT/030","message":{"lang":"en","value":"Duplicate resource"},"innererror":{"application":...

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
RIK
  • 123
  • 1
  • 2
  • 13

1 Answers1

3

First of all: Double check if there's actually no duplicate key by reading the underlying SQL view (annoted in the CDS definition @AbapCatalog.sqlViewName) using the transaction se16 (n/h).

If there are really no duplicates in the SQL view, the error can be caused by various bugs in the ABAP CDS framework. These bugs mostly do occur after you changed a CDS source/definition. Here a few of them:

  • Open transaction segw and refresh the entity structure by right clicking "refresh all".

    in edit mode.

  • Afterwards click on the red white beachball to regenerate the MPC/DPC classes.

    enter image description here

  • What the red white beachball actually does is kind of merging a the changed structure with the existing classes. Right click on the project and choose "Generate runtime" to really re-generate all of the runtime objects.

    enter image description here

  • Sometimes there's a clean up button in the entities overview. Click it.

  • In transaction /iwfnd/gw_client choose Metadata→Cleanup Cache→On both systems

    enter image description here

  • Cleaning the cache works quite well for OData views that have been manually created from ABAP types in segw but Core Data Services might still be cached. In case none of the above helped:

    • logout and login again
    • restart the transaction
    • wait for an hour or two
  • Try to manually test the failing OData request directly in /iwfnd/gw_client. You can activate logging in /iwfnd/traces to double check what the requests from your client actually look like.

  • Check your OData client. Does it maybe internally cache the $metadata?

  • Check that the transport request was successfully processed, using e.g. transaction se10. Transports/Imports to another system might be blocked by long running SADL queries. Kill them using sm50 if necessary.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
koks der drache
  • 1,398
  • 1
  • 16
  • 33
  • Thanks ,but it started working after i changed a search anotation of one of the field to false from true. – RIK Sep 20 '19 at 12:45
  • 2
    RIK thanks, can you describe your solution by writing a separate answer please? And adding precise information would be helpful too (instead of "changed a search anotation of one of the field"). – Sandra Rossi Sep 22 '19 at 07:22