cancel
Showing results for 
Search instead for 
Did you mean: 

BI Application Frame programming of methods and setting of parameters

Former Member
0 Kudos

Hi experts,

I have a webdynpro ABAP application with one view.

The view consists of two BIApplicationFrame elements (KOSTENSTELLEN and REPORT).

There is also a treeview element (QUERY) with a hierarchical list of web applications which can be called through the BIApplicationframe REPORT.

The planned functionality is:

First the REPORT is empty. You have to select a query from the treeview QUERY. The element KOSTENSTELLE is filled from the start of the application with the costcenters which the user may view with his permission. This is achieved with a simple query on the masterdata 0costcenter.

When you selected a query from the tree QUERY the element REPORT is filled with the content of this query and the default costcenter (this is the highest node of the costcenter hierarchy which the user may use out of his permissions).

All this is working already with a little coding necessary.

Now comes my problem. How can I adress the BIApplicatioFrame REPORT and transfer a selected costcenter from the element KOSTENSTELLEN to the element REPORT and refresh the content with this new information?

Also I need some coding for the acces of the selected costcenter out of the element QUERY into the context of the view.

I could not find any documentation of the class CL_WD_BIAPPLICATION_FRAME besides the definition in the class builder.

Did anyone already some coding for this task? Please inform me.

Thx

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi community, there seems to be not so much interest in the BIApplicationFrame. So I found out myself.

Here are the comments on the BIApplicationFrame. If you want to use your WD4A application mainly to process data from BW sources just forget about it. The BIApplicationFrame does not give you any possibility to process the retrieved data further. Its only for display of the result of the query.

There are a lot of pitfalls and program errors.

1. No 7.0 support. Your templates must be strictly in 3.5 style. You must prepare your templates if necessary programatically (with the program rs_template_maintain) to use. The queries can be designed in 7.0 design but there seems to lurk also some pitfalls out of the neglected support of the new technology in the BIApplicationFrame.

2. You can't get data out of the Frame. Data is buried as I could see so far. If there is some action else to be done depending of the resultset of the query (which is the main usefulness of displaying data out of BI with a WD4A application) then again forget about the Frame. Just do not use it.

Better recover the data with a FB in the Backend which calls the query and provide an MDX data stream you can work with in your model. The Table and AVL are great to display data anyway and when you want to navigate its better to work with 7.0 webapplications with full support for everything.

3. Some methods of the class just doesn't what they are expected to do, for instance thze method reset_item. Ist unreliable and risky to depend on those methods. Dynamic programming is therefore something shaky and difficult and time consuming. Its mainly a trial and error game.

Something is working, something not.

If you now still want to use the BIApplicationFrame I provide here the technic to send parameters to a query which is displayed in the Frame. You must deklare the parameter dataProviderStateName because you cannot change this dynamically (afaik).

Good luck and if you will find something worthtelling don't hesitate to contact me (bcard is available).

I do all in the method WDDOMODIFYVIEW because I need to adjust the display constantly to the input of the user. There is a table with the costcenters and a table with the queries and the selected line is then used as information to set the parametrisation of the Frame.

method wddomodifyview .

data:

lt_parameters type if_wd_bi_applframe_method_hndl=>tt_name_value,

ls_parameters type if_wd_bi_applframe_method_hndl=>t_name_value,

l_sel_nodename type string,

l_sel_iobjnm type string,

l_sel_child type string,

l_sel_query type string,

lr_node type ref to if_wd_context_node,

lr_element type ref to if_wd_context_element,

ls_kostenstelle type if_main=>element_kostenstelle,

ls_costcenthier type if_main=>element_costcenthier,

ls_queries type if_main=>element_queries,

lr_context_node type ref to if_wd_context_node,

lv_show_variables type wdy_boolean,

l_sel_costcenthier type string.

define add_parameter.

clear ls_parameters.

ls_parameters-name = &1.

ls_parameters-value = &2.

append ls_parameters to lt_parameters.

end-of-definition. "add_parameter

if first_time = abap_true.

wd_this->m_bi_application_frame1 ?= view->get_element( 'REPORT1' ).

wd_this->m_bi_method_handler1 ?= wd_this->m_bi_application_frame1->_method_handler.

wd_this->m_bi_application_frame2 ?= view->get_element( 'REPORT2' ).

wd_this->m_bi_method_handler2 ?= wd_this->m_bi_application_frame2->_method_handler.

wd_this->m_bi_application_frame3 ?= view->get_element( 'REPORT3' ).

wd_this->m_bi_method_handler3 ?= wd_this->m_bi_application_frame3->_method_handler.

wd_this->m_bi_application_frame4 ?= view->get_element( 'REPORT4' ).

wd_this->m_bi_method_handler4 ?= wd_this->m_bi_application_frame4->_method_handler.

wd_this->m_bi_application_frame5 ?= view->get_element( 'REPORT5' ).

wd_this->m_bi_method_handler5 ?= wd_this->m_bi_application_frame5->_method_handler.

endif.

lr_node = wd_context->get_child_node( 'QUERIES' ).

lr_element = lr_node->get_lead_selection( ).

lr_element->get_static_attributes( importing static_attributes = ls_queries ).

l_sel_query = ls_queries-reportid.

case l_sel_query.

when 'REPORT1'.

wd_this->m_bi_application_frame1->set_visible( 02 ).

wd_this->m_bi_application_frame2->set_visible( 01 ).

wd_this->m_bi_application_frame3->set_visible( 01 ).

wd_this->m_bi_application_frame4->set_visible( 01 ).

wd_this->m_bi_application_frame5->set_visible( 01 ).

