Skip to Content

Not able to update or create the data through oData Services

Hi

I am trying to update or create a entry in bank account under FPP2/3 Transaction through odata services, but I am not able to execute the odata services with both POST/PUT method, facing error like bad request or method not allowed.

I checked in metadata that for all entity showing creatable="false" sap:updatable="false" sap:deletable="false".

Early response will be highly appreciated.

Thanks!

pastedImage_0.png (82.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 30, 2015 at 02:49 PM

    Hi Prince,

    These errors like bad request or method allowed typically mean that either you have a problem with URL specification (resource) or not properly formed payload that you submit to the server.

    Working example of PUT request for bank accounts (Check URL, you have to specify the resource that you want to modify by key):

    Hint for XML payload preparation: perform GET for this entity and click Use as Payload in GW_CLIENT

    Now while metadata is one way to see what is supported, another way is to use transaction SEGW (Gateway Service Builder):

    Open project ERP_UTILITIES_UMC and select the entity you would like, you can check the properties, which fields can be updated, deleted and so on.

    Final hint: if you want to see if at least you reach specific method for operations on ODATA entity level. Go to SE80, select package ISU_UMC_ODC, go to classes, you have there list of ODATA classes.

    Put an external breakpoint, for example, in UPDATE_ENTITY method or any other method.

    I hope this helps.

    Best Regards, Yevgen


    three.JPG (184.5 kB)
    second.JPG (109.1 kB)
    first.JPG (82.5 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Hi Prince, there is a badi isu_umc_business_settings with method set_bc_default_parameters that returns basic settings how bp contact should be created. Maybe, those basic settings are not there on your system and you have to overwrite that badi implementation. Still you would need to do a quick debug to verify: debug UPDATE_ENTITY, put breakpoint on BCONTACT_CREATE. This is what I can suggest.

      Yevgen