SPOOL - how to display output list of more then 255 characters?

Hi,
First of all, I would like to say hi to all of you here, as a new member :)!
I've just discovered this forum - I'm very new and let's say unexperienced in SAP, unlike you :)!
Didn't know where to put my subject (in what folder) so I apologize in advance if I'm mistaken... I work as an ABAP programmer in SAP Core and SAP IS-T and currently I'm worried about this problem:(!
We have these huge reports in IS-T that have to be run in background, because of lot of data. Most of reports are very wide and don't fit in those 255 characters that is SAP standard for spool display. Now I'm dealing with this RFC that has to provide spool display with 800 characters, and this has to be on production by tomorrow:)!!!!!
First I created new format type (ZX_65_800) in transaction SPAD and assigned it to my local printer. I thought this would be enough, but I was wrong. Because when I try to run my programe in background, the system doesn't offer me my format at all :(!
Is there anything else I must do in order to get it.... (I work in Release 620)
If anyone had the same problem, please contact me!
Thanks,
BR,
Sanja

Hi All,
We have been looking for a solution for what I believe is the same problem, for more than 2 years now. I would just like to verify with you, if your requirement are similar to ours.
Problem:
1.     Requirement is to run large HR reports – either standard or with Ad Hoc Query in background mode in a company with more than 50,000 employees.
2.     Nobody wants printed reports these days.  We want to save the forests. Customers prefer to be emailed an Excel file so they can do further data analysis, filtering, pivot tables etc.
3.     Reports are running OK in foreground for smaller sections of the organisation, where you send the output to Excel from ALV, or save as a local file in spreadsheet format.
4.     But large reports for entire company are awkward, tie up your PCs resources, and complex reports accessing many tables can timeout before completion.
5.     So scheduling these reports to run in background would be the ideal solution.
6.     However when we access the report output from SP02, we find that most reports (say with more than 13 or so fields) have an output wider than 255 characters and the output of the spool file wraps to the next line in Excel.  It is very tricky to then parse the data back into one row for each employee.  And you have a problem if you output is for 50,000 or so employees, because then you file is 100,000 rows and will not load completely into Excel – limit problem of 65,536 characters.
7.     We simply want a spool file that does not wrap the data to the next line after 255 characters.
8.     But how to explain this simple requirement to some technical people. It seems a lot of posts on SDN think we always want to print a spool file.  NO – remember the forests!
Possible Solutions:
I see a lot of posts here that refer to OSS note 186603, but they don’t mention the target for the output of the spool is to import into an Excel File (i.e. spreadsheet format).  Just search for 186603 or ” Spool request with more than 255 columns”.  There is also a reference to OSS note 313566.  I am not sure if these will work?
I have also seen the suggestions that you need to define a customer printer format that does not wrap the output after 255 characters (create a new format type in transaction SPAD).
Did you find a solution yet to this problem, do the solutions above work, or can anyone else help us!
John McKee

