on 08-23-2019 10:30 AM
Hi Experts,
We are using function import in our OData (SEGW - POST) which is working fine but now our requirement is to use the function import in Batch. I tried below in gateway:
Below URL in Gateway Client - and used the POST method with the content type:
multipart/mixed; boundary=batch
/sap/opu/odata/sap/Z_****_SRV/$batch
--batch
Content-Type:
application/http
Content-Transfer-Encoding:
binary
GET start?XYZ='90/100/2019/03'&ABC='****'&User='****'HTTP/1.1
--batch
Content-Type:
application/http
Content-Transfer-Encoding:
binary
GET start?XYZ='90/100/2019/09'&ABC='****'&User='*****'HTTP/1.1
--batch
I above start is function Import name and XYZ,ABC and User are the import parameters for the function import.
But we are getting 500 error which says "DeReferencing the NULL Reference"
Please help as we are stuck and not able to find anything regarding this.
Thanks,
Best Regrads,
Raina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raina,
As today is Lord Krishna's B'Day...so Hare-Krishna.
I hope you implemented below methods in your DPC_EXT:
Redefined below for Function Import logic, as per your requirements
1. /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION
Redefined below for $batch (Which is nothing but commented code inside below method)- as shown below:
2. /IWBEP/IF_MGW_APPL_SRV_RUNTIME~ CHANGESET_BEGIN
3. /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGE SET_END
4. Also may be check - Filter
You would have already tested successfully your single Function Import without batch first.
So probably in your gateway client please test like below:
URL: with POST
/sap/opu/odata/sap/Z_****_SRV/$batch
HEADER: Please also add x-csrf-token along with Content-Type
Content-Type: multipart/mixed; boundary=batch
Request Body: Request Body is little tricky part, need extra care for successful testing
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/xml
POST start?XYZ='90/100/2019/03'&ABC='****'&User='**** 'HTTP/1.1
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
Accept: application/xml
POST start?XYZ='90/100/2019/09'&ABC='****'&User='*****' HTTP/1.1
--changeset
--batch
Please be careful with line space in Request Body, this should be:
From Top --batch to --changeset 0-2-1-2-1-2
I hope if above is taken care, this should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.