Pictures from ALV output
Hi,
I have to create an ALV report. In output i ll have material number and few other fields and when user clicks on that material number an JPEG image has to be displayed in a seperate screen. How to achieve this functionality. where and how can i store those images linked with material number and how can i retrieve those image in my report?
Kindly anyone can help me?
Best Regards,
Pavan Jhawar.
Hi Pavan,
is this WD ALV? I am not very much clear on envirnoment of development like BSP or R/3 report.
Anyway please refer FM for uploading Image to SAP
Here you will get the required logic of storing and retriveing images from MIME repository and then accordingly put the code.
Thanks,
Chandra
Similar Messages
-
Selecting multiple lines from ALV output for further validation
Hi guru's,
i have created a ALV report with a check box in the output,i need to select multiple lines by checking 'X' in the check box
after that i need to do further validation..like updating etc..how to read the selected lines( check box = 'X' )from the output of the ALV report.Is there any function for that.plz help me with this regard.
Thanks & Regards,
Balaji.SHi Balaji,
Try this way.
<font color=blue><pre>
REPORT ztest_alv_row_selection.
DATA: BEGIN OF it_output OCCURS 0,
select TYPE c, "This variable stores the value when row selected.
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
END OF it_output.
TYPE-POOLS:slis.
DATA:it_events TYPE STANDARD TABLE OF slis_alv_event,
it_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv,
wa_events TYPE slis_alv_event,
wa_layout TYPE slis_layout_alv.
DATA:g_program TYPE sy-repid VALUE sy-repid.
START-OF-SELECTION.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_output UP TO 100 ROWS.
DEFINE fieldcatalog.
wa_fieldcat-fieldname = &1.
wa_fieldcat-tabname = &2.
wa_fieldcat-seltext_l = &3.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
END-OF-DEFINITION.
fieldcatalog: "Column table col text
'BUKRS' 'IT_OUTPUT' 'BUKRS',
'BUTXT' 'IT_OUTPUT' 'BUTXT'.
wa_layout-box_fieldname = 'SELECT'. "This has to be set to get selection
wa_layout-colwidth_optimize = 'X'.
wa_events-name = 'PF_STATUS_SET'.
wa_events-form = 'PF_STATUS_SET'.
APPEND wa_events TO it_events.
CLEAR wa_events.
wa_events-name = 'USER_COMMAND'.
wa_events-form = 'USER_COMMAND'.
APPEND wa_events TO it_events.
CLEAR wa_events.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = g_program
is_layout = wa_layout
it_fieldcat = it_fieldcat
it_events = it_events
TABLES
t_outtab = it_output.
*& Form PF_STATUS_SET
FORM pf_status_set USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZTEST'.
1. When you set Pf status ZTEST, standard application tools will be removed.
2. Goto SE41 give program 'SAPLKKBL' and status 'STANDARD_FULLSCREEN'.
3. Copy the status from those to ZTEST of our program. Now you will see all standard functions.
ENDFORM. "PF_STATUS_SET
FORM USER_COMMAND *
FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN 'DISPLAY'. "user presses SAVE
LOOP AT it_output.
IF it_output-select EQ 'X'.
Process records that have been selected
WRITE:/ it_output.
ENDIF.
ENDLOOP.
ENDCASE.
ENDFORM. "user_command</pre></font>
Thanks
Venkat.O -
Issue in Excel download from ALV output
Dear Experts,
I have generated an ALV Output using FM "REUSE_ALV_GRID_DISPLAY". When i try to download the ALV Output in Excel spreadsheet, I am not getting the data in Excel sheet. Kindly help me in this regard.
Thanks in advance,
Regards,
Ramesh Manoharanhi ramesh,
Please try below options.
after getting the ALV disply , Go to Menu LIST->Export->Spreadsheet.or microsoft excel view (Cntrl + Shift + F7)
It will give some options to see the data in spread sheet format, hope you can save this to local desktop also.
or
please check the extension, it should be .XLS not .XLSX .some times .XLSX format wont be supported
regards,
pradeep
Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM
Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM -
Regarding downloading data into excel from alv output
hi experts,
i have developed a customized report(ALV) in which the employee number and all details are coming but when i press
download to excel button and get downloaded it to the excel sheet the employee number is only not coming but all details are coming in the excel sheet.please help me to short out this problem.
Also what i found that when i press print preview button then employee number here is also not coming but rest
of the details are coming.Hi Ravi,
For downloading the data from ALV to Excel use the following FM's
SAP_CONVERT_TO_XLS_FORMAT
GUI_DOWNLOAD.
In the function GUI_DOWNLOAD use the filetype as "DBF" due to which all the data gets downloaded perfectly.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = fname
FILETYPE = 'DBF'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
IMPORTING
FILELENGTH =
tables
data_tab = itab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Pls reward if useful.
Thanks,
Sirisha. -
Subtotal problem in Export Excel from ALV Output
Subtotal displays correct in alv output, but if i do the export excel , that subtotal value is changed in excel sheet.
is it possible to solve this problem.DATA: lo_grid TYPE REF TO cl_gui_alv_grid.
** get the global reference
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lo_grid.
** get the subtotal
DATA: it_01 TYPE REF TO data.
* CALL METHOD lo_grid->get_subtotals
IMPORTING
ep_collect01 = it_01.
** change the data
FIELD-SYMBOLS: <ft_tab> TYPE ANY TABLE,
<fs_tab> TYPE ANY,
<ff_field> TYPE ANY.
ASSIGN it_01->* TO <ft_tab>.
LOOP AT <ft_tab> ASSIGNING <fs_tab>.
ASSIGN COMPONENT 'PER' OF STRUCTURE <fs_tab> TO <ff_field>.
<ff_field> = '100'.
ENDLOOP.
** Refresh the table display
CALL METHOD lo_grid->refresh_table_display
EXPORTING
i_soft_refresh = 'X'. -
How to save the data from alv output
My ALV output is editable one.I want that user can edit the output and save the output details into database.How to do it?
Moderator Message: Basic Question. This site is not an alternative for your Consultancy work. Put some effort of your own before turning to the forums for help. This is your LAST warning. One more violation will lead to Account deletion.
Edited by: kishan P on Dec 6, 2010 6:45 PMHi
U need to implement an user_command and manage the functionality SAVE: when the user press SAVE you'll store the data into db.
There are several programs demo in SAP and many solution in SCN forum: try to search it
Max
Moderator message: please think twice before replying. By now you should know which type of questions will be locked, so no point in replying, in a double sense.
Edited by: Thomas Zloch on Dec 6, 2010 2:49 PM -
From ALV output list to selection screen
Hi,
I created one ALV report.
After executing the program, it displays an ALV list.
When I click on the back/exit/cancel buttons on the screen, it should take me to the selection screen.
But that is not happening. it is taking to one screen which shows the report heading. IF i click back/cancel/exit buttons in this screen, it is taking me to the selection screen.
I checked the program for any write statement, but therre are no write statements.
Even i tried to remove the end-of-selection event in the program. but not working.
Can any one help me on this how to overcome this issue.
Thank you.
Kumarhi check this example...
REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
groes TYPE mara-groes,
maktx TYPE makt-maktx,
END OF i_alv.DATA: alv_container TYPE REF TO cl_gui_docking_container.
DATA: alv_grid TYPE REF TO cl_gui_alv_grid.
DATA: layout TYPE lvc_s_layo.
DATA: fieldcat TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION. PERFORM get_data.AT SELECTION-SCREEN OUTPUT. DATA: variant TYPE disvariant.
DATA: repid TYPE sy-repid. repid = sy-repid. variant-report = sy-repid.
variant-username = sy-uname. layout-zebra = 'X'.
layout-edit_mode = 'X'. CHECK alv_container IS INITIAL. CREATE OBJECT alv_container
EXPORTING repid = repid
dynnr = sy-dynnr
side = alv_container->dock_at_left
extension = 1500. CREATE OBJECT alv_grid
EXPORTING
i_parent = alv_container.* ALV Specific. Data selection.
Populate Field Catalog
PERFORM get_fieldcatalog. CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
is_layout = layout
is_variant = variant
i_save = 'U'
i_structure_name = 'I_ALV'
CHANGING
it_outtab = i_alv[]
it_fieldcatalog = fieldcat[].
START-OF-SELECTION.
FORM GET_DATA
FORM get_data. SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
FROM mara
INNER JOIN makt
ON maramatnr = maktmatnr
UP TO 100 ROWS
WHERE makt~spras = sy-langu. SORT i_alv ASCENDING BY matnr.ENDFORM. "get_data***************************************************************
Form Get_Fieldcatalog - Set Up Columns/Headers
FORM get_fieldcatalog. DATA: ls_fcat TYPE lvc_s_fcat.
REFRESH: fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Number'.
ls_fcat-fieldname = 'MATNR'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '18'.
ls_fcat-fix_column = 'X'.
ls_fcat-key = 'X'.
ls_fcat-col_pos = '1'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Type'.
ls_fcat-fieldname = 'MTART'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '10'.
ls_fcat-fix_column = 'X'.
ls_fcat-key = 'X'.
ls_fcat-col_pos = '2'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Group'.
ls_fcat-fieldname = 'MATKL'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '12'.
ls_fcat-col_pos = '3'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Size'.
ls_fcat-fieldname = 'GROES'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '30'. ls_fcat-col_pos = '4'.
APPEND ls_fcat TO fieldcat. CLEAR: ls_fcat.
ls_fcat-reptext = 'Material Description'.
ls_fcat-fieldname = 'MAKTX'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '40'. ls_fcat-col_pos = '5'.
APPEND ls_fcat TO fieldcat.ENDFORM. "get_fieldcatalog
regards,
venkat -
Problem in exporting data from alv output to excel
Hi,
I had developed a report which has ALV report output.It is working fine and i am facing problem that when i am exporting it to the data to excel,it is not displaying the whole data in it. I am using reuse_alv_grid_display function module.
Waiting for a positive response.
Thanks & Regards,
Rickky
Moderator Message: FAQ. Please search for available information before posting.
Edited by: kishan P on Nov 8, 2010 12:34 PMIt is highly likely that the way you have built your field catalog is causing some data to drop on the export to excel. I have had this problem before. Check the fields in your fieldcat that are not working vs the ones that are working.
-
To get selected rows from alv output which is prepared with funciton module
Hi ,
I have a program which is prepared ALV with funciton modules.
Now i have to get selected rows(more than one).
Can i use method CL_GUI_ALV_GRID -> get_selected_rows.
or any other way to get selected rows.
thanks,
shylaUnder the callback subroutine ( u have passed them in I_CALLBACK_USER_COMMAND of ur function module) - u do like this -
DATA : ref1 TYPE REF TO cl_gui_alv_grid,
t_selcted_rows type LVC_T_ROID.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING e_grid = ref1.
call method ref1->get_selected_rows
importing ET_ROW_NO = t_selected_rows.
Hope this solves ur problem. -
Download only selected record from ALV
Hi
I want to download only selected records from ALV output with button.
i hav to fix the button on ALV screen using &ZDL whenever user presses the button record should be downloaded.
Pl with coding
its very very urgent.Hi ,
i dont have the exact code which suits to your requirement
but declare the internal table
like
data: begin of itab occurs 0,
check type c,
fields
end of itab.
while filling the field catalog
fieldcatalog-checkbox = 'X'
for this check field.
and display the grid
now write this subroutine
*& Form USER_COMMAND
Called from within the ALV processes. Currently, '&IC1' is used
to process the hotspot and display the document 'picked' by the
user.
PV_UCOMM contains the sy-ucomm from ALV
SELFIELD is a structure that contains all the data required to
process a user selection. The following is an example
of the SELFIELD structure and sample values:
FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
CASE PV_UCOMM.
WHEN '&IC1'.
loop at itab where check = 'X'.
append all these records to another internal table itab1
endloop.
call function gui_download.
pass the internal table itab1 in the tables statement
and also you have to give the file path that may be static or dynamic
if dynamic you have to call the function module
f4_filename
and get the filename and pass the same value to gui_download
that will be download to the above said path
endcase.
end form.
reward points if helpful,
thanks & regards,
venkatesh -
HI ,
I developed ALV report, the output is coming properly. But if i download that output into local file or spreadsheet from ALV output screen am unable to get the data only header and field headers are coming but data is not coming. But for other ALV with same importing parameters it is downloading properly. I donu2019t know whatu2019s problem only for this ALV, any one can please help me out from this situation pls.
ThxHi Lavanya
There can be two possibilities
1.) check the authorization, if it's missing, then this might happen...u hav said that the other report, it's downloading fine...r u trying to download the other report also with the same user id? is it a standard program or a customized report?
2.) just try reducing the security level in excel --> Tools -> Macros -> Security
regards
Sathish -
How to get rid of the loop in ALV output from At selection screen event?
I have several push buttons on a selection screen.
Clikc on a button, then it pops up an editable ALV report. (This gets triggered AT SELECTION SCREEN event.). REUSE_ALV_GRID_DISPLAY_LVC..
On the ALV output, I enabled F4 for a couple of fields. Once I click on the F4 button, ONF4 method gets triggerd and a pop up appears with custom search helps.
choose a line and it fills the cell.
Upto this it works fine.
Now I click on the BACK button at the ALV output, it takes me to the selection screen. I click on the button again, it show the editable ALV. Now when I click on the F4 button, the pop up comes up twice and the cell gets filled from the second pop - up.
How to control this?
Probably I am not refreshing something?
(I am using REUSE_ALV_GRID_DISPLAY_LVC and tooks ome code for ONF4 event from BCALV_*DATATYPES (forgot the exact name) program.)
Thanks,
VenHi,
FORM refresh_grid USING pw_grid TYPE REF TO cl_gui_alv_grid.
*Work area
DATA : wal_stable TYPE lvc_s_stbl.
CHECK NOT pw_grid IS INITIAL.
wal_stable-col = c_check.
wal_stable-row = c_check.
*Method to refresh grid
CALL METHOD pw_grid->refresh_table_display
EXPORTING
is_stable = wal_stable
i_soft_refresh = c_check
EXCEPTIONS
finished = 1
OTHERS = 2.
ENDFORM. " refresh_grid
Thanks,
Sree. -
Need to choose fields from alv grid output and send mail
Hi,
I need to choose few orders from alv grid output and send mail as PDF for chosen orders.
Suggest if possible and how.Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked
Rob -
s
Hello Gurus, I have to read the attached text in which TDID and TDLINE need to read.Here i need to write logic like that in ALV output text of TDLINE related to TDID Htxt come in single line if there is more than 1 line used , same for NOTE and Itxt. Please help me out with some ogic to show data in alv output. I have used FM 'BBP_PD_CONF_GETDETAIL'. Thanks Sankil
TDID TDLINE HTXT Supplier Text HTXT Supplier Text NOTE Note NOTE Note ITXT Supplier Text ITXT Supplier Text NOTE Note NOTE NoteHello Sankil
This can be achieved by using event AFTER_LINE_OUTPUT and also search with keyword AFTER_LINE_OUTPUT to get more examples
Please go through the below tutorial.
http://www.****************/Tutorials/ALV/Wordwrap/Index.htm
Thanks -
Running BDC from my Editable ALV output
Hi All,
I want to run a bdc for my ALV output. Here the problem is the layout is editable so the values can be changed. I want to pick the values which is modified in my ALV output then using that i should run my BDC Program.
How to catch the input given in my ALV output.
Thank in advance.
Arun.Hi, check following link:
[https://wiki.sdn.sap.com/wiki/display/ABAP/Editable%20ALV%20through%20OOPS|https://wiki.sdn.sap.com/wiki/display/ABAP/Editable%20ALV%20through%20OOPS]
Maybe you are looking for
-
Reading a non-english character
Hi, I have a trouble with reading a non-english character from a html page. I'm taking the word from the html page, and compare it with itself, like this string.equals("BİTTİ") but it returns false. is it possible to correct this?
-
I need to get a cable that will connect my microphones to my camera. I need a stereo 1/8 inch on one end and two mail XLR connectors on the other end, about 6 feet long. Does anyone know where I can get cables made? I have searched and found many cab
-
App store/itunes wont load
Just says loading.... forever. am connected to wifi. safari works, mail works, everything works except appstore and itunes. help.
-
Triggering Payment Reversal to BRM
Hi I would like to seek feedback on the best approach to implement a function to perform a Payment Reversal transaction from Siebel to BRM. Based on our current solution, we are planning to customize the Billing Profile Payments History view to have
-
Website portion of screen flickers up and down if page size is reduced
I made three connections to Firefox Chat support for this question. All my chat connections with a support person end abruptly (timeout??) without me doing anything. I am running Sony VAIO w/Windows XP SP3, everything up to date. I made Foxfire my pr