on 05-12-2015 7:53 AM
hello members,
i got a situation to upload the excel data into alv table.the alv table is having initail view and std view which contains different fields in each view.i want to upload the data based on view selected.problem is that i am not able to read the value of the varient.please find below screen shot and let me know how to read the value of it.
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 tried below code?..
* Get the API reference
lo_api_interfacecontroller = lo_interfacecontroller->wd_get_api( ).
ENDIF.
* Get personalization obect
IF lo_api_interfacecontroller IS NOT INITIAL.
CALL METHOD lo_api_interfacecontroller->get_personalization_manager
RECEIVING
pers_manager = lo_pers.
ENDIF.
* Get variants
IF lo_pers IS NOT INITIAL.
CALL METHOD lo_pers->get_variants
RECEIVING
variants = lt_var.
ENDIF.
* Set the default variant
* Required variant is read
* READ statement can be modified as per the requirement.
* As this application holds only one user variant, first record is read.
##read the respective records based on your condition
IF lt_var IS NOT INITIAL.
READ TABLE lt_var INTO wa_var INDEX 1.
IF sy-subrc EQ 0.
ls_config_key-config_id = wa_var-config_id .
ls_config_key-config_type = wa_var-config_type.
ls_config_key-config_var = wa_var-config_var.
ENDIF.
TRY.
CALL METHOD lo_pers->set_default_variant
EXPORTING
config_key = ls_config_key
set = abap_true.
CATCH cx_wd_personalization .
ENDTRY.
* Get the variant information based on variant id
* Load the variant/ Set the default variant
CALL METHOD lo_pers->load_config_by_key
EXPORTING
config_key = ls_config_key
fetch_default_variant = abap_true.
Hope this helps you.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rama Krishna,
It ls Drop down field , you can use Get_Static_Attributes to get the selected row from it.
DATA lo_nd_attachments_table TYPE REF TO if_wd_context_node.
DATA lo_el_attachments_table TYPE REF TO if_wd_context_element.
DATA ls_attachments_table TYPE wd_this->element_attachments_table.
lo_nd_attachments_table = wd_context->get_child_node( name = wd_this->wdctx_attachments_table ).
lo_el_attachments_table = lo_nd_attachments_table->get_element( ).
lo_el_attachments_table->get_static_attributes(
IMPORTING
static_attributes = ls_attachments_table ).
- Gowtham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.