Skip to Content
author's profile photo Former Member
Former Member

ALV Column heading

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 08:58 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 09:29 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 10:05 AM

    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?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.