Web Service in SAP – Part III – Testing & Investigation Tips

Web Service in SAP

Let’s go for Web Service in SAP – Part III – Testing & Investigation Tips! You could accept, in this cutting edge age on UI5, Fiori and OData, there would be no space for Web Administrations. Yet, shockingly, Web Administration is one innovation which is broadly utilized even today. As a SAP Planner, you plan interfaces which consumes outside Web Administrations in SAP or you make Web Administration in SAP and outer outsider consumes SAP Web Administrations. Web Service in SAP – Part III – Testing & Investigation Tips.

Last week, we made several straightforward Web Administrations in SAP. After our Framework Organization group arranged the WSDL in SOAMANAGER, we gave the WSDL end highlight the group who should consume SAP Web Administrations from outsider apparatus. They were utilizing dotNet (.net) to consume SAP Web Administrations.

However, our dotNet executing accomplice griped that there is some issue with the SAP Web Administration and they can’t consume it. They gave the underneath mistake data. Going to see Web Service in SAP – Part III – Testing & Investigation Tips.

“cleanser env:ServerWeb administration handling blunder; more subtleties in the web administration mistake sign on supplier side (UTC timestamp 20181206151034; Exchange ID ERR74E1A27CD0170E005C081CE5DBERR)

System.Net.WebException: The distant server returned a mistake: (500) Inward Server Blunder.
at System.Net.HttpWebRequest.GetResponse()
at SAPClientApp.Program.Main(String[] args)
The far off server returned a blunder: (500) Inner Server Mistake.

Unhandled Special case: System.NullReferenceException: Article reference not set to an example of an item.
at SAPClientApp.Program.Main(String[] args)”

For unfortunate ABAPers like me who is attempting to become familiar with the basic JavaScript codes for UI5 and Fiori advancements, dotNet blunders were Nerd.

How might an ABAPer who knows just ABAP programming language propose the .Net engineer, how to consume SAP Web Administration programatically?

1. How to Test SAP Web Service?

Since, our .Net carrying out accomplice couldn’t consume our Internet Administration, we intended to test it ourselves from outside SAP. We pulled the Internet Administration Instructional exercise article written in 2008 and followed the means.

We downloaded the free SoapUI 5.4.0 apparatus. We did likewise in 2008 and 10 years later, SoapUI actually stays the best apparatus to test SAP Web Administration. Presently the SoapUI is the outsider. We recreated as though we are consuming SAP Web Administration very much like our .Net accomplices.

We sent the over four screen capture to our .Net companions and the following email which came was, they had the option to consume the SAP Web Administration effectively, Yet..

However.. they could consume all SAP Web Administrations with the exception of one. Presently this is another detour in our Deft venture. SAP group requirements to refresh why .Net couldn’t consume SAP Web Administration in our next Scrum Stand-Up gathering. Trust you are some what acquainted with Lithe/Scrum process (not standard Cascade).

Blunder message: “Web administration handling mistake, more subtleties in the web administration log”.

2. Where can we see the Web Service Log?

Answer : In SOAMANAGER

Logs and Traces in SOAMANAGER

On the off chance that you don’t know have the connection to your SOAMANAGER, you can simply type t-code SOAMANAGER in your SAP t-code order.

From the blunder log we tracked down this message “Worth ? is definitely not a substantial date as per the XML design for ABAP

Did you know, we can check the Internet Administration Sign in SAP itself rather than SOAMANAGER. Check the URI of the SOAMANAGER screen on the top. It has transaction=SRT_ELOG.

3. Go to t-code SRT_ELOG to see the same log.

At the point when we looked carefully, we found we had a discretionary table in the Internet Administration which had date field. Naturally there was not information in the table. At the point when the Internet Administration was called from SoapUI, ‘?’ was set.

Since it was a date field, SAP anticipated that it should be clear or 0000-00-00. However, since ‘?’ was being passed unconsciously, the Internet Administration call was coming up short.

Date should be pass as 0000-00-00 or left blank

4. Optional Input Parameters handling in Web Service

When we passed the date field as clear, we had the option to consume the Internet Administration. Yet, presently we were not getting any result in the reaction.

Once more, the guilty party was ‘?’ in the discretionary info field. We were passing info vale in the ImName boundary however we were not passing any worth in ImTaxNumber boundary. It was discretionary to Expect it. In any case, as a matter of course the XML was taking ‘?’. What’s more, in the SELECT assertion in SAP, ‘?’ was being passed in the channel (WHERE) statement and the SELECT question fizzled.

