10-10-2007 2:59 PM
Hi,
I need to create internal table depended on checkbox.
That means that if checkbox is checked the itab will have one column more.
could i do smt like this:
begin of itab.
.
.
if checkbox = 'X'.
pole type d,
endif.
end of itab.
Regards,
Joanna
10-10-2007 3:19 PM
Joanna,
There is no such feature in ABAP exactly the way you are looking for, but there are many alternatives. Depending on your need (why you want such a feature), one or other may be used.
1) Go ahead and add the column, but don't use it if check box is unchecked.
2) Define two internal tables (one of them with additional column) and use the appropriate itab when checkbox is checked.
3) Create a dynamic internal table - a very hard solution to implement and much harder to maintain.
10-10-2007 3:21 PM
Hi sudhi,
Can u show me some code which illustrates the implementation if dynamic internal table.
Thanks & Regards,
Sai
10-10-2007 3:39 PM
Sai,
Please create a separate question in the forum when you want to start a topic that is different from the original post. (Side tracking a thread is called 'hijacking' the thread.) Also, you might get more (and better) responses from others when the subject title is more appropriate for the question.
For dynamic internal table creation, please look up help on ABAP statement CREATE DATA. I recall the help page having an example. Also, you might find examples in this forum if you search with those keywords.
10-11-2007 5:11 AM
Hi
sorry joanna lazarz
there is no such facility in SAP to change the internal table like that
if you want you can create 2 internal tables where one contains one field extra and at that time if check box is checked then call that internal table other wise normal internal table
<b>Reward if usefull</b>
10-11-2007 7:45 AM
Hi,
but if i create two tables i need to make saome select twice i in code I am collecting a lot of data so it will be double long