How to adjust column length in function REUSE_ALV_GRID_DISPLAY

Hi,
I am using this function REUSE_ALV_GRID_DISPLAY to display .Please tell how to adjust the column length in  this function, so that it is set to default field name size.
thanks

Hi anu,
The column width can be adjusted by using the following method:
-> define layout of the type.
            data: it_layout type slis_layout_alv.
-> call the reuse alv... by using the is_layout field name with the above defined variable.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
    I_CALLBACK_PROGRAM                =  <program that calls reuse>
    I_CALLBACK_PF_STATUS_SET          = < form to set pf-status>
    I_CALLBACK_USER_COMMAND           = <form to catch user command>
    I_STRUCTURE_NAME                  = < structure to be passed>
    I_GRID_TITLE            = < any title to appear on top of the grid display>
    IS_LAYOUT                         = it_layout
    IT_FIELDCAT                       = IT_FIELDCAT[]
    IT_EVENTS                         =
    IT_EVENT_EXIT                     = I_EVENT_EXIT  < to capture exit event>
  I_SCREEN_START_COLUMN             = 0 <screen settings>
  I_SCREEN_START_LINE               = 0
  I_SCREEN_END_COLUMN               = 0
  I_SCREEN_END_LINE                 = 0
  IMPORTING
  E_EXIT_CAUSED_BY_CALLER           =
  ES_EXIT_CAUSED_BY_USER            =
   TABLES
    T_OUTTAB                          = IT_INACT_OBJ
   EXCEPTIONS
    PROGRAM_ERROR                     = 1
    OTHERS                            = 2
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                 
-> write a form to set the layout of the grid...
*&      Form  build_layout
      text
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
Set layout field for row attributes(i.e. color)
  gd_layout-info_fieldname =      'LINE_COLOR'.
gd_layout-totals_only        = 'X'.
gd_layout-f2code            = 'DISP'.  "Sets fcode for double click or "click(press f2)
gd_layout-group_change_edit = 'X'.
gd_layout-header_text       = 'helllllo'.
endform.                    " build_layout
endform.   
This will optimize the output of the grid display.
Hope this helps!!!
Revert if any queries!!!
regards,
Naveenan.

