Skip to Content
author's profile photo Former Member
Former Member

Change length of an attribute dynamically

Hello Everyone,

I am displaying data from a node in an ALV.

The node has an attribute whose length has been set to 30.

There are 3 cases.

In 2 of the cases, the length of one attribute in the node has to be restricted to 10, and the user would be allowed to enter in values in the ALVs.

Whereas in the third case, the length of the same attribute should be 30 and there also the user would be able to enter in values to that particular column.

Is there any way we can use the same node and change the length of the attribute dynamically based on the condition.

I believe I can bind a different node dynamically which has the respective length based on the case. But can this done by using just one node and changing the length of the attribute dynamically?

I hope I was able to explain my scenario clearly. Could someone give me valuable suggestions. 😊

Cheers,

Vishnu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 08, 2010 at 11:20 AM

    >But can this done by using just one node and changing the length of the attribute dynamically?

    I don't believe that you can change the lenght of the attribute dynamically. At least not with a static attribute. Perhaps with a dynamic attribute, but then it wouldn't be usable in the ALV. There is just too much going on with the generation of RTTIs and Field Catalogs behind the scenes.

    Although you could swap nodes or dynmically generate the entire node, perhaps the easier approach would be to use two different attributes. You could then setup two different cell editors pointing to these two different attributes. Cell editors can be placed in a column, but use the attributes of another column. You would need to disable one of the columns generated for one of the attributes. The other column would dynamically set which cell editor it was using.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.