Skip to Content
0

Mapping not allowed. The model in project ZGW_HCM_MYTIMESHEET_X is redefining another mode

Mar 22 at 01:43 PM

102

avatar image

Hi Folks,

we are trying to extend the HCM_TIMESHEET_MAN, for same we followed below steps

Steps

1. Created custom project

2. Right click on data model->redefine->OData Service(SAP GW)

3. provided the service name: HCM_TIMESHEET_MAN and version: 001

4. Selected all the and clicked on Finished button

5. Saved and Clicked on generate runtime artifacts

6. Created new entity type and entity set to full fill our requirement

7. trying to service implementation for new entityset but it ended with error

Error is 'Mapping not allowed. The model in project ZGW_HCM_MYTIMESHEET_X is redefining another mode'

Back-End

BASIS 740 SP10

ABAP 740 SP10

GWFND 740 SP11

GBX01HR 600 SP07

Please do the needful, thanks in advance

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Andre Fischer
Mar 22 at 02:46 PM
0

Hi Kiran,

the reason for this behavior is that the Service Builder does not generate entity set specific methods if you add entity sets to a service that has been generated via redefinition.

You have thus to redefine the generic methods of the framework (e.g. /iwbep/if_mgw_appl_srv_runtime~get_entityset to handle GET_ENTITYSET calls for your newly created entity set).

And you have to develop your own entity set specific methods.

method /iwbep/if_mgw_appl_srv_runtime~get_entityset.

    data lv_entityset_name type string.
    data lr_entity type ref to data.


lv_entityset_name = io_tech_request_context->get_entity_set_name( ).     

case lv_entityset_name.
      when '<your new entity set>'

"your code to retrieve your data .... 

when others.         

super->/iwbep/if_mgw_appl_srv_runtime~get_entityset(...

endcase.


endmethod.

Regards,

Andre

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 22 at 01:56 PM
0

continuing with the querry, PFB the image which shows the error message while trying to perform: Service Implementation -> Map to Data Source

Your help is appreciated. Thanks :)


Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 22 at 03:32 PM
0

Hi Andre Fischer,

Thank you very much for your prompt and correct response. I did exactly the same way you'd explained and it worked. :)

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Andre Fischer

But I remember that when we extended the V1 My Timesheet it was allowed us to implement the service implementation for newly created entityset in extended OData service.

0