Problem solve Get help with specific problems with your technologies, process and projects.

Beating back BSP bugs

Every software developer needs to know how to combat errors and SAP ABAP developers are no different. In this tip Nigel James gives us the goods on how to defeat pesky bugs in BSP.

Exhibit A - The Problem

  

This is just want I wanted, a bug. It has caused an error, but where is it and how can I fix it?

This kind of a bug generates a error log in the ST22 transaction.

Not much help either, so I searched SDN/BPX/SNC (whatever we are branding it these days) and found nothing useful.

I then posted a question in the forums and awaited a flood of responses. But days later I noticed that the email on my blackberry has somehow broken so I did't notice the responses.

Once I had fixed my email and decided to come back to the problem I discovered that the answers I was given weren't really making me jump over the moon with joy. So in order to not have to reinvent the wheel I called my BSP brain trust but they were working in the basement and had no mobile reception.

So I decided that I really should take a closer look myself. I noticed in the part of the code that was failing a class ( CL_O2_RT_SUPPORT ) with a few very meaningfully named methods. The one that really got my attention was: GET_PAGE_BY_CLASSNAME.

Breath deeply here because the O2 in that class name really does stand for oxygen.

This was exactly what I wanted and because it is a static class I could run it from SE24 and get my answer: the BSP page that was so elusive.

Fixing the error

Generating the page doesn't cut the mustard. You will get an information message:

and then the object will generate sucessfully.

To really find the error you have to do a syntax check (CTRL+F2) just like the ST22 error report told us we should.

So I did that, fixed the bug and my problems were over. Pimms o'clock.

In summary, if you are looking for a a way to get the BSP view name from a generated class name go to SE24 and run the static method GET_PAGE_BY_CLASSNAME in method CL_O2_RT_SUPPORT.

Nigel James is a freelance consultant.

This content is reposted from the SAP Developer Network.
Copyright 2007, SAP Developer Network


SAP Developer Network (SDN) is an active online community where ABAP, Java, .NET, and other cutting-edge technologies converge to form a resource and collaboration channel for SAP developers, consultants, integrators, and business analysts. SDN hosts a technical library, expert blogs, exclusive downloads and code samples, an extensive eLearning catalog, and active, moderated discussion forums. SDN membership is free.

Want to read more from this author? Click here to read Nigel James' Weblog. Click here to read more about ABAP on the SDN.



This was last published in August 2007

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close