I want to display header information of My ALV Report center Aligned.
Hi all,
I want to display header information of My ALV Report center Aligned. How can I do it..Also I want to show two different Layout display of ALV report according to the Radio Button Present in the selection screen.. Pls help me out in this.
Hi,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = ' EKKO Table Report '. Leave Space such that it comes to Center
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
Similar Messages
-
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 -
Information button in ALV report
Information button in ALV report is not working. any suggestion
I have copied standard tool bar from standard program.During debugging, I have found that function code is defferent. Then I changed function code according to that.
-
I do not want to display header of adf table
Hi
I have one page with 2 tables - on one af the tables I do not want to display the Header but how do I do that.
I have tried to put it in the css file
af|column::column-header-cell
display:none;}
but then its both tables who lose the header (I cant figure out how to use an id for column-header-cell.
I think that maybee you can write something in the inline stye option on each column but nothing seeams to work.
Anyone who can help me??You should mark that answer as Correct and mark question as asnwered :)
I also suggest you to change your nick in your control panel. -
Displaying selection screen details in Alv Report output display as Header
Hi all,
May be somebody knows how I can show selected values with select-options in top_of_page using REUSE_ALV_GRID_DISPLAY.
This shoud work for all the reports and diff selection screens .
I need one dynamic process which will for display any report selection screen selected details.(Basically varient information of report).
Small example if possible, please.
Thanks in advance,
RimasHi Thiru,
Thanks for the input.
This is my exact requirement.
Hi Experts,
I would like to Display / Print Select-options selected details in ALV Header.
Ex: Say suppose here i enter kunnr as 1000
lifnr as 2000 to 4000
p_langu as 'EN'.
p_dir as 'C:\TEMP,
p_upda as 'X'
for selection screen below.
SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr.
PARAMETER : p_lanuge LIKE t002-spras DEFAULT sy-langu.
PARAMETER: p_dir LIKE rlgrap-filename
DEFAULT text-003 LOWER CASE.
PARAMETERS: p_upd AS CHECKBOX DEFAULT 'X'.
I dont want to Hard code selection screen values like
DATA: header TYPE slis_t_listheader,
wa TYPE slis_listheader,
wa-typ = 'S'(093).
wa-key = s_lifnr .
wa-info = 'Vendor no".
APPEND wa TO header.
I want dynamic process for all of my selection screen values selected
hard code may be it will be fine small selection screen it will work.
Fur that i got one process to get dynamically through fm
Ex: DATA: irsparams TYPE rsparams OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = program
TABLES
selection_table = irsparams
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
loop at irsparams.
write : / irsparams-SELNAME.
write : / irsparams-SIGN.
write : / irsparams-OPTION.
write : / irsparams-LOW.
write : / irsparams-HIGH.
endloop.
I have done my requirement partially but i am failed to achive my full requirement.
Because
rsparams strcture is diff from slis_t_listheader.
Can any one help me for further assistence to display irsparams strcture data in alv header.
Thanks
Nag -
How do i display text information below an ALV grid.??
Hi.
I need to display my output in an ALV GRID.
also i need to display summary details below the ALV grid. the smmary values keep changing dynamically depending upon selection screen inputs!!chk this report..write your code in the footer
*& Report ZRJR02 *
REPORT ZRJR02 .
*Table declaration.
TABLES:ZEMP_MST,ZDEPT_MST,ZDESG_MST,ZSL_TXN.
*Varriable declaration.
TYPE-POOLS SLIS.
DATA : POS TYPE I.
DATA REPID LIKE SY-REPID.
DATA : F1 TYPE SLIS_T_FIELDCAT_ALV,
F2 TYPE SLIS_FIELDCAT_ALV,
L_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA L_POS TYPE I VALUE 1. "position of the column
DATA GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
*DATA GT_SORT TYPE SLIS_T_SORTINFO_ALV.
data: GT_EVENTS TYPE SLIS_T_EVENT,
FS_EVENTCAT LIKE LINE OF GT_EVENTs.
*Internal table declaration.
*DATA BEGIN OF IT_SORT OCCURS 5.
* INCLUDE TYPE SLIS_SORTINFO_ALV.
*DATA END OF IT_SORT.
DATA:BEGIN OF ITAB OCCURS 0,
ZEMPNO LIKE ZEMP_MST-ZEMPNO,
ZEMPNAME LIKE ZEMP_MST-ZEMPNAME,
ZDEPTCD LIKE ZEMP_MST-ZDEPTCD,
ZDEPTNAME LIKE ZDEPT_MST-ZDEPTNAME,
ZDESGCD LIKE ZEMP_MST-ZDESGCD,
ZDESGNAME LIKE ZDESG_MST-ZDESGNAME,
END OF ITAB.
REFRESH ITAB.CLEAR ITAB.
START-OF-SELECTION.
SELECT A~ZEMPNO A~ZEMPNAME A~ZDEPTCD B~ZDEPTNAME A~ZDESGCD C~ZDESGNAME
FROM ZEMP_MST AS A
INNER JOIN ZDEPT_MST AS B
ON A~ZDEPTCD EQ B~ZDEPTCD
INNER JOIN ZDESG_MST AS C
ON A~ZDESGCD EQ C~ZDESGCD
INTO CORRESPONDING FIELDS OF TABLE ITAB.
IF SY-SUBRC <> 0.
MESSAGE E899(M3) WITH 'No records'.
ENDIF.
perform f_build_eventcat.
PERFORM LAYOUT.
END-OF-SELECTION.
*& Form LAYOUT
FORM LAYOUT .
PERFORM FCAT USING 'ZEMPNO' 'ITAB' '' 'Emp.No.' 'ZEMPNO' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZEMPNAME' 'ITAB' '' 'Emp. Name' 'ZEMPNAME' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZDEPTCD' 'ITAB' '' 'Dept.Code' 'ZDEPTCD' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZDEPTNAME' 'ITAB' '' 'Dept.Name' 'ZDEPTNAME' 'ZDEPT_MST' ''.
PERFORM FCAT USING 'ZDESGCD' 'ITAB' '' 'Desg.Code' 'ZDESGCD' 'ZEMP_MST' ''.
PERFORM FCAT USING 'ZDESGNAME' 'ITAB' '' 'Desg.Name' 'ZDESGNAME' 'ZDESG_MST' ''.
* PERFORM LSORT USING 'ZEMPNO' 'IDATA' ''.
* PERFORM LSORT USING 'ZEMPNAME' 'IDATA' ''.
* MOVE IT_SORT[] TO GT_SORT[].
REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
IT_FIELDCAT = F1
* IT_SORT = GT_SORT
I_SAVE = 'X'
IT_EVENTS = GT_EVENTS[]
TABLES
T_OUTTAB = ITAB.
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. " LAYOUT
*& Form FCAT
FORM FCAT USING P_FIELD P_TABLE P_SUM P_TEXT P_RFIELD P_RTABLE P_DISP.
ADD 1 TO POS.
F2-COL_POS = POS.
F2-FIELDNAME = P_FIELD.
F2-TABNAME = P_TABLE.
F2-SELTEXT_L = P_TEXT.
F2-REF_FIELDNAME = P_RFIELD.
F2-REF_TABNAME = P_RTABLE.
F2-DO_SUM = P_SUM.
F2-NO_OUT = P_DISP.
APPEND F2 TO F1.
CLEAR F2.
ENDFORM. " FCAT
*& Form LSORT
*FORM LSORT USING P_FIELD P_TABLE P_UP.
* ADD 1 TO L_POS.
* IT_SORT-SPOS = L_POS.
* IT_SORT-FIELDNAME = P_FIELD.
* IT_SORT-TABNAME = P_TABLE.
* IT_SORT-UP = P_UP.
* APPEND IT_SORT.
*ENDFORM. " LSORT
FORM F_BUILD_EVENTCAT .
CLEAR: GT_EVENTS. REFRESH: GT_EVENTS.
CLEAR: FS_EVENTCAT.
FS_EVENTCAT-NAME = 'TOP_OF_PAGE'.
FS_EVENTCAT-FORM = 'F_REPORT_HEADER_ALV'.
APPEND FS_EVENTCAT TO GT_EVENTS.
CLEAR: FS_EVENTCAT.
FS_EVENTCAT-NAME = 'END_OF_LIST'.
FS_EVENTCAT-FORM = 'F_WRITE_SUMMARY'.
APPEND FS_EVENTCAT TO GT_EVENTS.
ENDFORM. " F_BUILD_EVENTCAT
FORM F_REPORT_HEADER_ALV.
CALL FUNCTION 'Z_YHEAD_PRINT'
EXPORTING
TITLE1 = 'XYZ Limited'
TITLE2 = 'Employee Master'
TITLE3 = 'Created on '
COLOR = 'X'
ENDFORM.
*& Form F_WRITE_SUMMARY
* Write summary before exit
FORM F_WRITE_SUMMARY .
write:/ 'Welcome to XYZ Limited'.
write:/ 'This is a test program to display Report in ALV Format'.
ENDFORM. -
Not able to display the values on the alv report.
Hi all,
loop at it_stpo.
indx = sy-tabix.
select single bdmng from resb into it_resb-bdmng
where matnr = it_stpo-idnrk
and xloek ne 'X'.
it_stpo-bdmng = it_resb-bdmng.
modify it_stpo index indx.
endloop.
in the above code, m fetchin the values of bdmng and populating it in the it_stpo.
the values get populated in the internal table.
But the problem is only the first value of all the entries gets populated.
For ex:
it_stpo-idnrk = C0201AA0800N ** under this components der r three entries***
i want to display all three values of these entries.
1.A0201AD6750N 990
2.A0201AJ0960N 1,578
3.A0201AJ1140N 2,996
but the value 990 gets repeated thrice for the above three entries. n the value 1598 n 2996 is not gettin displayed.
lll, for all other entries. only the first entry value gets displayed for their respective components.
suggest modification in my code so dat i cn display all the values.
thanks in advance.
regards,
purva.Hi all,
select bdmng from resb into corresponding fields of table it_stpo2
for all entries in it_stpo
where matnr = it_stpo-idnrk
and xloek ne 'X'.
loop at it_stpo2.
move-corresponding it_stpo2 to it_stpo.
append it_stpo.
endloop.
In the above code, m able to fetch the records in the table it_stpo2. but the data is not gettin populated in the final internal table it_stpo. Both the internal tables it_stpo & it_stpo2 are same.
The data is gettin moved from it_stpo2 to it_stpo but only upto the header level. its not gettin appended in the table it_stpo even after using append stmt.
Plz help me to resolve this issue. its urgent.
Rgds,
Purva -
Display logo on screen in ALV Report.
Hello ,
I want to change the logo displayed in ALV report on screen.
I have imported logo from SE78 as BMP image.
The logo imported successfully.And it can be seen in SE78.
But when i replace the old logo name with new logo in function module
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LIST_TOP
I_LOGO = 'ENJOYSAP_LOGO'.
The logo is not getting displayed on screen.The dimensions and other parameters of old and new logo are same.
What needs to be done to resolve this problem?
Regards,
Deepak.GOTO - OAOR (Business Document Navigator)
Give Class Name - PICTURES Class Type - OT..... then Execute
It will show you the list, then select ENJOYSAP_LOGO.
On that list, you will find one control with a "create" tab.
Click std. doc types.
Select SCREEN and double-click.
It will push FILE selection screen.
Select your company logo (.gif) and press OK.
It will ask for a description- for instance: "company logo".
It will let you know your doc has been stored successfully.
You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
Use the TOP-OF-PAE event.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
Cheers! -
Heading with parameter in ALV report
hi
i want to add heading to my ALV report which i created using factory method.
in my code i wrote:
data:gr_display type ref to cl_salv_display_settings.
gr_display = gr_table->get_display_settings( ).
gr_display ->set_striped_pattern( cl_salv_display_settings=>true).
gr_display->set_list_header( 'this alv report has' X <-- here i want to add variable)
how can i add variable ( which is global variable ) insted of the X ??
thankshi,
use this.
DATA:
gd_headr type char100.
concatenate 'this alv report has' <variable>
into gd_headr separated by space.
gr_display->set_list_header( gd_headr ).
regards,
Peter -
Display Material |Attachment File in ALV report
Dear All,
I have to make ALV report for mutliple material attachment file.I want to display material wise attachment where user can see in report. We can see attachment list in Service For Object button in MM03 tcode for single material. And i also i do not want attachement list on tool bar where like MM03 is dispalying.
I need ALV report for materialcodewise image/attachment file like,
MaterialCode File
A101 any filename
B101 any filename
So user can click on file base on material, then file will open and he can see image/attachment.
Please guide me for above mentioned query.
Regards,
Shivam.Dear Shivam,
You can have multiple attachments for a sinlge material. You need to consider that in your report.
for getting the list of attachments using the static method CL_BINARY_RELATION=>READ_LINKS.
DATA: lw_BOR TYPE sibflporb.
DATA: lt_rel TYPE OBL_T_RELT,
lw_rel type OBL_S_RELT.
DATA: lt_links TYPE obl_t_link,
lw_links type OBL_S_LINK.
DATA: lo_root TYPE REF TO cx_root.
lw_bor-instid = <Materail no.> "<------- Materail No.
lw_bor-typeid = 'BUS1001006'.
lw_bor-catid = 'BO'.
lw_rel-sign = 'I'.
lw_rel-option = 'EQ'.
lw_rel-low = 'ATTA'. "<----------Attachments
APPEND lw_relt TO lt_rel.
TRY.
CALL METHOD cl_binary_relation=>read_links
EXPORTING
is_object = lw_bor
it_relation_options = lt_rel
IMPORTING
et_links = lt_links.
CATCH cx_root INTO lo_root.
ENDTRY.
Once you get the list of attachment populate your output table using the same.
you can use FM SO_OBJECT_READ to get details of attachment.
Make the column with attachment as hotspot, so that ALV take action in sinlge user click.
In the user-command of ALV write the code to open the attachment.
you can use the FM SO_DOCUMENTS_MANAGER
Hope this helps you.
Regards,
Sachinkumar Mehta -
Creating header in printout of ALV report in WD4A
Hi
I have created one alv report in WD4A. When I click on the "print version" button, the report appears in pdf format.
I want to create header on that pdf output. Please let me know how can i do that ? . it is coming on alv but not on pdf.
The code follows:
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_ztime( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_ztime( ).
DATA:
l_value TYPE REF TO cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model(
*set header for the table
data: lr_table_settings type ref to if_salv_wd_table_settings.
data: lr_header type ref to CL_SALV_WD_HEADER.
lr_table_settings ?= l_value.
lr_header = lr_table_settings->get_header( ).
lr_header->set_text( 'ATTANDENCE LIST' ).
*PDF output header
data: pdf_header TYPE REF TO IF_SALV_WD_PDF_SETTINGS.
pdf_header ?= l_value.
data: lv_head type abap_bool.
call METHOD pdf_header->set_export_no_tol( 'X' ).
lv_head = pdf_header->get_export_no_tol( ).
regards
Vishal kapoor
Message was edited by:
vishal kapoorif you're still having this problem, try this (given your own code sample):
data:
lv_header type string.
pdf_header ?= l_value .
CONCATENATE 'My header text' INTO lv_header RESPECTING BLANKS .
pdf_header->set_header_left_freetext( lv_header ).
pdf_header->set_header_left( if_salv_wd_c_pdf_settings=>text_free ). -
Wrong Display of Japanese Currency in ALV Report
Dear Friends,
I am facing a problem in Displaying a Japanese Currency in the ALV Report Output. I am mentioning the Currency Key field and the Currency field in the Report.
For example, the amount field should be displaying as 22838 instead of 228.38 where this is correct in case of USD but not correct in case of JPY.
Code where the i am appending the fieldcatlog:
ls_fieldcat-fieldname = 'WAERK'.
ls_fieldcat-datatype = 'CUKY'.
ls_fieldcat-outputlen = 8.
ls_fieldcat-seltext_l = Text-088.
ls_fieldcat-seltext_m = Text-088.
ls_fieldcat-seltext_s = Text-088.
ls_fieldcat-reptext_ddic = Text-088.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'BUCK0'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 16.
ls_fieldcat-seltext_l = Text-017.
ls_fieldcat-seltext_m = Text-017.
ls_fieldcat-seltext_s = Text-017.
ls_fieldcat-reptext_ddic = Text-017.
Please do suggest if any inputs on the same.
Thanks in Advance for you reply.
Thanks and Regards,
Saritha KHi,
All the Decimals related to currency fields will be stored in the table tcurx.
You have to get the currency and respective decimals into internal table.
Read the internal the table with key equal to currency.
And calculate the values as below :
loop at gt_output.
READ TABLE gt_tcurx WITH KEY currkey = gt_output-zwaers.
IF sy-subrc EQ 0.
IF gt_tcurx-currdec = '0'.
gt_output-dmbtr = gt_output-dmbtr * 100.
ELSEIF gt_tcurx-currdec = '3'.
gt_output-dmbtr = gt_output-dmbtr / 10.
ENDIF.
ENDIF.
MODIFY gt_output.
endloop. Then pass the gt_output to ALV FM.
In the above code gt_output is my final internal table which i am passing to the ALV FM. And gt_tcurx is the internal table consists of all the currency and their decimals.
Thanks,
Sri. -
Information required on ALV report
Hello,
I am working on ALV report my requirement is I have to display output in colors like first line is as in white color and second line is light blue....this is applicable for all records in ALV Grid output.
Could you please help me how to get the alternate rows in color.
Thank you in Advance.Hi Kishore ,
See This links
Row color in ALV grid
selecting multiple rows in alv grid -
Column heading change in print ALV report
Hi,
when i see ALV report output that time column heading is correct. but when i see print preview it's give another column heading.
like
column heading - Delivery Challan no it's come in print preview only delivery.
Thanks in Advance.
regards.
Sam.Hi,
thanks.
I have already use this in report.
like.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-REF_TABNAME = 'LIPS'.
WA_FIELDCAT-SELTEXT_M = 'DELIVERY CHALLAN NO'.
WA_FIELDCAT-OUTPUTLEN = 20.
APPEND WA_FIELDCAT TO T_FIELDCAT.
Regard
Sam -
Automatic Display of NEW Data in ALV Report using Classes and Methods
Hi,
I have developed a ALV Report for displaying data from a set of DB tables using ABAP OO, Classes and Methods. The requirement is to have the report output to be automatically updated with the new entries from the DB table at a regular frequency of tiem may be every two minutes.
Could anyone please tell me how can this be acheived.
Thanks and regards,
Raghavendra Goutham P.Yes its possible.
Take a look at this thread
Auto refresh of ALV Grid, without user interaction
Or Rich's blog
/people/rich.heilman2/blog/2005/10/18/a-look-at-clguitimer-in-46c
Regards,
Ravi
Note : Please mark all the helpful answers
Maybe you are looking for
-
Thumb Drive write protected after plugging into MacBook Pro
So I recently plugged my 64GB thumb drive into my MacBook Pro to transfer music from my old mac to my new one. Although as soon as I plugged into the MacBook Pro, it write protected it rendering it useless as I do not wish to use it as a storage dri
-
Quick preview/ How do I disable Hot&coldSpotw
Hi, in the first version of Aperture I had no Hot&Coldspots in my Quickpreviews. Now I do have this al the time in Aper 3. How can I shut this off. I only would like to have this in my normal view.
-
Get today's date minus 30 seconds
How can I get the current date and time minus 30 seconds. The result shoulld be of date format. Thanks.
-
Unable to select endpoint or path
I am using Illustrator CS5. I drew a vector image with three layers multiple paths in each. I wanted to go in and smooth out some of the segments I had in there but I am not able to select endpoints or handles. I can go around the edge and it w
-
I lost my browser line on my firefox homepage, how do I restore it?
I've lost the browser address line on my firefox homepage, how do I restore it?