on 01-30-2009 3:33 AM
Hi,
We have the Tracking number being displayed along with all the other order details.
Requirement is to call the frieght forwarder url once the Tracking number is clicked.
Looking forward for a quick response.
Thank U,
Kedar
Hello Kedar,
Take a look at this [wiki|https://wiki.sdn.sap.com/wiki/x/AQD4AQ] where I show how to use UI elements in ALV component cells. (Specially at method build_alv).
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i am not mistaken, you want to call a different application upon clicking the tracking number.
See the code below
cl_wd_utilities=>construct_wd_url(
EXPORTING
application_name = '<APPL_NAME>'
in_parameters = lt_parameters
IMPORTING
out_absolute_url = lurl ).
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window1 = l_cmp_api->get_window_manager( ).
return = l_window1->create_external_window(
url = lurl ).
return->open( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kedar,
Please refer to the below code for creating an URL.
It was developed and tested exclusively for your requirement.
Here i created a node 'TABLE_ALV' which has three attributes BUKRS, BUTXT, PERIV.
Out of which i made BUKRS as LTU, and bounded to a URL.
METHOD wddoinit .
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
DATA lt_columns TYPE salv_wd_t_column_ref.
DATA ls_column LIKE LINE OF lt_columns.
DATA lo_column TYPE REF TO cl_salv_wd_column.
DATA lo_ltu TYPE REF TO cl_salv_wd_uie_link_to_url.
lo_cmp_usage = wd_this->wd_cpuse_use_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_use_alv( ).
lo_value = lo_interfacecontroller->get_model( ).
CALL METHOD lo_value->if_salv_wd_table_settings~set_read_only
EXPORTING
value = abap_true.
CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
RECEIVING
value = lt_columns.
LOOP AT lt_columns INTO ls_column.
lo_column = ls_column-r_column.
CASE ls_column-id.
WHEN 'BUKRS'.
CREATE OBJECT lo_ltu.
CALL METHOD lo_ltu->SET_TEXT_FIELDNAME
EXPORTING
value = 'BUKRS'.
CALL METHOD lo_ltu->set_reference
EXPORTING
value = 'https://www.google.com'.
lo_column->set_cell_editor( lo_ltu ).
ENDCASE.
ENDLOOP.
Hope it answers your question.
Regards,
Shashikanth. D
ENDMETHOD.
Hi Kedar,
Yes you can set the Link to URL in the table.
Once you create a node in the context, create a Table UI element on the view.
Now right click on the UI element and click Create Binding from the context menu.
Now choose the cell editor for various attributes in the node.
Select LTA for the desired attribute and say OK.
This will create a table with LTU as one of the columns.
Once you have that column, then select that respective cell editor of that column.
Under properties of the LTU, you please create a method to handle the OnClick of the link.
Now you can write the necessary code in that event handler, to navigate to the desired URL.
Hope it helps,
Regards,
Shashikanth. D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.