How to display more than 255 chars in background job with ALV Grid ????

Hi All,
I am using ALV grid with OO.
I have used call screen for ALV grid display. I have to display more than 255 characters in width. While running it, I can see the list perfectly.
But in background mode, the list is truncated after 255 chars.
Can anybody help how to send complete list(width more than 255 chars) to spool.
Thanks and Regards,
Neha

Hi SAP fan,
<b>YES you can run the ALV report in background mode.
To run the report in background do F9 instead of F8, then give immediate and save.
Now goto Sm35 goto job overview and view the job listed
Choose the job and press the spool button. It will show the list created on the next page. When u clcik the list u can see the ALV output.
To see this the job should be in the finished status.
How to define Periodic Jobs
1.Execute transaction SM36
2.Define Job name, Job class, Target server
3.Click on 'START CONDITION' button
4.Click on 'Date/Time' button
5.Enter Scheduled start DATE & TIME. Check mark 'Periodic Job' field. Click on 'Period values' button and select 'Hourly' or 'Dialy' or 'Weekly' or 'Monthly' or Other period and SAVE. Go back to main screen.
6.Click on 'STEPS' button and enter Program name and Variant under box 'ABAP Program'. Click on 'Print Specification' button and enter Printer name under 'Output device' and SAVE
7.Click on SAVE button until you get message on bottom of the screen that describes 'Job XYZ saved with status: Scheduled'.
8.Click on 'Job overview' button or execute SM37 transaction.
9.Select the appropriate 'Job name', 'User name', 'Job Status' & Schedule date under 'Job start condition' and click on 'Execute' button or press F8.
10.You will now see all your scheduled JOBS.
<b>Case: 2</b>
You can Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
if sy-batch = ' '.
call 'REUSE_ALV_GRID_DISPLAY'.
else.
call 'REUSE_ALV_LIST_DISPLAY'.
endif.
if you are using OO alv then write this code..
CALL METHOD cl_gui_alv_grid=>offline
                RECEIVING e_offline = off.
    IF off IS INITIAL.
      CREATE OBJECT g_custom_container
             EXPORTING container_name = g_container.
    ENDIF.
<b>Case: 3</b>
if you are using OO ALV.
Just before creating the custom container check for the following condition.
Batch or Web Reporting
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT o_custcontainer
EXPORTING
container_name = lc_custcontrol
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
ENDIF.
You can see the output in Spool in transaction SP01.</b>
Good Luck and thanks
AK

