How to extract the column width in ALv report if its executed in background

I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extract coulmns in back ground.
I have executed in background and checked the spool and  for some of the columns width is not sufficient to display comeplete data so please suggest how to extract the columns sizes if executed inj background for an ALV

Hi Deepthi,
you can try with the above mentioned suggestions ,if its worked its fine ,
If not use Docking container instead of custom container, For ALV in back ground jobs, its suggest to use docking container instead of custom container , below you can find the declaration for docking container and code to use docking and custom container in your program for fore and back ground.
or you can use docking container alone for both operations.
Data : G_DOCK1 TYPE REF TO CL_GUI_DOCKING_CONTAINER,
IF CCON IS INITIAL. (ccon is container name )
*Check whether the program is run in batch or foreground
    IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
*Run in foreground
      CREATE OBJECT CCON
        EXPORTING
          CONTAINER_NAME = 'CON1'.
    CREATE OBJECT GRID1
        EXPORTING
          I_PARENT = parent_1.
ELSE.
*Run in background
      CREATE OBJECT GRID1
        EXPORTING
          I_PARENT = G_DOCK1.
    ENDIF.
  ENDIF.
B&R,
Saravana.S

Similar Messages

  • How to add the double headings in Alv Report.

    Hi All,
    Plz suggest me how to add the double headings in ALv Report.
    Ram

    Hi,
    Try out this program....
    REPORT  ypm_historycard_rep.
    TYPE-POOLS : slis.
    DATA : it_cbm TYPE STANDARD TABLE OF mara.
    DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
           wa_fcat TYPE slis_fieldcat_alv,
           it_fcat TYPE slis_t_fieldcat_alv.
    START-OF-SELECTION.
      SELECT  *
      FROM  mara
      INTO CORRESPONDING FIELDS OF TABLE  it_cbm
      where matnr = 'D80K7'.
    END-OF-SELECTION.
      it_layout-zebra = 'X'.
      it_layout-colwidth_optimize = 'X'.
      it_layout-f2code = '&ETA'.
      APPEND it_layout.
      DEFINE macro4fcat.
        wa_fcat-col_pos = &1.
        wa_fcat-fieldname = &2.
        wa_fcat-tabname = &3.
        wa_fcat-seltext_l = &4.
        append wa_fcat to it_fcat.
        clear wa_fcat.
      END-OF-DEFINITION.
      macro4fcat    '1'  'MATNR'         'IT_CBM'   'MATERIAL NO'    .
      DESCRIBE TABLE it_cbm.
      IF sy-ucomm = '&F03'.
        MESSAGE 'hi hello good morning "press enter button" this is quiz' TYPE 'S'.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      i_callback_program                = sy-repid
    i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
      is_layout                         = it_layout
      it_fieldcat                       = it_fcat
       i_save                            = 'A'
      TABLES
      t_outtab                          = it_cbm
      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.
    *&      Form  html_top_of_page
    *       text
    *      -->TOP        text
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      DATA: l_text(255) TYPE c.
      DATA: text1(255)  TYPE c.
      DATA: t_header TYPE REF TO cl_dd_table_element ,
            wa_header TYPE REF TO cl_dd_table_area.
      CALL METHOD top->add_gap
        EXPORTING
          width = 10.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'hello'
        sap_style     = 'HEADING'
    CALL METHOD top->add_gap
        EXPORTING
          width = 20.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'HOW ARE YOU'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 50.
      CALL METHOD top->add_text
      EXPORTING
        text          = '____________________________________________________________'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 90.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'YOU CAN TRY LIKE THIS'
        sap_style     = 'HEADING'.
    ENDFORM.                    "html_top_of_page
    Regards
    Debarshi

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

  • How to increase the column size of Alv tbale

    Hi All,
    I created an Alv table to display the content of my database table. In one of the column the entire data from my database are not displayed the last few characters are missing. The data type for that column in the database is char. Can any one help me how to increase the column size in my Alv table or any suggestions to resolve this issue.

    Hi Vadiv,
    Try with this..
    DATA: LR_IF_CONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
    LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE,
    LR_CMDL TYPE REF TO CL_SALV_WD_CONFIG_TABLE,
    LR_TABLE_SETTING TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
    LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
    IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
    LR_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    " get reference to the ALV model
    LR_IF_CONTROLLER = WD_THIS->WD_CPIFC_ALV( ).
    LR_CMDL = LR_IF_CONTROLLER->GET_MODEL( ).
    LR_TABLE_SETTING ?= LR_CMDL.
    " Set column width
    DATA LR_COL TYPE REF TO CL_SALV_WD_COLUMN.
    LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
    LR_COL->SET_WIDTH( '70' ) .
    LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'ENAME' ).
    LR_COL->SET_WIDTH( '100' ) .
    LR_TABLE_SETTING->SET_FIXED_TABLE_LAYOUT( ABAP_TRUE ).
    You can refer to webdynpro component SALV_WD_TEST_TABLE_PROPS. Go to the view TABLE and look inside the method SET_COLUMN_SETTINGS. I hope this will help you.
    Cheers,
    Kris.

  • How to change the column width in Smartforms..?

    Hi All..
    I need to change the column width in a smartform.
    The requirement has been mentioned as follows...
    Adjust the column width of the following columns:
    MATERIAL: 14 char
    DESCRIPTION: 20 char
    How to perform this..??
    Where can i find the column width of various columns of a smartform..???
    Please Help me...
    Regards
    Pavan

    In the SMART Forms, you would have created a Table object and specified the line width and divided that into no. of columns that you want, you have to mandatorily specify the width of each column so that total of column width will be equal to that of the line width.
    When you double click on the Table object, you can TABLE tab on the right side. If you can't see the line / columns details, click on the DETAILS button.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • How to set the column width of JTable

    I want do remember the column width and write it to a file, when the window is started , the column width is read from the file and the table is set as that. I also want the column width is not fixed and can be changed by mouse.But I am always failded.
    How to do? would you please help me!
    Thanks a lots.

    To "remember" the column widths, add a mouse listener to the table header. Upon mouseReleased(), get the column widths and save them to your file. When the application starts next time, get the stored widths and set them using:
    table.getColumn("XXX").setPreferredWidth(...);
    By default, your columns are adjustable, but you can use:
    table.getTableHeader().setResizingAllowed(true);

  • How to optimize the column width in Table Control

    Hi all,
          When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
    So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
    thanks for your help.
    Points would be awarded .
    Regards,
    Anil .

    Hi,
    In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
    Regards
    Sudheer

  • How to set the column width in the PDF exports of interactive reports ?

    Hello,
    I have a huge problem with the PDF export for the Interactive reports. I'm using APEX 3.2.
    I have to produce a PDF report in landscape format that show 21 columns. My problem is that the columns have a ridiculous short width and that the text inside the columns do not wrap in the columns. So I get things like that :
    Date Name
    2011 Leina
    I should see 2011-08-01 and the name Leinad Jan
    I tried several things to format the columns, but none of the them has any effect on the PDF itself.
    1) I used HTML code in the report query. It works well with the interactive report, but display the HTML tags in the PDF.
    2) I used css to set the width of my columns. It works in the interactive report, but not in the PDF, the column width do not change.
    It's like the report do not notice that my page format is Legal 14 x 8.5 (Landscape) and still believe it's 8.5 x 11 (which is "portrait")
    Do you have any idea so set the columkn widths in the reports ?
    Thank you !
    Edited by: leinadjan on Aug 1, 2011 11:15 AM

    To "remember" the column widths, add a mouse listener to the table header. Upon mouseReleased(), get the column widths and save them to your file. When the application starts next time, get the stored widths and set them using:
    table.getColumn("XXX").setPreferredWidth(...);
    By default, your columns are adjustable, but you can use:
    table.getTableHeader().setResizingAllowed(true);

  • How can i Auto Size the Column width in RDLC Report

    Hi Friend's,
    I have created Windows application with RDLC Report. I am binding(Generating) dynamic columns and data's in RDLC Report Using Matrix control, I need to make Auto size of Column width for each Column in
    Matrix of RDLC report. So Can any one suggest me to make the Auto Size of Column Width in RDLC.
    Thanks in Advance,
    Mohan G

    Hi Mohan,
    In Reporting Services, the column width/height is hard-coded, hence, we cannot set the column width/height dynamically or based on an expression. So is the report size.
    In addition, since it is a RDLC report, we need a ReportViewer control to display this report within a custom application. If you need to change the size of the whole report, we can set the AsyncRendering property of the ReportViewer control to false, and
    set the SizeToReportContent property to true.
    Regards,
    Mike Yin
    TechNet Community Support

  • How to increase the column size of interactive report

    Hi , I am using apex 4.2 and theme 25 ..
    i did not find any option to increase the column size of interactive report. where as in classic report i can do so ,,
    Please guide me to achieve that.
    Thank You,
    Nihar Narla

    Nihar Narla wrote:
    Hi , I am using apex 4.2 and theme 25 ..
    i did not find any option to increase the column size of interactive report. where as in classic report i can do soThis can be done using CSS. Create a rule like this in the page Inline CSS property:
    .apexir_WORKSHEET_DATA td[headers="COLUMN_ALIAS"] {
      width: 10em;
    }where COLUMN_ALIAS is the alias of the column in the report query and the width measure is whatever you require.

  • How to Reduce the Column Width in JSP?

    Hi -
    I have developed a JSP with the Jdeveloper3.2 Wizard.
    I want to reduce the column size on the screen as some columns appear too big. How do I do this ?
    Any help will be greatly appreciated
    Thanks
    Fahim Chesti

    In the SMART Forms, you would have created a Table object and specified the line width and divided that into no. of columns that you want, you have to mandatorily specify the width of each column so that total of column width will be equal to that of the line width.
    When you double click on the Table object, you can TABLE tab on the right side. If you can't see the line / columns details, click on the DETAILS button.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • How to Extract the selected line in alv?

    Hi,
      I am learning ABAP and i have a doubt.It is as follows.
    In interactive reports, by clicking on a ROW we can display the line by using SY_LISEL in AT LINE_SELECTION event .
    Now i want to have a pop up window when we click on a selected row of ALV  report I want that single ROW to be displayed . How can i do this?

    Hi Ravindra,
    I think this is not possible with ALV reports because these use field catalogs unlike Interactive reports. Interactive reports only has the capability of popping up the data in the next list when clicked on row with the help of the events.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • How to increase the column width when viewing a spreadsheet created by a concurrent request

    I have created a BI Publisher template to display the output from scheduled discoverer reports. It contains sixty three columns and the heading for each one is a variable but, in order to fit these on the page, each column is about a half a centimeter wide.
    When I use the Preview Template option from the RTF file and select Excel the columns are automatically sized to accommodate the data (which is what is required). However, when I upload the template and run a concurrent request and view the output, each column is shown as half a centimetre in width so the user can see very little of the data without resizing all columns. We do not think that this will be acceptable to our users.
    We are using Excel 2010 in both cases.
    I have looked at this forum and tried a few things without success so any help will be gratefully received.

    for ebs 12.1.3 you can create excel template by bip desktop 11
    i used bip desktop 11.1.1.5 with ms office 2010 for create excel template for ebs 12.1.2 and 12.1.3
    using excel template based on what do you want to do - if report contains complex visualization or many merging of cell and etc
    for starting
    https://blogs.oracle.com/xmlpublisher/entry/real_excel_templates_i
    Creating Excel Templates - 11g Release 1 (11.1.1)

  • How can i change field width in ALV report

    hello,
    i have to modify vendor payment list. it is a ALv report
    proble is that when i gave vendor acc range for any month (range of posting date) it shows list,
    but for february it show run time error
    error description-  the resulting values are too large for the designated field.
    for posting dates 1.02.2009 to 25.02.09 it shows list. but when i gave posting date after 25 it doesnt show list.
    just i cant understand how to solve it.
    thanks in advance,
    Anuradha.

    Hi...
    Best option is first deside which format you want to put in that date field...
    then before filling internal table do one thing format that date field and then add into ur internal table which u later will use to show in ALV Grid Report...
    Example...Suppose you want DD.MM.YYYY
    then use
    concatenate Fieldname0(2) Fieldname2(2) Fieldname+4(4) into Fieldname...
    This way you can format the date in any format with proper logic. and ur problem getting solved
    Regards,
    Chintan

Maybe you are looking for

  • Calling XML Publisher Report from OAF using the conc programs xml output

    Hi all I am trying to call a report from oa Framework. I have developed the Template in the Ms-Word and for Generating the xml data i used the view object defined in OAF, this approach is working for me...i used the following code to do this in the A

  • Install Oracle 8.1.7 on Solaris 2.8

    I can't connect to servermanager and when i try, i have the ora-03113 ! What have to do ? Please help-me !

  • What program do I use to install Reader under Ubuntu

    I am trying to install a later version of Adobe Reader than comes from the Ubuntu repository. When I use Adobe's download Reader page, I get the typical download box that asks if I want to open the file or save it. The default opening program on my s

  • Coverflow icons

    I've tried looking around for a solution but I have been unable to find anything. I've got a two part question. 1- How can I get better icons to show in coverflow? Some of these are Apple defaults. For example, the icon for ".dmg" files shows up like

  • Presenter Display does not update current slide or run timer ...

    Hey - I'm a newbee, so forgive me is this is something obvious. When I run my presentation, the Presenter's Display does not update the current slide as the show progresses. Nor does the timer run. Nor are the notes displayed, even though I have chec