‎2004 Dec 30 7:44 AM
Hello,
I have a requirement where i want the first two lines on the internal tables that are displayed to be fixed in an alv grid. I have to generate dyanmic columns so i can't use another list. The data in the list is something like this.
matnr columnA columnB columnC..... Maybe N
Limit1 10 - -
Limit2 - 20 -
2306 A B C
2441 D E F
I want the limit1 and the limit2 column to be fixed and Can i add them directly to Column heading but on a new line or fix these two lines so that the othe data moves.
Regards,
Shekhar Kulkarni
‎2004 Dec 30 7:52 AM
You say <b>LIMIT1</b> and <b>LIMIT2</b> are columns, but you show them under MATNR. This is confusing.
As far as I know, multiple level columns are not possible, unless it is a hierarchy. There is no indication of hierarchy in this case.
Your question is obscure. Use [code ] and [/code ] without the spaces before the end bracket and you can show clearly how you want your table. Also specifiy what are the fixed lines in that table with an example ?
You can show your example something like this(I have used the code tags in here)
---------------------------
| MATNR COLA COLB COLC |
|---------------------------
| 2345 XY AB DE |
| 5634 AK TR NK |
----------------------------
I know it is pretty difficult to explain in the forum, but with vague questions you get vague answers.
Regards,
Subramanian V.
‎2004 Dec 30 9:16 AM
Hello,
I am sorry but the lines get distorted after i post the message. Hope this will make clear.
-
..MATNR...COLA...COLB...COLC |
|----
Limit1.. | .-.. | ...PC.....-. |
Limit2.. | .-.. | ...-......PQ. |
2345 ... | .XY. | ...AB.....DE. |
| 5634 ...|.AK.|...TR.....NK. |
-
Now columns COL A COlB COLC there can be n such columns and are decided dynamically. Limit1 and limit2 are the rows of the internal table which are constant for these eg cola colb ... What i want here is now limit1 and limit2 should not move when i scroll on the vertical bar. as there constant for that particular column in this case say colb. so when i press the scroll bar button 2345 should go up 5634 should remain and limit1 and limit 2 should be seen.
eg i press the scroll bar the two rows limit1 and limit2 remain as they are.
-
..MATNR...COLA...COLB...COLC |
|----
.Limit1.. | .-.. | ...PC.....-... |
.Limit2.. | .-.. | ...-......PQ.. |
.5634 ... | .AK. | ...TR.....NK.. |
|.1346......XY.....TY.....NK..|
-
Hope i am clear
‎2004 Dec 30 9:24 AM
‎2004 Dec 30 9:28 AM
Fig 1.
----------------------------
| MATNR COLA COLB COLC |
|---------------------------
| Limit1 - PC - |
| Limit2 - - CE |
| 2345 XY AB DE |
| 5634 AK TR NK |
---------------------------Fig 2
----------------------------
| MATNR COLA COLB COLC |
|---------------------------
| Limit1 - PC - |
| Limit2 - - CE |
| 5634 AK TR NK |
| 1455 XY NB TE |
---------------------------
‎2004 Dec 30 9:34 AM
As far as I know, I am not sure whether you can freeze rows. Freezing columns is possible, but freezing rows, I doubt.
Regards,
Subramanian V.
P.S From this figure, it is pretty clear to us. Thanks
‎2004 Dec 30 9:45 AM
Hello,
What you say is quite correct however there are some methods in cl_gui_alv_grid_base class which if i call may provide a solution. For eg.
<b>SET_FIRST_VISIBLE_COL
SET_FIRST_VISIBLE_COL_ID
SET_FIRST_VISIBLE_COL_ID2
SET_FIRST_VISIBLE_ROW
SET_FIRST_VISIBLE_ROW_ID
SET_FIRST_VISIBLE_ROW_ID2
SET_FIXED_COLS
SET_FIXED_ROWS
SET_GRID_READONLY</b>
However the problem is sap does not let me call these methods and says that either the method is not existing or is a protected method. Could you please help .
Regards,
‎2004 Dec 30 10:43 AM
SET_FIXED_COLS and SET_FIXED_ROWS are applicable for OLE objects.
I am not sure about the others.
Regards,
Subramanian V.