In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what is the debugging method of ABAP application in the cloud". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
When Jerry was doing nodejs and Java development on SAP Cloud Platform, it was a headache to single-step debugging applications developed in these two languages running on the cloud. Although it is still possible to improve the efficiency of troubleshooting problems in background service applications through Jerry this article? The port mapping method described in log VS remote debugging can debug cloud applications on the local computer, but Jerry still misses the convenience of single-step debugging in On-Premises ABAP-the breakpoint is set at the click of the mouse, and you can debug immediately without any configuration.
So now that ABAP is in the cloud, is single-step debugging as easy to use as it was in the previous On-Premises environment? The answer is yes.
Let's take a specific example to experience.
Through the first two articles of the Restful ABAP Programming series, Jerry has developed a Fiori application that supports additions, deletions, changes and queries, and supports custom data checking and Action.
I select the record whose ID is 103.After clicking the Accept Travel button, I expect to set its status to Accepted through the Action:
Unfortunately, I didn't see the expected state change, but the following ABAP runtime error prompt interface that all ABAP programmers don't want to see.
However, have you noticed the Debug hyperlink in the lower right corner of the image above? Like SAPGUI, the debugger opens immediately after clicking, and you can observe the call stack where the runtime error occurred, the detailed code location that caused the error and the value of the related variable.
By the way, if you want to customize the ABAP runtime error display that occurs in SAP GUI (that is, what you see in the ST22 transaction code in On-Premises), such as adding the phrase "Buddha Blessed, never BUG", you can refer to the Jerry article:
Has your ABAP program ever given light to Buddha? Let's try this trick of Jerry.
Back in ABAP Development Tool, we first click on the Show hyperlink to see the runtime error details: Short Text tells us that after we click the Accept button, the relevant processing framework intentionally throws a CX_CSP_ACT_RESPONSE exception. The location where the exception is thrown is in the program CL_CSP_ACT_CHECK_FEATS_ACTIONS, which implies that the error may be related to the pre-execution CHECK of the Action.
Continue to scroll down and find that in the frame code, because nothing is read from the table it_feature_result on line 353, sy-subrc is not zero, resulting in the RAISE SHORTDUMP branch on line 355.
All runtime errors that occur by currently logged-in users in the SAP Cloud Platform ABAP environment can be viewed in the Feed Reader view of ABAP Development Tool, which is equivalent to the ST22 transaction code in SAP GUI.
Now that we know enough about the static information about this runtime error, the next step is to look at it in the debugger.
Restart the Fiori application, click the Accept button again, click the Debug hyperlink after a run-time error, and the ABAP debugger pops up automatically, highlighting the line of code that caused the run-time error and showing the call stack on the left.
Hold the mouse over the it_feature_result and find that the inner table is empty. Of course, you can't read the data from it. This inner table is the input parameter of the method handle_rejected_instances of the current ABAP class CL_CSP_ACT_CHECK_FEATS_ACTIONS, and you need to figure out why this input parameter is empty.
Looking out one frame from the stack frame that throws the runtime exception, we can see that the inner table of this input is generated by execute_feature_controllers on line 291. This method calls a get_features method we implemented in Behavior Definition by callback function:
Here we find the root cause of this run-time error: because Jerry commented a piece of code for testing purposes, causing get_features to be called back by the framework, it did not return the data expected by the framework:
When Jerry re-enable the required code and then set the breakpoint, click the Accept button, and you can clearly see how the framework's execute_feature_controllers is called to the get_features callback method we implemented through the call stack.
This is the end of the content of "what is the debugging method of ABAP application in the cloud". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.