FM to display Selection screen on report output??
Hi Experts,
Is there an FM to display Selection screen on report output.
Thanks In Advance.
Hi Ashwin,
Refer to below link
http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
or
The easiest way is to define your selection screen in the TOP include of your module pool.
Then call the selection screen.
Selection Screen
selection-screen begin of screen 1010 as window title text-001.
selection-screen begin of block b1 with frame title text-002.
parameters: p_vornr type resb-vornr,
p_refno(20) type c,
p_plnid type zplcfg-plnid as listbox visible length 20,
p_sorts type c as listbox visible length 20.
selection-screen begin of line.
selection-screen comment (20) text-004.
selection-screen position 33.
parameters: p_order as checkbox default 'X'.
selection-screen end of line.
selection-screen end of block b1.
selection-screen end of screen 1010.
Now call the selection screen.
call selection-screen 1010.
if sy-subrc = 0.
perform get_production_orders.
perform process_orders.
endif.
Thanks!!
Similar Messages
-
Modification on selection screen of report
Hello guys,
I have a requirement where in i need to modify the initial selection screen as per clients requirement. The scenario is as follows:
Suppose 'EMPLOYEE' and 'PORTFOLIO' are two of the fields of a cube on which the report will be run. Now suppose there are three employees as A, B and C and A handles portfolios X & Y, B handles portfolios W & Y while C handles portfolios X & Z.
The initial selection screen of report will have two selection fields first as the employee and second as the portfolio.
When we do F4 at employee it will display A, B and C. Now the requirement is if we F4 at portfolio it should display only the relevant one for that employee.
For example: if i give employee as A and when i do F4 at portfolio screen it should give me only X and Y and not all the portfolios viz. W, X, Y & Z
Is there a way to achieve the above scenario????Hi Chakradhar,
Refer this code :
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-456.
PARAMETERS PO RADIOBUTTON GROUP RADI USER-COMMAND R.
SELECTION-SCREEN END OF BLOCK BL2.
AT SELECTION-SCREEN OUTPUT.
CALL SCREEN 100.
when user will click on this radio button , a pop up screen will appear dynamically.
Reward points if helpful.
Regards,
Hemant -
Displaying selection screen as pop-up from dialog box
Hi,
I have a screen which is of dialog-box type. This dialog screen shows an ALV and has a button in the ALV toolbar. On pressing this button, a pop-up screen is to be displayed. This pop-up screen is designed as a selection-screen. Is it possible to display this selection screen as a pop-up from a dialog box screen?
Regards,
SuhasHi Suhas,
Its possible to display selection screen as pop-up from dialog box.....Check the code below...copy paste and execute...
SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE text-001.
PARAMETER p.
SELECTION-SCREEN END OF SCREEN 123.
CALL SELECTION-SCREEN 123 STARTING AT 20 5
ENDING AT 80 15.
The below code might help u to add a button in alvgrid's toolbar......
* CLASS lcl_event_handler DEFINITION
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
DATA: wa_toolbar TYPE stb_button,
calc TYPE REF TO cl_gui_frontend_services.
METHODS : toolbar_handle FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object
e_interactive,
ucomm_handle FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD toolbar_handle.
MOVE 3 TO wa_toolbar-butn_type.
APPEND wa_toolbar TO e_object->mt_toolbar.
MOVE : 0 TO wa_toolbar-butn_type,
'CALC' TO wa_toolbar-function,
'@0M@' TO wa_toolbar-icon,
'Calculator' TO wa_toolbar-quickinfo.
APPEND wa_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "toolbar_handle
METHOD ucomm_handle.
IF e_ucomm = 'CALC'. " When button added in toolbar is clicked
IF calc IS INITIAL.
CREATE OBJECT calc.
ENDIF.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = 'CALC'.
ENDIF.
ENDMETHOD. "ucomm_handle
ENDCLASS. "lcl_event_handler IMPLEMENTATION
DATA : container TYPE REF TO cl_gui_custom_container,
grid TYPE REF TO cl_gui_alv_grid,
event TYPE REF TO lcl_event_handler,
it_display TYPE TABLE OF mara,
wa_display TYPE mara.
START-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM build_it_display.
PERFORM create_objects.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'EXIT'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'CANC'.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form build_it_display
* text
* --> p1 text
* <-- p2 text
FORM build_it_display .
SELECT * FROM mara UP TO 15 ROWS INTO TABLE it_display.
ENDFORM. " build_it_display
*& Form create_objects
* text
* --> p1 text
* <-- p2 text
FORM create_objects .
IF container IS INITIAL.
CREATE OBJECT container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT event.
CREATE OBJECT grid
EXPORTING
i_parent = container.
SET HANDLER event->toolbar_handle FOR grid.
SET HANDLER event->ucomm_handle FOR grid.
CALL METHOD grid->set_table_for_first_display
EXPORTING
i_structure_name = 'MARA'
CHANGING
it_outtab = it_display.
ENDIF.
ENDFORM. " create_objects
Cheers,
Jose. -
Coding ma selection screen of report
suppose i hav
field (all visible)
a
b
c
and den a check box
d
again a field (non visible)
e
f
intial my chck box d should be blank
when i tick my d check box
my field my invisible field shld be visible
in my selection screen
plz help me with the code
Title was edited by:
Alvaro Tejada GalindoDo something like this .........
selection-screen begin of block sel2 with frame title z02.
parameters: p_bos radiobutton group rad1 user-command mode,
p_rohs radiobutton group rad1 default 'X',
p_bapi radiobutton group rad1,
p_wlist radiobutton group rad1.
parameters: p_alvvar type slis_vari no-display.
selection-screen end of block sel2.
selection-screen skip.
selection-screen begin of block sel1 with frame title z01.
select-options: s_matnr for estmj-matnr modif id sub,
s_spec for estrh-subid modif id sub.
parameters: p_skip1 as checkbox default 'X' modif id skp,
p_force as checkbox modif id trc,
p_sim as checkbox default ' ' modif id rol,
p_trace as checkbox modif id trc.
selection-screen end of block sel1.
parameters: s_subid type string no-display.
at selection-screen.
if sy-ucomm = 'MODE'.
perform f_adjust_fields.
else.
if s_matnr[] is initial and s_spec[] is initial
and ( p_bos = 'X' or p_rohs = 'X' ).
message e000(38) with 'Please specify blah blah'
'or a specification number' '' ''.
endif.
endif.
at selection-screen output.
perform f_adjust_fields.
form f_adjust_fields .
loop at screen.
if screen-group1 = 'SUB'.
if p_wlist = 'X'.
"Hide
screen-active = '0'.
screen-request = '1'.
screen-invisible = '1'.
else.
"Show
screen-active = '1'.
screen-request = '1'.
screen-invisible = '0'.
endif.
modify screen.
elseif screen-group1 = 'SKP' or screen-group1 = 'TRC'.
if p_bos = 'X' or p_rohs = 'X' .
"Hide
screen-active = '0'.
screen-request = '1'.
screen-invisible = '1'.
else.
"Show
screen-active = '1'.
screen-request = '1'.
screen-invisible = '0'.
endif.
modify screen.
elseif screen-group1 = 'ROL'.
if p_rohs = ' ' .
"Hide
screen-active = '0'.
screen-request = '1'.
screen-invisible = '1'.
else.
"Show
screen-active = '1'.
screen-request = '1'.
screen-invisible = '0'.
endif.
modify screen.
endif.
endloop.
endform. " f_adjust_fields
Best! -
Z_Dialog prog initial input screen-looking like selection screen of Report?
Hi Experts,
In internet, I found 2 screens( code is not mentioned there) and mentioned that, they r Dialog Prog. screens, they r as below,
1 - Initial input screen-programmer mentioned it as a selection screen-1000
2 - Output screen in ALV grid (Object ALV)
So, when I saw this initial input screen, it looks like same as selection screen 1000 of a report prog., I mean, its containing all selection screen components, like Select-options with out interval, with out extension, blocks, titles for these blocks!!
So,pls. let me know that,
1) How the programmer achived this screen? is he used like,
SELECTION SREEN 1000 START
END OF SELECTION SCREEN 1000
2) How these input fileds r looking like select-optins, parameters, blocks etc.?
thanqPutting selection screens on dialogue transactions have been covered before in the forum. Please search.
Rob -
Depndng on chkbox, should display selection screen block on selectionscreen
Hi,
Depending upon the chkbox it should display selection screen block on selection screen.
If not checked it should display B3 and If checked it should display Block B2 .
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS P_DAT AS CHECKBOX USER-COMMAND FLAG.
SELECTION-SCREEN COMMENT 3(79) text-112.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-109.
PARAMETER: p_year1 LIKE ce1rh03-gjahr,
p_perid1 LIKE ce1rh03-perde.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-109.
PARAMETER: p_year LIKE ce1rh03-gjahr MODIF ID MO1,
p_period LIKE ce1rh03-perde MODIF ID MO1.
SELECTION-SCREEN END OF BLOCK B3.
If P_Dat is checked .... It should display the Block B2 and
If p_Dat is not checked .... it should display the Block B3
Any suggestions will be appreciated!
Regards,
KittuHello Kittu,
You can try this code:
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_dat AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN COMMENT 3(79) text-112.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-109.
PARAMETER: p_year1 TYPE gjahr MODIF ID mo1,
p_perid1 TYPE perio MODIF ID mo1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-110.
PARAMETER: p_year TYPE gjahr MODIF ID mo2,
p_period TYPE perio MODIF ID mo2.
SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_dat = 'X' AND screen-group1 = 'MO2'.
screen-active = '0'.
ELSEIF p_dat <> 'X' AND screen-group1 = 'MO1'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Hope this helps.
BR,
Suhas -
Creating Selection screen in Report Painter
Good day everyone,
Does anyone know how I could create a selection screen in Report Writer? Thanks!
>Christian<Hi,
Simple Parameters or Selec-options statements will suffice.
Eg : Parameters : p_matnr type mara-matnr.
select-options : s_matnr for mara-matnr.
In selection screen, you may have selec-options, parameters, check boxes, radio buttons etc.
Regards,
Sujatha. -
Adding gsber in selection screen of report painter
To gurus,
I have a small requirement, I have to get business area (GSBER) in selection screen of report.
I have developed the report using report painter FGI1 --FAGLFLEXT which is having gsber field.
In selection screen it self i want this GSBER FIELD .How to achieve it.
kindly guide me.
regards,
padmaja.Hi
What I understand from your question is you want bussiness area value on selection screen you can achive this by just using the by export/import parameter or by get/set parameter id.
Please elaborate what exactly you want.
Regards
Sagar. -
Is there any option to display selection screen text in bold or big font?
Hi all,
Is there any option to display selection screen text in bold letters or with increase font size?
Thanks n RegardsHi,
Just give atry in this way..
open the same program ans selection-screen screen no will be 1000 in se51 screen painter,
go to properties of the texts u want to change then go to display tab and check the checkbox bright.
it may or may not work but this will work in module pool .
just give a try...
Regards,
Suresh. -
AT SELECTION-SCREEN stops report
Hello,
I run a report using the AT SELECTION-SCREEN stmt.
Below AT SELECTION-SCREEN is an IF ... ELSE block. Within that block the report checks, whether the user input (made in a SELECT-OPTIONS) complies some requirements.
I check for example, if that what the user types in matches a defined string...
But if i use an AT SELECTION-SCREEN, the report does not continue after execution after that!
It returns to the selction screen...
How can I achieve, that the report continues with execution...?
Thx,
holgerHi Holger,
1. This is the default behaviour.
2. For report purpose execution,
the event is
START-OF-SELECTION ( and not at selection-screen)
3. However u CAN ACHIEVE this by :
after all validations , use the syntax
LEAVE TO LIST-PROCESSING.
4. I tried the same at my end,
its working fine.
5. However, if u use step 3,
there will be a problem :
after the execution of report,
it wil get HANG. ie. it won't then
get back using the toolbar buttons.
U may try it for yourself.
6. Bottom line is:
use
START-OF-SELECTION (FOR FINAL EXECUTION OF THE REPORT)
Regards,
Amit M.
Message was edited by: Amit Mittal -
How to create multiple selection screens in reports
How to create multiple selection screens in reports
Thanks,
SridharEx: hope you will find an idea from the below example :
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
CITYTO LIKE SPFLI-CITYFORM.
SELECTION-SCREEN end OF BLOCK SEL1
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS SEL1.
SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2
SELECTION-SCREEN END OF SCREEN 5000.
INITIALIZATION.
TIT1 = 'ITIES'.
aT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN '0500'.
MESSAGE W159(at) WITH 'SCREEN 500'.
WHEN '1000'.
MESSAGE W159(at) WITH 'SCREEN 1000'.
ENDCASE.
START-OF-SELECTION.
TIT1 = 'CITIES FOR AIRPORTS'.
TIT2 = 'AIRPORTS'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
TIT1 = 'CITIES AGAIN'.
CALL SELECTION-SCREEN 1000 STARTING AT 10 10. -
How we can assign the customised selection screen to report category
hai
gurus
how we can assign the customised selection screen to report categoryHi Naresh,
You can do like this.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME.
SELECT-OPTIONS: S_FKART FOR VBRK-FKART.
SELECT-OPTIONS: S_FKDAT FOR VBRK-FKDAT OBLIGATORY.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
SELECT-OPTIONS: S_AUART FOR VBAK-AUART.
SELECTION-SCREEN END OF BLOCK SELECTION.
SELECTION-SCREEN END OF BLOCK B1.
if you give me brief i can help you out more.
Thank you .
Regards
Ram -
Displaying radio button on report output
hi folks,
how to display radiobuttons on the report output.
thanks,
santosh.Declare parameter as RADIOBUTTON
like
Single radio button
PARAMETER p_purch RADIOBUTTON.
Two radio button with same group.
PARAMETER p_sales RADIOBUTTON GROUP opt.
PARAMETER p_purch RADIOBUTTON GROUP opt.
Regards,
Mahesh
Edited by: Mahesh Guragol on Jan 23, 2008 4:12 PM -
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 -
Is it possible to display a tag at the selection screen in the output.
Hi all,
When you go to se38 and in the program editor screen, at the bottom right end of the screen you find a value called NUM and when you place your cursor on that it displays a tag that says "Num Lock Mode. Double click to toggle."
My query is, when i execute a report it takes me to the output screen that has a parameter, here i want to display a tag, say "enter the record as it is in the database". Is it possible to have such an option.
If you'll are wondering why I'm looking for such an option it is just to make a report that can be understood by many.
P.S: Not only on the NUM field the tag is available. Even on tools like activate display and so on.
Regards,
Narayanan Chandran.If it's a report program, use a comment in the selcetion screen for information of the user as shown below.
* Information
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-003.
SELECTION-SCREEN COMMENT /1(60) text-004. "Text containing the information message
SELECTION-SCREEN END OF BLOCK b1.
If you are using a module pool, you can create a tooltip for the element as suggested.
Maybe you are looking for
-
Can't run project, "No recent history launches"
Hey guys, I used to use Eclipse a few years ago but i stopped. Currently I'm using Eclipse Mars for Windows 64-bit. I'm facing one problem right now... I can't run my project, whenever I did, Eclipse will state that there is no recent history...I don
-
Dynamic Selection screen in FDK43 transaction
HI, The transaction FDK43 has a dynamic selection screen used from LDB DDF .It does not show all selections views in the dynamic selection but when I test the LDB from se36 its shows all the selections in dynamic selections. Any idea why it is not sh
-
Does Windows CS2 qualify for CS5 upgrade
I got CS2 so I could process my Olympus C-8080 raw files, but my Olympus E-620 raw files require a later version. I am wondering if the CS5 upgrade will work with my CS2. This page makes it look like CS2 qualifies: http://www.adobe.com/products/photo
-
Export InDesign files to Word (text only) document
I need to create a Word file (text only) from 250 InDesign files containing about 3500 text frames. What would be the best way to proceed?
-
i have a problem while i drop a database package SQL>drop package dd; ORA-00600: internal error code, arguments: [kdsgrp1], [], [], [], [], [], [], Could anyone help me to solve that? thnx alot;