Printing logo with ALV report output?
Hi all,
I have written a sinple program to display a report output in ALV grid format and inserted a logo in it usingh standrad FM. Though the logo is inserted successfully displaying with list , but when i am clicking on print preview the logo is missing.
Please help me on how to print the logo with the list?
Thanks,
Vamshi.
Hi Krishna,
-->Firstly go to T-Code OAER.
-->Give Class Name as PICTURES
-->Give Class Type as OT
-->Give Object Key as(watever the name you wish to give)
-->Example key 1000
-->Click on Execute.
Here you will get Standard Document Types.
Select which ever you want i.e., Attachment,Screen,Template ,etc.
Double click on Attchment it will ask you the File on the Desktop.
Upload the image.
Now you can see the Image in the Folder PICTURES.
Now go to the Report.
Function Module 'REUSE_ALV_COMMENTARY_WRITE'.
i_logo = '1000'.
Hope this will Help you.
With Regards,
Sharmishta.
Similar Messages
-
How to Print Selection-Screen along with ALV Report output
Hi,
I have a requirement wherein i need to also print the Selection Screen of a report when I print the ALV report output.
Basically i need to print the ALV output along with selection screen.
Could you plz suggest me the way.
Regards,
NitinHi,
My selection Screen is a very big one. It contains around 30 select-options.
So is their any standard method in which you can choose whether you want to take the output printout with or without Selection screen.
Regards,
Nitin -
Hi,
I've created an ALV report with a logo in the header.
But, when i'm taking the printout ,the logo is not printed.
How to solve this problem,..please help me .
Thanks and regards.
RajeshIt is not possible to Print the logo, which you are showing in ALV Grid.
But you have to work with Cl_DD_DOCUMENT class
Check this program DD_ADD_PICTURE, Here you can print the logo.the same you can try to implement if you want. -
Print Logo in Classic Report (Write Method,Not ALV)
Hi All,
I'm currently doing conversion of the All the Classic Report with addition of Header with 'LOGO'.
I'm willing to find out that Function (CALL FUNCTION 'WWW_GET_MIME_OBJECT') is only able for display but not show out during printing.
Is that any method, I can do it(Print with Logo) without conversion to SAP Script or Smartform that was exhausted.
*Please take note is Classic Report with Write Method (Line by Line), Not ALV.
Thank you all in advance
Regards,
Trevor Wong.Hi,
It is possible to include logo in classical report but its not possible to print logo in classical report. It can be done in ALV's.
Write the code in Top-of-page event in ALV.
The following is the code for inserting the logo in ALV.
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
Regards
Purnand -
I want to print the LOGO on the report output
Hi ,
i want to print the LOGO on the report output. How can tyhis possible ?using "SMWO" to upload LOGO image.
add a customer "customer control" named P1 using "SE51"
the following program for your reference:
=============================================
REPORT ytest17.
DATA ok_code TYPE sy-ucomm,
save_code TYPE sy-ucomm.
DATA container TYPE REF TO cl_gui_custom_container.
DATA picture TYPE REF TO cl_gui_picture.
DATA init.
CALL SCREEN 100.
MODULE user_command_0100 INPUT
MODULE user_command_0100 INPUT.
save_code = ok_code.
CLEAR ok_code.
CASE save_code.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. "user_command_0100 INPUT
MODULE status_0100 OUTPUT
MODULE status_0100 OUTPUT.
IF init IS INITIAL.
DATA url(255).
CLEAR url.
CREATE OBJECT container
EXPORTING container_name = 'P1'.
CREATE OBJECT picture
EXPORTING parent = container
EXCEPTIONS error = 1.
IF sy-subrc NE 0.
ENDIF.
PERFORM load_pic_db CHANGING url.
CALL METHOD picture->load_picture_from_url
EXPORTING
url = url.
IF sy-subrc NE 0.
ENDIF .
init = 'X'.
ENDIF.
ENDMODULE. "status_0100 OUTPUT
*& Form
text
FORM load_pic_db changing p_url.
data query_table like w3query occurs 1 with header line.
data html_table like w3html occurs 1.
data return_code like w3param-ret_code.
data connect_type like w3param-cont_type.
data connect_length like w3param-cont_len.
data pic_data like w3mime occurs 0.
data pic_size type i.
refresh query_table.
query_table-name = '_object_id'.
query_table-value = 'TESTPIC'.
append query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
changing
return_code = return_code
content_type = connect_type
content_length = connect_length
EXCEPTIONS
OBJECT_NOT_FOUND = 1
PARAMETER_NOT_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
pic_size = connect_length.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
SIZE = pic_size
DATE =
TIME =
DESCRIPTION =
LIFETIME = cndp_lifetime_transaction
CACHEABLE =
SEND_DATA_AS_STRING =
FIELDS_FROM_APP =
tables
data = pic_Data
FIELDS =
PROPERTIES =
COLUMNS_TO_STRETCH =
changing
url = url
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_PUT_TABLE = 2
DP_ERROR_GENERAL = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
*& Module CANCEL INPUT
text
module CANCEL input.
LEAVE PROGRAM.
endmodule. " CANCEL INPUT
============================================= -
Hi,
I have generated a ALV Report Output. Fine, but when I have selected 'Print' button or 'Download' button in Application Tool Bar I get dump 'GETWA_NOT_ASSIGNED'.
What should I do to rectify the error?
Thnx,
Shivaa...This is my declaration....
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
i_callback_pf_status_set = gs_user_status
i_callback_user_command = gs_user_command
i_callback_top_of_page = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = gs_layout
it_fieldcat = itfc
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = it_alv
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
Plz let me know the changes I have to do.. -
Download alv report output to excel format with out header line
Hi experts,
i want to download a alv report output into excel formatt with out the header line but it has to download including field description. as this output will fed into another transaction, the downloaded excel file should be with out header line.
fro eg:
Report : Zabc ABAP Development Page : 1
Run Date : 12/14/06 System: UD400
Run Time : 08:45:37
this header details should not be downloaded into the excel file.
could somebody help me please.
thanks
deepuhi jayanti,
thanks for your response.
i have delclared all the field types as character but still it is not downloading and it 's sy-subrc is 4... the code is as below.
*field names
lt_fieldnames-value = 'Material Number'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Plant'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Group'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Description'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'UOM'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Price Unit'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Type'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'X-Plant Status'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Valuation Class'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avmng.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avntp.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Qty'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'PO Creation Date'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_fcaqt.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Prev. Yr. Std. Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_stcst.
APPEND lt_fieldnames.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'XLSHEET'
CREATE_PIVOT = 0
DATA_SHEET_NAME = ' '
PIVOT_SHEET_NAME = ' '
PASSWORD = ' '
PASSWORD_OPTION = 0
TABLES
PIVOT_FIELD_TAB =
data_tab = t_output1
fieldnames = lt_fieldnames
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_pivot_fields = 6
download_problem = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE e001 WITH 'Data could not be downloaded'.
ENDIF.
ENDFORM. " z_dwn_xl
thanks
deepu -
I have a ALV report output with LINE-SIZE 1023. But when I try to execute the report in background the output row is not coming in one line but in 2 lines. When we run the report in background I gave the printer as 'LOCL' (local) and displayed in spool. In the PRINT SETTINGS I don't see FORMAT for 65 X 1023. Do I need to create one? If yes, how to create it? Or if there is any other way go get all the cloumns in one row of a ALV output.
Thank you.Hi,
<b>Change the font on the X_65_255 paper size :-</b>
This tip was taken from the SAP-R3 mailing list, <b>and is by Sheila Tichener</b>.
If you need to use a large line-size to get all your data in I know the sap version of X_65_255 for hp laser jet 4 gives an unnecessarily small font . You can change it in SPAD (or copy to Y_65_255) as follows.
<b>Example:</b>
Choose Device formats, Change
hplj4
x_65_255
Execute
Double click on printer initialisation
Change from:-
# select Courier 16.67 CPI normal font
e(s0p16.67h0s0b4099T
to:-
# select arial 24 cpi 15 point normal
e(s0p24h15v0s0b16602T
Also bold as follows:-
# select arial 24 cpi 15 point bold
e(s0p24h15v0s3b16602T
Also the error you get when changing a format in the output screen is only a warning and can be overidden by pressing the green tick.
If the sap standard formats don't fit your requirements you can create your own eg Y_65_170 . It seems to be the numbers in the name that somehow triggers which one the abap chooses
Regards
Sudheer -
Is there any transaction code for uploding logo in ALV reports.
is there any transaction code for uploding logo in ALV reports.
hi,
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
Upload Logo for REUSE_ALV_COMMENTARY_WRITE
For those who wish to upload and use a picture in your ALV abap reports.
Steps for uploading Logo :-:
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo
7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
or
Import Logo and Background Picture for Reporting
In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
From the SPRO:
HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
Activities
1. Enter the Name of your logo/background picture as an object key in the initial screen.
2. Make sure that the class name is PICTURES, and the class type is OT.
3. Choose Execute.
4. Double-click the document type Picture on the Create tab page. A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
5. Enter the path and choose Open. The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable. -
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 -
Hi,
How To add Logo in ALV Report?
I need step by step explanation.Hi uday,
go through this hope u can understand.
*&amp; Report Z_OOALV_LOGO
*&--Sample Program using ooalv-> by SrikanthV--
REPORT z_ooalv_logo.
****DECLARATION FOR LOGO INSERT
CONSTANTS: cntl_true TYPE i VALUE 1,
cntl_false TYPE i VALUE 0.
DATA:h_picture TYPE REF TO cl_gui_picture,
h_pic_container TYPE REF TO cl_gui_custom_container.
DATA: graphic_url(255),
graphic_refresh(1),
g_result LIKE cntl_true.
DATA: BEGIN OF graphic_table OCCURS 0,
line(255) TYPE x,
END OF graphic_table.
DATA: graphic_size TYPE i.
CALL SCREEN 100.
*&----
*& Module PICTURE OUTPUT
text
MODULE picture OUTPUT.
DATA: l_graphic_xstr TYPE xstring,
l_graphic_conv TYPE i,
l_graphic_offs TYPE i.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = 'EDS'"IMAGE NAME - Image name from SE78
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = l_graphic_xstr
EXCEPTIONS
not_found = 1
OTHERS = 2.
graphic_size = XSTRLEN( l_graphic_xstr ).
CHECK graphic_size > 0.
l_graphic_conv = graphic_size.
l_graphic_offs = 0.
WHILE l_graphic_conv > 255.
graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
APPEND graphic_table.
l_graphic_offs = l_graphic_offs + 255.
l_graphic_conv = l_graphic_conv - 255.
ENDWHILE.
graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
APPEND graphic_table.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown " 'X-UNKNOWN'
size = graphic_size
lifetime = cndp_lifetime_transaction "'T'
TABLES
data = graphic_table
CHANGING
url = graphic_url
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_put_table = 2
dp_error_general = 3
OTHERS = 4 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
CREATE OBJECT h_pic_container
EXPORTING container_name = 'LOGO'.
CREATE OBJECT h_picture EXPORTING parent = h_pic_container.
CALL METHOD h_picture->load_picture_from_url
EXPORTING
url = graphic_url
IMPORTING
RESULT = g_result.
ENDMODULE. " PICTURE OUTPUT
Reward points if helpful.
Thanks -
ALV report output to be send to the respective users through email
Hi Gurus,
My requirement is to send the ALV report output to the respective users Email ID (Lotus notes) when the report runs in background.
Could any one suggest me with sample coding, How to send a ALV report output to the respective email ID's ( Suggest me the FM that used to send a internal table)
Regards
PaulHi Paul,
Here for u the sample code:
<b>call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_txt = it_message
receivers = it_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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.</b>
Hope this helps you.Reply for queries
Regards,
Kumar. -
ALV Report output in Excel format
Hi ,
I am facing a different behaviour in two computers , while trying to take an Excel format of an ALV report output. After generating the ALV output ,in one , when I click on the Excel Format button - the Excel spreadsheet opens with the output data. In the second computed , under the same action , a blank Excel sheet opens .
Could someone tell me a solution . What aspect is responsible for this ?
Regards ,
SujataReduce the MACRO security settings in the Excel to Medium.
Open an execl sheet, Chose from menu Tootls->Macro->Security.
Chose the radio-buton medium. Close the file and all excel applications.Then try downloading again.
Regards,
Ravi -
Select mutiple rows in ALV report output
Hi All,
I want to select the Multiple records i in ALV report output with out holding the CNTL(Control Key).
Is there any options in Layout?
Please let me know
regards,
Ajay
Edited by: Ajay reddy on May 30, 2010 3:27 PMHi Ajay,
To select several rows without Control button, if the rows are adjacent:
- select the first and the last of the desired rows with Shift button pressed
or
- select a row, keep the mouse button pressed, and pass over the desired rows
I don't know an option without Control if the rows are not adjacent.
http://help.sap.com/saphelp_bw/helpdata/en/d1/7d9d37664e4d45e10000009b38f8cf/content.htm
Regards,
Paulo Carvalho -
Adding/Enabling Totals & Subtotals Button in ALV Report Output
Hi Guys,
I would like to know , how to add / enable Totals & Subtotals Button on the application tool bar in alv report output.
Regards,
Kishanok so here i am sending my code....its also interactive...
and in second list i am displaying quantity....
*& Report ZINT_ALV
REPORT zint_alv.
TYPE-POOLS:slis.
TABLES:mara,
makt,
mseg.
DATA:BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
maktx LIKE makt-maktx,
END OF itab.
DATA:BEGIN OF itab1 OCCURS 0,
mblnr LIKE mseg-mblnr,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
werks LIKE mseg-werks,
END OF itab1.
DATA:fcat TYPE slis_t_fieldcat_alv,
fcat1 TYPE slis_t_fieldcat_alv,
eve TYPE slis_t_event,
eve1 TYPE slis_t_event.
DATA:t_mat LIKE mara-matnr,
s_mat LIKE mara-matnr,
g_repid LIKE sy-repid.
SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:mat FOR mara-matnr OBLIGATORY.
SELECTION-SCREEN:END OF BLOCK blk1.
INITIALIZATION.
PERFORM build_fcat USING fcat.
PERFORM build_eve.
START-OF-SELECTION.
PERFORM get_data.
PERFORM dis_data.
*& Form build_fcat
text
-->T_FCAT text
FORM build_fcat USING t_fcat TYPE slis_t_fieldcat_alv.
DATA:wa_fcat TYPE slis_fieldcat_alv.
wa_fcat-tabname = 'ITAB'.
wa_fcat-fieldname = 'MATNR'.
wa_fcat-ref_fieldname = 'MATNR'.
wa_fcat-ref_tabname = 'MARA'.
wa_fcat-seltext_m = 'Material'.
wa_fcat-input = ' '.
wa_fcat-edit = 'X'.
wa_fcat-input = 'X'.
APPEND wa_fcat TO t_fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'ITAB'.
wa_fcat-fieldname = 'MAKTX'.
wa_fcat-seltext_m = 'Description'.
APPEND wa_fcat TO t_fcat.
CLEAR wa_fcat.
ENDFORM. "build_fcat
*& Form build_eve
text
FORM build_eve.
DATA:t_eve TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = eve
EXCEPTIONS
LIST_TYPE_WRONG = 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.
ENDFORM. "build_eve
*& Form get_data
text
FORM get_data.
SELECT maramatnr maktmaktx INTO CORRESPONDING FIELDS OF TABLE itab
FROM mara INNER JOIN makt
ON maramatnr = maktmatnr
WHERE mara~matnr IN mat.
ENDFORM. "get_data
*& Form dis_data
text
FORM dis_data.
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid "'ZINT_ALV'
i_callback_user_command = 'USER_COMMAND'
i_grid_title = 'Interactive ALV'
it_fieldcat = fcat
it_events = eve
TABLES
t_outtab = itab
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.
ENDFORM. "dis_data
*& Form user_command
text
-->U_COM text
FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.
CLEAR fcat1.
CASE u_com.
WHEN '&IC1'.
READ TABLE itab INDEX sel_field-tabindex.
IF sel_field-fieldname = 'MATNR'.
IF sy-subrc = 0.
t_mat = itab-matnr.
PERFORM build_cat1 USING fcat1.
PERFORM build_eve1.
PERFORM get_data1.
PERFORM dis_data1.
ENDIF.
ENDIF.
SET PARAMETER ID 'MAT' FIELD t_mat.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM. "user_command
*& Form build_fcat1
text
-->T_FCAT1 text
FORM build_cat1 USING t_fcat1 TYPE slis_t_fieldcat_alv.
DATA:wa_fcat1 TYPE slis_fieldcat_alv.
wa_fcat1-tabname = 'ITAB1'.
wa_fcat1-fieldname = 'MBLNR'.
wa_fcat1-seltext_m = 'Material Doc.'.
APPEND wa_fcat1 TO t_fcat1.
CLEAR wa_fcat1.
wa_fcat1-tabname = 'ITAB1'.
wa_fcat1-fieldname = 'MENGE'.
wa_fcat1-seltext_m = 'Quantity'.
APPEND wa_fcat1 TO t_fcat1.
CLEAR wa_fcat1.
wa_fcat1-tabname = 'ITAB1'.
wa_fcat1-fieldname = 'MEINS'.
wa_fcat1-seltext_m = 'UOM'.
APPEND wa_fcat1 TO t_fcat1.
CLEAR wa_fcat1.
wa_fcat1-tabname = 'ITAB1'.
wa_fcat1-fieldname = 'WERKS'.
wa_fcat1-seltext_m = 'Plant'.
APPEND wa_fcat1 TO t_fcat1.
CLEAR wa_fcat1.
ENDFORM. "build_fcat1
*& Form build_eve1
text
FORM build_eve1.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = eve1
EXCEPTIONS
list_type_wrong = 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.
ENDFORM. "build_eve1
*& Form get_data1
text
FORM get_data1.
SELECT mblnr menge meins werks FROM mseg
INTO CORRESPONDING FIELDS OF TABLE itab1
WHERE matnr = t_mat.
ENDFORM. "get_data1
*& Form dis_data1
text
FORM dis_data1.
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid "'ZINT_ALV'
i_callback_user_command = 'USER_COMMAND1'
it_fieldcat = fcat1
it_events = eve1
TABLES
t_outtab = itab1
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.
ENDFORM. "dis_data1
Maybe you are looking for
-
How to provide hyperlink for a particular field in ALV
Hi, How to provide hyperlink for a particular field in alv report. Regards, Ramu.
-
Change page order inside a section
I am putting together a membership directory, with one page devoted to each member. I thought I could easily change the page order (to make them alphabetical) after I completed each page by shifting the thumbnails. Wrong. Looks like you can only shif
-
Video Control Bar in Flash Displays on HD but Not From Webserver
I am using Flash Pro 8 - putting FLV files in SWF files using Flash Pro 8 and then "publishing" to Html and SWF to a location on my hard drive. When I display the webpage from my Hard Drive from where ever on my hard drive I initially published to fr
-
Can't run programs from non-admin account
I'm new to the Mac and rusty with -- but not new to -- UNIX. I'm working with an iMac running OS X 10.2. I have installed several programs in a non-admin account (called "boys"), but they will not run from that account. The "get info" screen tells me
-
Adding JScrollPane to JInternalFrame
Hello, I have been having a rather difficult time adding a a jscrollpane to my jinternalframe. I have a panel that I am adding some objects to. I add that panel to a jscrollpane, then add the jscrollpane to the container of the JInternalFrame. I get