Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Grid Display Format to be changed

vinotha_m
Participant
0 Kudos

Hi,

I have a requirement wherein i hav copied a SAP transaction pgm to a Y pgm. and i want the ALV GRid Display Format to be changed i.e the column arrangement.

I have changed the col_pos fields of the table fieldcatalog which is correct even befor the call FM.

But the order of the columns do not..change...

What cud be the reason.

Does anybody know?

10 REPLIES 10

FredericGirod
Active Contributor
0 Kudos

Hi Vinotha,

Maybe you have modify the fieldcatalog after the first display.

Maybe you have chose two times the same column number for different column.

Maybe you have modify the wrong tables

Rgd

Frédéric

former_member181962
Active Contributor
0 Kudos

Hi Vinotha,

Put a breakpoint at the call to the FM and see what is the colpos values for each column in the field catalog.

Post the code here, for exact solutions.:)

Regards,

Ravi

former_member188685
Active Contributor
0 Kudos

hi vinidha,

Check it once your fieldcatalog.

Try to Assign Positions properly.

Regards

Vijay

Former Member
0 Kudos

Hi,

Check that you pass the your internal table fields in capital letters and make sure the col_pos that you mentioned in fieldcatlog are reflecting same sequence in your internal table.

Thanks.

0 Kudos

Hey Deepak,

Thank u for replying....but the fieldcatalog has the fields in caps only but the structure of the internal table that i am passing is different from the fieldcat sequence....Do u think that wud matter..

Regards,

Vinotha M.

0 Kudos

Hi Vinotha,

Try to Chnage and see the Difference.

Regards

vijay

0 Kudos

Also make sure that you do not have a user defined layout loaded (via structure is_variant). This overwrites the default column sequence and visibility set in the field catalog.

Former Member
0 Kudos

Hi vinodtha,

1. sometimes while making such modifications to alv program

(ie chaning the alv format etc.)

and immediately executing the program,

does not reflect the changes on screen output.

2. so just

come out of the transaction se38

, again load the same program

, activate it

, again execute it.

3. Many a times, this kind of behaviour happens

with alv formatting. I had faced similar problems.

May be it helps at your end.

regards,

amit m.

0 Kudos

that too does not work amit..

Former Member
0 Kudos

hi vinotha,

1. are u using GRID of ALV List ?

2. If u are using alv list,

and the column u are trying to shift

is a KEY column, then it won't happen.

3. for this, u also have to make the field

KEY = '' (instead of KEY = 'X')

so that it can shift places.

4. Only using Col_Pos in alv grid

works fine.

But in alv list, one has to use

KEY also (if it is a key column)

so that appearance/output is proper.

Hope the above helps.

regards,

amit m.