cancel
Showing results for 
Search instead for 
Did you mean: 

BSP Application object reference

Former Member
0 Kudos

Hi,

In My Z BSP application, I have used the standard class CL_BSP_HAP_DOCUMENT_UI application class.

In one of the button click, a HRHAP00_DOC_BC BADII is implemented. In this BADI, i wanted to get the reference of the BSP applicaiton object. I wanted to know which button of BSP is clicked to bypass some piece of code. In R/3, for the same button SY-UCOMM is filled. when the same is run from portal, this SY-UCOMM is not set. How to get the reference of the BSP object in this case.

Regards,

Lekha.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you´ll have to create your own BADI (definition and implementation) as a Z object. Check first if behind the button that you mention it is possible to implement another BADI. It might be necessary to work also with a Z class instead of CL_BSP_HAP_DOCUMENT_UI. You´ll have no other choice, since you may not modify standard objects.

Once you have created your interface, BADI definition and BADI implementation, you can add a method for catching the event OnClick. It might be necessary to define an event in the interface behing the new BADI for catching the event and calling the method that will process the information.

krishnendu_laha
Active Contributor
0 Kudos

I would suggest to use a static attribute in class and pass the event name of the button after clicking the same (even triggered)...!

In the BADI you can check static attribute 's value.

Thanks

Former Member
0 Kudos

HI,

As the class is standard class, how can I create a static attribute inside it.

Regards,

Lekha.

krishnendu_laha
Active Contributor
0 Kudos

well, you can make a new class by inheriting from 'CL_BSP_HAP_DOCUMENT_UI' class and use it in your BSP...

(I do not know if we can new attributes or not in standard class through enhancement)

Thanks

Former Member
0 Kudos

Hi,

Inherting a class at this time would be a risk for us. As this is a support project, minimum coding is requried to achieve this. Do you suggest any other way.

Regards,

Lekha.

krishnendu_laha
Active Contributor
0 Kudos

If you are in ECC 6.0 then you can enhance the class to add one attribute..

Menu: Class -> Enhance - create an enhancement implementation and you can add your own attribute!

Hope it is going to help you.

Thanks.