Application Development and Automation 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: 
Read only

ALV GRID - Fixed Column with fixed Text

Former Member
0 Likes
1,314

Hi all !!!

I want to use an ALV GRID to show data in this form :

Menu | Data1 | Data2 | Data3

Menu 1 |

Menu 2 |

Menu 3 |

Menu 1,2,3 are fixed Text in a fixed Column (such as Row Title, this column is always the same and fixed).

How can I program this with an ALV Grid ?

Thanks.

Message was edited by: David Cerati

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
880

Hi David,

do you have only three rows alwyas....?

if there are only three rows then you can take extra column in internal table and then fill that column with the Menu1 , Menu2....etc.

But can you explain in detail what you are looking for..

Regards

vijay

5 REPLIES 5
Read only

Former Member
0 Likes
881

Hi David,

do you have only three rows alwyas....?

if there are only three rows then you can take extra column in internal table and then fill that column with the Menu1 , Menu2....etc.

But can you explain in detail what you are looking for..

Regards

vijay

Read only

0 Likes
880

Hi,

and also make the the MENU column as key , so that it will be fixed. pass this while filling the fieldcat.

<b> X_FIELDCAT-KEY = 'X'.

X_FIELDCAT-KEY_SEL = 'X'.</b>

Regards

vijay

Read only

dani_mn
Active Contributor
0 Likes
880

use the "fix_column = 'X'" property of field catalog to fix column.

Fill your internal initial lines with fixed text menu1 menu2 and menu3 to display.

Regards,

Wasim Ahmed

Read only

aris_hidalgo
Contributor
0 Likes
880

Hi David,

Please use my code below for your reference.

DATA: lc_fieldcat TYPE slis_fieldcat_alv.

CLEAR lc_fieldcat.

DEFINE m_field.

add 1 to lc_fieldcat-col_pos.

lc_fieldcat-fieldname = &1.

lc_fieldcat-outputlen = &2.

lc_fieldcat-seltext_l = &3.

lc_fieldcat-do_sum = &4.

lc_fieldcat-inttype = &5.

lc_fieldcat-hotspot = &6.

lc_fieldcat-fix_column = &7.

lc_fieldcat-ddictxt = 'L'.

lc_fieldcat-no_zero = 'X'.

append lc_fieldcat to %fieldcat.

END-OF-DEFINITION.

m_field 'AEDAT_ERDAT' '12' 'Release Date' '' '' '' 'X'.

m_field 'CPUTM_ERZET' '12' 'Creation Time' '' '' '' 'X'.

m_field 'BUDAT_WADAT' '12' 'Issue Date' '' '' '' 'X'.

m_field 'VBELN_EBELN' '12' 'STO/DO Number' '' '' 'X' 'X'.

m_field 'WGBEZ' '20' 'Material Group' '' '' '' ''.

m_field 'ARKTX_TXZ01' '42' 'Material Description' '' '' '' ''.

m_field 'LGORT_KUNNR' '10' 'Ship-To-Party' '' '' '' ''.

m_field 'LGOBE_NAME1' '20' 'BC/Dealer Name' '' '' '' ''.

m_field 'LGOBE_ADDRS' '42' 'Ship-To-Address' '' '' '' ''.

m_field 'REGION' '08' 'Region' '' '' '' ''.

m_field 'MBLNR' '12' 'GTS Number' '' '' '' ''.

m_field 'WAMNG_LFIMG' '14' 'Quantity' '' 'P' '' ''.

m_field 'TOT_QTY' '14' 'Total Quantity' 'X' 'P' '' ''.

m_field 'VBAND' '15' 'Volume Band' '' '' '' ''.

m_field 'VOLUME' '16' 'Rate' '' 'P' '' ''.

m_field 'COST' '20' 'Cost' 'X' 'P' '' ''.

This is done in fieldcat(ALV). My first 4 columns are fixed.

Regards!

Read only

0 Likes
880

Ok, I'm going to make some test with your examples !

Thanks a lot ... Rewards OK !