when 'REPORT2'.

wd_this->m_bi_application_frame1->set_visible( 01 ).

wd_this->m_bi_application_frame2->set_visible( 02 ).

wd_this->m_bi_application_frame3->set_visible( 01 ).

wd_this->m_bi_application_frame4->set_visible( 01 ).

wd_this->m_bi_application_frame5->set_visible( 01 ).

when 'REPORT3'.

wd_this->m_bi_application_frame1->set_visible( 01 ).

wd_this->m_bi_application_frame2->set_visible( 01 ).

wd_this->m_bi_application_frame3->set_visible( 02 ).

wd_this->m_bi_application_frame4->set_visible( 01 ).

wd_this->m_bi_application_frame5->set_visible( 01 ).

when 'REPORT4'.

wd_this->m_bi_application_frame1->set_visible( 01 ).

wd_this->m_bi_application_frame2->set_visible( 01 ).

wd_this->m_bi_application_frame3->set_visible( 01 ).

wd_this->m_bi_application_frame4->set_visible( 02 ).

wd_this->m_bi_application_frame5->set_visible( 01 ).

when 'REPORT5'.

wd_this->m_bi_application_frame1->set_visible( 01 ).

wd_this->m_bi_application_frame2->set_visible( 01 ).

wd_this->m_bi_application_frame3->set_visible( 01 ).

wd_this->m_bi_application_frame4->set_visible( 01 ).

wd_this->m_bi_application_frame5->set_visible( 02 ).

endcase.

lr_context_node = wd_context->get_child_node( 'SCHALTER' ).

lr_context_node->get_attribute( exporting name = 'SHOW_VARIABLES' importing value = lv_show_variables ).

if lv_show_variables eq abap_false.

lr_node = wd_context->get_child_node( 'KOSTENSTELLE' ).

lr_element = lr_node->get_lead_selection( ).

lr_element->get_static_attributes( importing static_attributes = ls_kostenstelle ).

l_sel_nodename = ls_kostenstelle-nodename.

l_sel_iobjnm = ls_kostenstelle-iobjnm.

l_sel_child = ls_kostenstelle-childid.

lr_node = wd_context->get_child_node( 'COSTCENTHIER' ).

lr_element = lr_node->get_lead_selection( ).

lr_element->get_static_attributes( importing static_attributes = ls_costcenthier ).

l_sel_costcenthier = ls_costcenthier-hienm.

if l_sel_child eq '00000000'.

concatenate '1000/' l_sel_nodename+10(4) into l_sel_nodename.

endif.

refresh lt_parameters.

add_parameter 'CMD' 'LDOC'.

add_parameter 'TEMPLATE_ID' 'ZQUERY_TEMPLATE'.

case l_sel_query.

when 'REPORT1'.

wd_this->m_bi_method_handler1->execute_command( lt_parameters ).

when 'REPORT2'.

wd_this->m_bi_method_handler2->execute_command( lt_parameters ).

when 'REPORT3'.

wd_this->m_bi_method_handler3->execute_command( lt_parameters ).

when 'REPORT4'.

wd_this->m_bi_method_handler4->execute_command( lt_parameters ).

when 'REPORT5'.

wd_this->m_bi_method_handler5->execute_command( lt_parameters ).

endcase.

refresh lt_parameters.

add_parameter 'CMD' 'PROCESS_VARIABLES'.

add_parameter 'SUBCMD' 'VAR_SUBMIT'.

add_parameter 'VAR_NAME_1' 'ZKSTKNOT'.

add_parameter 'VAR_VALUE_EXT_1' l_sel_costcenthier.

add_parameter 'VAR_NAME_2' 'ZKSTHIER01'.

add_parameter 'VAR_VALUE_EXT_2' l_sel_nodename.

add_parameter 'VAR_NODE_IOBJNM_2' l_sel_iobjnm.

case l_sel_query.

when 'REPORT1'.

wd_this->m_bi_method_handler1->execute_command( lt_parameters ).

when 'REPORT2'.

wd_this->m_bi_method_handler2->execute_command( lt_parameters ).

when 'REPORT3'.

wd_this->m_bi_method_handler3->execute_command( lt_parameters ).

when 'REPORT4'.

wd_this->m_bi_method_handler4->execute_command( lt_parameters ).

when 'REPORT5'.

wd_this->m_bi_method_handler5->execute_command( lt_parameters ).

endcase.

else.

refresh lt_parameters.

add_parameter 'CMD' 'PROCESS_VARIABLES'.

add_parameter 'VARIABLE_SCREEN' 'X'.

case l_sel_query.

when 'REPORT1'.

wd_this->m_bi_method_handler1->execute_command( lt_parameters ).

when 'REPORT2'.

wd_this->m_bi_method_handler2->execute_command( lt_parameters ).

when 'REPORT3'.

wd_this->m_bi_method_handler3->execute_command( lt_parameters ).

when 'REPORT4'.

wd_this->m_bi_method_handler4->execute_command( lt_parameters ).

when 'REPORT5'.

wd_this->m_bi_method_handler5->execute_command( lt_parameters ).

endcase.

lr_context_node->set_attribute( exporting name = 'SHOW_VARIABLES' value = ' ' ).

endif.

endmethod.

The use of the classmethod set_visible() for 5 frames in a view is somewhat arkward and I hate to do it like that, but hey, if you have a better idea, as for instance how to set the parameter dataProviderStateName dynamically (and don't tell me something out of SAP help online which is not working once you have implemented it!) then don't hesitate to contact me.

good luck to all fearless BI people who still believe in WD4A!