cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to update or create the data through oData Services

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (1)

Answers (1)

yevgen_trukhin
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hi Yevgen,

Thanks for the information!

I have tried with the provided solution, but i am facing same issue.

I checked with the below URL, changing Bank Account Name.

Also checked in SEGW, it's showing update flag in bank account name:

checked through debugging as well on UPDATE_ENTITY, inputs are properly passing. but in result i am getting bad request error.

Is their any other things also which i need to consider for this?

Thanks,

Prince

yevgen_trukhin
Advisor
Advisor
0 Kudos

Hi Prince, now this is a different problem. You don't have a problem with payload of URL. Now it is the problem in business logic of odata entity. When you modify a bank, an interaction record/bp contact is written. Put a breakpoint at FM BCONTACT_CREATE. This API gives an error, which seems like a customizing issue for bp contacts.

Further debugging hints: run transaction /IWFND/ERROR_LOG on GW system and /IWBEP/ERROR_LOG on backend ERP system to see the trace.


Br Yevgen

Former Member
0 Kudos

Hi Yevgen,

Could you please help me in understanding what customizing issue might causing this issue or what needs to be done to fix this.

Thanks!

Prince

yevgen_trukhin
Advisor
Advisor
0 Kudos

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