Reserve lines in alv report
hi experts , how we reserve 15 lines from the top of the page in alv reports.
regards
subhasis
If by reserve you mean should not move on scrolling then make them KEY from fieldcatalog.
But I think maximum of 10-12 can be handled by that.
Regards,
Amit
Reward all helpful replies.
Similar Messages
-
Hi Experts,
I have written few lines of code in "HTML_TOP_OF_PAGE" sub routine. This subroutine I am using in ALV. like below...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = IT_FIELDS
IT_SORT = IT_SORT
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
I would like to reserve some lines for the top of page. i mean After displaying the data in top of page, ITAB data should be displayed.Now we can only visible three lines data only. still there are six lines are there. After displaying another six lines the Itab data should be displayed in ALV table.
Of course, we can drag down my data table. But user doesn't want to see without any efforts.
Pls help me.
Thanks in advance
RaghuCALL METHOD document->add_gap
EXPORTING
width = 50. should help you..
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
DATA: text TYPE sdydo_text_element.
CALL METHOD document->add_gap
EXPORTING
width = 100.
text = 'Jay custom ALV'.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'HEADING'.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
text = 'User Name : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uname.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Date : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
DATA: zword TYPE string, zdd TYPE string, zmmm TYPE string,
zyyyy TYPE string, zfin TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
input = sy-datum
IMPORTING
output = zword.
zdd = zword+3(2).
zmmm = zword+0(3).
zyyyy = zword+7(2).
CONCATENATE zdd '-' zmmm '-' zyyyy INTO zfin.
text = zfin.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Time : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uzeit.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
text = lv_count.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
ENDFORM. "HTML_TOP_OF_PAGE -
How to insert horizontal lines in alv report?
hi,
i have to insert horizontal lines in alv report.( RM07MLBB )
actually my requirement is:
basis list = RM07MLBB.
first secondary list = another report is called here ( RM07DOCS )
i want to insert horizontal lines in the first secondary list, when i execute individually RM07DOCS , i can get horizontal lines, but when i dounle click in the basic list --> in the first secondary list , i am not getting the horizontal lnes.
functional modules used are REUSE_ALV_HIERSEQ_LIST_DISPLAY & REUSE_ALV_GRID_DISPLAY.
here in this program,
is_layout = alv_layout.
hence i tried to give
alv_layout-no_hline = ' '.
but not effecting.
can some one please tell me , how to insert lines in the alv report.
thanks in advance,
Dastagir.hello,
so i cannot insert horizontal lines in the first secondary list according to my sorting condition, i.e., in a single block there should be :
if same delivery challan number is repeating they should come in the same block,
for the corresponding delivery challen number, if have po number, is repeating , they also should come in the same block.
in this way i have to seperate the blocks containing EXNUM , EBELN CONDITIONED. -
Field description in two line in ALV report
Hi ,
In ALV report I want the description for each field to be displayed in two lines . For example
the description for field matnr is " Material No for grade A " which is displayed in one line . But i want to display it as : Material No
for grade A
in two lines . Is it possible . Please help me out .
NeeteshHi Neetesh,
Its not possible to display as you like in 2 lines header for single column. But i can provide the alternative way , it won't good logically. Please try the following logic.
Let suppose you have 10 fields F1-f10. Each field has the 2 lines header. So take 20fields in your fields catalog ie take 10 dummy fields which are equal lenght of the fields F1-f10. and for the last 10 fields(F11-F20) set the row pos as 2, set the second line header to these field(F11-F20). So you will succed to display the 2 level header for single column. But the problem here is you will get one empty row additional row for each row. Because you have taken (F11-F20) fields are dummy and don't have the data also. This solution will works only in the case of ALV List display not in Grid Display.
But Before that tell to your customer about this problem , Because I have done the same things when my customer giving important to 2 lines header and he accepeted that also.
If suppose you have the data in 2 lines for each column then this solution will work fine. Thats what i implemented in my ALV Report.
Warm Regards,
Vijay. -
How to select multiple lines in ALV report
hi gurus,
I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
Regards,
Satyajithi,
try like this
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
TYPES: BEGIN OF t_ekko,
sel, "stores which row user has selected
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
DATA : BEGIN OF det_tab OCCURS 0,
ebeln LIKE ekpo-ebeln,
END OF det_tab.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
gd_layout-box_fieldname = 'SEL'.
"set field name to store row selection
gd_layout-edit = 'X'. "makes whole ALV table editable
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_STAT'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'EBELN'.
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'DET'. "button add by me
CLEAR det_tab.
REFRESH det_tab.
LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
MOVE-CORRESPONDING wa_ekko TO det_tab.
APPEND det_tab.
ENDLOOP.
PERFORM build_cat.
PERFORM dis_data.
ENDCASE.
ENDFORM. "user_command
*& Form set_stat
* text
* -->RT_EXTAB text
FORM set_stat USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
ENDFORM. "set_stat
*& Form build_cat
* text
FORM build_cat.
CLEAR fieldcatalog1.
REFRESH fieldcatalog1.
fieldcatalog1-fieldname = 'EBELN'.
fieldcatalog1-tabname = 'DET_TAB'.
fieldcatalog1-seltext_m = 'Order No.'.
fieldcatalog1-outputlen = 10.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
ENDFORM. "build_cat
*& Form dis_data
* text
FORM dis_data.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_DS'
it_fieldcat = fieldcatalog1[]
i_save = 'X'
TABLES
t_outtab = det_tab.
ENDFORM. "dis_data
here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
here u can select morethan one line using control(ctrl)
reward if usefull... -
Output several lines in ALV report
Hi all,
My requirement is to output multiple lines (i.e. text lines) in a grid of an ALV report, so that user could later download it to an MS Excel sheet.
Is there any solution to it?
Many Thanks!
e.g., target output is like this and all the text lines in Col B should belongs to 1 single record...
Col A | Col B |
===============
rec1 | text line 1 |
text line 2
text line 3
===============
rec2 | text line 1 ||
text line 2
text line 3Thanks!
Yes, I populated it, but each text line occupies one row ID, how can make it?
can I display it as a table in a grid ?
Thanks! -
Logic needed to print blank line in alv report
hi experts,
can anyone please tell me the logic for this
i want to logic one is
1) in alv report contains
a set of data contains 100 (5 datas)
and a set of data contain 200(5 datas)
i want to have one coloum containing serial no
ex for 100 i want to move no '5' to one coloumn ,but it should display only ones not for all 5 records.
same for 200 also i want to move 7 to this ,it should b displayed ones
i used for at new command alos its not working
2)suppose for particular date, 200 related records is not there
it should conatin blank line,displaying 'NIL'.
SO THE OPT FROMAT MUST BE
MATNR DOCNO
100 1000
100 1000
100 "
100 "
100 "
200 2000
200 "
200 "
200 "
200 "
SUPPOSE 200 RECORD IS NOT THERE THE OPT SHLD B
100 1000
100 1000
200 NILArun,
1)
If you are using the function module REUSE_ALV_GRID_DISPLAY, then use the internal table it_sort with a row for the column where you want the suppression of repeated values.
2)
If you are using the function module REUSE_ALV_GRID_DISPLAY, then simply ensure that your internal table t_outtab has the rows that you need containing 'NIL'.
John -
Hello All,
Does any one have any idea how to create 2 Header lines in an ALv report
as in 1 cummulative header and under that 2nd detailed header.
Please help me out.
Cheers,
Deepthee KasalHi,
It is not possible to have 2 detailed headers in ALV reports.
Regards,
Satish -
Add new line in ALV report on click of button...
Dear All,
How to add a new line for input in ALV report at runtime, on click of a button.
Waiting for early and favorable reply.
Regards,
Dharmesh VyasHi,
First of all u have to Create ur own PF-status and Assign Fcode e.g 'INSERTROW'.
So, whenevr you will click Insertrow button it will be triggered in your User Command and then just Append the blank line in your Final Internal Table.
And Refresh Icon will be there by default...
To Trigger it You have to write rs_selfield-refresh = 'X'
You can also follow the below link...
Try it.
Link:[http://wiki.sdn.sap.com/wiki/display/ABAP/ALVeasytutorial].
Regards
Arbind -
Add new line in ALV report and Refresh button
How to add a new line in a ALV report?
How to add a refresh button in a report?Hi,
First of all u have to Create ur own PF-status and Assign Fcode e.g 'INSERTROW'.
So, whenevr you will click Insertrow button it will be triggered in your User Command and then just Append the blank line in your Final Internal Table.
And Refresh Icon will be there by default...
To Trigger it You have to write rs_selfield-refresh = 'X'
You can also follow the below link...
Try it.
Link:[http://wiki.sdn.sap.com/wiki/display/ABAP/ALVeasytutorial].
Regards
Arbind -
Hi Experts,
I want to make color to parrticular line when it satisfies the condition in ALV report.
I am not using SLIS.
so is there any alternavite to clolor row on specific condition like...NETWR > 10000,
that row shold be in RED color.
Please give me Example of code.
Poins will be awarded soon.
Thanks,
RohanHi,
You have to expand your internal table with a field named eg. LINE_COLOR wich has 4 char's.
Then in building your internal table you can set that field with the appropriate value.
eg. wa_itab-line_color = C600. "( red )
Then when calling your first display of your ALV you do this
alv_grid_layout-info_fname = 'LINE_COLOR'.
Then
call method alv_grid->set_table_for_first_display
That should do the trick.
Best regards,
Dirk. -
Skip 1 Line in ALV report.....
Hi Experts,
I have made ALV report in which user wants one blank line after each row.
How to skip one line after each row in ALV ?
YusufHi Yusuf,
It is really a typical requirement.
There is a solution to that.
In the internal table that you are passing to the function module, append a blank line to that itself.
Like:
LOOP AT itab INTO wa.
APPEND wa TO itab3.
CLEAR wa.
APPEND wa TO itab3.
ENDLOOP.
REFRESH itab.
itab[] = itab3[].
But remember not to do sorting after that or not to pass the sorting table parameters.
If you have an extra line at the bottom you can delete that by reading the number of lines through the describe statement and delete the last row of the table.
Try this hiope this will work.
Reward points if found useful.
Thanks & regards
Abhijit -
Displaying data in Two line in ALV report
Hi,
I want to know how to display the data in alv in two lines for Fild name as well as for fild value
like in below case
wa_fieldcata-fieldname = 'WRBTR'.
wa_fieldcata-seltext_l = 'AMOUNT IN DOCUMENT CURRENCY'.
wa_fieldcata-outputlen = 18.
wa_fieldcata-DO_SUM = 'X'.
APPEND wa_fieldcata TO it_fieldcat.
CLEAR wa_fieldcata.
by this on alv COLUMN headig is coming as 'AMOUNT IN DOCUMENT CURRENCY' in one linw i want to display 'AMOUNT IN ' in first line and then 'DOCUMENT CURRENCY' below that
'AMOUNT IN
DOCUMENT CURRENCY' ***
similarly how to display value of three fidls in one column
like for a vendor I have one column Vandor name in that column i want to display from table LFA1,
NAME1
NAME2
NAME3
NAME4,
in one column only how to do it.
regards,
zafarHi,
Ref . early reply can u help me how to uset his in ALV code and can u give some example for this how to display it in two lines as my column heading is of 60 characters 5 word i want to display it in two line in one column only .
How to use : SLIS_EV_AFTER_LINE_OUTPUT
to get this.
or is there any other method.
regards,
zafar -
FBL5N customer line item ALV report -- define exit points
Customer wants to modifications on FBL5N std sap report. Here's what I think are the options:
1. Modify SAP program (which I dont prefer at all to do)
2. Copy SAP Program into Y/Z program
3. User-exits or BAdIs.
I am in process of doing step 2.
I tried to find any user-exits for the requirement but there seems no user-exit. There is no std BAdI delivered for the same purpose either.
Hence, I was wondering if I can create BAdI so as to define the exit points where I need. Can you suggest on howt to go about this procedure?If you copy and change the program, you have to be aware that in some of the includes, it checks the program name and calling transaction and behaves differently if it's not the normal program name or transaction. If SAP makes significant changes to the program during an upgrade, your changed program won't have these SAP changes. I don't know of any BADIs or user exits for report programs.
Some people wiil disagree with me on this, but I really don't have a problem with making mods to the original SAP code, particulary if you can isolate them in another include and keep changes to the SAP code to a minimum. With version management and SPAU at upgrade and support pack time, you can keep track of your changes and re-apply them if needed.
But it's easy for me to say because I've been doing this for quite a while. If you really don't want to make the changes, then you're probably better off copying and changing a Z program.
Rob -
Problem in displaying Total No.of Lines in ALV report header.
Hi guys,
my field symbol internal table is having records in which "Compliance" field is having YES or NO values. now requirement is to display
Total No. of Compliances which are having YES.
lets say, internal table is having 10 lines. in which compliance field is having 6 YES and 4 No respective values .
now i want to display header as No. of Compliances : 6
following is my code to display Total no.of lines in internal tables.
* total no. of records selected
DESCRIBE TABLE <table> LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE text-004 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,ld_lines, ld_linesc .
My data is there in Field-Symbol table.
Now i want to display No.of compliances . could anybody please help me out in this.
Thanks in Advance.
Regards
satishHI,
You can use another option like below,
<Table>[] = <Table1>[]
delete table1 where compliance = 'NO'.
DESCRIBE TABLE <Table1> LINES ld_lines. .. follow your logic as above.
Hope this will helps you,
Thanks & Regards,
Suresh M
Maybe you are looking for
-
I just don't want to have to delete a lock file - which has a purpose - in order to use firefox simultaneously from two locations on the network - where the home directory, i.e. .mozilla directory - is located
-
My external hard drive is not recognised on my mac book pro
my external hard drive is not recognised on my mac book pro
-
Problem with a 3D object imported from Photoshop (CS5)
Hello, I have an interesting problem that I've never encountered. I have a PSD file that contains a 3D object I created from AutoCAD. I need to animate the object and add it to a video comp I previously created. After importing the PSD into aftereffe
-
ORA-31466: no publications found (Oracle 10.2.0.1.0)
When I execute BEGIN DBMS_CDC_SUBSCRIBE.SUBSCRIBE( subscription_name => 'C1_SUB', source_schema => 'R1', source_table => 'C1啊', column_list => 'COL1埃, COL2唉', subscriber_view => 'C1_VIEW'); END; with chinese characters in table name and column name a
-
MP4 clips just won't preview in PremPro CS4
Hi there, I have a question about why I don't seem to be able to work with HD footage in Premiere Pro CS4. I'm using footage shot on a Flip Mino HD (720) and although I can access the MP4 files just fine, and import them into PP ok, I can't get them