cancel
Showing results for 
Search instead for 
Did you mean: 

Reg READ_TEXT handling in WDA

former_member186491
Contributor
0 Kudos

Hi,

I'm using READ_TEXT function to get Transporter name and LR No in function module to be used in WDA application. While testing function module - custom one - it gives proper result. But, when I made a service call for that same custom function module, dump comes stating that Data is not available when GET_MODEL is called .

Later on searching on that topic, I found that only 128 characters are normally displayed in ALV in WDA. If this is the constraint, then how can I truncate that field of TLINE-TDLINE - which is of 255 characters?

If there is other way out to display that field in ALV in WDA application?

Thanks.

Kumar Saurav.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I dont think that there is a restrictiion in cell lenght in WD ALV on number of charc( not 128 alteast ).

Check my reply in following thread:

former_member186491
Contributor
0 Kudos

Hi,

Thanks for your response.

But, while debugging, when processing reaches to GET_MODEL( ) part, it gets into

 method if_salv_wd_comp_table_if~get_model.

*... check application has set data
  if me->r_data_controller->is_data_instance_valid( ) ne abap_true.
    raise exception type cx_salv_wd_nc_program_error_ui
      exporting
        textid = cx_salv_wd_nc_program_error_ui=>data_invalid
        object = 'SALV_WD_TABLE'
        key    = 'GET_MODEL'.
  endif.

  if me->r_model_controller->default_created eq abap_false.
    me->r_model_controller->set_default_model(
      default_columns = default_columns ).
  endif.

  value ?= me->r_model_controller->r_model.

endmethod. 

and gives the dump. Whereas, till the previous step, data is coming up. That means, while the stage of fetching data in Internal Table, data are there. As and when ALV config is getting called in the step of

DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
  LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
  ). 

it reaches in the aforementioned Method.

Can you please suggest what is wrong over here...?

Thanks.

Kumar Saurav.

Former Member
0 Kudos

Check whether you have implemented your ALV usage properly,

check whether you have correctly bound the data node of ALV ( reverse context mapping ) to the node which contains ALV data.

Also see whether you ALV is instantiated properly or not.

Code should look something like this

  • get ALV component

lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ). " ALV comp usage name; replace with your ALV usage name

wd_this->alv_config_table = lr_salv_wd_table->get_model( ).

Former Member
0 Kudos

Are you creating the component before getting the model?


  lo_cmp_usage = wd_this->wd_cpuse_alv( ). *change alv to your component usage name
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.

  lo_interfacecontroller =  wd_this->wd_cpifc_alv( ). *use the same name you used in the ALV component usage name
  lv_value = lo_interfacecontroller->get_model( ).

make sure you are creating the component and also make sure you are binding correct the ALV like Manas mentioned above.

hope this help!

Jason PV

former_member186491
Contributor
0 Kudos

Hi Manas,

Thanks for your suggestion to re-check.

Issue Resolved.

Thanks.

Kumar Saurav.