cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I'm trying to make a sample of POST data in SEGW that call a BAPI. I follow this tutorial step by step:

Step-by-step Creation of sales order using BAPI in... - SAP Community

However, when I try to POST through SAP Gateway Client, there is error 405 Method Not Allowed. I already tried some solutions including tick Creatable, Updatable in Entity Properties but the error 405 persists.
I also try to create another SEGW project that call a simple BAPI to insert data to my ZTable, but
The similar error 405 also happens

HTTP Status Code : 405
Error Text : The specified HTTP method is not allowed for the resource identified by the Data Service Request URI
T100 Error ID : /IWFND/CM_CONSUMER122

I also make other SEGW sample project to GET data from a BAPI as well, it works well and everything is okay. The problem only happens when I POST data to a BAPI create.
Is there any solution for this error? Is is related to networking setting/configuration?

 
 
View Entire Topic
junwu
SAP Champion
SAP Champion
0 Likes

remove $format=json

junwu
SAP Champion
SAP Champion
0 Likes
@YS1990 did you try this?
YS1990
Explorer
0 Likes
I have tried... still error. The only way to make POST succeed is through $Batch. I still don't know why and if it is applicable when ultimately used by other app. I have posted the screnshot in another answer. May be you know why the post only works when I use $Batch ?
junwu
SAP Champion
SAP Champion
0 Likes
@YS1990 show me your screenshot for this case.
YS1990
Explorer
0 Likes
I already posted the screnshot on a new answer
junwu
SAP Champion
SAP Champion
0 Likes

@YS1990  are you sure you have tried like this?

/sap/opu/odata/sap/Z_ODTSLSORDCRT_SRV/SalesOrderSet

request body 

{ "DocType" : "TA", "SalesOrg" : "8900", "DistrChan" : "10", "Division" : "11", "TextLine" : "coba text", "ItmNumber" : "000010", "ReqQty" : "15.000", "PartnRole" : "AG", "PartnNumb" : "0001000000", "Material" : "000000000030000032", "Plant" : "8921", "TargetQty" : "15.000", "CondType" : "", "CondValue" : "0.000000000" }

junwu
SAP Champion
SAP Champion
0 Likes
I don't see any screenshot like that.
YS1990
Explorer
0 Likes
Thanks junwu it works. Sorry I have not removed $format=json in my previous trial. I just focus on using $Batch that works