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 Column heading

Former Member
0 Likes
521

Hello all,

my requirement is to display quantity field and its heading text.

GR Quantoty(In Base UOM)

1.011

I need to display heading in leftalign and quantity value in right align..

in my case when i drag the col its draging with column heading also hwo to fix col heading n move value right side in AVL grid display?

Hello all,

my requirement is to display quantity field and its heading text.

GR Quantoty(In Base UOM)

1.011

I need to display heading in leftalign and quantity value in right align..

in my case when i drag the col its draging with column heading also hwo to fix col heading n move value right side in AVL grid display?

4 REPLIES 4
Read only

Former Member
0 Likes
489

Hi,

http://help.sap.com/saphelp_sm32/helpdata/en/e3/e3eb40c4f8712ae10000000a155106/content.htm

See this example

REPORT Y_MALVPOV .

****TABLE WORK AREA

TABLES:KNA1,VBAK.

**SELECTION SCREEN**

PARAMETERS:P_KUNNR LIKE KNA1-KUNNR DEFAULT 1001.

SELECT-OPTIONS:S_VBELN FOR VBAK-VBELN.

***DEFINE INTERNAL TABLE**

DATA:BEGIN OF IT_ITAB OCCURS 0,

VBELN LIKE VBAK-VBELN,

END OF IT_ITAB.

**DEFINE INTERNAL TABLE WITH HEADER LINE***

DATA:IT_JTAB LIKE VBAK OCCURS 0 WITH HEADER LINE.

***PROVIDE TYPE GROUP**

TYPE-POOLS:SLIS.

**MAINTAIN REPORT ID**

DATA:REPID LIKE SY-REPID,

***DEFINE COLUMN HEADING***

VBAK_B TYPE SLIS_T_FIELDCAT_ALV,

***EVENT**

EVENTS_B TYPE SLIS_T_EVENT.

***VARIABLE FOR STORING VALUE**

DATA:IDEX TYPE I.

**FUNCTION MODULE COLUMN HEADINGS***

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_STRUCTURE_NAME = 'VBAK'

CHANGING

Ct_fieldcat = VBAK_B.

***REPORT ID SYSTEM VARIABLE***

REPID = SY-REPID.

****AT SELECTION SCREEN ****

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_VBELN-LOW.

****FUNCTION MODULE FOR ADDING ZEROS AND DELETING THE ZEROS**

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = P_KUNNR

IMPORTING

OUTPUT = P_KUNNR.

***SELECT STATEMENT FOR OUTPUT DISPLAY**

SELECT VBELN FROM VBAK INTO TABLE IT_ITAB.

***FUNCTION MODULE FOR OUPUT DISPLAY**

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

endpos_col = 30

endpos_row = 30

startpos_col = 10

startpos_row = 10

titletext = 'SALES DETAILS'

IMPORTING

CHOISE = IDEX

tables

valuetab = IT_ITAB.

READ TABLE IT_ITAB INDEX IDEX.

S_VBELN-LOW = IT_ITAB-VBELN.

IF SY-SUBRC <> 0.

LEAVE.

ENDIF.

***START-OF-SELECTION EVENT**

START-OF-SELECTION.

SELECT * FROM VBAK INTO TABLE IT_JTAB WHERE VBELN = S_VBELN-LOW.

***FUNCTION MODULE OUTPUT DISPLAY**

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = VBAK_B

IT_EVENTS = EVENTS_B

TABLES

t_outtab = IT_JTAB.

***END OF PROGRAM***

Regards,.

Jagadish

Read only

Former Member
0 Likes
489

Hi,

For alligning the fields to left or right ,you have a option in fieldcatalog called

just(1) type c, " (R)ight (L)eft (C)ent

You can populate this and pass that fieldcatalog.Then you can allign to left ,right or center.

If you want to fix column use

fix_column(1) attribute present in the fieldcatalog.Populate that and pass that .

Reward if useful.

Thanks,

Khan.

Read only

0 Likes
489

but for just(1) type works only for CHAR and NUM type not for QUAN type..

Read only

Former Member
0 Likes
489

I fixed the column heading but quantity value is coming in right side only.. i made column heading right side n need to display values in left side?