on 12-14-2009 11:02 AM
Hi all,
IM having simple alv table ( SALE DOCUMENT ) .i need when i click the vbeln column i need to navigate the second alv table .
for second alv table i need describtion for vbeln.( the concept is same has normal table( LIKE LINK TO ACTION ) .HOW TO DO LINK TO ACTION IN ALV AND PLEASE GIVE CLEAR EXPLANATION.
1.VBAK----vbeln,some more fields im taken ,the cardinality has o.n......
first alv table as executed but how to do second alv while clik the vbeln field.......
thanking you,
A.S.ANANTH.
In that view, when you have used the ALV as component usage...then
In teh METHODS tab,
on_click_vbeln <<EVENT HANDLER>> F4help select teh onclikc event of that alv...
By ths you can have the clickhandler for that ALV..
And you can have data in R_PARAM of that action handler..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you used the Normal TABLE UI or ALV element for the table display..
This is for ALV, where BEGDA is a column that has linktoaction..At runtime you can see it..
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
).
data: lr_col type ref to cl_salv_wd_column,
lr_colH type ref to cl_salv_wd_column_header,
lr_link1 TYPE REF TO cl_salv_wd_uie_link_to_action. "Link to action type
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'BEGDA'
receiving
value = lr_col.
CREATE OBJECT lr_link1.
lr_link1->set_text_fieldname( 'BEGDA' ).
CALL METHOD lr_col->set_cell_editor
EXPORTING
value = lr_link1.
For ALV, if want to haev an action to this then refer my earlier post in the same thread..
For NORMAL TABLE UI ellement, while creating the binding option you can specify the LINKTOACTION as UI element for that column..
For that column, once you attach teh LinkToAction, properties->action-create an action for this..
Please try this out..
Regards,
Lekha.
have u created the node for ALV right..
if this ALV is the first view to be displayed then, write in WDDOINIT of this view...
otherwise if this ALV is 2nd view then write the code in the inoundplug handler of this 2nd view...
is this clear..
how many views are there..in which view is this ALV displayed...
HI ,
Yes u given the code ,s its working but im created only one view in that view in init the code written u given and than i need when im click the link need to navigate to 2 window ( that is second view ) now im creted second alv table foe the link action first than give code to second table .; and were to insert the code
thank you for u r response
Hi,
Are the Two ALVS structure same...or you fecthcing from different tables..
If you have created the 2nd view and aslo had the ALV as component usage...
Create the Inbound plugs ie carete a navigation link from 1st to 2nd view, from 2nd to 1st view...
After doing this,
In the LINKTOACTION, handler fire the plug to the 2nd view..
In teh 2nd view...
Get the table contents and bind to the node...
Instantiate the ALV if this is different.. and display in view..
If you have previous/back button then fire the plug to 1st view...
Which code are you taling about...
Do you have 2 views with ALVs in both of them..If yes, are the ALVs display different sets of data of same structure...
Is this clear..
HI IM CLEAR ABOUT U R REPLAY but im done as u told last theard but when im click the first view o/p by link to action field i need to get second view table.here in the to view im taken same struc( vbak ).but in the the first alv table im taken three fields and in the second view im taken another 3 fields in the same structure i need when im clik the vbeln field i need to navigate to second three field table.
NOW im got up to first view o/p by link to action field also im having now.BUt WHAT CODE want to write for getting link to action to second view and were to write in the second view to get link to get the values iwhen i click the first link to action vbeln field.im written u r code previouse u posted im get sucessfully link to action but i need to navigate to seconary view were have to write the code.
Hi,
I think below link will help you a lot in solving the roblem:
PS:You have to write the code in the method of type event handler ont he action OnClick.
Pooja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
try this
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
).
data: lr_col type ref to cl_salv_wd_column,
lr_colH type ref to cl_salv_wd_column_header,
lr_link1 TYPE REF TO cl_salv_wd_uie_link_to_action. "Link to action type
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'BEGDA'
receiving
value = lr_col.
CREATE OBJECT lr_link1.
lr_link1->set_text_fieldname( 'BEGDA' ).
CALL METHOD lr_col->set_cell_editor
EXPORTING
value = lr_link1.
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.