cancel
Showing results for 
Search instead for 
Did you mean: 

How to resolve http error 403 (through SOAPUI) calling S/4HANA SOAP API

tborn
Participant

payload.txtHi community;

We are testing the Asset API through Finance - Fixed Asset Integration (SAP_COM_0563) using SOAP UI. We tried slightly different settings passing the messageID and are constantly getting a HTTP 403 forbidden error on the outbound service. Can anyone help with the correct configuration. In SOAPUI we are calling the service

https://myxxxxxx-api.s4hana.ondemand.com/sap/bc/srt/scs_ext/sap/fixedassetcreatemain

with the payload as per the attached file

We are using Basic Authentication and have following settings under WS-A

No other settings have been specified. Any input is highly appreciated.

Adding the communication arrangement as well:

Thanks

Thomas

OwenLiu
Product and Topic Expert
Product and Topic Expert
0 Kudos

We helped you to accept the answer, since there were no updates after 7 days.

You can unaccept it anytime if you have further questions.

Accepted Solutions (1)

Accepted Solutions (1)

guoqiang_fan2
Discoverer

Hi Thomas and Eric,

Thanks for raising your questions.

During this asynchronous processing of our Fixed Asset APIs, the Outbound Service is sent from S/4HC to the specified Communication System after the fixed asset creation/change is processed (either succeeded or failed) in S/4HC.

The error "HTTP code 403 Forbidden" on the Outbound Service basically means the Outbound Service comes across some technical errors when transferring to the Communication System and couldn't get processed by the specified service in the Communication System (which is specified in the Communication Arrangement), while doesn't really mean the Fixed Asset creation/change actually fails in S/4HC.

And vice versa, currently, if the Outbound Service gets processed in the Communication System (only if you have a corresponding service as a handler in that Communication System) and thus technically green, that doesn't mean the Fixed Asset creation/change succeeds in S/4HC.

So, if you don't have any service available in the Communication System to handle the Outbound message from S/4HC, the Outbound message would have some technical errors and be red. To check the response in this case, please manually check the data content of the Outbound message in app "Message Dashboard" - find out the corresponding Outbound message, and go to its Data Structure ->…-> FIXEDASSETCHANGECONFIRMATION->Log->Item. You can refer to the following screenshot:

Or, if you want to use a service in the Communication System to automatically check the Outbound messages from S/4HC, create that service based on the WSDL of our Outbound service, make sure that it is available and correct, and then you can maintain its URL in the Communication Arrangement accordingly.

If you have further specific questions during your testing, you could raise a ticket to component FI-AA-AA-A. Or if you have any requirements, you could use the customer influence tools described in note 11 in order to bring this matter up to product owner of the application so that this can be addressed in future development.

Hope this helps.

Regards,

Guoqiang

tborn
Participant
0 Kudos

Hi Guoqiang;

Thanks for your response. Our communication arrangement is configured similar than your screenshot and I would have thought it then checks the confirmation message. Based on the error message I believe this is where there is an issue (maybe permission error of some sort).

Or are you saying when testing this via SOAP UI we need to create a second request for the confirmation?

Regards

Thomas

guoqiang_fan2
Discoverer

Hi Thomas,

No, you don't have to create a service in your Communication System to handle the confirmation message from S/4HC.

If you are only doing a few manual tests via SoapUI and can do the manual check in Fiori app, you don't have to create a service to automate this. You can still do the manual test and manual check, just please ignore the HTTP technical error codes in header and search for the business responses in data content in Fiori app.

Only if you are processing mass fixed assets and don't want to manually check the results in Fiori, you may want to create a service in Communication System to automate the checking process. For example you may want to show a corresponding report in Communication System. Just please be aware that you need to be responsible for the logic in that service.

Regards,

Guoqiang

Answers (2)

Answers (2)

EricvanZundert
Active Participant
0 Kudos

2021-10-09-07-16-41.jpgHi Thomas,

We facing a kind of similar issue.

The confirmation of the asset change API results in an HTTP Code: 404 () Error.

Although the result is written in an item log, see attached picture. If you go to Data Content (item) do you also see the messages?

In the meantime, I asked SAP (via incident) or it's possible to have a kind of ALV list/export functionality of the messages (in mass... not 1 by 1...).

Or provide a way how we can solve the HTTP error, because we get an error in case of successful processing and unsuccessful processing... no way to focus on the errors only.

Ideally, both should be provided.

@Mark, you also comment in the SAP incident, maybe worth keeping involved?

Eric.

Ps. we're on S4HC Public.

tborn
Participant
0 Kudos

Hi Eric,

When checking the outbound message we are getting a slightly different error, where it says the recipient cannot be determined. Only comes up as a warning though.

Mark_W
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Thomas,

Please see sample-payload-create-asset.txt

What you are missing is the tag <SenderBusinessSystemID>?</SenderBusinessSystemID>

See the mandatory fields here

I've changed the field you are trying to amend to NegativeAmountIsAllowed for the example as I'm running into an error I want to clarify internally, but for the moment that payload should work for you as a reference.

I also wanted to add this User Guide for Journal Entry Post API on S/4 HANA Cloud, while it is a different API the general steps are much the same.

Also note "Reliable messaging (RM) configured, but no Message ID and no WSRM assertion provided" error when us..., while for onprem it gives good information on the WS-A or SAP-MessageID protocol in the resolution.

Kind regards

Mark

tborn
Participant

Thanks Mark for your input. Edging closer. We are now at a stage where the asset gets created, although as you mentioned adding the node ExpiredUsefulLifeInYrs in the valuation node returns an error.

Also the outbound service still fails with HTTP code 403 Forbidden

I have tried some changes to the outbound user for the communication scenario but nothing seems to fix the issue.

Reading through the documentation didn't shed any light either.

Thanks again

Thomas