cancel
Showing results for 
Search instead for 
Did you mean: 

No ALV Columns available until view rendering complete first time

ramakrishnappa
Active Contributor
0 Kudos

Hi All,

I have a scenario where I need to set properties of alv columns dynamically based on customizing table entries.

The issue is I am not able to find alv columns using WD VIEW object reference during first time view rendering. i.e. When view rendering first time ( FIRST_TIME = 'X' ), the view ref contains no alv columns in method WDDOMODIFYVIEW.But, I am able set the properties of alv columns  on subsequent event trigger.

I tried using REFRESH method of ALV interface controller but of no use.

How do I get ALV columns by using VIEW object reference in method WDDOMODIFYVIEW when FIRST TIME = 'X' ?

Regards,

Rama

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Solved.

I am able to refresh the view using timed trigger ui element and upon refresh of view, got the alv columns in view object reference.

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi Experts,

I need to get alv columns in WDDOMODIFYVIEW( ) method and set ui properties of view ui elements along alv columns using VIEW object

if FIRST_TIME = abap_true.

"How to get the alv columns in view reference object while view rendering for first time?

endif.

Any helpful response is highly appreciable.

Regards,

Rama

Former Member
0 Kudos

Hi,

Like Sarbjeet, I have issues understanding your matter. You're using alv without using alv component as used component? Cause the design pattern of ALV component request you to use the objects from package SALV_WD_CONFIG (especially the model ones). You shouldn't access the view elements directly.

Can you provide the code (or algorythm) that works in the other case so that we could identify the issue?

Regards,

gill367
Active Contributor
0 Kudos

Hi

you can access the ALV column using class cl_salv_wd_config_table.

no need to put in the code in wddomodify.

DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

lo_INTERFACECONTROLLER = wd_this->wd_cpifc_alv( ).


DATA lo_value TYPE ref to cl_salv_wd_config_table.

lo_value = lo_interfacecontroller->get_model(

).

* get the column whose properties you want to change

data col1 type ref to cl_salv_wd_column.


col1 = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( '<COL Name>' ).

Regards,

Sarbjeet Singh

ramakrishnappa
Active Contributor
0 Kudos

Hi Sarbjeet,

Thanks for the reply.

My scenario is not fulfilled by getting alv_model  as we are not mainting any used alv component name in table.

We have a configurable table where we maintain view name , elements and property sets. We are setting the properties of view elements using the table entries.

ALV columns are not available during first time view rendering.

How to make the alv colums available in VIEW ref during first time rendering ?

Hope I have clarified my requirement.

Regards,

Rama

gill367
Active Contributor
0 Kudos

Sorry but I am not able to understand the requirement. Could you please elaborate little more.

How are you displaying ALV without ALV component usage.

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Let me explain my requirement in detail as below

Example:

 

We have an ALV table with columns PARTNER, PARTNER_NAME, PARTNER_COUNTRY, PARTNER_SHARE  on view VIEW1 and ALV model settings are done in WDDOINIT( ).

 

Based on application mode (i.e. Create, Change, Display), we need to set the properties of ALV columns based on custom table entries.

 

Custom table entries as maintained as below

 

TABLE1

 

We need to set the properties of ALV columns by using the table entries with view reference.

 

Note: I am able to access ALV columns by using view reference VIEW1 and set the properties of ALV columns using above table entries but view reference is not having ALV columns when VIEW is first time rendered.

Is there any way to get ALV columns in view reference VIEW1 during first time view rendering?

Regards,

Rama

gill367
Active Contributor
0 Kudos

Thanks for the elaboration.

but still I am not able to get

a) why you cannot use ALV model object in wddoinit only to get ALV column and change column property.

b) why view reference is required to change ALV column.

Regards,

Sarbjeet Singh

ramakrishnappa
Active Contributor
0 Kudos

Hi,

We need to control the whole application and ui properties from custom table entries in we are maintaining the view name and its respective fields along with property sets.

We are setting the properties of alv columns as other normal ui elements by using View object reference but having issue in settings properties to alv columns when view is rendering for first time.

Is it possible to get ALV columns reference while view rendering for first time from View object reference ?

Regards,

Rama