ABAP list report, multiple selections - select-options
I have written a very simple ABAP list report, that contains a single select-option. On the selection screen, I have the option of entering multiple values, with each new value being displayed directly underneath the old, but I am only getting the first value entered on the screen displayed. Does anyone have any sample code for me?
Hi Daniel,
Select_Options consists of 4 parameters, in with the range consists in eg...
Select-options s_vbeln for vbak-vbeln.
then s_vbeln-low, s_vbeln-high are the range values...
So whne you write select query.
write vbeln in s_vbeln
instead of vbeln eq s_vbeln
Hope this solves your problem.
Thanks & Regards,
Dileep .C
Similar Messages
-
Hi ,
I want to know how to change font size in ABAP list report.
I want to enlarge the font size.
I have tried print control but it doesn't work.
I have also tried line size and line count
but it can only reduce the font size .
Thanks.
JohnHi Kong,
Try with following example:
REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
NEW-PAGE PRINT ON.
PRINT-CONTROL FUNCTION 'SF000'.
WRITE: / 'This is CPI 20'.
PRINT-CONTROL FUNCTION 'SF020'.
WRITE: / 'This is CPI 6'.
PRINT-CONTROL FUNCTION 'SF008'.
WRITE: / 'This is CPI 12'.
PRINT-CONTROL FONT 1 LPI 6.
WRITE: / 'font 1 lpi 6'.
PRINT-CONTROL FONT 2 LPI 6.
WRITE: / 'font 2 lpi 6'.
PRINT-CONTROL FONT 3 LPI 6.
WRITE: / 'font 3 lpi 6'.
End of print-control
NEW-PAGE PRINT OFF.
End of Program
thnks
Anurodh -
SQ01 - ABAP List Report Header
We have a query in SQ01 that provides a listing of employees and their
IT0027 distribution accounts. Using the ABAP List as the output I have
some control over the header information. I've done things like the
report title, the username of the individual who runs it, the time and
date it was run, etc. What I've been asked to do is display the input
parameters for the report in the header.
So, if someone requested KOSTL = E991234 (the screen field is
SP$00008-LOW), then they'd like to see the header:
"Report of Employees by Distribution Account"
"For Cost Center: E991234"
When I attempt to put the field KOSTL in the header then I get the cost
center for the first employee record. So, if the user chooses more than
one KOSTL, I only get one of the cost centers to display in the header.
Clicking on the "Selections" icon provides a listing of ALL the
parameters, but I only want to display one or two of those - and I want
it in the header rather than as a separate item to click and print.
Can anyone help with coding either in the query or the infoset?
Thanks,
John
John Rich
HR Team, IRIS Administrative Support
The University of TennesseeHi Daniel,
Select_Options consists of 4 parameters, in with the range consists in eg...
Select-options s_vbeln for vbak-vbeln.
then s_vbeln-low, s_vbeln-high are the range values...
So whne you write select query.
write vbeln in s_vbeln
instead of vbeln eq s_vbeln
Hope this solves your problem.
Thanks & Regards,
Dileep .C -
Help in abap list report printing
Dear all,i did a customized list report using abap.the usual size for report print out is A4 which is line-count 65 and line-size 255. but for this report,my line-size is 296. i define at the begining of my program with "REPORT ZMM_STKVAL_VIEW LINE-COUNT 65 LINE-SIZE 296 MESSAGE-ID ZA."
i can run this program but the output is not complete.i can only see untill the line-size of 255..anything exceed 255 kenot be displayed..
Is there anyway to overcome this problem? My user doesnt required this report to be printed out but just to download it into EXCEL file. Thank you.Ok, if user doesn't need a list output, then simply gather the data and fire excel.
report zrich_0001 .
data: imara type table of mara with header line.
start-of-selection.
select * into table imara up to 100 rows
from mara.
call function 'WS_EXCEL'
exporting
filename = 'TEST.XLS'
tables
data = imara.
Regards,
Rich Heilman -
How to edit font of printer depend on size of abap list report.
Hi all,
How to edit Format type"X_65_255" of HP Laser printer when print out the same preview in abap list?
Example:
I want print as below:
Title of abap list: AAAAAAAAAAAA --> size 15
body of abap list:
colum1 column2 columm3 ---> size 10
s1 cccc bbbb -
> size 10
I need it whenever you find time out of your busy schedule.. Please help me .. Thank you so much.
Edited by: kishan P on Oct 13, 2010 12:02 PMHi,
I have to set font type on matrix printer.
Can You please explain how did you find
\e(s0p24h15v0s0b16602T
for
select arial 24 cpi 15 point normal
As I can see, all the escapes defined in "Printer initialization" are in
\e\0xqw\0xer0x\tz
form, where qw, er, tz are hexa decimal interpretation of escapes from printer manual.
I am confused where did You find annotation such as
\e(s0p24h15v0s3b16602T
Thank you, cheers.
p.s. - if You want me to open another subject with this question so I can express my gratitude, please let me know.
p.s. - in SPAD > Device Type, Print Control tab, we have
SF005 | 1B6B001B4D121B57001B461B35
and I know the
"1B"
stands for
\e
but then at "6b........" I am lost... -
ABAP list report wont print on Z device type with Z format
Our developer have created a report which outputs data in ABAP list format and the standard format would not fit. We have since created a custom format and copied a device type in to custom device type. So we now have a custom format and custom device type. However when we print, it spools correctly and shows as green but the report wont print. The only thing that gets printed is
"Sort criteria AscdgDescndSubtotalGRAND TOTAL : X X PROJ" "
The abap list format is Z_100_500. Basically the report has 450 columns and hence we created this format.
I am not sure what this means. I have been advised by SAP to follow instruction on note 17895 - Adapting print list formats for customers however i cant fully comprehend point 5 of the note and I believe this is why it wont print. Has anyone adapted ABAP list using this note. Can you please let me know how i should go about printer initialisation mentioned in the noted.
We have checked everything however dont seem to get around the issue. Any ideas will be appreciatedNo comments
-
ABAP list with multiple headers
Hi experts,
i have to display a table with multiple headers. Example:
Header 1 = Sales order header
Header 2 = Sales order items
It's possible to create an ABAP list with 2 headers?
Thanks in advance.Hi Dan,
FYI .
[ALV Grid with Multiple Headers;
Regards
Abhii -
Hierarchial list display- multiple line selection
hi all,
In my program I have multiple item field records under a header field.When I select some of the item record line and press a button on application tool bar the control should be transferred to a transaction code.
how can I accomplish this in hierarchial sequential list display.
The code I used is:
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = GV_PROGNAME
I_CALLBACK_PF_STATUS_SET = 'ORDERS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = I_FCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = LT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = I_TAB_HEAD
i_tabname_item = I_TAB_ITEM
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = IKEYINFO
IS_PRINT =
IS_REPREP_ID =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IR_SALV_HIERSEQ_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = I_HEADER
t_outtab_item = I_ITEM
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. " ALV_DISPLAY
form USER_COMMAND USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*at user-command.
case r_ucomm.
when 'SEL'.
*IF sy-lsind = 1 .
DO.
CLEAR wa_item-chk.
READ LINE sy-index FIELD VALUE wa_item-chk.
IF sy-subrc <> 0.
EXIT.
ELSE.
CHECK wa_item-chk = 'X'.
IF rs_selfield-tabindex <> '0'. "CHECKS IF A VALID IS SELECTED OR NOT.
CHECK i_item IS NOT INITIAL.
READ TABLE i_item INTO wa_item INDEX rs_selfield-tabindex.
SET PARAMETER ID 'VST' FIELD wa_item-vstel.
call transaction 'VL03N' and skip first screen.
endif.
endif.
enddo.
endcase.
endform.
Please help me out with a solution.
Thanks in advance.hi,
if u want to go to different transactions according to different fields u have selected than there is one field u can check that
<b>selfield-fieldname</b>
IF <b>selfield-fieldname</b> = 'VBELN'.
SET PARAMETER ID 'VF' FIELD itab-vbeln.
CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
ELSEIF <b>selfield-fieldname</b> = 'MATNR'.
SET PARAMETER ID 'MAT' FIELD t_mat.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDIF. -
Printing ABAP List(Report output - SE38) in A3 format
I have a requirement to print the ABAP report in A3 page format. I am using LP01 printer and in in SPAD transcation I Changed the Tab "Output Attributes"
Paper tray = "Paper tray 3" and Tab "Tray Info" Tray 3 = "DINA3" still the report gets print in A4 page format.
Even i tried by changing the lize size and line count...still .... it prints in A4 format only.
Could you let me know what exactly I need to in order to print my report output in A3 Page format.
Waiting for your reply.
Thanks in Advance,
SteevanHi,
Check this below link
http://www.sap-img.com/basis/how-can-i-print-a3-format-in-sap.htm
Cheers!!
VEnk@ -
DYNP_VALUES_READ Limitations for multiple lines select options
Hi all !
First post here, but a tough one I think. Here is my inquiry :
I have worked on an specific abap function used in many long abap list reports. Theses reports are launched in background processing. The aim of this routine is to stop the report execution if a background job with the same selection parameters is already launched for the current user (to Prevent useless several launch of a time-expensive program).
Because this routine is dynamic, I read the selection screen of the current report with the function 'DYNP_VALUES_READ'. And I compare the result with the variant of the backgroung job (read with function 'RS_VARIANT_CONTENTS').
The real problem is that function "DYNP_VALUES_READ" only extract the first line of select-options. I found an alternative solution to extract the select options values (a dynamic assign with field symbols), but external conversions (for WBS elements for example ) are lost, so the comparison detects differences between the background job's variant values and the current selection screen values.
Does anybody know a way to get entire select options values from a selection screen just as they are displayed on screen ?
Thanks for reading my message
Message was edited by: Thomas BRICOUTThomas,
Perhaps the following code will help you. A function module in the code captures everything on the selection screen into an internal table. It doesn't actually capture the information the way you want it, but I believe you will be able to work with it to achieve your desired result. If it doesn't meet your needs, it is still useful for printing selection screen fields and their values.
Bruce
report zybttes2.
tables: zf137, " 137 General Ledger Document Details Table
zf137a. " 137 General Ledger Document Details Table, Archive
selection-screen begin of block b1 with frame title text-004." BCT003
parameters: p_zf137 radiobutton group xxx, " BCT003
p_zf137a radiobutton group xxx. " BCT003
selection-screen end of block b1. " BCT003
selection-screen begin of block parameter with frame title text-001.
selection-screen skip 1.
select-options: s_date for zf137-zzpostdat.
selection-screen skip 1.
selection-screen begin of line.
selection-screen comment 3(6) text-002.
selection-screen end of line.
selection-screen skip 1.
select-options: s_loan for zf137-zzloan.
selection-screen skip 1.
selection-screen begin of line.
selection-screen comment 3(6) text-003.
selection-screen end of line.
selection-screen skip 1.
select-options: s_ccentr for zf137-zzcostctr.
selection-screen skip 1.
selection-screen end of block parameter.
data: ww(3) type n.
data: zz(3) type c.
data: c1(1) type c value '0'.
do 2 times.
ww = ww + 1.
zz = ww. shift zz left deleting leading c1.
write: / zz.
enddo.
Capture and then print the selection screen fields and their values
data: begin of i_info occurs 20,
flag,
olength type x,
line like raldb-infoline,
end of i_info.
call function 'PRINT_SELECTIONS'
exporting
mode = 'TABLE'
rname = sy-cprog
rvariante = sy-slset
tables
infotab = i_info.
loop at i_info.
write: / i_info-line.
endloop.
write: / 'end'. -
Hi Experts, Crystal report mutiple value selection using checkbox in 8.81
Hi,
I am using Crystal report multiple value selection option using checkbox in 8.81 sap b1 pl 05.but i want default all check box value should be selected.
How do we achieve same.
Thanks
Rajkumar Gupta
Edited by: Rajkumar Gupta on Jul 11, 2011 5:45 AMDear Raj,
As per me, this can't be done in current version of SAP 8.81.
Alternate way is use SDK
Thanks
Kevin -
Application toolbar list report
Hi,
How would I get a button on the application toolbar for an abap list report.
I could do it using a selection screen, but I want the button usuable when the list output is printed
to the screen. I have clickable icons on the list report. Be nice to have toolbar buttons.
thanks
Dylan.Hi you are asking about selection-screen application tool bar buttons or output application tool bar buttons. If u want selection-screen application tool bar buttons then go with SCCRFIELDS structure. If u want output application tool bar buttons then go with Set pf-status.
Regards,
Kumar. -
Hi Experts,
I have a requirement to print: "Page XX of XX" in my ABAP List report (this report is meant to be printed).
For Current Page, I know that the system field is SY-PAGNO. But I can't find the field for Total Page. Is there anyway to print this (Total Page) since it means that we have to predict how long the report will be before we WRITE anything?
Thanks a lot,
SamIn the first statement of ur report u'll have to reserve some lines for footer as follows:
REPORT <prg name> LINE-COUNT 25(2).
here ur list will display 23 lines of data and then 2 lines are reserved for footer.
This means that in each page u can display 23 lines of text. Now depending on number of entries in your internal table which contains data to be displayed, we can calculate the number of pages required to print the total output.
E.g: I have 62 records in my internal table, so to get the total number of pages use the following logic:
(U can find out the number of recs in internal table dynamically using DESCRIBE stmt)
62/23 = 2.69
Round the result to the next integer using CEIL , so the next interger is 3.
So ur total number of pages is 3. And u now the current page number by sy-pagno.
Hope this solves ur problem. -
List Box - Object How do you get "allow multiple item selection" option to work?
developing a fillable PDF form using livecycle. I have several list boxes that contain multiple text items. I have entered all items directly into the item list and I have selected "allow multiple selection". The object is committed on exit, All the binding options have been left on default settings. BUT when the form is tested it will not allow multiple selections. I cannot find anything in help to resolve this. CAN Someone help me. This is urgent!!!!!
Dear Deb
Thank you for your suggestion, but it does not appear to work. I used the alt key then my mouse to select, but it still only allows for 1 selection. I do not see the sample you said you included, so I cannot check to see if I have a setting incorrect. If you have any other suggestions I would really appreciate it or if there is a way for you to look at the form, at this point I am open to any suggestions. -
List/Menu (multiple selected) insert into MySQL
I have been building a feedback form and I am running into a
issue that when I place a list/menu that allows multiple selections
when I submit my form in my MySQL database it collected the
information but only on the last multiple selection.
For example, this is what my list/menu looks like.
<select name="occasion" size="5" multiple="MULTIPLE"
id="occasion">
<option value="Spur of the moment,">Spur of the
moment</option>
<option value="Family dinner">Family
dinner</option>
<option value="Special occasion (i.e.
birthday)">Special occasion (i.e. birthday)</option>
<option value="Office get together">Office get
together</option>
<option value="Romantic dinner">Romantic
dinner</option>
<option value="Night out with friends">Night out with
friends</option>
<option value="Business meeting">Business
meeting</option>
<option value="Other">Other</option>
</select>
And my MySQL database I have it set up as...
Field Type
occasion mediumtext
I do not know why I cannot have more than one selection
inputed into my field, what must I do to correct this? Everything
works perfectly expect the multi selected list/menu. I want to
place all that is selected in the list/menu in that one database
field called occasion..oO(MikeL7)
>>You should also test with isset() and is_array() if
$_POST['occasion']
>>is available at all and of the expected type. The
code above will also
>>throw a notice if $insert_string is not initialized
before the loop.
>
> I use both isset and is_array in my code, When you say
notice, you dont mean
>a script stoppiong error?
Nope. An E_NOTICE error won't terminate the script, but
shouldn't happen
nevertheless. While developing, the error_reporting directive
should be
set to E_ALL|E_STRICT and _all_ reported problems should be
solved. It's
not only better coding style, but also helps to prevent real
errors. In
this particular case it was just a guess, because it was only
a part of
the code. But using an uninitialized variable with a '.='
operator for
example would lead to a notice, which should be fixed.
>>But of course this is a really bad DB design, as it
already violates the
>> first normal form (1NF). Just some ideas for queries
that might come to
>> mind, but would be really hard to do with such a
comma-separated list:
>
> A better table design would be to have column for |
list_ID | user_ID |
>song_ID | and do a insert for each song selected.
Yes, something like that.
>Thanks for the input, i like escaping the variables from
a string as they
>stand out more in code view, is the single quote method
faster? And which one
>will be or is already deprecated?
All are correct and won't be deprecated. IMHO it's more or
less just
personal preference. It also depends on the used editor and
its syntax
highlighting capabilities. For example I use Eclipse/PDT for
all my PHP
scripts, which can also highlight variables inside a string.
But if the
above is your preferred way, there's nothing really wrong
with it.
Just some additional thoughts:
Personally I prefer as less escaping and concatenating as
possible,
because such a mixture of single quotes, double quotes, dots
and
sometimes even escaped quote signs (for example when printing
HTML)
_really_ confuses me. I like to keep my code clean and
readable.
Something like this:
print "<img src=\"".$someVar."\" ...>\n";
not only hurts my eye, it is also quite error-prone. It's
easy to miss a
quote or a backslash and get a parse error back, especially
in editors
with limited syntax highlighting (or none at all). So I would
prefer
print "<img src='$someVar' ...>\n";
or even
printf("<img src='%s' ...>\n", $someVar);
When it comes to performance issues, of course there's a
difference
between the various methods. But for me they don't really
matter. In
practice you usually won't notice any difference between an
echo, a
print or a printf() call for example, as long as you don't
call them
a million times in a loop.
So I always just use the method that leads to the most
readable code.
In many cases, especially when a lot of variables or
expressions are
involved, (s)printf() wins. Not for performance, but for
readability.
But as said - personal preference. YMMV.
Micha
Maybe you are looking for
-
Printer will not feed paper. Tried print doctor scan-- unplugging and wiping rollers with lint- free cloth dipped in distilled water. Did'nt work. Printer is 5 yrs old. Is it time for a new one?? Or anything else I can try? I have HP computer-an
-
Quicktime problem PLEASE HELP!!!!
Whenever i try to watch a trailer in hd from the site:http://trailers.apple.com/. I get this error message in quicktime, quicktime dosen't even open it only displays the error message. "Error 47: Invalid URL. 0". I have found some solutions to this p
-
How to use xvkbd in Arch + ratpoison
I installed xvkbd in Arch + ratpoison. if I run xvkbd in terminal or exec xvkbd, xvkbd graphic keyboard appear full screen. It doesn't pop up when an application which concern with text typing, Eg. leafpad or even terminal open. How to use xvkbd grap
-
IPod touch reports no available memory after only 160 songs
I upgraded to version 2.0 (the backup feature failed) and starting moving songs from my library to my 8GB touch. After only 160 songs were copied over I got a message saying the iPod is out of available space, and after checking the unit itself it sa
-
Hi, please help me why i can not use my 'Infineon 64 mb MMC Card' on my pccam 850? i have never use mmc card before, and this is the first time, but everytime i insert my mmc card then turn the camera on, i get only hear camera startup and the light