Similar Messages

  • SQ01 Output fields having more than 255 characters

    Hello,
    I need to show query output more than 255 charaters but system is not allowing
    Here is the Error message:
    List is wider than 255 characters (generation not possible)
    I used SQ01 as t-code to create query.
    How can i show my output more than 255 characters
    Thanks

    Refer SAP Note 857823, ALV grid cannot display more than 128 characters per field and will truncate all the characters beyond if it's an ABAP program
    From my experience it will not display the field at all in SQ01.
    You need to write an abap program and split the field into two fields of length 128 and display side by side.
    Work around:  If you cannot write abap program uncheck (no display in query) that field in SQ02 and generate it. Execute your query and copy the key field use se16n to input in the key fields and use import to excel sheet function to get the required data.

  • How to declare a custom field more than 255 characters?

    Dear Freinds,
                  I have custom table where one character field name i want more than 255 characters .....the size of the field  i require is  800 .Could any one one let me know how i can increase the size to 800 or is there any way we can declare to size 800 ....as
    normally i know is we can declare only 255 character in size, but i heard there is another way around we can declare . Could any one please help me out.
    regards
    madhuri

    Hi Ruby,
                i have tried changing at dataelement level only..byusingthe standrd ie char 2000  , and i have tried other way by creating a custom domain and for the data type  i have used char and given size as 2000. Wheniam activating it is aying i can use the size range from 0 to 255 characters only......i have tried by declaring as string the data element ...it has taken as zero size as in the string we can use as many characters i can , but when iam trying to  table generator ...it saying i canot declare my field as String .
    please help what i can do to solve this issue.
    thanks
    regards
    madhuri

  • How to display ALV list with more than 1 structure?

    Hello everyone,
    I am using REUSE_ALV_LIST_DISPLAY to generate a report that displays vendor/customer items with purchases/sales total. I have 2 internal table for this. For every vendor/customer i need a total table right after, this have a different structure. I cannot use REUSE_ALV_BLOCK_LIST_ as this is not capable of calculating the subtotal per currency and from the documentation it says do not use.
    Any idea on how to proceed?
    Thanks!

    Call ALV list function module per table structure.
    Closing this thread.

  • Anyone knows how to send a attach with more than 255 characters in 4.6c ?

    Hi everyone,
    i´m tring to send a email with attach , my problem is that i have a itab with 2500 characters per line,
    and the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'  have the structure SOLISTI1 thats supports only 255 char. i tried to converto to PDF and XLS ,but when i open the attach only appers the first 255 char in each line only. any ideia for that issue?
    Thanks,
    Shimada
    Edited by: Fernando Shimada on May 5, 2009 8:28 PM

    here is part of my code that i tried:
    first: i write the lines of my itab and after did that
      CALL FUNCTION 'SAVE_LIST'
           EXPORTING
                list_index = '0'
           TABLES
                listobject = list_object.
      CALL FUNCTION 'LIST_TO_ASCI'
           TABLES
                listasci           = list_asci
                listobject         = list_object
           EXCEPTIONS
                empty_list         = 1
                list_index_invalid = 2
                OTHERS             = 3.
      APPEND LINES OF t_saida TO t_objbin.
      DESCRIBE TABLE t_objbin LINES v_lines_ane.
    second: do a alv report and tried to convert to pdf ,but the pdf have the same problem
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program = sy-cprog
                it_fieldcat        = t_fieldcat[]
                is_layout          = w_layout
                is_print           = wa_pr
           TABLES
                t_outtab           = t_alv
           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.
      w_sp =  sy-msgv1.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = w_sp
                no_dialog                = ' '
                dst_device               = 'LOCL'
          IMPORTING
               pdf_bytecount            =
                TABLES
                pdf                      = t_pdf
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT t_pdf.
        TRANSLATE t_pdf USING '~'.
        CONCATENATE gd_buffer t_pdf INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~'.
      DO.
        t_objbin = gd_buffer.
        APPEND  t_objbin.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Create Message Body Title and Description
      t_objtxt-line = 'teste'.
      APPEND t_objtxt.
      DESCRIBE TABLE t_objtxt LINES v_lines_txt.
      READ TABLE t_objtxt INDEX v_lines_txt.
      wa_doc_chng-obj_name = 'smartform'.
      wa_doc_chng-expiry_dat = sy-datum + 2.
      wa_doc_chng-obj_descr = 'smartform'.
      wa_doc_chng-sensitivty = 'F'.
      wa_doc_chng-doc_size = v_lines_txt * 255.
    Main Text
      CLEAR t_objpack-transf_bin.
      t_objpack-head_start = 1.
      t_objpack-head_num   = 0.
      t_objpack-body_start = 1.
      t_objpack-body_num   = v_lines_txt.
      t_objpack-doc_type = 'RAW'.
      APPEND t_objpack.
    Anexos
      t_objpack-transf_bin = 'X'.
      t_objpack-head_start = 1.
      t_objpack-head_num = 0.
      t_objpack-body_start = 1.
      DESCRIBE TABLE t_objbin LINES v_lines_bin.
      READ TABLE t_objbin INDEX v_lines_bin.
      t_objpack-doc_size  = v_lines_bin * 255 .
      t_objpack-body_num  = v_lines_bin.
      t_objpack-doc_type  = 'PDF'.
      t_objpack-obj_name  = 'smart'.
      t_objpack-obj_descr = 'test'.
      APPEND t_objpack.
      CLEAR t_reclist.
      t_reclist-receiver = Email.
      t_reclist-rec_type = 'U'.
      APPEND t_reclist.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = wa_doc_chng
                put_in_outbox              = 'X'
                commit_work                = 'X'
           TABLES
                packing_list               = t_objpack
                object_header              = t_objhead
                contents_bin               = t_objbin
                contents_txt               = t_objtxt
                receivers                  = t_reclist
           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.
      IF sy-subrc <> 0.
        WRITE:/ 'Error When Sending the File', sy-subrc.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.

  • Spool output more than 255 characters

    Hi ,
    i am running a ALV report in background whose output is more than 255 characters . but spool is showing only 255 charcters.
    Do we have any setting to change to display all characters.
    Or any OSS notes that can be applied.
    Thanks & regards,
    Sonika Ahuja

    Hi,
    You need to change the Format Type through SPAD transaction. The Format Type decides the number of rows and columns per page. By creating a new format type as per your requirement would solve the probelm.
    Also, in the Report declaration, change the Line-Size to 300 or as per the width of your output.
    For further details pls. refer this thread :
    Re: Spool List output display > 255 char when the rpt is run in Background
    Best regards,
    Prashant

  • 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.

  • 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.

  • How to declare and read a variable more than 255 characters

    Hi Friends,
          Actually i want to declare a variable which can accepts more than 255 characters as input and the same manner i want to read the data and pass the data as a output length more than 255 characters.
      So how can i delcare the data as a field in the table.
    Thanks & Regards
    Gupta

    Hi Raj,
       Thanks for your reply, please privide the further clarification actually by declaring a variable as string i can able to pass 1023 characters form selection screen like that i passed the data to the three varibles and i concatenated those three varibles in to single varible now is there any way to pass the result into the smartform.
      Please give me some techincal stuff on this
    Regards
    Gupta

  • How to accomodate more than 255 characters in character field

    HI All
    i need to accomodate more than 255 characters in character field. How can i do that ?
    thanks in advance!!!

    Hi,
    You can try the following things:
    1. Use a datatype STRING and check it will work.
    2. In se11 transaction goto datatype and search for char* in data elements.
    You will find predefined data types ,you can make use of it.
    For eg. char2000,char3000,char4000 etc.
    Hope this will help.
    Regards,
    Nitin.

  • Display message wwhich is more than 72 characters

    Hi Experts,
    I wanna display message which is more than 72 characters.
    is there any way in ABAP to display such type of message?

    create message class, in message give & & & &.
    now you can pass the display message like this.
    message i000 with text-001 text-002 text-003 text-004.

  • How to send text file as an email attachment havin more than 255 characters

    My requirement is to generate a text file and to send this text file as E-mail attachment. I am using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the E-mail. but here the limitation is the number of characters per line must not be more than 255 characters whereas in my case it is exceeding 1000 characters per line. could anyone please suggest me what should i do now ? Each field in the text file has to be tab delimited.

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • More than 255 characters in background

    HI,
    My report width is 275 which is displaying when run in front ground. but when run in background it truncates after the 255 characters.
    We have created a format using 'SPAD' of width 300, area is showing but the data is not showing after 255.
    I have mention line-size 275 in report, i tried this without mentioning line-size but the result is same. it gets truncates after 255, empty area is showing after 255 if we use width 300 format...
    Thanks

    Hi,
    After creation of the new format, run the job with the new format ie. attach the new format to your printer, and run the job.
    Now take the spool number and put it as a parameters to the following program .
    Hope it work fine.
    Rewards points if useful.
    Here is the code: 
    Display spool list > 255 columns 
    This is a SAP utility report to allow display of 
    spool request lists with more than 255 columns in 
    releases 4.6B and 4.6C (4.6D kernel must be used) 
    REPORT ZRSPOSHOWLIST LINE-SIZE 80. 
    PARAMETERS: RQIDENT LIKE TSP01-RQIDENT, 
    FIRSTL TYPE I DEFAULT 0, 
    LASTL TYPE I DEFAULT 0. 
    global data from LSPOXTOP 
    DATA: RC(10) TYPE C, 
    ERRMSG(100) TYPE C, 
    STATUS LIKE SY-SUBRC, 
    DSN_TYPE(8) TYPE C. 
    DATA: BEGIN OF DATA_SET_LINE, 
    DATA_LENGTH(5), 
    PRECOL(1), 
    DATA_LINE(1000), 
    DATA_LINE(5000), "MODAB 
    END OF DATA_SET_LINE, 
    DATA_SET_LENGTH(5) TYPE C. 
    TABLES: TSP01, TST05, TSPOPTIONS. 
    DATA: TEMSE_NAME LIKE TST01-DNAME, 
    TEMSE_CLIENT LIKE TST01-DCLIENT, 
    TEMSE_HANDLE LIKE RSTSTYPE-HANDLE, 
    TEMSE_PART LIKE TST01-DPART, 
    TEMSE_OBJTYP LIKE TST01-DTYPE, 
    TEMSE_RECTYP LIKE RSTSTYPE-RECTYP, 
    TEMSE_CHARCO LIKE TST01-DCHARCOD. 
    DATA: IS_OTF. 
    global data from LSPOCTOP 
    DATA: BEGIN OF SPOC 
    , escape 
    , prtctrl 
    , FIRST_BYTES(4) " collection of the first bytes of the 
    " escape sequences, which I am searching for. 
    , PRTCTRL_START_LENGTH TYPE I 
    , PRTCTRL_TOTAL_LENGTH TYPE I 
    , PRTCTRL_START(10) 
    , SYMBOL_LOW_START(10) 
    , SYMBOL_HGH_START(10) 
    , SYMBOL_START_LENGTH TYPE I 
    , ICON_START(10) 
    , ICON_START_LENGTH TYPE I 
    , ICON_SEL TYPE I VALUE 1 
    , FRAME_START(10) 
    , FRAME_START_LENGTH TYPE I 
    , END OF SPOC. 
    FIELD-SYMBOLS:  TYPE C 
    copied from RSPO_DISPLAY_ABAP_SPOOLJOB 
    DATA: BUFFER LIKE DATA_SET_LINE OCCURS 1000. 
    TABLES: TSP02L. 
    SELECT SINGLE * FROM TSP01 WHERE RQIDENT = RQIDENT. 
    IF SY-SUBRC <> 0. 
    WRITE: / 'Spool request does not exist:'(001), RQIDENT. 
    EXIT. 
    ENDIF. 
    CALL FUNCTION 'RSPO_CHECK_JOB_PERMISSION' 
    EXPORTING 
    ACCESS = 'DISP' 
    SPOOLREQ = TSP01 
    EXCEPTIONS 
    NO_PERMISSION = 1 
    OTHERS = 2. 
    IF SY-SUBRC <> 0. 
    WRITE: / 'No authorization to display'(002). 
    EXIT. 
    ENDIF. 
    PERFORM READ_DATA TABLES BUFFER 
    USING TSP01 FIRSTL LASTL. 
    IF SY-SUBRC <> 0. 
    WRITE: / 'Error reading spoolo request'(003). 
    EXIT. 
    ENDIF. 
    IF IS_OTF = 'X'. 
    WRITE: / 'This spool request is not an ABAP list'(004). 
    EXIT. 
    ENDIF. 
    PERFORM DISPLAY_DATA TABLES BUFFER USING TSP01-RQPAPER TSP01-RQIDENT. 
    FORM GET_SPOOL_LINE. 
    DO. 
    IF TEMSE_RECTYP+1(1) = 'Y'. 
    CALL 'C_RSTS_READ' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'BUFF' FIELD DATA_SET_LINE 
    ID 'BUFFLG' FIELD 1006 
    ID 'BUFFLG' FIELD 5006 "MODAB 
    ID 'ALLINE' FIELD 'X' 
    ID 'BINARY' FIELD ' ' 
    ID 'SHOWLG' FIELD 'X' 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    STATUS = SY-SUBRC. 
    ELSE. 
    CALL 'C_RSTS_READ' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'BUFF' FIELD DATA_SET_LINE+1 
    ID 'BUFFLG' FIELD 1005 
    ID 'BUFFLG' FIELD 5005 "MODAB 
    ID 'ALLINE' FIELD 'X' 
    ID 'BINARY' FIELD ' ' 
    ID 'SHOWLG' FIELD 'X' 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    STATUS = SY-SUBRC. 
    DATA_SET_LINE(5) = DATA_SET_LINE+1(5). 
    DATA_SET_LINE-PRECOL = ' '. 
    ADD 1 TO DATA_SET_LINE-DATA_LENGTH. 
    ENDIF. 
    STATUS = SY-SUBRC. 
    IF STATUS <> 6. " EOF, error condition, or got data 
    EXIT. 
    ENDIF. 
    end of this part, try to open next part 
    ADD 1 TO TEMSE_PART. 
    CALL 'C_RSTS_CLOSE' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    STATUS = SY-SUBRC. 
    IF STATUS = 0. 
    CALL FUNCTION 'RSTS_GET_ATTRIBUTES' 
    EXPORTING 
    AUTHORITY = 'SP01' 
    CLIENT = TEMSE_CLIENT "hjl 
    NAME = TEMSE_NAME 
    PART = TEMSE_PART 
    IMPORTING 
    CHARCO = TEMSE_CHARCO 
    CREATER = 
    CREDATE = 
    DELDATE = 
    MAX_CREDATE = 
    MAX_DELDATE = 
    NON_UNIQ = 
    NOOF_PARTS = 
    RECTYP = TEMSE_RECTYP 
    SIZE = 
    STOTYP = 
    type = 
    OBJTYPE = TEMSE_OBJTYP 
    EXCEPTIONS 
    FB_ERROR = 1 
    FB_RSTS_OTHER = 2 
    NO_OBJECT = 3 
    NO_PERMISSION = 4 
    OTHERS = 5. 
    STATUS = SY-SUBRC. 
    ENDIF. 
    IF STATUS = 0. 
    CALL 'C_RSTS_OPEN_READ' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'CLIENT' FIELD TEMSE_CLIENT "hjl 
    ID 'NAME' FIELD TEMSE_NAME 
    ID 'PART' FIELD TEMSE_PART 
    ID 'TYPE' FIELD TEMSE_OBJTYP 
    ID 'CONV' FIELD ' ' 
    ID 'ALLINE' FIELD 'X' 
    ID 'BINARY' FIELD ' ' 
    ID 'RECTYP' FIELD TEMSE_RECTYP 
    ID 'CHARCO' FIELD TEMSE_CHARCO 
    ID 'PROM' FIELD 'I' 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    STATUS = SY-SUBRC. 
    ENDIF. 
    ENDDO. 
    IF STATUS = 4. 
    STATUS = 12. "EOF 
    ENDIF. 
    IF STATUS = 8. 
    STATUS = 40. "Line too long 
    ENDIF. 
    DATA_SET_LENGTH = DATA_SET_LINE-DATA_LENGTH. 
    ENDFORM. 
    FORM READ_DATA TABLES BUFFER 
    USING TSP01 LIKE TSP01 VALUE(FIRST) TYPE I 
    VALUE(LAST) TYPE I. 
    DATA: LINES TYPE I. 
    REFRESH BUFFER. 
    CLEAR IS_OTF. 
    TEMSE_CLIENT = TSP01-RQCLIENT. 
    TEMSE_NAME = TSP01-RQO1NAME. 
    TEMSE_PART = 1. 
    CALL FUNCTION 'RSTS_GET_ATTRIBUTES' 
    EXPORTING 
    AUTHORITY = 'SP01' 
    CLIENT = TEMSE_CLIENT 
    NAME = TEMSE_NAME 
    PART = TEMSE_PART 
    IMPORTING 
    CHARCO = TEMSE_CHARCO 
    CREATER = 
    CREDATE = 
    DELDATE = 
    MAX_CREDATE = 
    MAX_DELDATE = 
    NON_UNIQ = 
    NOOF_PARTS = 
    RECTYP = TEMSE_RECTYP 
    SIZE = 
    STOTYP = 
    type = 
    OBJTYPE = TEMSE_OBJTYP 
    EXCEPTIONS 
    FB_ERROR = 1 
    FB_RSTS_OTHER = 2 
    NO_OBJECT = 3 
    NO_PERMISSION = 4 
    OTHERS = 5. 
    IF SY-SUBRC = 0. 
    IF TEMSE_OBJTYP(3) = 'OTF'. 
    IS_OTF = 'X'. 
    ENDIF. 
    ELSE. 
    EXIT. 
    ENDIF. 
    CLEAR TEMSE_HANDLE. 
    CALL 'C_RSTS_OPEN_READ' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'CLIENT' FIELD TEMSE_CLIENT "hjl 
    ID 'NAME' FIELD TEMSE_NAME 
    ID 'PART' FIELD TEMSE_PART 
    ID 'TYPE' FIELD TEMSE_OBJTYP 
    ID 'CONV' FIELD ' ' 
    ID 'ALLINE' FIELD 'X' 
    ID 'BINARY' FIELD ' ' 
    ID 'RECTYP' FIELD TEMSE_RECTYP 
    ID 'CHARCO' FIELD TEMSE_CHARCO 
    ID 'PROM' FIELD 'I' 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    STATUS = SY-SUBRC. 
    IF STATUS = 0. 
    DO. 
    PERFORM GET_SPOOL_LINE. 
    IF STATUS <> 0 AND STATUS <> 40 AND STATUS <> 12. 
    PERFORM CLOSE_JOB. 
    EXIT. 
    ENDIF. 
    IF STATUS <> 12. " 12 = End 
    IF NOT ( DATA_SET_LENGTH IS INITIAL ). 
    DATA_SET_LINE-DATA_LENGTH = DATA_SET_LENGTH - 1. 
    ENDIF. 
    ADD 1 TO LINES. 
    IF LINES >= FIRST. 
    APPEND DATA_SET_LINE TO BUFFER. 
    ENDIF. 
    IF ( NOT LAST IS INITIAL ) AND ( LINES >= LAST ). 
    EXIT. 
    ENDIF. 
    ELSE. 
    IF LINES = 0. 
    PERFORM CLOSE_JOB. 
    EXIT. 
    ENDIF. 
    IF LINES < FIRST . 
    PERFORM CLOSE_JOB. 
    EXIT. 
    ENDIF. 
    EXIT. 
    ENDIF. 
    ENDDO. 
    PERFORM CLOSE_JOB. 
    ENDIF. 
    ENDFORM. 
    FORM CLOSE_JOB * 
    FORM CLOSE_JOB. 
    IF STATUS <> 0 AND STATUS <> 12. 
    CALL 'C_RSTS_CLOSE' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    MESSAGE E112(PO) WITH STATUS RC ERRMSG RAISING READ_ERROR. 
    ENDIF. 
    CALL 'C_RSTS_CLOSE' 
    ID 'HANDLE' FIELD TEMSE_HANDLE 
    ID 'RC' FIELD RC 
    ID 'ERRMSG' FIELD ERRMSG. 
    STATUS = SY-SUBRC. 
    IF STATUS <> 0. 
    MESSAGE E112(PO) WITH STATUS RC ERRMSG RAISING READ_ERROR. 
    ENDIF. 
    ENDFORM. 
    FORM DISPLAY_DATA TABLES BUFFER USING RQPAPER LIKE TSP01-RQPAPER
    RQID LIKE TSP01-RQIDENT. 
    DATA: LINE_LENGTH TYPE I, GCOL TYPE I, GLINES TYPE I, 
    LINE_LENGTH2 LIKE RSTSTYPE-LINELENGTH, 
    V, V2. 
    CALL FUNCTION 'RSPO_SPOOLDATA_WRITE_INIT'. 
    PERFORM SPOOLDATA_WRITE_INIT. "MODAB 
    select single * from tspoptions where spoption = 'REALWIDTH'. 
    if sy-subrc = 0. 
    V = 'X'. 
    endif. 
    select single * from tspoptions where spoption = 'REALHEIGHT'. 
    if sy-subrc = 0. 
    V2 = 'X'. 
    endif. 
    IF NOT V IS INITIAL OR NOT V2 IS INITIAL. 
    GCOL = 0. 
    GLINES = 0. 
    SELECT SINGLE * FROM TSP02L WHERE PJIDENT = RQID 
    AND PJNUMMER = 0. 
    IF SY-SUBRC = 0. 
    GCOL = TSP02L-COLUMNS. 
    GLINES = TSP02L-LINES. 
    ELSE. 
    CALL FUNCTION 'RSPO_GET_SIZE_OF_LAYOUT' 
    EXPORTING 
    LAYOUT = RQPAPER 
    IMPORTING 
    ANSWER = 
    COLUMNS = GCOL 
    LINES = GLINES 
    PFORMAT = 
    ENDIF. 
    ENDIF. 
    IF GCOL < 80 OR V IS INITIAL. 
    GCOL = 255. 
    ENDIF. 
    IF GLINES < 5 OR V2 IS INITIAL. 
    GLINES = 0. 
    ENDIF. 
    IF GCOL >= 1024. "MODAB 
    GCOL = 1023. 
    ENDIF. 
    NEW-PAGE NO-HEADING NO-TITLE LINE-SIZE GCOL 
    LINE-COUNT GLINES. " make a wide list 
    SET BLANK LINES ON. 
    LOOP AT BUFFER. 
    DATA_SET_LINE = BUFFER. 
    IF DATA_SET_LINE-PRECOL = 'P'. 
    IF DATA_SET_LINE(1) = ' '. " Echter Vorschub ?" 
    NEW-PAGE. 
    ENDIF. 
    CONTINUE. 
    ENDIF. 
    Zeilenlänge berechnen, falls unbekannt. 
    IF DATA_SET_LINE-DATA_LENGTH IS INITIAL. 
    LINE_LENGTH = STRLEN( DATA_SET_LINE-DATA_LINE ). 
    ELSE. 
    LINE_LENGTH = DATA_SET_LINE-DATA_LENGTH. 
    ENDIF. 
    IF LINE_LENGTH > 0. 
    LINE_LENGTH2 = LINE_LENGTH. 
    PERFORM SPOOLDATA_WRITE USING DATA_SET_LINE-DATA_LINE "MODAB 
    LINE_LENGTH2 
    1. 
    ELSE. 
    " Leerzeile 
    SKIP. 
    ENDIF. 
    ENDLOOP. 
    ENDFORM. 
    copied from RSPO_SPOOLDATA_WRITE 
    FORM SPOOLDATA_WRITE USING VALUE(SPOOL_DATA) 
    VALUE(DATA_LENGTH) LIKE RSTSTYPE-LINELENGTH 
    VALUE(START_POS) LIKE SY-COLNO. 
    function globals 
    DATA: LPOS LIKE SY-COLNO 
    , REST_LEN TYPE I 
    , AREA_LEN TYPE I 
    , NEXT_HOT TYPE I " offset of next special character 
    , COLS TYPE I " columns used by special character 
    , BYTES TYPE I " bytes used by special character 
    , HOT2 
    , HOT3 
    , HOT4 
    , HOT5 
    , HOT6 
    , HOT7 
    , BEGIN OF ESCAPE_TRICK 
    , X1(1) TYPE X 
    , END OF ESCAPE_TRICK 
    , THE_PRTCTRL(5) TYPE C 
    Because of a problem within the ABAP listprocessing, I shall 
    never output the same icon side by side with the same color 
    and without a gap. 
    As I don't know the data, I will use two different variables 
    alternatively. 
    , ICON_ID1 LIKE ICONS-L4 
    , ICON_ID2 LIKE ICONS-L4. 
    FIELD-SYMBOLS:  
    IF START_POS < 2. 
    write at / ' ' no-gap. 
    NEW-LINE. 
    LPOS = 1. 
    ELSE. 
    LPOS = START_POS. 
    ENDIF. 
    REST_LEN = STRLEN( SPOOL_DATA ). 
    DESCRIBE FIELD SPOOL_DATA LENGTH AREA_LEN. 
    IF DATA_LENGTH = 0. 
    " fine. 
    ELSEIF DATA_LENGTH . 
    MODAB
    PERFORM WRITE_BIGFIELD USING  
    NEXT_HOT 
    LPOS. 
    WRITE AT LPOS <PLAIN_TEXT> NO-GAP. 
    ADD NEXT_HOT TO LPOS. 
    SUBTRACT NEXT_HOT FROM REST_LEN. 
    ASSIGN +6(1). 
    ELSE. 
    HOT7 = '?'. 
    ENDIF. 
    ELSE. 
    HOT6 = '?'. 
    ENDIF. 
    ELSE. 
    HOT5 = '?'. 
    ENDIF. 
    IF HOT5 = SPACE. 
    IF HOT6 = SPACE. 
    IF HOT7 = SPACE. 
    IF SPOC-ICON_SEL = 1. 
    WRITE AT LPOS(4) ICON_ID1 AS ICON. 
    write at lpos icon_id1 as icon no-gap. 
    ELSE. 
    WRITE AT LPOS(4) ICON_ID2 AS ICON. 
    write at lpos icon_id2 as icon no-gap. 
    ENDIF. 
    COLS = 4. 
    BYTES = 7. 
    ELSE. 
    IF SPOC-ICON_SEL = 1. 
    WRITE AT LPOS(3) ICON_ID1 AS ICON. 
    write at lpos icon_id1 as icon no-gap. 
    ELSE. 
    WRITE AT LPOS(3) ICON_ID2 AS ICON. 
    write at lpos icon_id2 as icon no-gap. 
    ENDIF. 
    COLS = 3. 
    BYTES = 6. 
    ENDIF. 
    ELSE. 
    IF SPOC-ICON_SEL = 1. 
    WRITE AT LPOS(2) ICON_ID1 AS ICON. 
    write at lpos icon_id1 as icon no-gap. 
    ELSE. 
    WRITE AT LPOS(2) ICON_ID2 AS ICON. 
    write at lpos icon_id2 as icon no-gap. 
    ENDIF. 
    COLS = 2. 
    BYTES = 5. 
    ENDIF. 
    ELSE. 
    "rite at lpos(1) icon_id as icon. 
    WRITE AT LPOS(1) '#' NO-GAP. " Not enough space for any icon. 
    COLS = 1. 
    BYTES = 4. 
    ENDIF. 
    ENDIF. 
    IF . 
    ELSE. 
    EXIT. 
    ENDIF. 
    ENDWHILE. 
    MODAB 
    IF REST_LEN > 0. 
    ASSIGN . 
    SPOC-FIRST_BYTES+0(1) = SPOC-PRTCTRL_START(1). 
    SPOC-FIRST_BYTES+1(1) = SPOC-FRAME_START(1). 
    SPOC-FIRST_BYTES+2(1) = SPOC-ICON_START(1). 
    SPOC-FIRST_BYTES+3(1) = SPOC-SYMBOL_LOW_START(1). 
    ENDFORM.

  • More than 255 characters required in excel send as attachment in mail.

    Hi Experts,
    I have a requirement to send displayed list in an ALV report as attachment in excel through mail. I have used FM SO_DOCUMENT_SEND_API1. Now the problem is my excel data in more than 255 characters in a line. It is about 400 characters.But it is taking upto 255 characters in the internal table which is passed to parameter contents_bin . This is because the internal table is of type SOLISTI1. But the excel should hold atleast 400 characters as per my requirement. How to overcome this issue ? Please suggest me...
    Regards,
    SURYA

    Say your records are exactly 400 length (I am saying 400 for sake of simplifying things, in reality record lengths can be variable and have to be calculated using STRLEN)
    You will cut the first record at 255 length and put it in first row. You will put next 145 characters in 2nd row, followed by newline characters (hex 0D and 0A) at positions 146 & 147 (which indicates end of record for excel, so that it puts next record in a new excel row).
    The second record will start from 148th character in second row till 255, that is 108 characters and will extend into 3rd row till 400 - 108 = 292th character followed by newline characters (hex 0D and 0A) at postions 293 & 294, followed by contents of 3rd record and so on and so forth.
    If you records are of variable length you can also think of always blank padding them to create a record of such a fixed length that always your records are lesser than that and fit into it. This will leave some blank spaces at the end of each record in excel, which may be fine.

  • ALV Cell with more than 255 characters.

    Hello Guru's,
    I need to display a longtext in ALV with other details. I am using READ_TEXT to get the Longtext and appending it to Internal table field, which i have defined as a string. I have debugged the code and it is containing around 450 characters. But, when i am trying to display using "REUSE_ALV_GRID_DISPLAY" it is only displaying 255 characters.
    Please suggest a solution.
    Thanks,
    Sudhir.

    Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap 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 up to 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

