cancel
Showing results for 
Search instead for 
Did you mean: 

Sort a column in table that has dynamic context attributes

Former Member
0 Kudos

Hi,

I have few static attributes in my context, rest of the attributes are added dynamically to the context.

i have followed the std steps, ONSORT i call the table IF_WD_TABLE_METHOD_HNDL-> apply_sorting() method.

Now if i try to SORT on the column bound to the dynamic attribute. It dumps.

Pls give your suggestion.

regards,

Murugesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Murugesh,

How did you solve this problem? Can you help me on this, I am facing the same issue.

When I debug this, CL_WDR_TABLE_METHOD_HNDL class GET_DATA_TABLE method is getting only static structure data. PFB

Also this is causing missing of dynamic attribute values when sorting any other field.

Are we missing any note or something? Please suggest.

Regards,

Vamsi

Former Member
0 Kudos

Hi ,

Please provide the code of you ONSORT event handler .

Regards

Vivek

Former Member
0 Kudos

In ONSORT, as mentioned, i just call the apply_sorting method of the table method handler.

IF_WD_TABLE_METHOD_HNDL-> apply_sorting()

Former Member
0 Kudos

Hi,

Standard sorting method is applicable only if all your context_attributes comes from same node. if your table column is mapped from context attributes of different nodes then it will not work.

Thanks,

Rahul

Former Member
0 Kudos

As mentioned, In my case the Node is same, but the attributes of the NODE are dynamic.

Former Member
0 Kudos

Hi,

A possible reason of dump in this case may be that at the time when you try to sort the framework does not have a static image of the context node. During this time, if you try to process the node programatically trhe framework will dump.

So for any dynamic changes to be done in the context, one has to be very sure that at the time when you are processing the dynamic attributes there is a stable context image present.

Hope this information helps.

Best Regards,

Ashish.