Missing columns in print preview of ALV Grid
In a report using ALV grid the output is ok in ALV grid when press print preview the 1st column is always missing and the 1st row shift by 1 character. Why is it happening. The same is happening in print out or when list saved in excel also.
the coding is like
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_interface_check = ' '
i_buffer_active = ' '
i_callback_program = i_repname
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
i_callback_pf_status_set = ' '
i_callback_user_command = 'FRM_ALV_USER_COMMAND'
i_structure_name = 'IT_REPORT'
i_background_id = ' '
is_layout = i_layout
it_fieldcat = i_fieldtab[]
it_sort = i_sort[]
i_default = 'X'
i_save = 'A'
is_variant = i_variant
it_events = i_events[]
is_print = i_print
tables
t_outtab = it_report.
Kindly resolve.
thanks
anya
Sample code:
REPORT ZALV_DISPLAY_CHANGE.
TABLES :T247.
TYPE-POOLS SLIS. "Type definitions for alv report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
WA_FIELDCAT TYPE LVC_S_FCAT.
DATA: WA_LAYOUT TYPE LVC_S_LAYO.
DATA : BEGIN OF IT_FINAL OCCURS 0,
CHECK(1),
CELLTAB TYPE LVC_T_STYL, " Switch between display/change
MNR LIKE T247-MNR,
LTX LIKE T247-LTX,
END OF IT_FINAL.
DATA : WA_FINAL LIKE IT_FINAL.
DATA : W_REPID LIKE SY-REPID.
W_REPID = SY-REPID.
REFRESH IT_FINAL.
SELECT MNR LTX
FROM T247
INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
WHERE SPRAS EQ 'E'.
WA_FIELDCAT-FIELDNAME = 'CHECK'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-CHECKBOX = 'X'.
WA_FIELDCAT-EDIT = 'X'..
WA_FIELDCAT-OUTPUTLEN = '3'.
WA_FIELDCAT-COL_POS = '1'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MNR'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-OUTPUTLEN = '8'.
WA_FIELDCAT-COL_POS = '2'.
WA_FIELDCAT-REPTEXT = 'Month'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'LTX'.
WA_FIELDCAT-TABNAME = 'IT_FINAL'.
WA_FIELDCAT-OUTPUTLEN = '20'.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-REPTEXT = 'Month Desc'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
DATA: WA_CELLTAB TYPE LVC_S_STYL,
IT_CELLTAB TYPE LVC_T_STYL,
L_INDEX TYPE I.
CLEAR : WA_CELLTAB,WA_FINAL,IT_CELLTAB.
REFRESH IT_CELLTAB.
*Initialize the celltab table
LOOP AT IT_FINAL INTO WA_FINAL.
L_INDEX = SY-TABIX.
WA_CELLTAB-FIELDNAME = 'CHECK'.
WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
INSERT WA_CELLTAB INTO TABLE IT_CELLTAB.
INSERT LINES OF IT_CELLTAB INTO TABLE WA_FINAL-CELLTAB.
MODIFY IT_FINAL FROM WA_FINAL INDEX L_INDEX.
ENDLOOP.
*Make the first five 5 rows as disabled
CLEAR L_INDEX.
LOOP AT IT_FINAL INTO WA_FINAL.
L_INDEX = SY-TABIX.
IF SY-TABIX LE 5.
LOOP AT WA_FINAL-CELLTAB INTO WA_CELLTAB.
IF WA_CELLTAB-FIELDNAME EQ 'CHECK' .
WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
MODIFY WA_FINAL-CELLTAB FROM WA_CELLTAB.
MODIFY IT_FINAL INDEX L_INDEX FROM WA_FINAL TRANSPORTING CELLTAB.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
WA_LAYOUT-BOX_FNAME = 'CHECK'.
WA_LAYOUT-NO_ROWMARK = 'X'.
WA_LAYOUT-STYLEFNAME = 'CELLTAB'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
I_GRID_TITLE = 'GRID DISPLAY'
IS_LAYOUT_LVC = WA_LAYOUT
IT_FIELDCAT_LVC = IT_FIELDCAT
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
Please give me reward point If it is useful
Thanks
Murali Poli
Similar Messages
-
Problem with print preview in alv grid
Hello all,
I have to display base unit of measure(meins) in alv grid output. i am using a conversion routine to convert it from ST TO PC before display.After executing the report i am getting the correct data. the problem is when i select the print preview
alv list is displayed. in that the unit of measure pc is not displayed, it is comming as '*******. what i came to know is the same conversion routine is triggered in the standard program for the display. so it canot convert that.
so please help me out in solving this.
Thanks in advance,
Sarathi sarath,
this is an example code try using the statement before displaying, i think it works.
*example cdoe.
LOOP AT i_grp1 INTO wa_grp1.
AT NEW tknum.
READ TABLE i_grp1 intto wa_grp1 index sy-tabix.
SUM.
MOVE-CORRESPONDING wa_grp1 TO wa_grp2.
APPEND wa_grp2 TO i_grp2.
ENDAT.
ENDLOOP. -
I need to print logo in alv grid
I need to print logo in alv grid .As of now its getting displayed but it cannot be printed .Kindly tell me wether there is any option to print it .Eitjer using ALV or Object oriented ALV.Please reply soon
Hi Deepti,
Refer the code below.
report sy-repid.
type-pools : slis.
*ALV Formatting tables /structures
data: gt_fieldcat type slis_t_fieldcat_alv.
data: gt_events type slis_t_event.
data: gs_layout type slis_layout_alv.
data: gt_page type slis_t_listheader.
data: gs_page type slis_listheader.
data: v_repid like sy-repid.
*ALV Formatting work area
data: w_fieldcat type slis_fieldcat_alv.
data: w_events type slis_alv_event.
data: gt_bsid type table of bsid with header line.
initialization.
perform build_events.
perform build_page_header.
start-of-selection.
*perform build_comment. "top_of_page - in initialization at present
select * from bsid into table gt_bsid up to 10 rows.
*perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
*USING = Row, Column, Field name, display length, table name, heading
*OR
perform build_fieldcat.
gs_layout-zebra = 'X'.
*top of page event does not work without I_callback_program
v_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_structure_name = 'BSID'
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'This is the grid title'
I_GRID_SETTINGS =
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
tables
t_outtab = gt_bsid.
Form..............: populate_for_fm
Description.......: Populates fields for function module used in ALV
form populate_for_fm using p_row
p_col
p_fieldname
p_len
p_table
p_desc.
w_fieldcat-row_pos = p_row. "Row Position
w_fieldcat-col_pos = p_col. "Column Position
w_fieldcat-fieldname = p_fieldname. "Field name
w_fieldcat-outputlen = p_len. "Column Lenth
w_fieldcat-tabname = p_table. "Table name
w_fieldcat-reptext_ddic = p_desc. "Field Description
w_fieldcat-input = '1'.
append w_fieldcat to gt_fieldcat.
clear w_fieldcat.
endform. " populate_for_fm
*& Form build_events
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events.
read table gt_events with key name = slis_ev_user_command
into ls_event.
if sy-subrc = 0.
move slis_ev_user_command to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move slis_ev_top_of_page to ls_event-form.
append ls_event to gt_events.
endif.
endform. " build_events
*& Form USER_COMMAND
When user command is called it uses 2 parameters. The itab
passed to the ALV is in whatever order it currently is on screen.
Therefore, you can read table itab index rs_selfield-tabindex to get
all data from the table. You can also check r_ucomm and code
accordingly.
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
read table gt_bsid index rs_selfield-tabindex.
error checking etc.
set parameter id 'KUN' field gt_bsid-kunnr.
call transaction 'XD03' and skip first screen.
endform.
*& Form top_of_page
Your own company logo can go here if it has been saved (OAOR)
If the logo is larger than the size of the headings in gt_page,
the window will not show full logo and will have a scroll bar. Thus,
it is a good idea to have a standard ALV header if you are going to
use logos in your top of page.
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
endform.
*& Form build_fieldcat
*Many and varied fields are available here. Have a look at documentation
*for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
form build_fieldcat.
w_fieldcat-fieldname = 'BUDAT'.
w_fieldcat-seltext_m = 'Dte pst'.
w_fieldcat-ddictxt(1) = 'M'.
Can change the position of fields if you do not want them in order
of the DDIC or itab
w_fieldcat-row_pos = '1'.
w_fieldcat-col_pos = '10'.
append w_fieldcat to gt_fieldcat.
clear w_fieldcat.
endform. " build_fieldcat
*& Form build_page_header
gt_page is used in top of page (ALV subroutine - NOT event)
*H = Header, S = Selection, A = Action
form build_page_header.
For Headers, Key is not printed and is irrelevant. Will not cause
a syntax error, but is not used.
gs_page-typ = 'H'.
gs_page-info = 'Header 1'.
append gs_page to gt_page.
gs_page-typ = 'H'.
gs_page-info = 'Header 2'.
append gs_page to gt_page.
For Selections, the Key is printed (bold). It can be anything up to 20
bytes. It gets printed in order of code here, not by key value.
gs_page-typ = 'S'.
gs_page-key = 'And the winner is:'.
gs_page-info = 'Selection 1'.
append gs_page to gt_page.
gs_page-typ = 'S'.
gs_page-key = 'Runner up:'.
gs_page-info = 'Selection 2'.
append gs_page to gt_page.
For Action, Key is also irrelevant.
gs_page-typ = 'A'.
gs_page-info = 'Action goes here'.
append gs_page to gt_page.
endform. " build_page_header
Settings for the Logo :
01) GOTO - OAOR (Business Document Navigator)
02) Give Class Name - PICTURES
Class Type - OT
Object type - whatever you want to call your area EG: OURCOMP.... then Execute
03) Top left will say PICTURES. Bottom left will have multi tab. Select Create and double-click on Screen.
04) Select your image from the appropriate directory.
05) Give the image an appropriate name (not Screen)
06) It will tell you document stored successfully.
07) You can now find your logo under the heading OURCOMP in top left window.
08) You can reference the logo in things like FM REUSE_ALV_COMMENTARY_WRITE or any other area which may reference these things. EG: I_LOGO = 'OURCOMP'. You can preview image by double-clicking it.
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra
Message was edited by: Amit Mishra -
Icon in print preview of ALV tree
Hi friends,
I am not getting the icons in item level in the print preview of ALV tree output.
For example:
Execute BCALV_TREE_06 and see the print preview of the output. You can not see the icons in the print preview.
But i need it to be printed.
Guide me
venkateshHi Venkatesh,
you can see similar kind of folder icon in the view.
but you can't download or print them.
regards
vijay -
Data missing when Exporting or print preview from ALV report
Hi
I have a alv report which is showing fine but when i try to export it to say excel sheet or do print preview some of the data is missing. Can anyone tell me how to fix this. or at least point to some document that discuss this problem.
Here is my ALV CODE
* CALL_ALV
form call_alv.
* v_repid = sy-repid.
perform build_field_catalog using field_tab[].
perform build_eventtab using events[].
perform comment_build using header_alv[].
perform build_sorttab using gt_sort[].
* perform build_layout.
* v_variant-variant = '/TEST3'.
* Call ABAP List Viewer
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_user_command = ''
i_structure_name = 'REC'
it_fieldcat = field_tab[]
it_special_groups = gt_sp_group[]
it_sort = gt_sort[]
i_save = v_save
is_variant = v_variant
it_events = events[]
* is_layout = gd_layout
tables
t_outtab = REC
exceptions
program_error = 1
others = 2.
endform.
From my Catalog this data is missing
* BUILD_FIELD_CATALOG
form build_field_catalog USING pt_fieldcat type
slis_t_fieldcat_alv.
data: ls_fieldcat type slis_fieldcat_alv.
clear: fieldcat, pt_fieldcat[].
ls_fieldcat-tabname = 'REC'.
ls_fieldcat-edit = ' '.
ls_fieldcat-fieldname = 'PERNR'.
ls_fieldcat-seltext_s = 'Employee # '.
ls_fieldcat-seltext_m = 'Employee # '.
ls_fieldcat-seltext_l = 'Employee # '.
ls_fieldcat-datatype = 'C'.
append ls_fieldcat to pt_fieldcat.
There r coupole that's missing
But there couple that show's up like this one
ls_fieldcat-fieldname = 'STIME'.
ls_fieldcat-seltext_s = 'ST '.
ls_fieldcat-seltext_m = 'St Tm '.
ls_fieldcat-seltext_l = 'Start Time '.
ls_fieldcat-datatype = 'C'.
append ls_fieldcat to pt_fieldcat.
ls_fieldcat-fieldname = 'ETIME'.
ls_fieldcat-seltext_s = 'ET '.
ls_fieldcat-seltext_m = 'Et Tm '.
ls_fieldcat-seltext_l = 'End Time '.
append ls_fieldcat to pt_fieldcat.
I always reward points.
Thankshi Anwarul,
Try the following code:
* CALL_ALV
form call_alv.
* v_repid = sy-repid.
perform build_field_catalog using field_tab[].
perform build_eventtab using events[].
perform comment_build using header_alv[].
perform build_sorttab using gt_sort[].
* perform build_layout.
* v_variant-variant = '/TEST3'.
* Call ABAP List Viewer
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_user_command = ''
i_structure_name = 'REC'
it_fieldcat = field_tab[]
it_special_groups = gt_sp_group[]
it_sort = gt_sort[]
i_save = v_save
is_variant = v_variant
it_events = events[]
* is_layout = gd_layout
tables
t_outtab = REC
exceptions
program_error = 1
others = 2.
endform.
form build_field_catalog USING pt_fieldcat type
slis_t_fieldcat_alv.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
I_PROGRAM_NAME = sy-repid
I_STRUCTURE_NAME = 'REC'
changing
CT_FIELDCAT = pt_fieldcat.
When you export to excel, the character fields and numeric columns gets re-arranged, but all the fields will be displayed in this case.
hope this helps. -
Overlapping of Columns in the Print Preview of ALV Report
Hi ,
I have created a ALV report which has 62 columns, when i see the print preview, the rows overlaps one another. I want a printout where no line items or rows should overlap each other. Never mind if the extra overlapped columns get truncated. Kindly help me to solve this problem.
Regards,
shivuU need to increase u201Cno. of columns fieldu201D in the Format typesu201D. For details pl. see this link.
http://www.****************/Tutorials/ALV/Spool/width.htm
Regards,
Joy. -
Error in print preview in ALV report
Hi....All,
Good Day.
I have developed a ALV report. It is displaying all data properly. The problem is...
When I am pressing the print preview button... it is getting dump.
The dump short message is....... "Field symbol has not yet been assigned".
Hope that I will get a solution from you as previous.
With Thanks
SohelDo you use a field for coloring a column or cell?
If the coding is not too large it could be helpfull to post the coding as well.
Regards,
John. -
Getting Error While Going For Print Preview in ALV Report
Hi,
We doveloped a new report based on client requirment while going for print preview all the fields are shufling.Can you please guide me I am unable to solve this problem.
Regards
SureshDo you use a field for coloring a column or cell?
If the coding is not too large it could be helpfull to post the coding as well.
Regards,
John. -
Add column with preq number to ALV grid in me53n
hi all,
i am trying to add column with preq number (BANFN) to ALV with preq items in ME53N. it is not available in column set, when trying to add by "change layout" button - i dont understand why, when the strcucture MEREQ3211GRID contains it :-(
i also tried to add new field ZZBANFN into the structure CI_EBANMEM and after that, i could add the new field to ALV through change layout, but it was empty of course. so i implemented EXIT_SAPLMEREQ_001 from MEREQ001, but ZZBANFN is still empty, because this exit is not called when opening ME53N, but when clicking on tab "customer data" in preq item detail.
how to solve this? is there any exit that is called before displaying the ALV grid?Here is some more detail. I included my code from the Enhancement.
ENHANCEMENT-POINT MM06EFPO_POT_AUFBAUEN_02 SPOTS ES_MM06EFPO_POT_AUFBAUEN INCLUDE BOUND.
ENHANCEMENT 1 Z_MM06EFPO_POT_AUFBAUEN_1. "active version
SELECT SINGLE zz_old_material FROM mara
INTO pot-zz_old_material
WHERE matnr = pot-matnr.
ENDENHANCEMENT.
You will also need to change the layout in Item Overview to bring your field in. -
How to realize page numbers when printing from an ALV-Grid
Dear ABAPers,
with resprect to SAP note 402627 ALV-Grids in 4.6-Systems
do not produce a header with Actual date, report title
and page number as it does from release 610 on.
I've spent almost the entire day on searching the SDN
for an answer on how I could produce a page numbering.
I've also tried quite a lot, for example by using the
END_OF_PAGE event, but nothing worked.
I'm using the FM REUSE_ALV_GRID_DISPLAY, but even an SAP
sample report BCALV_GRID_01, which is supposed to
demonstrate the object-oriented use of the several
PRINT-events does not process PRINT_END_OF_PAGE in our
4.6C-System.
Is my search in vain or does anybody have experience
with those kinds of problems under 4.6x ?
Thanks in advance
Andreas FlügelI think you should be able to use PRINT_END_OF_PAGE event for the same. That should work. Use SY-PAGNO variable to print the page no in this event.
You will have to register this event and set the handler for the same.
Did you try this?
Regards,
Ravi -
Hi,
I have a report which consists of 9 subreports in 2 tables..
When the run report I do see data.
when i export to a pdf and print preview the report in Bids.. i see data for the first 22 pages and then the remaining pages are blank with just the header showing up...
when i go to the pdf and select page 25 it is blank but when i go the report and not in print preview mode.. and i type in 25 in the page number data shows up on that page...
the report is set to a portrait and the margins are set to 0.
How can I solve this problems and why is it happening... the size of the sub report are the same..
Any help will be appreciated.
Thanks
KarenI should add that when I e-mail this document to myself and print it directky from the iMac, it prints fine.
-
Modification of print preview of alv report
Dear all,
I got a new requirement, after running CADO transaction with sel.parameters PERNR and DATERANGE it displays alvgrid . If an enduser want to print this ALVGRID that must display sel.parameters at the top of first page.Is it possible while triggering the print to change alvreport layout.
Please help regarding this.
Thanks in advanceI have the same problem, too.
Can anyone give the solution please..?
Thanks -
Skipping ALV Grid and moving into Print Preview
Hi Friends,
I am using ALV Grid Display, and created an ALV Layout which gives multiple lines output in Print Preview.
Now I do not want ALV Grid Output. I need to directly see the print preview, by skipping the grid output.
Any ideas?
Thanks
KrishnaPrint preview of ALV grid display data in ALV list format. So if u r using REUSE_ALV_GRID_DISPLAY Fm instead of it use REUSE_ALV_LIST_DISPLAY fm. It will display data like print preview of ALV grid.
-
ALV grid display with more than 1000 columns
Hi Friends,
I have to prepare a report output which have 1015 columns.
User will give 100 weeks of data to retrieve. I have to display the output in day wise.
100*7 + 315 = 1015 columns.
I am using ALV grid display for this in 4.6C.
My Question is, whether I have to declare the output table type with 1015 fields.?
Is there any other way to do this, without declaring 1015 cloumns.
Please guide me to solve this.
Regards,
Viji.I'm thinking when your End-user will press Ctrl + P feeding A4 size to printer
Thomas:
Maybe the functional consultant is pulling your leg?
May be OP is pulling our legs or something further?
Cheers -
HOW TO PRINT LONG TEXT OF 255 CHARACTER IN ALV GRID instead of132 Char's
Hi sir/mam
i'm sreekar can any one help me on this please
"As I took a variable 'STR' with 255 length, But still ALV GRID DISPLAYS the same 132 characters, and
When I download the report into excel it is showing the 250 charactered text"
how can i print it in alv grid
FORM BUID_CATALOG .
DATA : COL_POS TYPE I.
COL_POS = COL_POS + 1.
*--DECLARING FIELDCATALOG FOR HEADER
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'EBELN'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Purch.doc.no.'(002).
LT_FCAT-REF_FIELDNAME = 'EBELN'.
LT_FCAT-REF_TABNAME = 'EKKO'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'BEDAT'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Po Date'(003).
LT_FCAT-REF_FIELDNAME = 'EBDAT'.
LT_FCAT-EDIT_MASK = '__.__.____'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'EKGRP'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Purch.Grp'(004).
LT_FCAT-REF_FIELDNAME = 'BKGRP'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'EKNAM'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Purch.Grp. Name'(005).
LT_FCAT-REF_FIELDNAME = 'EKNAM'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'LIFNR'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Vendor No.'(006).
LT_FCAT-REF_FIELDNAME = 'ELIFN'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'NAME1'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Vendor Name'(007).
LT_FCAT-REF_FIELDNAME = 'NAME1_GP'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'ZTERM'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Pay.Code'(008).
LT_FCAT-REF_FIELDNAME = 'ZTERM'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'TEXT1'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Own explanation'(009).
LT_FCAT-REF_FIELDNAME = 'DZTERM'.
LT_FCAT-OUTPUTLEN = '30'.
LT_FCAT-DDICTXT = 'L'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'WAERS'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Curr'(010).
LT_FCAT-REF_FIELDNAME = 'WAERS'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
LT_FCAT-COL_POS = COL_POS.
LT_FCAT-FIELDNAME = 'NETWR'.
LT_FCAT-TABNAME = 'LT_FINAL'.
LT_FCAT-SELTEXT_L = 'Net Value'(011).
LT_FCAT-REF_FIELDNAME = 'BWERT'.
APPEND LT_FCAT.
CLEAR LT_FCAT.
ENDFORM. " BUID_CATALOG
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BUFFER_ACTIVE = 'X'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = LT_FCAT[]
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IMPORTING
E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
TABLES
T_OUTTAB = LT_FINAL[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC = 0.
IF G_EXIT_CAUSED_BY_CALLER = 'X'.
ELSE.
IF GS_EXIT_CAUSED_BY_USER-BACK = 'X'. "F3
EXIT.
ELSE.
IF GS_EXIT_CAUSED_BY_USER-EXIT = 'X'. "F15
LEAVE TO SCREEN 1000.
ELSE.
IF GS_EXIT_CAUSED_BY_USER-CANCEL = 'X'. "F12
LEAVE TO SCREEN 1000.
ELSE.
EXIT.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ELSE.
ENDIF.
ENDFORM. " DISPLAY_DATA
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F15' "ls_thead-tdid PAYMENT TERMS
LANGUAGE = SY-LANGU "ls_thead-tdspras "CURRENT LANGUAGE 'E'
NAME = NAME "ls_thead-tdname PO NUMBER LW_EKKO-EBELN
OBJECT = 'EKKO' "ls_thead-tdobject TABLE NAME EKKO
IMPORTING
HEADER = HTEXT
TABLES
LINES = LTEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT LTEXT.
IF LTEXT-TDLINE NE ''.
MOVE LTEXT-TDLINE TO WA_WORD-TEXT.
APPEND WA_WORD TO LT_SENTENCE.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT LT_SENTENCE INTO WA_WORD.
COUNT = COUNT + 1.
IF COUNT = 1.
STR = WA_WORD-TEXT.
LW_FINAL-TEXT1 = STR.
ELSEIF COUNT = 2 OR COUNT = 3 OR COUNT = 4 OR COUNT = 5 OR COUNT = 6 OR COUNT = 7 OR COUNT = 8.
CONCATENATE STR WA_WORD-TEXT INTO STR SEPARATED BY SPACE.
LW_FINAL-TEXT1 = STR.
ENDIF.
ENDLOOP.can you provide an example of how to wrap the text i have like this please see the below code and correct if any errors
FORM GET_TEXT_LINES .
DATA :NAME TYPE THEAD-TDNAME.
NAME = LW_EKKO-EBELN.
V_TABIX = SY-TABIX.
CALLING FUNCTION READ_TEXT FOR PAYMENT TEXTS
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT "CLIENT ID 200/600/400
ID = 'F15' "ls_thead-tdid "PAYMENT TERMS TEXT ID 'F15'
LANGUAGE = SY-LANGU "ls_thead-tdspras "CURRENT LANGUAGE 'E'
NAME = NAME "ls_thead-tdname "PO NUMBER LW_EKKO-EBELN
OBJECT = 'EKKO' "ls_thead-tdobject "TABLE NAME EKKO
IMPORTING
HEADER = HTEXT "LS_THEAD
TABLES
LINES = LTEXT "LT_LINES[]
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT LTEXT.
IF LTEXT-TDLINE NE ''.
MOVE LTEXT-TDLINE TO WA_WORD-TEXT.
APPEND WA_WORD TO LT_SENTENCE.
ENDIF.
ENDLOOP.
ENDIF.
Word Wrap the text in multiple lines
LOOP AT LT_SENTENCE INTO WA_WORD.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WA_WORD-TEXT
OUTPUTLEN = 100
TABLES
OUT_LINES = LT_SENTENCE
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
IF not LT_SENTENCE IS INITIAL.
READ TABLE LT_SENTENCE INTO WA_WORD INDEX v_tabix.
LW_FINAL-TEXT1 = WA_WORD_TEXT.
MODIFY LT_FINAL FROM LW_FINAL INDEX V_TABIX.
ENDLOOP.
CLEAR: LT_SENTENCE.
ENDFORM. " GET_TEXT_LINES
*& Form LAYOUT_INIT
text
-->P_GS_LAYOUT text
FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
*"Build layout for list display
RS_LAYOUT-DETAIL_POPUP = 'X'.
ENDFORM. " LAYOUT_INIT
*& Form EVENTTAB_BUILD
text
-->P_GT_EVENTS[] text
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
*"Registration of events to happen during list display
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_AFTER_LINE_OUTPUT
INTO LS_EVENT.
IF SY-SUBRC = 0.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*& Form AFTER_LINE_OUTPUT
text
--> p1 text
<-- p2 text
FORM AFTER_LINE_OUTPUT.
CLEAR :COUNT,LT_SENTENCE.
LOOP AT LT_SENTENCE INTO WA_WORD.
READ TABLE LT_SENTENCE INTO WA_WORD INDEX V_TABIX.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WA_WORD-TEXT
OUTPUTLEN = 20
TABLES
OUT_LINES = LT_SENTENCE.
DESCRIBE TABLE LT_SENTENCE LINES V_TABIX.
CHECK V_TABIX > 1.
COUNT = COUNT + 1.
IF COUNT = 1.
STR = WA_WORD-TEXT.
LW_FINAL-TEXT1 = STR.
ELSEIF COUNT = 2 OR COUNT = 3 OR COUNT = 4 OR COUNT = 5 OR COUNT = 6 OR COUNT = 7 OR COUNT = 8.
CONCATENATE STR WA_WORD-TEXT INTO STR SEPARATED BY SPACE.
LW_FINAL-TEXT1 = STR.
ENDIF.
ENDLOOP.
ENDFORM. " AFTER_LINE_OUTPUT
Maybe you are looking for
-
It was my fault, but...
I recently succumbed to the iPod thing, when the video iPod came out. I bought some TV episodes and enjoyed watching them on a plane. Anyway, a few days ago I mistakenly clicked on a "Lost" episode that I had seen on regular TV, so I didn't want to p
-
Only Pre-Authorization Executed for Zero Qty Document
We use credit/debit memos with zero quantity for business reasons. We are attemting to use credit card functionality with these credit/debit memos but when authorization is performed only the pre-auth for $1 occurs even if the date is immediate. If w
-
HTMLLoader loading local content (SWF files) problem
Hello guys, I'm just finishing my application but I facing a problem. I'm currently developing a desktop application using AIR. I'm using HTMLLoader to load local SWF files when te user tries to access specific content on the application. I successfu
-
Final Cut Crashes when I try to export a batch list - help!
I'm doing a very large documentary project and each tape has extensive log notes. I use the batch list function to export tabbed text files and convert them to excel - very useful in the creative process when figuring out story structure etc. But now
-
I'm tryign to put together and tuned install. I downloaded the ACRO8_Win_WEB_WWEFG.exe install file. I an the /a swicth and built and admin point. I'm looking for the *.ITW file to tune. It does not look to be there. Is there a different install file