Example Took in: The discretionary boundaries ought to stay clear in Web Administration.

5. How to Test SAP Web Service from within SAP?

Go to t-code SE80. Go to Storehouse Data Framework – > Venture Administration. Give your Internet Administration name or search with Trump card. When you have your Internet Administration, hit Execute (F8) button.

SE80 -> Repository Information System -> Enterprise Services
Execute the Web Service
Generate Initial Req. Template
Open the XML Editor to Input Values to the Web Service

Please note, you need to put your Input data with the XML tags properly.

Example: <ImName>Federal Credit Union</ImName>

If you have another field say ImTaxNumber then the tag would look like:

<ImTaxNumber>129191200</ImTaxNumber>

Web Service Test within SAP

The above testing steps could look excessively basic. Be that as it may, trust me, assuming somebody is trying his/her Internet Administration, interestingly, he/she wouldn’t know it.

Also Check : Free Step by Step Training on ABAP for SAP HANA

6. How to Update SAP ABAP Web Service End Points (URI) after making some update in the Function Module?

When you make the Internet Administration from the RFC Capability Module, you arrange the End Focuses in SOAMANAGER. Then you move your Capability Module and Web Administration object to next climate (say quality and afterward to creation). Your SOAMANAGER config with end focuses are additionally there in quality and creation.

Following not many months, the business needs to add another information boundary in the Internet Administration. For this you change your RFC Capability Module. You initiate it and test it. After is works agreeably, how might this new change refresh in the Internet Administration End Point?

This is an exceptionally normal and substantial situation.

Go to SE80 – > Vault Data Framework – > Undertaking Administrations – > Administration Definitions.

Open the Help Definition in Alter Mode. Stir things up around town or Enact Button. It ought to open a Spring Up message. Hit Yes. It would save the change to your vehicle.

When you hit Indeed, it would affirm what changes were finished (added or erased). On the off chance that you receive no message, it is fine as well.

Presently, you can move the transport(s) where you have the change to your RFC and Web Administration update. You don’t have to do anything in SOAMANAGER. When the vehicle arrives at quality and creation, the Internet Administration would fill in true to form.

7. Internal error check in CL_VIF_UTIL_FUNC->CHECK; inform the person responsible

You made a RFC FM. Switched it over completely to Web Administration and the end focuses are designed in SOAMANAGER. Then you roll out a significant improvement in the RFC FM. New custom Sorts are added. The table construction is change. You are finished with the RFC. Presently, you need to refresh the Internet Administration.

Comfortable you attempt SE80 and figured you would hit initiate and the Internet Administration would auto change. Amazingly, you get mistake message ‘Interior blunder check in CL_VIF_UTIL_FUNC->CHECK; illuminate the individual dependable’. This isn’t the manner by which it ought to act.

You attempt to go to Outside View, Inside view. No karma.

Then, at that point, I go to SE84 and attempt to actuate there. The spring up affirms for auto amendment/change. However, ultimately it likewise gives a similar mistake.

If you look at the error closely. All says, Type XXXX is not available. So, I go to the Types Tab.

I hit Actuate button. It springs up for auto change message. I hit Yes. Again same blunder.

Presently, I was concerned. I attempted one final time. Rather than hitting Enact, apprehensively I hit Actually take a look at button.

Bingo. It worked. Since I changed the Kinds of the RFC, I went to Types Tab and hit the Actually take a look at symbol. It provoked with auto change data and afterward all green messages. At last, I hit the Enact button once more. Also, this time it requested transport.

Also, the Internet Administration got actuated effectively.

So whenever you can’t change the conflicting assistance definition, you understand what you want to do in SE80 or SE84.

This finishes us up of this article. I fostered my most memorable SAP Web Administration in 2008. I confronted these inquiries/gives then, at that point. Following 10 years, last week when I was helping my group, they all had similar inquiries once more. They needed to research for each focuses referenced previously. Along these lines I wanted to place everything in one spot so in future anybody who needs any data in Making, Testing, Refreshing and Issue Taking care of in Web Administrations can think that it is here.

YOU MAY BE INTERSTED IN

Setting Up an ABAP Environment in the Cloud

How to SPLIT Data in FOR LOOP Using Modern ABAP Syntax?

ABAP on SAP HANA. Part VI. New Age Open SQL ABAP 740

X
WhatsApp WhatsApp us