Similar Messages

  • How to adjust Column width using SHD0 for FB60

    Hi,
    How can adjust ( i have to reduce the length) Assignment filed in the FB60 transaction using SHD0.
    Please help in this regard.
    Regards,
    Kishore

    HI,
    I think you can adjust the column width and save it as Screen Variant in the SHD0.
    When you create a screen variant for the MIRO, adjust your column width and position than save it the variant. Once you save and activate the variant, it will appear in the Layout dropdown box on MIRO.
    OR
    Please check in spro with ur functional consultant to explore if the field can be made not mandatory..
    menu path:
    AR and AP -> Customer Accounts -> Line Items -> Display line items -> display line items without ALV

  • How to determine column length semantics through ANSI Dynamic SQL ?

    I am looking for a way to determine the length semantics used for a column through ANSI Dynamic SQL.
    I have a database with NLS_CHARACTERSET=AL32UTF8.
    In this database I have the following table:
    T1(C1 varchar2(10 char), C2 varchar2(40 byte))
    When I describe this table in SQL*Plus, I get:
    C1 VARCHAR2(10 CHAR)
    C2 VARCHAR2(40)
    In my Pro*C program (mode=ansi), I get the select statement on input, use PREPARE method to prepare it and then use the GET DESCRIPTOR method to obtain colum information for output:
    GET DESCRIPTOR 'output_descriptor' VALUE :col_num
    :name = NAME, :type = TYPE,
    :length = LENGTH, :octet_length = OCTET_LENGTH
    For both C1 and C2 I get the following:
    :type=12
    :length=40
    :octet_length=40
    So, even if I know that my database is AL32UTF8, there doesn't seem to be a way for me to determine whether char or byte length semantics were used in C1 and C2 column definitions.
    Does anybody know how I can obtain this information through ANSI Dynamic SQL?
    Note: the use of system views such as ALL_TAB_COLUMNS is not an option, since we wish to obtain this information even for columns in a complex select statements which may involve multiple tables.
    Note: I believe OCI provides the information that we need through OCI_ATTR_DATA_SIZE (which is in bytes) and OCI_ATTR_CHAR_SIZE (which is in chars). However, switching to OCI is something we would like to avoid at this point.

    Yes, I was wondering which forum would be the best for my question. I see similar questions in various forums, Call Interface, SQL and PL/SQL and Database - General. Unfortunately there is no Pro*C or Dynamic SQL forum which would be my first choice for posting this question.
    Anyway I now posted the same question (same subject) in the Call Interface forum, so hopefully I'll get some answers there.
    Thank you for the suggestion.

  • In powl- how to adjust column size

    Hi All,
    In my Powl - I have a column of char320.
    In display this field get scrolled - like abcdefgh, ijklmn till 320 char
    i want to adjust the column size -  only 8 to 10 char to display & dots after that - like abcdefgh....
    So that if required user can scroll & see it - but in defalut only 10 char column
    I try it with -
          lw_fieldcat-width         = 8.
    *    lw_fieldcat-wrapping      = abap_true.
    But its not working
    Any suggestions ???

    Hi Priya,
    Have you tried for optimizing the column width using Change Layout option?
    BR,
    RAM

  • How to adjust column width Sheet to Go?

    Does anybody know how you can increase the column width in Sheet to Go?
    Eugene
    My PlayBook App: Checklists

    With the new Playbook 2.0 update and the docs to go app, I found that when in Excel, tap on the column header, (where it has the column identified as A, B, C, etc.), the whole column will be highlighted in blue and you will notice that on one side of the column header is a double line. Simply place finger on the header and slide to desired width. Tap outside of the column to return to the document.

  • How to adjust song length

    Hi there I have an ipod mini. I have a couple of songs that have a 'hidden' track or a long silence attached to the song that I like. I was wondering if anyone knew how to import the song without the hidden extras.
    Thankyou x

    Welcome to Discussions Nicole!
    Here's what you need to do, and do this before you import the tracks into iTunes:
    1. Play the track in question in iTunes (by double clicking it), and make a note of the time where it ends (minutes:seconds)
    2. Right click (command-click on a Mac) the track, and select 'Get Info'
    3. Select the 'Options' area of the dialog box which appears
    4. Enter the 'Stop time' you acquired above. Enter the minutes, then a colon, then the seconds. If you wish to be more presice, you can enter the milliseconds as well
    5. Click OK, and then import the track in the usual way.
    Note, you can do steps 2-4 after you've imported the track, but this won't remove the dead area of the track from the file, and therefor won't reduce the file size.

  • How to adjust width of columns?

    I used to be able to find that sweet spot between columns (e.g., song, artiust, album) where my cursor arrow became a width-indication-symbol and I could adjust the width of the columns. Since the new version of Spotify arrived, I can't. How to adjust column width?

    I'm not sure what the management are thinking at Spotify? First we loose that handy feature where you can click the artwork to jump straight back to the tune being played (yes I know it works in some situations like if you're in another play list but it's confusing me still) Then Ctrl F searching within a playlist goes, which is unforgivable IMHO. Now we can't resize column sizes and finally the apps have disappeared! I've been a champion of Spotify since 2009 and still consider it to be the future of music but all I can see is retrograde steps being taken and the product is becoming more frustrating to use. So this is an appeal to the managers at Spotify to read these threads and take notice! There are other streaming systems we can switch to! Btw I also used to work as a Software User Interface designer so if you need some help give me a shout :)

  • How to adjust the column size

    Hi All,
    I have a table UI element and due to length of header my column is expanded in width.  Kindly assist how I can adjust the column length so the look and feel is good.  I am using NWDS 7.0 sp 05.
    Thank you
    Regards,
    Jaspreet Kaur Grewal

    Hi Jaspreet ,
    Try to use less letter in header for table.
    Refer to http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/601ca4c3-6e64-2a10-3380-949f9cdddd46?quicklink=index&overridelayout=true
    Hope it migh helps
    Regards
    Arun

  • How to increase the row and Column length of Bex query in EP Portal 7.3

    Dear All,
    Please let me know the process  to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Please  let settings to increase rows up 10000 and column 100 in one page.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • How to decrease the column length in working time (CATS) table

    Hi all,
    Can you please tell me how we can decrease the column length in CATS table in the portal. Is it something we can do in webdynpro or in the back end.
    Thanks in advance.
    RK Reddy

    I was looking for something similar and ran across OSS Note 989453. I would recommend checking out this note to see if it helps. Apparently, there is a JAVA program error that makes the columns wider than they need to be.
    We have not yet tried this so if you happen to use it, let me know how it works for you.
    Mark Musser
    County of Sacramento

  • How to pass column name at run time in function.

    how to pass column name at run time in function as parameter.
    thank in advance
    pramod patel

    Hello,
    Using dynamic sql you can pass column name to function. well I am not getting what you really want to do ? Please write in more detail. By the way I am providing one example here. see it uses dynamic sql.
    Create or replace function fun_updtest (p_columnname_varchar2 in varchar2,
    p_value_number in number)
    return number is
    v_stmt varchar2(500);
    begin
    v_stmt := 'update emp
    set '||p_columnname_varchar2||' = '||to_char(p_value_number)||'
              where empno = 7369';
    execute immediate v_stmt;
    return 0;
    commit;
    end;
    call to this function can be like this..
    declare
    v_number               number;
    begin
    v_number := fun_updtest('SAL',5000);
    end;
    Adinath Kamode

  • How can I adjust the length of a note? Please help.

    How can I adjust the length (the sustain time) of a note after I have selected the note? Many thanks.

    Just drag the right end back and forth (mouse over the end of the note - a ] appears) - by holding down ctrlshiftdragging you can change the subdivision into ticks. In the Midi event editor you can do it numerically - just change the numbers displayed in the length section.

  • NW04s: How to change column settings like 'do not adjust' 'fit to resuts' e

    In the new Analyzer, old report format: how to change column settings: do not adjust, fit to results, etc.?
    Regards
    -Bala

    Hello,
    In the properties dialog of the Grid and some other items, there is a checkbox by name "Autofit". When this is checked, the result columns are expanded to correct data widths.
    Regards,
    Manjunath

  • How can we restrict Column length in ALV using POWL.

    Hello,
    I have a new assignment o ABAP Web Dynpro, data displaying ALV by using POWL is a part of that assignment. Everything went fine and at last moment I was stuck with a small issue. In my application I am displaying first ALV by using POWL concept and on the basis of selected row I am displaying second level LAV by using normal ALV procedure (SALV_WD_TABLE). Here the issue is as soon as second ALV is displaying columns in first level ALV are getting expanded. How can I restrict Column length in first level ALV using POWL. I browsed a lot for getting the solution for this, Can any one help me out from this issue.
    Regards,
    Kumar

    Done, in field catalog method...

  • HOW to increase code column length in se38

    hi,
    i am  trying to copy paste code ( SE38) from one server to another  but
    it showing error while pasting i.e code column lenght . on previous server column length
    was  more than 125 charater per line. but here i am getting only 68 charater per line.
    so how can i increase the length of charater per line.
    please help me....
    Manoj...

    hi,
    follow this
    REPORT  zsample  NO STANDARD PAGE HEADING
                                      LINE-SIZE 132
                                      LINE-COUNT 65
                                      MESSAGE-ID yy.
    ~linganna

Maybe you are looking for

  • Visio 2013 startup problem "Please wait while Windows configures Microsoft Visio..."

    Hello, I am getting the "Please wait while Windows configures Microsoft Visio Professional 2013" window on every load of this program. I have found no resolutions from Google searches.  I have tried a full reinstall of Visio, registry modifications (

  • Connecting iPod to a reformatted Mac

    I recently erased everything and reloaded Mac OS X Tiger on my Mac, and I was wondering if the iPod (80 GB, fifth gen.) that I used to sync on that Mac before reinstalling Tiger, would still be able to sync from that Mac like before, or would it eras

  • Touch is stuck on circle

    Sons iPod touch is stuck on spinning circle screen. It won't shut off or let me re-set iPod.  Of course it is just one week over a year old :(

  • Fundamental  Question -Users

    How Do I create Users on the SOlman & the authorizations ;(PFCG direct on SOLMAN??) BTW I have no clue of  SolMan -Just got my hands on it today ! Thanks

  • Internet works everywhere in the house, except in the tv room!

    For some strange reason, anywhere in my house, I get amazing internet connection. A full four bars. But, as soon as I walk into my TV room, which is literally right beside my router, I still get four bars, but my internet becomes slow. On a good day,