Writing List Header
Hi all,
Iam using something as follows for writing a list out.
I want to write 2 lines of some header details(dynamic text) above the following table output using "write".Is that possible.....
LOOP AT itab.
WRITE: /1(1)'|', 2(20) itab-Text1 CENTERED,22(1)'|', 23(12) itab-text2 CENTERED, 35(1)'|', 36(8) itab-text3 CENTERED, 44(1) '|', 45(10) itab-text4 LEFT-JUSTIFIED, 55(1) '|'.
ENDLOOP.
WRITE: /1(55) sy-uline.
TOP-OF-PAGE.
WRITE: 1(1)'|', 2(20)'TEXT1' CENTERED COLOR 1,22(1)'|', 23(12)'TEXT2' CENTERED COLOR 1, 35(1)'|', 36(8)'TEXT3' CENTERED COLOR 1, 44(1) '|', 45(10)'TEXT4' CENTERED COLOR 1, 55(1) '|',
/1(55) sy-uline.
Thanks
P
Edited by: pazzuzu on Apr 7, 2010 2:46 PM
Try Below Logic
data : cnt(5) type n.
cnt = 0.
LOOP AT it_mara INTO wa_mara.
cnt = cnt + 1.
IF cnt GT 50.
NEW-PAGE.
WRITE :/ 'heading'.
cnt = 1.
ENDIF.
WRITE :/ wa_mara-matnr,
wa_mara-matkl.
ENDLOOP.
Regards
Vinod
Similar Messages
-
Writing selections in alv list header
Hi,
in alv list header i have to show the values entered in selection screen.
ex.
Current year : 2008
current period : 03
report ID : R_123
company code : I BT AA to BB
I BT CC to DD
I EQ FF
in the above example first three are parameters and company code is select-option, for parameters i can display what i want, but for company code( which is select option) it is showing only first line and not showing other lines.
at the time of filling list header table for select-option, i am looping the select-option, first i am filling with typ, key and info and for other i am filling only info, if i fill typ, key also for other recoreds also it is showing the company code in all lines as below ....
company code : I BT AA to BB
company code : I BT CC to DD
company code : I EQ FF
can any one suggest to get the list header as shown at the begining....
thanks,
bhushanHi,
Check this sample code. Here plant and date are selection screen paramters.
Plant
lwa_header-typ = 'S'.
lwa_header-key = text-t47.
If the select option for plant is 'EQ'
LOOP AT s_werks. "#EC *
IF s_werks-option = 'EQ'.
lwa_plant-werks = s_werks-low.
APPEND lwa_plant TO lt_plant.
CLEAR lwa_plant.
If the select option for plant is 'BT'
ELSEIF s_werks-option = 'BT'.
CONCATENATE s_werks-low
text-t50
s_werks-high
INTO lf_plant.
lwa_header-info = lf_plant.
APPEND lwa_header TO gt_header.
CLEAR lwa_header.
ENDIF.
ENDLOOP.
IF s_werks-option = 'EQ'.
READ TABLE lt_plant INTO lwa_plant INDEX 1.
lwa_header-info = lwa_plant-werks.
APPEND lwa_header TO gt_header.
CLEAR lwa_header.
LOOP AT lt_plant INTO lwa_plant FROM 2.
lwa_header-typ = 'S'.
lwa_header-key = ''.
lwa_header-info = lwa_plant-werks.
APPEND lwa_header TO gt_header.
CLEAR: lwa_header.
ENDLOOP.
ENDIF.
Post date Range
lwa_header-typ = 'S'.
lwa_header-key = text-t33.
If the select option for post date is 'EQ'
LOOP AT s_budat. "#EC *
IF s_budat-option = 'EQ'.
CONCATENATE s_budat-low+6(2) '.'
s_budat-low+4(2) '.'
s_budat-low(4) INTO lf_range.
For multiple values
IF lf_date_tmp IS INITIAL.
lwa_date-date = lf_range.
APPEND lwa_date TO lt_date.
ELSE.
lwa_date-date = lf_range.
APPEND lwa_date TO lt_date.
ENDIF.
If the select option for post date is 'BT'
ELSEIF s_budat-option = 'BT'.
CONCATENATE s_budat-low+6(2) '.'
s_budat-low+4(2) '.'
s_budat-low(4) text-t49
s_budat-high+6(2) '.'
s_budat-high+4(2) '.'
s_budat-high(4) INTO lf_range .
lwa_header-info = lf_range.
CLEAR lf_range.
ENDIF.
ENDLOOP.
IF s_budat-option = 'EQ'.
READ TABLE lt_date INTO lwa_date INDEX 1.
lwa_header-info = lwa_date-date.
APPEND lwa_header TO gt_header.
CLEAR: lwa_header.
LOOP AT lt_date INTO lwa_date FROM 2.
lwa_header-typ = 'S'.
lwa_header-key = ''.
lwa_header-info = lwa_date-date.
APPEND lwa_header TO gt_header.
CLEAR: lwa_header.
ENDLOOP.
ENDIF.
Appending work area to the header table
APPEND lwa_header TO gt_header.
CLEAR lwa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_header.
<REMOVED BY MODERATOR>
Regards,
Ramya
Edited by: Alvaro Tejada Galindo on Apr 8, 2008 4:30 PM -
Hai Friends,
In my ALV List header..i am writing date , time and my program name.
but all are coming on left side.
can i get date on left side, program name on centered and time on write side.
my code is like this.
FORM list_headers.
lists-typ = 'H'.
lists-info = text-010.
APPEND lists.
CLEAR lists.
lists-typ = 'S'.
lists-key = text-011.
CONCATENATE sy-datum+6(2) '/'
sy-datum+4(2) '/'
sy-datum+0(4) INTO lists-info.
APPEND lists.
CLEAR lists.
lists-typ = 'S'.
lists-key = text-012.
CONCATENATE sy-uzeit+0(2) ':'
sy-uzeit+2(2) ':'
sy-uzeit+4(2) INTO lists-info.
APPEND lists.
CLEAR lists.
ENDFORM.Hi again,
1. first of all how are u writing / displaying
the alv header ?
2. using documentary write ?
then also, u can use one variable of
length 100 and use this concept.
3. If u are using top_of_page
event,
in this event, WE CAN use WRITE.
(i have used it, and it
works fantastic)
(not in case of alv grid)
4. My point is, what ever u are using,
use on variable of length 100.
WRITE value INTO variable.
using offset
and then proceed further.
regards,
amit m. -
Traffic lights in ALV list header
how do i display traffic lights as icons in ALV list header. for example, in the code below, i want to display a green icon at the end of closed items and a red icon at the end of the open items:
closed : 4 [green-icon]
open : 2 [red-icon]
CLEAR header_alv_wa-info.
header_alv_wa-key = 'closed:'.
header_alv_wa-info = gv_closed.
header_alv_wa-typ = 'S'.
APPEND header_alv_wa TO headeralv.
CLEAR header_alv_wa-info.
header_alv_wa-typ = 'S'.
header_alv_wa-key = 'open:'.
header_alv_wa-info = gv_open.
APPEND header_alv_wa TO headeralv.Hi,
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
the above links will give u the code for the same..
Regards,
Aparna -
S_ALR_87012168 List Header Issue
Dear Friends,
I Am facing problem to resolve the issue as in the standard FI Report S_ALR_87012168 need to hide the list header because if I am executing the report for multiple customers than its displying the all customers in list header so while I am scheduling background job or printing than its printing all the customers in each page than the report data..
Kindly suggest me how to hide the list header, is there any standard cutomizing or enhancement.
Thanks,
DTKHiya
Click on the Currency icon {Ctrl + Shift + F9} and select whatever currency you want it to be displayed on.
It gets converted. Then when you hit the green arrow back, it will sk you whether you want to save the data, if you click yes it gets saved.
Then everytime you execute this report, it will ask you, which layout you want to be displayed as the output - and you can select the one that you saved. And it aint user specfic either. The pop up Qs comes up for all users.
Rukshana -
List header for alv grid using abap objects
Hai all,
I have displayed alv grid in container control using abap objects i.e. using method set_table_for_first_display.
now i need to display list header for this alv grid.
please help me how to create with a sample coding.
Thanks and regards,
Prabu S.Create a splitter using CL_GUI_EASY_SPLITTER_CONTAINER with a top and bottom half. Put the alv grid in the bottom half. Use cl_dd_document (documented in help.sap.com ) to build the header in the top half. Use events on CL_GUI_ALV_GRID to handle the top-of-list printing.
Or, if available, use CL_SALV_TABLE, and read the documentation on that. When I needed a header for my report, that's what I did. There's plenty of good documentation about if you'll search for it.
matt -
Prevent Occurence of list header and page breaks in spool file of ALV Grid
Prevent Occurence of list header and page breaks in spool file of ALV Grid Display.
When we run the ALV in background and create spool request then:
Spool file output is coming like this.
Column1 Column2 Column3 Column4
data data data data
data data data data
data data data data
Column1 Column2 Column3 Column4
data data data data
data data data data
data data data data
But the required is like this
Column1 Column2 Column3 Column4
data data data data
data data data data
data data data data
data data data data
data data data data
data data data data
Please suggest a posible answerHello all,
if you have not yet solved this on your own, here is my solution: use a format type that has 60000 lines per page for your spool output device.
It all depends on the format type that was used for creating the spool output.
By default (in our system), we have 65 lines per page. And after each page the column headings of the ALV will appear.
What i did:
create a new format type via transaction SPAD->full administration->device types->format types (copy an existing one)
change"Number of Rows" to 60000 or something applicable
edit the device type of your output device (e.g. LOCL) to contain the newly created format type (via SPAD; Button "Formats" in device type maintenance).
That's it! Be sure to use this format type for your output device in the "Background Print Parameters" window (-> Button "Properties").
Regards
Daniel Klein
All other parameters you discussed before didn't do it. All ALV-Settings will be overwritten by the output device settings and its print properties. -
Reg: Adding spaces between texts in ALV list header
Hi All,
I was implementing a client requirement for ALV. The list header should contain something of this format.
Pgm Id: ZZZ01
After this list header it is ALV display.
I did this using the concatenate statement.
ex: Concatenate 'PgmID' sy-repid into listheader seperated by space.
But this is not showing spaces between text in ALV display. See I want a tabspace between the texts in headr. Any idea on how to mak it?
RakeshDepending on Fontsize the space might be so narrow that you believe its not there.
check in the debugger if there is really a space in the string, the clause "separated by space" will insert one for sure.
May be you'reshowing the ALV before you are modifying the listheader?
Another approach is using strings, blanks at the end of a string are not deleted
concatenate 'ABC ' 'XYZ' into s.
and
concatenate `ABC ` `XYZ` into s.
will give different results, be aware of the difference in the quots in both cases. Using the second example you can insert as many blanks as you want. -
Number formatting in ALV list header
Hi,
I am using an ALV with a list header. Code is as follows:
FORM ALV_SHOW.
DATA G_CALLBACK_PROG LIKE SY-REPID.
G_CALLBACK_PROG = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_CALLBACK_PROG
I_SAVE = 'U'
IT_FIELDCAT = ITAB_FIELDCATALOG
IS_LAYOUT = GS_LAYOUT
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
TABLES
T_OUTTAB = ITAB_SUB_SEARCH.
ENDFORM. "alv_show.
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.
DATA: SHHLDR_INFO LIKE ZSH_SHHLDR.
Title
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = 'Some Title'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
CLEAR SHHLDR_INFO.
READ TABLE ITAB_SUB_SEARCH INDEX 1.
SELECT SINGLE * FROM ZSH_SHHLDR INTO SHHLDR_INFO WHERE FOLIO EQ
ITAB_SUB_SEARCH-FOLIO.
WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = 'Holding '.
WA_HEADER-INFO = SHHLDR_INFO-SHHOL.
APPEND WA_HEADER TO T_HEADER.
CLEAR: WA_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_HEADER.
ENDFORM. " top-of-page
The problem is that the number for 'Holding' is displayed in the ALV header without any formatting, i.e.
SOME TITLE
Holding 2375385
I want it to be displayed like:
SOME TITLE
Holding 2,375,385
Is there any way to achieve this? Help is appreciated, thanks.
RegardsHi
Use WRITE statament
WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = 'Holding '.
*WA_HEADER-INFO = SHHLDR_INFO-SHHOL.
WRITE SHHLDR_INFO-SHHOL TO WA_HEADER-INFO.
APPEND WA_HEADER TO T_HEADER.
If SHHLDR_INFO-SHHOL is amout, it would be better you used CURRENCY option
WA_HEADER-TYP = 'S'.
WA_HEADER-KEY = 'Holding '.
*WA_HEADER-INFO = SHHLDR_INFO-SHHOL.
WRITE SHHLDR_INFO-SHHOL CURRENCY <currency> TO WA_HEADER-INFO.
APPEND WA_HEADER TO T_HEADER.
Max -
Payment terms, Payment method, etc. blank in the Invoice Lists header.
Hello,
I am creating Invoice Lists - LR with F2 - Invoices but surprisingly the payment terms, payment method, VAT registeration no., etc. are not populated into the Invoice Lists header. I think it should have been populated from the 'Payer's' customer master.
I am using 'Copycontrol' routine no. 16; if it is relevant in any way.
Can someone help me with this, cause I need to use these field's data into the printout.
Thanks,
Nandish.Hi Sreedhar,
BBP_UPLOAD_PAYMENT_TERMS program does not work well.I tried using this and this ask for RFC destination(LOGSYS) while replicating the payment terms.
and when you try to see these payment terms in customzing it does not give you correct result and so result in SRM HTML screens.
What I did for this.
There are two tables involved in this
BBP_PAYTERM
BBP_PAYTERM_TEXT .
If you see entries in table BBP_PAYTERM ,it will have data with ERPCLNTXXX system while same kind of data will not be there for SRMCLNTXXX.
You have to copy ERPCNLTXXX data into SRMCLNTXXX data.
To do that copy all data with SRMCLNTXXX ,go to table Entry in Menu and delete all entries.
Then copy all ERPCLNTXXX data and go to Table Entry ,Create with template.
You can do this is SE11 or SE16 transactions.Do similarly with BBP_PAYTERM_TEXT.Please check entries before doing it for BBP_PAYTERM_TEXT table as this table may have similar entries for SRMCLNTXXX and then you will not require to copy all.
Actaully program recognise only Payment terms in SRM.
Once you have done this..You can see in customzing all correct payment terms replicated.
SPRO->SRM server->Cross application basic setting->Create payment conditions.
I hope this helps.
regards,nishant
please reward if this helps -
How do you change the font in WPC Link List Header ...
Does any one know how/where to change the font in Web Page Composer on the Link List Header? I am using the Link List header delivered with the product.
It looks like it is pulling arial font but we are adding content in a different font in the paragraphs and want the fonts to be the same. Is there something I can change in the theme?
thanks
Angie.You need to go to the
Content Adminstration/KM Content/etc/wpceditor/css/runtime and look in the sdn_general.css file. The controls are all there. You can rename or create a new style sheet as this will modify all WPC sites. -
Functional location Task lists Header/Operation Mass Upload
Hello experts,
I am using LSMW to upload Functional location Task lists Header & Operations in T-code IA12, for this i am using the Standard program IBIP (Object -> 480).
All required fields are in the standard structures apart from Operation QM Data, Recording view -> ERFSICHT & Inspection point Completion -> QPPKTABS (see attached screen shot).
Should i upload these 2 fields in different way ?
Thank you by advance.
Regards,
SoufianeGenerally, for all kinds of task list (Maintenance, Quality as well as Production), I tend to use BDC programs by which all the fields can be addressed. In standard, there are certain fields which might have got avoided for certain reasons.
So, I suggest you to look for some other options available. -
Hi all,
I have created list heade r using FM commentary_wirite.
the parameter slis_listheader-info has length of only 60 characters.
So my header is getting truncated .
Plase suggest me on how to increase the length.
Regards,
Naveenhey u need to consider slis_t_listheader
typ(1) type c, " H = Header, S = Selection, A = Action
key(20) type c,
seggregate u r text and give some text in header and some other in selection ..and some other in action
i hope this may help u......
reward points if helpful -
How to enter second short text description language in task list header
Hi,
I can't find how to maintain second description language in task list header,
Does some know how to do it (I have searched in Go TO menu - but haven't found anything useful there).
Daniel GontarTasklist in Different languages
PeteA -
Table containing Program Texts(Text Symbols, SelectionTexts, List Heading)
Hi All,
I would like to know which is the standard SAP std. table which stores the data regarding Text Symbols, SelectionTexts, and List Heading of every program we create. There should definitly be a table where it is stored (otherwise we will not be able to retrieve it each time).
I have found out a structure RS38M which has all the required fields. But since it is a structure, it doesnt contain data.
So please inform if any body knows any standard SAP table which stores Program Texts. A quick, correct reply would be highly appreciated.Hi
All these texts are stored in text pool not in any std. table.
To retrieve these info u have to use statement like:
READ TEXTPOOL <prog_name> INTO itab LANGUAGE <language> [STATE state].
This statement reads the text elements of the text pool of the language specified in lang and the program specified in prog from the Repository and places them into the internal table itab. The previous content of itab is deleted. If the text elements cannot be read, then the content of itab remains unchanged.
For prog, you must specify a flat character-like data object, which contains the name of the program of the text elements to be read; the name is case-independent. The internal table can have any table type and its row type must correspond to structure TEXTPOOL from the ABAP Dictionary.
For lang, you must specify a flat character-like data object, which contains a language key of up to one character, whose value must be contained in the SPRAS column of database table T002. If lang contains a blank, the behavior is undefined.
After a successful read, itab contains in the ENTRY column the texts of the text symbols, the selection texts, the list headers and the title from the program attributes. Every text element that exists for the specified language occupies one row of the internal table and is identified uniquely by the columns ID and KEY. The column LENGTH contains the length of the text element. The table below shows the possible values of the columns ID and KEY and their meaning:
ID KEY ENTRY
H 001 to 004 List header: Column headings
I Text symbol identifier Text symbol text
R - Program title
S Name of a parameter or selection criterion Selection text
T - List Title: Titlebar
Maybe you are looking for
-
HP 7310 scanner doesn't work with Mac Mountain Lion
I just tried to scan a photo on my 7310 Officejet All-in-one. It tells me I need to install software for this feature. I know I scanned a photo with this same setup before. However I upgraded to Mountain Lion and now it's not working. I tried to
-
Cannot open some tif files in camera raw
When I try to open my scanned tiffs (Coolscan 9000, Silverfast) with camera raw I get this option only with some of those files. With others it is not even greyed out it just isn't there. So far I have not discovered any regularity about this. I does
-
I cant watch videos. Flash player is asking me to update but Firefox is blocking it.
I cant watched videos on YouTube or online stream. its says "This plugin is vulnerable and should be updated. Activate Adobe Flash." When i try to update it Firefox is blocking it for my own protection. Please help me with this problem, i have a Macb
-
Problem opening a video (photoshop format)
Every time I try to open a video its stops at "reading photoshop format". Any chance someone knows whats up?
-
ORA-03106: fatal two-task communication protocol error USING INFORMATICA
Hi, We are testing Oracle 10203 with linux using INFORMATICA 8.1.1 The user who run the informaica is getting the following error , after runing query against a remote database. READER_12_1_1> RR_4035 SQL Error [ ORA-03106: fatal two-task communicati