Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BSP - Controllers

Former Member
0 Likes
754

Hello Experts,

I have a BSP Page in a BSP Application. The BSP Page is made up of a controller class A. The BSP page has an attribute of type string.

When the page is launched even in test mode, that attribute is having a value. The controller class has a method set_attribute.

My doubt is that, this attribute is getting populated by that method. However when i set a breakpoint to that method body, in se24, the breakpoint is not reached when i launch the page in test mode.

Can someone help me understand what i am missing?

Thanks,

Nitish.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
629

The reason why you don't stop there is because set_attrribute method of controller is not the one which you should use for passing values to view attributes. You need to use same named method of IF_BSP_PAGE which is implemented in CL_BSP_PAGE_BASE . So you need


"in controller's attributes tab
mr_page type ref to if_bsp_page.

"in method DO_REQUEST
me->mr_page = me->create_view( 'my_page.bsp' ).
me->mr_page->set_attribute( name = 'my_page_attr' value = 'some_value' ).

Then double click set_attribute and set breakpoint in cl_bsp_page_base class. It will stop there.

Regards

Marcin

3 REPLIES 3
Read only

MarcinPciak
Active Contributor
0 Likes
630

The reason why you don't stop there is because set_attrribute method of controller is not the one which you should use for passing values to view attributes. You need to use same named method of IF_BSP_PAGE which is implemented in CL_BSP_PAGE_BASE . So you need


"in controller's attributes tab
mr_page type ref to if_bsp_page.

"in method DO_REQUEST
me->mr_page = me->create_view( 'my_page.bsp' ).
me->mr_page->set_attribute( name = 'my_page_attr' value = 'some_value' ).

Then double click set_attribute and set breakpoint in cl_bsp_page_base class. It will stop there.

Regards

Marcin

Read only

0 Likes
629

Yes indeed, this works now.

However I am facing a bigger issue now. An excel file is being stored in a transparent table in a field of type string. When i open the contents of the field in debugger mode, i can see a huge set of characters, its not hexadecimal for sure. The contents are like this:

ÐÏ#ࡱ#á################>###þÿ##############;##########

This continues like it seems to be infinite. I have never seem something like that.

In debugger mode, when i see the contents of the field in fast display, i can see the equivalent hexadecimal value.

Now when i choose view content as XML Browser in debugger, it opens me the excel file.

I have to make some modifications in the excel file and save the updated file in that table.

Can anyone tell me how do i convert it to readable form, like an internal table?

Then convert it back to that format.

Thanks.

Read only

0 Likes
629

Nitish,

Sorry this doesn't seem to be related to your original query and is a totally new one. Please therefore close this thread and create new explaining your issue. Otherwise people will not contribute here as the title is missleading and no one can enter here.

Thanks

Marcin