cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in calling SAP IRPA bot via postman

Vijay
Active Contributor
0 Kudos

Dear Experts,

I have created a simple SAP iRPA bot in which i am calling an RFC. I have created Input and output structure in context and mapped the input/output and input manager under properties as shown below .

I have mapped the input parameters to the RFC fields like this

and imported the package in Cloud and created the API Trigger. Now i am trying to test it via postman. It is getting triggered

but getting failed with below error "Step GLOBAL.CAIPostJE.PostJE: TypeError, 'IO.Entry' is null or not an object

I am not sure, what is that i am doing wrong here. I also not sure if i can debug the postman trigger of the bot.

Please help with this if you can.

Tagging the experts with hope 🙂

stefan.schnell peter.engel chaitanyapriya.puvvada

Regards

Vijay

Accepted Solutions (0)

Answers (5)

Answers (5)

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

vijay.sharma4

Hi Vijay,

Are you mapping the user name from the your chat bot too ?

Regards,

Priya

Vijay
Active Contributor
0 Kudos

No, i just passed it as reference variable. It is not mapped anywhere in my RPA bot parameters.

Can i show you in system if possible? WebEx?

Thanks

Vijay

Vijay
Active Contributor
0 Kudos

Hi chaitanyapriya.puvvada

Is the way i am passing username in the the invocation context a problem?

Thanks

Vijay

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

vijay.126 :

Hi Vijay,

Looks like the payload passed in post man and API trigger are same including the key word invocationcontext.

Your screen shot of postman doesnot show the invocationcontext key word.Hope it is included.

You had mentioned that the user name is not mapped .Can you elaborate on this?

Hope you are using OAuth authentication in POSTMAN to execute the call.Refer this link more details.https://help.sap.com/viewer/c836fab4182e45548b6c6c6d0d0a9146/Cloud/en-US/347ba172a8e64f1c8544f460264...

If yes, What is the output when you are executing the POST call in POSTMAN ?

Vijay
Active Contributor
0 Kudos

Hi chaitanyapriya.puvvada,

In Postman input i am passing username under invocation context as shown below.

I am using the OAuth in postman and the postman call is successful and returns the run ID

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

vijay.126 :

As requested, please send the screenshot of your invocation context.

Attached is the screenshot for reference.

Does your payload in the postman does not have an invocationcontext?

Attaching the screenshot for the reference.

Vijay
Active Contributor
0 Kudos
chaitanyapriya.puvvada

Below is the invocation Context .

And Postman Input do have invocation context as shown below

Regards

Vijay

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

vijay.126

Hi Vijay,

Can you please confirm you have exposed your parameters as Skills in Cloud Studio.

Please confirm if you have done step 5 in my blog.

https://blogs.sap.com/2020/02/18/challenge-submission-create-an-api-triggertest-in-postman-to-have-s...

If you expose them correctly ,you can test it postman by sending the input parameters.

Are you able to see your parameters in the Payload of API trigger.(Invocation context)?

Step no 6 ,3rd screen shot in my blog.

Please attach the screen shot of the payload of API trigger. We can check the input parameters mapping

Vijay
Active Contributor
0 Kudos

Yes, the parameters are exposed as skills in Cloud Studio as shown below (so step is done)

In cloud Factory, the log looks like below

And from postman , i am sending the same data as as shown below

As you can see am sending username in invactionContext? could that be a problem as that is not mapped to anything

Regards

Vijay

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

vijay.126

Can you let me know when you tested the Application in Desktop Studio(Debug mode) if you had received the output data.

If you had faced any error ,let me know the error and attach the screen shot of the same.

Thanks

Priya

Vijay
Active Contributor
0 Kudos

Thanks chaitanyapriya.puvvada for your response.

First i tested my Bot in debug mode by setting the context variables with hardcoded values like below

rootData.IO.Entry.v_cc = "1810";
rootData.IO.Entry.Hdr_txt = "Test Header";
rootData.IO.Entry.docDate = "20200622";
rootData.IO.Entry.Fis_per = "06";
rootData.IO.Entry.Doc_typ = "SA";
rootData.IO.Entry.Xref_doc = "REF DOC1";

and mapped them to the target fields.

hdrdata("HEADER_TXT") = rootData_IO.Entry.Hdr_txt;
hdrdata("COMP_CODE") = rootData_IO.Entry.v_cc;
hdrdata("DOC_DATE") =  rootData_IO.Entry.docDate;
hdrdata("PSTNG_DATE") = rootData_IO.Entry.docDate;
hdrdata("FIS_PERIOD") = rootData_IO.Entry.Fis_per;
hdrdata("DOC_TYPE") = rootData_IO.Entry.Doc_typ;
hdrdata("REF_DOC_NO") = rootData_IO.Entry.Xref_doc;

and it executed successfully without error.

Now as the input is supposed to come from API trigger input, i have removed the hardcodded population of context variable.

Bot gets triggered from postman, job gets created ,but fails with the error

"Step GLOBAL.CAIPostJE.PostJE: TypeError, 'IO.Entry' is null or not an object"

Regards

Vijay