Similar Messages

  • Want to display more than 300 charcters in a column using ALV grid display

    Hi Guru's,
    I am trying to display more than 500 charcters in a column using alv grid display but it in the output it is showing only 128 characters. Can you help me to display all the characters in particular column Or is there any limitation in maximum of no of charcters for a column?
    Thanks,
    Radha.

    Hi Paurl,
    Define a work area say
    wa_layout type slis_layout_alv.
    then fill this work area as
    wa_layout-zebra = X
    wa_layout-colwidth_optimize = X.
    wa_layout-max_linesize = 300.
    Then in FM 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    is_layout = wa_layout
    etc.
    you provided this for the field which is displayed in alv grid will have more than 128 characters.
    from this code i want,how it refers to particular field.
    when i mentioned field catalog-OUTPUTLEN = '300'.
    it is not displayed the field morethan 128 characters.
    it only displays 128 characters.
    please provide me clear and breif information with suitable code.
    i am trying what your sending but it is not displayed more than 128 characters.
    if you don't mind please spend for me some time for this and
    give me clear and breif information with suitable code.
    Thanks & Regards,
    Radhakrishna.

  • How to handle more than 255 char in excel att. in FM SO_DOCUMENT_SEND_API1

    hi all,
    Good morning.
    My requirement is to send a report as an excel attatchment to the respective managers mail box. For this I am using the function module SO_DOCUMENT_SEND_API1 as follows.
    call function 'SO_DOCUMENT_SEND_API1'
    exporting
    document_data =
    put_in_outbox =
    sender_address =
    sender_address_type =
    commit_work =
    tables
    packing_list =
    object_header =
    contents_bin =
    contents_txt =
    receivers =
    exceptions
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    others = 8.
    Here the problem is contents_bin is of type SOLISTI1 which takes max 255 characters, As my report columns occupies more than 400 characters, I am unable to get all the column values in excel attachement.
    Can anyone please help me to get all the column values in the excel attachment.
    Thanks in Advance.

    Hi,
    Please check the following extract of a sample program I had executed.It deals with how to handle more that 255 chars in excel att in FM SO_DOCUMENT_SEND_API1
    Hope this helps....
    CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
               con_tab  TYPE X VALUE '09'.  "OK for non Unicode
    data : Begin of wa_output ,
              BUFFER(1000)  TYPE C,  " data to be written into xls format
           End of wa_output.
    data : gt_output LIKE wa_output OCCURS 0 WITH HEADER LINE.
    data : FIELDNAME_OFFSET TYPE I.
    Attachement contents
    DATA: BEGIN OF wa_att_cont.
            INCLUDE STRUCTURE solisti1.
    DATA: END OF wa_att_cont.
    DATA: lt_att_cont LIKE wa_att_cont OCCURS 0.
    data : begin of zdfies occurs 0.
                 include structure dfies.
    data : end of zdfies.
    data : begin of it_field occurs 0,
                 fldname(40) type c,
           end of it_field.
    data : yfilname like RLGRAP-FILENAME value 'C:\Documents and
    Settings\'.
    data : ok_code TYPE sy-ucomm,
           save_ok TYPE sy-ucomm.
    data : flag type i.
    ********************************Variables*****************************
      DATA: lv_count   TYPE i,                   "  count
            lv_forwarder LIKE soud-usrnam,       " Forwarder.
            lv_lines TYPE i.                     " no of lines
    ********************************Structures****************************
      DATA: w_doc_data LIKE sodocchgi1,
            w_sent_all(1) TYPE c,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ.
    ******Structure for Folder ID
      DATA: BEGIN OF wa_folder_id.
              INCLUDE STRUCTURE soodk.
      DATA: END OF wa_folder_id.
    Folder Contents, change attributes
      DATA: BEGIN OF wa_object_fl_change.
              INCLUDE STRUCTURE sofm1.
      DATA: END OF wa_object_fl_change.
    ******Object definition, change attributes
      DATA: BEGIN OF wa_object_hd_change.
              INCLUDE STRUCTURE sood1.
      DATA: END OF wa_object_hd_change.
    ******Object ID
      DATA: BEGIN OF wa_object_id.
              INCLUDE STRUCTURE soodk.
      DATA: END OF wa_object_id.
    ******Object Defintion.
      DATA: BEGIN OF wa_sood.
              INCLUDE STRUCTURE sood.
      DATA: END OF wa_sood.
    ******User Definition
      DATA: BEGIN OF wa_soud.
              INCLUDE STRUCTURE soud.
      DATA: END OF wa_soud.
    ******Sent to all flag.
      DATA: BEGIN OF wa_sonv.
              INCLUDE STRUCTURE sonv.
      DATA: END OF wa_sonv.
    ******Mail contents
      DATA: BEGIN OF wa_objcont.
              INCLUDE STRUCTURE solisti1.
      DATA: END OF wa_objcont.
    ******Mail header.
      DATA: BEGIN OF wa_objhead.
              INCLUDE STRUCTURE soli.
      DATA: END OF wa_objhead.
    ******Para A
      DATA: BEGIN OF wa_objpara.
              INCLUDE STRUCTURE soparai1.
      DATA: END OF wa_objpara.
    ******Para B
      DATA: BEGIN OF wa_objparb.
              INCLUDE STRUCTURE soparbi1.
      DATA: END OF wa_objparb.
    ******Receivers list
      DATA: BEGIN OF wa_receivers.
              INCLUDE STRUCTURE somlreci1.
      DATA: END OF wa_receivers.
    Pack list
      DATA: BEGIN OF wa_packlist.
              INCLUDE STRUCTURE sopcklsti1.
      DATA: END OF wa_packlist.
      DATA: BEGIN OF wa_att_head.
              INCLUDE STRUCTURE soli.
      DATA: END OF wa_att_head.
    ********************internal tables******************************
      DATA: lt_objcont   LIKE wa_objcont OCCURS 0, "mail contents
            lt_objhead   LIKE wa_objhead OCCURS 0, "mail header
            lt_objpara   LIKE wa_objpara OCCURS 0, "Paragraph A
            lt_objparb   LIKE wa_objparb OCCURS 0, "Paragraph B
            lt_receivers LIKE wa_receivers OCCURS 0," receiver list
            lt_packlist  LIKE wa_packlist OCCURS 0,"Pack list
            lt_att_head  LIKE wa_att_head OCCURS 0."Attachment Header
    **************************Constants***********************************
      CONSTANTS: lc_kreuz LIKE sonv-flag   VALUE 'X', "Outbox flag,
                 lc_colon(1) TYPE c VALUE ':',
                 lc_raw(3) TYPE c VALUE 'RAW',
                 lc_f(1) TYPE c VALUE 'F',
                 lc_u(1) TYPE c VALUE 'U'.
    DATA: w_cnt TYPE i.
    data : wa_edition like t_edition.
    DATA : i_strlen TYPE i,
            i_off TYPE i ,
            i_len TYPE i VALUE 254,
            i_totlen TYPE i,
            lv_fill_space TYPE i,
            lv_split_times TYPE i,
            lv_len TYPE i.
    **>> Populate the attachment contents.*
      LOOP AT gt_output INTO wa_output.
        i_strlen = strlen( wa_output ) .
        IF i_strlen LE 254.
          CONCATENATE con_cret wa_output-buffer
               INTO wa_output-buffer.
          APPEND wa_output-buffer TO lt_att_cont.
        ELSE.               "  i.e the data is more than 255 characters
         DO 4 TIMES.
            i_totlen = i_off + i_len .
            IF i_totlen = 254.
              wa_att_cont = wa_output+i_off(i_len).
              CONCATENATE con_cret wa_att_cont
              INTO wa_att_cont.
              APPEND wa_att_cont TO lt_att_cont.
            ELSE.
          wa_att_cont = wa_output+i_off(i_len). "splitting more than 255
               APPEND wa_att_cont TO lt_att_cont.
            ENDIF.
            IF i_totlen GE i_strlen.
              CLEAR : i_off .
              EXIT.
            ELSE.
              i_off = i_off + 254.
            ENDIF.
          ENDDO.
        ENDIF.
        CLEAR : wa_output.
      ENDLOOP.

  • How to display more than 255 characters in the report

    Hi all,
    In my program, i try to output a variable type c length 500 in the report. But this report still keep on display 255 characters only although i had set the line-size to 500.
    Is there any method output all characters?
    thanks,
    Janice

    Hi Janice Yeoh,
      I am assuming this is classical report......And just need to do is increase the line-size in report statement. Find below for small example which i ve tried..
    REPORT  ytest1 LINE-SIZE 500.
    DATA :  BEGIN OF it OCCURS 500,
            v TYPE c,
            END OF it.
    DO 503 TIMES.
      IF sy-index = 500.
        WRITE '500'.
      ELSE.
        WRITE : 'X' NO-GAP.
      ENDIF.
    ENDDO.
    Dont forgot to Reward me points .....All the very best....
    Regards,
    Sreenivasa sarma K.

  • How to display more than 132 characters in a smartform

    Hi Experts,
    I am reading notes/text entries by calling read_text and then passing them in a variable. I want to display the notes. But even after declaring the variable as  LINE2048, it is displaying only 255characters as output length in smartform.
    My code:
    TYPES: BEGIN OF TYP_FINAL,
             PARTNER_NO      TYPE BU_PARTNER,         "Partner No.
            OBJECT_ID       TYPE CRMT_OBJECT_ID_DB,  "Object ID
            PROCESS_TYPE    TYPE CRMT_PROCESS_TYPE,  "Activity Type
           ACTUAL_NOTE     TYPE LINE2048,           "Actual Notes
           END OF TYP_FINAL.
    data : T_FINAL           TYPE STANDARD TABLE OF TYP_FINAL,
              WA_FINAL          TYPE TYP_FINAL.
    data:  v_actualnote     TYPE LINE2048.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                        = SY-MANDT
                  ID                            = C_0002
                  LANGUAGE                      = sy-langu
                  NAME                          = l_name1
                  OBJECT                        = C_BUT000
                TABLES
                  LINES                         = t_line
               EXCEPTIONS
                 ID                            = 1
                 LANGUAGE                      = 2
              IF SY-SUBRC = 0.
               clear: v_accountnote.
               LOOP AT T_LINE INTO WA_LINE.
                 CONCATENATE v_accountnote wa_line INTO v_accountnote SEPARATED BY space.
                 clear: wa_line.
               ENDLOOP.
              wa_final-account_note = v_accountnote.
              clear: v_accountnote.
             ENDIF.
    On the smartformm side, under main window->loop->text(to display the variables).
    How to display more than 255 characters in a smartform.
    Regards,
    Sangeeta.

    why the heck would you use read_text when you want to print a text/note on a form?
    in SAP-Script we use the "INCLUDE"-Statement for this.
    and in smartforms a Text-node of type 'I'.
    you can not write all in one line and expect the system to handle this like a floating text.
    one character takes a cretain amount of space (varying for different characters and font and font sizes).
    you Page has a certain width, so where is the miracle in the thesis that on a sheet of paper with a certain width just a certain amount of characters will fit?

  • Display more than 255 characters in SAP 4.6c version.

    Hi
    Can anyone tell me how to display more than 255 characters in the spool log  of sap or the application server?
    Thanks in advance.
    Geeta

    Hi,
      You have to have some patch.Pls refer to SAP oss notes 626010.
    Pls reward if useful.
    Sushil.

  • A field to be displayed in portal legth of 3 and r/3 more than 255 char

    Hi all,
    Kindly give me reply, I need to display one structure in portal, in this one field is of length 255 char.
    Need to change it to more than 255 characters but it should be display in portal as 3 or 5 char length only, can accept more than 255 char lengtjh.
    thanks & regards,
    Chandra sekhar.

    Hi Chandra sekhar,
    A similar kind of a probelm is explained in the link below:
    Link:
    The other requirement of displaying it as 3 - 5 chararcter field in portal can be done by creating the iView as required.
    Regards,
    Pranav.

  • How to transfer data more than 255 char from excel sheet to internal table.

    Hello Experts,
    I have a requirement where i have a text field in the excel sheet of more than 255 char and need to be updated in the text element. To do that i need to transfer the excel sheet data to an internal table where one of the field is more than 255 char.
    in the standard function module it works only upto 255 char. Can you help me if we have some other way to get more than 255 char in the internal table from excel sheet.
    Thanks in Advance.
    BR,
    RaJ.

    Using .xls, it is not possible transfer data more than 255 characters from excel sheet. However if the excel sheet is saved as Comma Delimited format or Tab Delimited format, then using GUI_DOWNLOAD function module data more than 255 characters can be transferred.
    File name should be : .csv (Comma Delimited format)  or .txt (Tab Delimited format)
    File Type would still remain 'ASC' while calling function module GUI_DOWNLOAD
    Also In the internal table declare the field type as String or LCHAR.
    Eg:
    TYPES: begin of ty_file,
            col_a TYPE string,
          end of ty_file.
    DATA: i_file type standard table
                   of ty_file
                 with header line
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      =  'C:\test.csv'
      TABLES
        DATA_TAB                      = i_file

  • How to display more than one documents on windows 8 desktop?

    how to display more than one documents on windows 8 desktop?

    Adobe Reader Touch doesn't show more than one file on screen and doesn't show them on the desktop. Apparently these are very old fashioned things that Microsoft doesn't think we'll want to do any more and calls them "legacy" to make them sound antiquated.
    If you want to do these things use the legacy Adobe Reader, a much more powerful and flexible app (and not obsolete in the slightest). http://get.adobe.com/reader . There are no legacy apps in the Windows App Store.

  • Is it possible to create a Large Text Field in OCOD, more than 255 Char?

    Is it possible to Create a Long Text Field (more than 255 Char Long) as like Description field in OCOD?

    Not at this time.

  • Is it possible to Create a Long Text Field (more than 255 Char Long)?

    Is it possible to Create a Long Text Field (more than 255 Char Long) as like Description field in Service Request Object??
    Thanks!

    Hi
    User can only create custom Long text field (255 Charcter) . Currently system does not support custom note creation

  • ABAP Programming to display more than 255 characters in the screen

    Hi
       I want to display more than 255 characters in the screen after executing a report but i cant able to do that.
    Please help me to find out the solution.
    Thanks
      Mrutyunjaya Trpathy

    Hai tripathy,
    when the output of a report contains columns extending more than 255 characters in length.  In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain upto 90 columns in the display with the wide array of display options.
    The commonly used ALV functions used for this purpose are;
    1.REUSE_ALV_VARIANT_DEFAULT_GET
    2.REUSE_ALV_VARIANT_F4
    3.REUSE_ALV_VARIANT_EXISTENCE
    4.REUSE_ALV_EVENTS_GET
    5.REUSE_ALV_COMMENTARY_WRITE
    6.REUSE_ALV_FIELDCATALOG_MERGE
    7.REUSE_ALV_LIST_DISPLAY
    8.REUSE_ALV_GRID_DISPLAY
    9.REUSE_ALV_POPUP_TO_SELECT
      hope u can try in this way.
    REGARDS,
    PRABA.

  • Send an attachment in email with length more than 255 char per line

    Hi All,
    I have to send an attachment in email with length more than 255 char per line. I dont want to break the line after 255 char and add it in another line.
    Please suggest me any function module which can perform this.
    Thank you all.

    I looked at all threads in the forum, there was about 5 or 6 identical questions, but surprise, nobody knows! It seems that SO_NEW_DOCUMENT_ATT_SEND_API1 function module does not allow more than 255 characters by line.
    It would surprise me a lot if there is no workaround !
    As it is very easy to add any binary attachment which is like a very long line, PDF for example (several kilobytes), via the function module above (lots of examples in the forum), I would advise you to try to use the same way, i.e. use the contents_bin parameter instead of the contents_txt parameter (convert the text into binary) and add the line feeds yourself (okay I know, it's not very smart).
    Last thing, this function module is deprecated, and we should use BCS classes, maybe they work better.

  • How to display more than one column with for each

    Hi guys,
    how to display more than one column with for each like below?
    for each
    Item1
    Item2
    Item3
    Item4
    Item5
    Item6
    Item7
    Item8
    Item9
    Item10
    End for each
    for each          
    Item1     Item2     Item3
    Item4     Item5     Item6
    Item7     Item8     Item9
    Item10          
    End for each

    Take a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
    Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
    Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
    Thanks,
    Bipuser

  • Attach xls file with more than  255 chars

    Hi all,
    I'm trying to send an .xls file as attachement whose row contains more than 255 chars with FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    When preparing the attached table, I tried to separate the tables like this:
    loop at itab.
      concatenate itab-col_1 itab-col_2 itab-col_3 into it_attach
        separted by cl_abap_char_utilities=>horizontal_tab.
      append it_attach.
      concatenate itab-col_4 itab-col_5 itab-col_6 into it_attach
        separted by cl_abap_char_utilities=>horizontal_tab.
      append it_attach.
      concatenate IT_ATTACH cl_abap_char_utilities=>newline into it_attach.
      append it_attach.
    endloop.
    I am able to send this xls as attachment, but when open it in excel/notepad,
    it is so strange that there are so many spaces before the contents itab-col_4 which is unexpected.
    It is expected that the file is tab-delimited with continuous column 1-6.
    Any things went wrong?
    Many Thanks!

    Thanks.
    I tried the first method to convert the byte to string, but a short dumps is resulted,
    DATA: con_tab TYPE x,
               sep TYPE string.
    con_tab = '09'.
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
                EXPORTING
                  in_xstring = con_tab
                IMPORTING
                  out_string = sep.
    so I use back my original method to concatenate the columns as suggested, i.e.
    concatenate itab-col_1 tab itab-col_2 tab itab-col_3 tab into it_attach
    append it_attach.
    concatenate itab-col_4 tab itab-col_5 tab itab-col_6 into it_attach.
    append it_attach.
    concatenate it_attach cl_abap_char_utilities=>newline into it_attach.
    append it_attach.
    but the outcome is still the same, i.e. ...many leading space before itab-col_4
    any more ideas? Many Thanks

Maybe you are looking for