Beating back BSP bugs

Beating back BSP bugs

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

    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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 first published in August 2007

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.