Long Text In ALV - Exporting to Excel sheet
Hi,
Currently my ALV report reads the text using READ_TEXT fm and it displays only the first line of the text in the report.
To the see the remaining lines of the text, user needs to double click on the text in the report and it creates another ALV report with one column showing all the lines of that particular text.
Now the problem is when user exports the report in excel sheet, obviously only the first line of the text is downloaded in the excel file. User wants all the lines to be downloaded but at the same time, it should be line by line in a single cell not in a single line.
LIKE
Col-1 Col2
XXXXX XXXXXXXXXXXXX
XXXXXXXXXXXX
XXXXXXXXX
YYYYY YYYYYYYYYYYY
YYYYYYYYYYY
YYYYYYYY
So How can i create a report like this? and also the number of lines of the text will vary.
Thanks,
Ezhil
Hi,
Here's my suggestion: Install OpenOffice.org and ask SAP to deliver good integration with OpenOffice.org.
Alternative suggestion: re-install SAP Gui on the PC where the integration is not working. If that does not help, re-install Microsoft Office as well.
Here's my comment: I think you should ask this question in a different forum, e.g. in the Duet forum. That may not be the correct forum either, but as it is a Microsoft/SAP integration technology forum, someone there may know the solution.
Regards,
Raj.
Similar Messages
-
Hi All
I have a problem with exporting a ALV Grid to Excel. If I add the quantity field to my Grid output the excel spreadsheet does not bring through the quantity field and it puts all the other columns one place out. I tried changing field attributes from QUAN to CHAR field and it made no difference.
I am using the standard sap functionality:
List > Save > Local File > Spreadsheet
It works fine as long as I do not include my quantity column? I have tried many other custom FM's with no luck because all of them require you to put in a internal table inside the function but I do not want to send whole internal table to spreadsheet only the ones selected in the ALV Grid. So please do not suggest function modules as I have had no luck with these!
I need to know how to use the standard sap alv export to excel function with my quantity field? The only issue I can think of that would cause a error would be that I have 50+ columns on the grid and internal table. Even If I put quantity field by itself in the grid then export to excel it brings through the Qty header but no data.Hi Atish
Quantity is below: (RMNGE)
Data type is QUAN, Length 10, Decimal places 0.
DATA: BEGIN OF I_DATA OCCURS 0.
INCLUDE STRUCTURE ZWRNTHDR.
DATA: POSNR LIKE ZWRNTITM-POSNR, "Sales Document Item
MATNR LIKE ZWRNTITM-MATNR, "Material Number
CLRFL LIKE ZWRNTITM-CLRFL, "Claim Reference Line ID
PCBPN LIKE ZWRNTITM-PCBPN, "PCB Part Number
PCBPX LIKE MAKT-MAKTX, "PCB Part Number Description
RMNGE LIKE ZWRNTITM-RMNGE, "Quantity
MEINS LIKE ZWRNTITM-MEINS, "Base Unit of Measure
WRNTC LIKE ZWRNTITM-WRNTC, "Warranty Claimed
WRNTG(3) TYPE C, "Warranty Given
FLTCD LIKE ZWRNTITM-FLTCD, "Fault Code
MFATE LIKE ZWRNTITM-MFATE, "Module Fate
CMNTS LIKE ZWRNTITM-CMNTS, "Comments
SRIAL LIKE ZWRNTITM-SRIAL, "Serial Number
PFREX LIKE ZWRNTITM-PFREX, "PFR External
PFINT LIKE ZWRNTITM-PFINT, "PFR Internal
RLCRQ LIKE ZWRNTITM-RLCRQ, "Replacement Requested
TCHID LIKE ZWRNTITM-TCHID, "Technician ID
PMATN LIKE ZWRNTITM-PMATN, "Parent Material
PMATX LIKE MAKT-MAKTX, "Parent Material Description
MDLNO LIKE ZWRNTITM-MDLNO, "Module Number
MDLNT LIKE MAKT-MAKTX, "Module Description
CLVFX LIKE ZWRNTITM-CLVFX, "Claim Value FX
CRVFX LIKE ZWRNTITM-CRVFX, "Credit Value FX
CRVLC LIKE ZWRNTITM-CRVLC, "Credit Value Local
XRATE LIKE ZWRNTITM-XRATE, "FX Rate
NAME1 LIKE KNA1-NAME1, "Customer Name
MAKTX LIKE MAKT-MAKTX, "Material Description
CTYPT LIKE DD07T-DDTEXT, "Customer Type Text
BUNTT LIKE DD07T-DDTEXT, "Business Unit Text
FRCRT LIKE DD07T-DDTEXT, "Freight Carrier Text
FLTCT LIKE ZFLTCODES-FDESC, "Fault Code Text
ISRES LIKE ZWRNTITM-ISRES, "Issue Resolved
DCODE LIKE ZWRNTITM-DCODE, "Date Code
ISTAT LIKE ZWRNTITM-ISTAT, "Ignore Stats
LABCL LIKE ZWRNTITM-LABCL, "Labour Claimed
MATCL LIKE ZWRNTITM-MATCL, "Material Claimed
END OF I_DATA.
Field Catalog:
FORM BUILD_ALV_COLUMNS
Build Main Page ALV Fieldcat
FORM BUILD_ALV_COLUMNS.
CLEAR FIELDCAT_LN.
ADD 1 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'KUNNR'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-KEY = 'X'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 2 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'CLMID'.
FIELDCAT_LN-KEY = 'X'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 3 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Claim Type'.
FIELDCAT_LN-FIELDNAME = 'CTYPT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 4 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'CLREF'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 5 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Business Unit'.
FIELDCAT_LN-FIELDNAME = 'BUNTT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 6 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'CURCY'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C500'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 7 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'CHKID'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 8 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'RECVD'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 9 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'APVDT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 10 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'CRDRF'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 11 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'RORDR'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 12 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'RORDD'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 13 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'ARVDT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 14 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'TSTDT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 15 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'TEDDT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 16 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'FSTDT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 17 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'FEDDT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 19 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Freight Carrier'.
FIELDCAT_LN-FIELDNAME = 'FRCRT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 20 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'FRTRF'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 21 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'FRINV'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 22 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'UNAMECR'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 23 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'DATUMCR'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 24 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'UNAMECH'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 25 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'DATUMCH'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 26 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'UNAMEDE'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 27 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTHDR'.
FIELDCAT_LN-FIELDNAME = 'DATUMDE'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 28 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'POSNR'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-KEY = 'X'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 29 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'MATNR'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 30 TO COL_POS.
FIELDCAT_LN-TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'RMNGE'.
FIELDCAT_LN-SELTEXT_L = 'Qty'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 31 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'CLRFL'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 32 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'PCB Part No'.
FIELDCAT_LN-FIELDNAME = 'PCBPN'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 33 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'MEINS'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 34 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'WRNTC'.
FIELDCAT_LN-DO_SUM = SPACE.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 35 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Warranty Given'.
FIELDCAT_LN-FIELDNAME = 'WRNTG'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 36 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'FLTCD'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 37 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'MFATE'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 38 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'CMNTS'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 39 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'SRIAL'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 40 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'PFREX'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 41 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'PFINT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 42 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'RLCRQ'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 43 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'TCHID'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 44 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'PMATN'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 45 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'MDLNO'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 46 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Customer Name'.
FIELDCAT_LN-FIELDNAME = 'NAME1'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-KEY = 'X'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 47 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'MAKT'.
FIELDCAT_LN-FIELDNAME = 'MAKTX'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 48 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Parent Matl Description'.
FIELDCAT_LN-FIELDNAME = 'PMATX'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 49 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'PCB Matl Description'.
FIELDCAT_LN-FIELDNAME = 'PCBPX'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 50 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Fault Code Description'.
FIELDCAT_LN-FIELDNAME = 'FLTCT'.
FIELDCAT_LN-COL_POS = COL_POS.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 51 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'CLVFX'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C500'.
FIELDCAT_LN-NO_ZERO = 'X'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 52 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'CRVFX'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-NO_ZERO = 'X'.
FIELDCAT_LN-EMPHASIZE = 'C500'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 53 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'XRATE'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-NO_ZERO = 'X'.
FIELDCAT_LN-EMPHASIZE = 'C500'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 54 TO COL_POS.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'CRVLC'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-NO_ZERO = 'X'.
FIELDCAT_LN-EMPHASIZE = 'C500'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 55 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Module Description'.
FIELDCAT_LN-FIELDNAME = 'MDLNT'.
FIELDCAT_LN-COL_POS = COL_POS.
FIELDCAT_LN-EMPHASIZE = 'C700'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 56 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Iss Resvld'.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'ISRES'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 57 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Date Code'.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'DCODE'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 58 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Ignore Stats'.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'ISTAT'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 59 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Labr Claimed'.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'LABCL'.
APPEND FIELDCAT_LN TO FIELDCAT.
CLEAR FIELDCAT_LN.
ADD 60 TO COL_POS.
FIELDCAT_LN-SELTEXT_L = 'Matl Claimed'.
FIELDCAT_LN-REF_TABNAME = 'ZWRNTITM'.
FIELDCAT_LN-FIELDNAME = 'MATCL'.
APPEND FIELDCAT_LN TO FIELDCAT.
ENDFORM. " BUILD_ALV_COLUMNS -
Display a Long Text in ALV report
Hi,
I want to display the PO header long text in ALV Report that is 255 character width.
Please help me out how to do this.
please it is very urgent
Thanks and regards
KrishnaUse READ_TEXT and concatenate the first lines of the text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'F01'
language = sy-langu
name = lv_name " purchase order with leading zeroes
object = 'EKKO'
TABLES
lines = t_lines
EXCEPTIONS
OTHERS = 8.
Regards -
Dump in prodcution server while downloading ALV report to excel sheet
HI ALL,
ALV report is working fine in bother DEV and PROD servers....but in production while downloading report to excel sheet it is going to dump.
"dump is below:
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed. "
But in development this problem is not there, iam able to download ALV report to EXCEL sheet.
Any help experts......
Thanks in advance
RamHi,
I had the same problem,
Run a consistency check for your ALV and you will find out. See if you havent passed any unnecessary parameter to FM.
/people/rainer.hbenthal/blog/2009/09/25/sos--my-alv-report-is-not-working
Dump while printing ALV (field symbol not assigned)
Sumit -
Display the long text in alv by using function modules
Hi all,
How to display the long text in alv by using function modules ?
Send me any sample code.
Thanks in advance
krupali.Hello KR,
Use READ_TEXT and concatenate the first lines of the text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'F01'
language = sy-langu
name = lv_name " purchase order with leading zeroes
object = 'EKKO'
TABLES
lines = t_lines
EXCEPTIONS
OTHERS = 8.
You can loop at t_lines and concatenate header in to some other field.
Best Regards,
Sasidhar Reddy Matli.
Edited by: Sasidhar Reddy Matli on Aug 13, 2008 12:25 PM -
AlV conversion into excel sheet
Hello Expert,
When I am exporting ALV report to excel sheet then only exports 99 fields . I have MS excel 2003 version.
But my report has around 150 fields .
Please give me any guidance abt exporting more than 99 fields.
Is there is SAP Patch or something.
Thanks,
Rahul@SSyou should use excel 2007...
see this blog: /people/community.user/blog/2010/07/12/abap2xlsx--generate-your-professional-excel-spreadsheet-from-abap -
Hi,
I have problem exporting data to excel sheet In the java servlet.
I am getting a date field as 03/15/2004 in servlet but after exporting to excel sheet it displayed as 3/15/2004 in excel.
Is there a way I can show the way its comming in java servlet.
Thanks,
Zakir HussainExcel will format stuff in its own way - depending upon the settings for date/time format on your computer.
ie It will read the string from the servlet "03/15/2004" but then format the date according to its default rules.
This may end up being "15 March 2004"
Solution: change the default date format on your computer.
In other words, you can't easily tell excel what to do from Java. -
Download ALV report to excel sheet
halo fellow SAPiens,
i want to download my alv report into excel sheet...........for tht i used UGI_DOWNLOAD........here if i use the file type as 'ASC' all the leading zeros of numeric values are removed and date format is "yyyy/mm/dd".......
i need the leading zeros and date format in "dd/mmyyy"
when i use file type 'DBF' i get the leading zeros but my date is replaced by '#####.............wht shld i do...........To get the leading zeros to come, append an apostrophe to the start of each field that has the leading zeros as shown
loop at itab.
concatenate '''' itab-field1 into itab-field1.
modify itab.
endloop.
note that
1. This sometimes doesnt show correctly in excel and you may have to double click on the cell to prevent the apostrophe from displaying in the sheet
2. You field needs to have an extra character to add the apostrophe -
Facing a Problem while downloading the data from ALV Grid to Excel Sheet
Hi Friends,
Iam facing a problem while downloading the data from ALV Grid to excel sheet. This is working fine in Development server , when comes to Quality and Production servers I have this trouble.
I have nearly 11 fields in ALV Grid and out of which one is PO number of length 10 , all the ten numbers are visible in the excel sheet if we download it from development server but when we download it from Quality or Production it is showing only 9 numbers.
Can any one help me out in this case.hi...
if this problems happens dont display the same internal as u finally got.
just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
for eg.
ur final internal int table for disp,
data : begin of itab occur 0,
matnr like mara-matnr,
end of itab.
create new like this,
data : begin of itab occur 0,
matnr(12) type N,
end of itab. -
Alv- displaying long text in alv output
hi,
as per my requirement, i need to be display long text (length >1000 characters) in alv list or alv grid.
i get the entaire long text and keep it in final internal table and pass it to alv functional module, but it unable to display the compleate long text( in alv-grid).
the alv list displays the complete long text but not in the row, it displays in the second rown and few field labes of long text and its previous field label are displayed in impro[per order.
is there any possible way to display long text in alv.
regards,
revooriHi Ashok,
try to pass the below while filling your long text.
wa_fieldcat-seltext_l = 'Your Long Text'.
wa_fieldcat-ddictxt = 'L'.
for more info check below
Long Text --- 1000 characters
hope it works
Thnaks!
Edited by: Prasanth on Mar 8, 2009 4:03 PM -
Hi ,
I wanted to display a long text in my grid. Suppose I have a field's long text having field length 3000.
It is varying for other fields.
Anybody will tell me how to display the whole long text in alv grid.hi,
if it is a heading then in the field catlog u can do it.
i don know th length limitation.
fieldcatalog-fieldname = 'EBELP'.
<b> fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-seltext_s = 'PO Item'.
fieldcatalog-seltext_l = 'PO Item'.</b>
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
rgds
Anver -
Problem in exporting ALV Report to excel sheet
Hi All,
I have developed a Report and now facing problem in exporting the same to excel sheet.
When we click the "Locate File" icon in the report layout, the system will pop up a window with radio buttons. I have opted for 'Spreadsheet'.
When i save the excel sheet into my desktop, the excel file has all the report headers (Title of each column). But no value is exported.
There are around 15 columns in the report and the excel sheet shows value of last 2 columns which has some text.
I have been into ALV report development and developed around 30+ reports in the same fashion.
What might be the reason behind this issue?
When i export other reports into excel sheet, everything is perfect without any flaws......
Kindly help me out......
Regards
PavanHi,
Here's my suggestion: Install OpenOffice.org and ask SAP to deliver good integration with OpenOffice.org.
Alternative suggestion: re-install SAP Gui on the PC where the integration is not working. If that does not help, re-install Microsoft Office as well.
Here's my comment: I think you should ask this question in a different forum, e.g. in the Duet forum. That may not be the correct forum either, but as it is a Microsoft/SAP integration technology forum, someone there may know the solution.
Regards,
Raj. -
Problem while alv grid display exporting to excel sheet
Hi,
I have done an ALV report using reuse_alv_grid _display , out put is fine , but when i click on excel view icon i could only see an excel sheet without any data ., but when i use export to local file and choose spread sheet its giving the data in excel, but the user wants to click only the excel view icon.
Best RegardsHi,
Check this link
[Problem with Excel button in ALV Grid...URGENT;
Regards,
Sathish Reddy. -
Reg alv grid display exporting to excel sheet
hi experts,
I have done an ALV report using reuse_alv_grid _display , out put is fine , but when i click on excel view icon i could only see an excel sheet without any data ., but when i use export to local file and choose spread sheet its giving the data in excel, but the user wants to click only the excel view icon., please help me out.
Note : i have already tried changing the macro security in excel to Low .see it will give you the Status message as ...
<b>View cannot be switched: Product is not installed or integration is not active.</b>
it means the Excel Integration was not done in you sap system . ask basis there will be a Patch for it ... once it was applied automatically in all the ALV the excel view will work
in my system it was working
Girish -
Export ALV List into Excel Sheet
Hi Friends,
We are displaying an ALV List in report Program and we are exporting that into excel sheet using the icon "Spreadsheet(ctrlshiftF7)"provided by ALV Grid.
But when it is displayed in Excel sheet it changes the sequence of columns (fields).
And we observed that it displays all the CHAR fields first then the CURRENCY fields and then the DATE fields that we specified in field catalog.
So, what should be done so that the fields are exported into Excel in the same order as specified in the field catalog of ALV List.Give this a look.
REPORT ZEXCEL .
INCLUDE ole2incl.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cells TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
*START-OF-SELECTION
START-OF-SELECTION.
APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
'=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
'John' TO itab1, 'Smith' TO itab2,
'=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
CREATE OBJECT application 'excel.application'.
SET PROPERTY OF application 'visible' = 1.
CALL METHOD OF application 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
Create first Excel Sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 1.
CALL METHOD OF sheet 'Activate'.
SET PROPERTY OF sheet 'Name' = 'Sheet1'.
LOOP AT itab1.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab1-first_name.
ENDLOOP.
Create second Excel sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 2.
SET PROPERTY OF sheet 'Name' = 'Sheet2'.
CALL METHOD OF sheet 'Activate'.
LOOP AT itab2.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab2-last_name.
ENDLOOP.
Create third Excel sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 3.
SET PROPERTY OF sheet 'Name' = 'Sheet3'.
CALL METHOD OF sheet 'Activate'.
LOOP AT itab3.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Formula' = itab3-formula.
SET PROPERTY OF cells 'Value' = itab3-formula.
ENDLOOP.
Save excel speadsheet to particular filename
CALL METHOD OF sheet 'SaveAs'
EXPORTING #1 = 'c:\temp\exceldoc1.xls' "filename
#2 = 1. "fileFormat
Closes excel window, data is lost if not saved
SET PROPERTY OF application 'visible' = 0.
Maybe you are looking for
-
Key Figure Display in Interactive Planning
Hello, I am unable to display some of the key figures in SNP Interactive Planning. All these Key Figures are present in Planning book and are also included in the data view. Is there any setting wherein I can control the display of Key figure althou
-
Has anyone tried to pair the iphone with a 2006 Lexus GX470?
before opening the package I would like to know if anyone has been able to use the bluetooth capabilities of the iphone with a 2006 Lexus. Was you able to pair the phone to the car's bluetooth technology?
-
Use Any Song As An Alarm?
Hi, With the iPhone, is it possible to use any Song as the sound for an Alarm that you've set? If not, why not? I understand the restrictions with Ringtones, as Ringtones have their own industry. But there's no industry for Alarm Sounds, is there. So
-
I am having troubles at the moment of making slide show. specially when I want to chage the parameters. the app get closed. If I do not try to change the paramenters any way he music is not reproduced...I would like to download again the app, maybe i
-
Nothing on google to resync LOGICAL standby database
Dear All, Either for Linux or Oracle there are thousand of documents available to resyn PHYSICAL standby database BUT not a single document to resync LOGICAL standby database. Why is this? I have 2 Oracle instance on windows 2003 server one for Logic