Maybe you are looking for

  • System.IO.FileNotFoundException: The Web application at ..not found - when getting document versions in a doc lib

    i have created a    asmx file using vs 2012 4.5 framework, and published to my d:\  drive  and mapped to a  iis  web site but when i trued to consume this from a another web appln, it throws me the below error:  System.IO.FileNotFoundException: The W

  • Can you hear other people, but they can't hear you? Here's how I fixed it.

    If you're having the same problem I did where you could hear other people on a call, but they couldn't hear you and your microphone worked fine for everything else then you are in the same boat I was. After a week of trying to fix it, a friend and my

  • Does your powerbook rock?

    This may well sound like a crazy thing to be asking but i wonder if there is a problem with powerbooks not resting firmly on the four corners but instead rocking like those rather annoying tables in restaurants, bars cafes etc etc. My laptop does not

  • Rollover frecuency

    somebody knows where i find the parameter to modify the format of log_file.yyyymmdd that it save when I execute the rollover?? This because when I execute it save but with a day distinct to the real date

  • SM59 - HTTP Connection to ABAP System fails

    I am building an http conn from XI to ECC6 for ABAP proxy On Connection Test, I get the error - ICM_HTTP_CONNECTION_FAILED On running the trace in SMICM, I get the following: [Thr  5] *** ERROR => Connection request from (-1/65535/0) to host: srpidev