Print Selection Screen Parameters in ALV report only once
Does anyone know how to print the selection screen within a ALV report.
I've tried everything. I have the code to capture the selection parameters into a internal table. I can use top_of_page but I only want it printed once.
Hi,
If you have captured the selection screen entries in an internal table, then you could display it once by using the BLOCK LIST ALV.
Check the function module.
REUSE_ALV_BLOCK_LIST_DISPLAY
Using this function module more than 1 alv could be display in the report.
In our case ..there will be two alvs ...one for the selection screen n other for the main report output.
Check the following example on the block List ALV....
<b>BALVBT01</b>.
Regards,
Vara
Similar Messages
-
How to Print Selection-Screen along with ALV Report output
Hi,
I have a requirement wherein i need to also print the Selection Screen of a report when I print the ALV report output.
Basically i need to print the ALV output along with selection screen.
Could you plz suggest me the way.
Regards,
NitinHi,
My selection Screen is a very big one. It contains around 30 select-options.
So is their any standard method in which you can choose whether you want to take the output printout with or without Selection screen.
Regards,
Nitin -
Auto-populating the selection screen parameters for web report
hello
i am having a scenario where my web report is a link to another internet application (a BSP application) and it is called by clicking some link or button on the BSP page.
can i pass the selection values for BW Web report directly from BSP application through a query string or by setting some cookie values so that the user will directly view the report on click of that link?
Thanks in advance.
Regards
Rajeevwe can do this by adding a URL as the query-string with web template_id and with the selection screen parameters as key value pairs
-
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 -
Printing Selection-Screen while printing ALV Grid output display
Hi,
I have a requirement wherein I want to print the Selection Screen also while printing the output in simple ALV grid Display.
Currently when I print the ALV output report, only the header and the Body of the ALV is getting printed. But the requirement is that I also want to print Selection screen along with this.
If anyone has faced a similar situation, plz let me know what needs to be done in order to print the selection screen also while printing the ALV report output.
Rgds,
NitinHi,
You can use given function module to print your
selection screen
RS_REFRESH_FROM_SELECTOPTIONS
>This will get Current contents of selection screen
RS_LIST_SELECTION_TABLE
>This will Generates list according to values in selection table(RSPARAMS)
Sample
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = p_repid
TABLES
selection_table = it_int_tab
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc EQ 0.
WRITE:1 'Selection Criteria'(i19),
/1 sy-uline(18),
/1 'Variant Name'(i21),
23 sy-slset.
*-- This function module lists the Selection Screen contents
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = p_repid
seltext = 'X'
newpage = space
TABLES
sel_tab = it_int_tab
EXCEPTIONS
sel_tab_empty = 1
OTHERS = 2.
Mark all helpful answers -
Change Layout in Selection Screen for OO ALV-Grid
Hello everyone,
I got a problem regarding layouts for objectoriented ALV Grid. I want to make it possible that user can take the layout for ALV he wants to on the selection screen. So far thats no problem and it works. But there are some little problems which I do not know how to fix them. But first the facts:
(1) I got my parameter for layout
PARAMETER: p_vari TYPE disvariant-variant.
(2) I fill my global layout structure in initialization
INITIALIZATION.
* Variante vorbelegen
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
* Layout holen
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0.
p_vari = gs_variant-variant.
ENDIF.
(3) I got my handling for F4-value help on variant parameter
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
CALL FUNCTION 'LVC_VARIANT_F4'
EXPORTING
is_variant = gs_variant
i_save = 'A'
IMPORTING
es_variant = gs_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE text-m01 TYPE 'S'.
ELSE.
p_vari = gs_variant-variant.
ENDIF.
(4) I give back my parameters content into the variant structure at start of selection
START-OF-SELECTION.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-variant = p_vari.
This works all fine but I got some problems when using default variants/layouts. For example I got a default variant only for me. When starting the selection screen it works fine that the default layout was written. It is displayed automatically in the variant parameter. But I want that if i I empty the content (blank it out) from my variant parameter, that report should start with "normal" layout how it was written in the report and NOT with default layout.
When I clear the gs_variant it works like I want it, but then the alv layout button looks like (without functions for layout), because I do not have the reference to my report.
So what to do? :-)
Regards
MichaelWow that was fast, works great, thanks :-)
I did not use this parameter in set table method but now I fill it dynamically.
Ok next problem, one step harder ;-)
Now I have one selection screen for one ALV-Grid, but four radio buttons which control with which data the ALV gets filled (four different fieldcats, data tables and so on). Each Grid got an own HANDLE so that the layouts can be separated in four categories.
Now I want that by changing the radio button the individual standard layout for the chosen alv grid is getting filled.
This works fine when using it in selection screen output.
AT SELECTION-SCREEN OUTPUT.
CLEAR gs_variant.
* Layout-Handles individuell für Klausel-Radiobuttons setzen
IF p_py IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLPY'.
ELSEIF p_rh IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLRH'.
ELSEIF p_aj IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLAJ'.
ELSEIF p_sr IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLSR'.
ENDIF.
* Layout holen
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0.
p_vari = gs_variant-variant.
ELSE.
CLEAR p_vari.
ENDIF.
But unfortunately selection screen output is getting passed by EACH changing in the selection screen. This means when I try to clear the default layout in my parameter field, it gets refilled automatically with default layout. If I do a condition around the filling (only if not initial) the default value filling does not work fine in every case, e.g. when clearing the parameters field and then change the radiobutton -> then it does not get filled automatically. -
How to clear all selection screen parameters before calling transaction?
Hi Experts
I have a ABAP report that displays data using ALV.
When I double click a cell it calls transaction MB51. Before calling the transaction I need to set some parameters of the selection screen of the transaction.
My code is like below:
<UL>
<LI>FREE MEMORY ID 'MAT'. <I>"material</I>
<LI> FREE MEMORY ID 'WRK'. <I>"plant</I>
<LI> FREE MEMORY ID 'CHA'. <I>"batch</I>
<LI><I>* Get the selected ALV row data</I>
<LI>READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
<LI><I>* If link MB51 is clicked then open tcode MB51</I>
<LI> IF p_selfield-sel_tab_field+8(4) = 'MB51'.
<LI><I>* Pass material, plant to the corresponding tcode</I>
<LI> SET PARAMETER ID 'MAT' FIELD x_recon-matnr.
<LI> SET PARAMETER ID 'WRK' FIELD p_plant.
<LI> CALL TRANSACTION 'MB51' AND SKIP FIRST SCREEN.
</UL>
The problem is:
<UL> <LI> 1. First, I run the given transaction before running the report in a separate session with some set of values in the selection screen. For example: plant = AB01, Material = 990001 and Batch = 10001.</LI>
</UL>
<UL>
<LI> 2. Then in another session I run my report. In the report ALV I have selected a record where plant = AB01, Material = 990001 but Batch is blank. But it opens the transaction with plant = AB01, Material = 990001 and Batch = 10001.
Even though in my ALV record the batch is blank yet it uses the batch value from the memory. That is, the batch value that was given in the transaction earlier. Why it is not getting cleared? I have also used FREE MEMORY ID code in the beginning. But still it is not clearing the values in the memory.
</UL>
<UL>
<LI>What shall I do to clear all the selection screen parameters before calling the transaction?</LI>
</UL>
<UL>
<LI>
Thanks
Gopal
</LI>
</UL>
Edited by: gopalkrishna baliga on Aug 11, 2010 10:29 AMIts because sap memory is globally shared.
Do it like this.
READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
IF p_selfield-sel_tab_field+8(4) = 'MB51'.
perform bdc_dynpro using 'RM07DOCS' '1000'.
perform bdc_field using 'BDC_OKCODE' '=ONLI'.
perform bdc_field using 'MATNR-LOW' x_recon-matnr.
perform bdc_field using 'WERKS-LOW' p_plant.
perform bdc_field using 'CHARG-LOW' p_batch.
perform bdc_field using 'DATABASE' 'X'.
call transaction 'MB51' with i_bdcdata mode 'E'.
endif.
form bdc_dynpro using program dynpro.
clear la_bdcdata.
la_bdcdata-program = program.
la_bdcdata-dynpro = dynpro.
la_bdcdata-dynbegin = 'X'.
append la_bdcdata to i_bdcdata.
endform.
form bdc_field using fnam fval.
clear la_bdcdata.
la_bdcdata-fnam = fnam.
la_bdcdata-fval = fval.
append la_bdcdata to i_bdcdata.
endform. -
Get selection screen parameters from sap query
Hello. I use SAP Query Reporting, so I added a report assignment for detailing (sq01 -> Change button -> Goto -> Report Assignment -> Insert row -> Other type row -> Abap Report Program)
and put there ABAP program.
When I run query and press CtrlShiftF1 (or double click) It calls my abap program.
So the question is: how to get selection screen parameters in my program ?
to be more precise I want to get date parameter (begda, endda)
Thanks a lot.There is a Z query which I can see in sq01. I set reporting period and run the query; when I run it, it gives me the employee list.
So I wrote the abap report to get an employee details, customized query as I mentioned above.
The query calls my report and I need to get parameters.
SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-001.
PARAMETER : p_pernr LIKE p0001-pernr OBLIGATORY MATCHCODE OBJECT prem.
PARAMETER : p_date LIKE sy-datum.
SELECTION-SCREEN END OF BLOCK frm1.
Parameter
p_pernr
passes normal. ALV Query contains it, but I'd like to get one more parameter from selection screen of the query and don't know how to get it. -
Edit a selected row in an alv report after pressing a push button ?
hi all ,
I want to edit a selected row in an alv report but that too after i press a push button . After pressing the push button , a pop up shud *** showing all the entries of the selected row which shud be editable and after editing it shud be saved into the database table.
How can i do this please help asap ???May this prog. of mine can solve your requirement.
REPORT z_demo_alv_jg.
TYPE-POOLS *
TYPE-POOLS: slis.
INTERNAL TABLES/WORK AREAS/VARIABLES *
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
w_field TYPE slis_fieldcat_alv,
p_table LIKE dd02l-tabname,
dy_table TYPE REF TO data,
dy_tab TYPE REF TO data,
dy_line TYPE REF TO data.
FIELD-SYMBOLS *
FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
<dyn_wa> TYPE ANY,
<dyn_field> TYPE ANY,
<dyn_tab_temp> TYPE STANDARD TABLE.
SELECTION SCREEN *
PARAMETERS: tabname(30) TYPE c,
lines(5) TYPE n.
START-OF-SELECTION *
START-OF-SELECTION.
Storing table name
p_table = tabname.
Create internal table dynamically with the stucture of table name
entered in the selection screen
CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
ASSIGN dy_table->* TO <dyn_table>.
IF sy-subrc <> 0.
MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
LEAVE TO LIST-PROCESSING.
ENDIF.
Create workarea for the table
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
Create another temp. table
CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN dy_tab->* TO <dyn_tab_temp>.
SORT i_fieldcat BY col_pos.
Select data from table
SELECT * FROM (p_table)
INTO TABLE <dyn_table>
UP TO lines ROWS.
REFRESH <dyn_tab_temp>.
Display report
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
TABLES
t_outtab = <dyn_table>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*& Form SET_PF_STATUS
Setting custom PF-Status
-->RT_EXTAB Excluding table
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'Z_STANDARD'.
ENDFORM. "SET_PF_STATUS
*& Form user_command
Handling custom function codes
-->R_UCOMM Function code value
-->RS_SELFIELD Info. of cursor position in ALV
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Local data declaration
DATA: li_tab TYPE REF TO data,
l_line TYPE REF TO data.
Local field-symbols
FIELD-SYMBOLS:<l_tab> TYPE table,
<l_wa> TYPE ANY.
Create table
CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN li_tab->* TO <l_tab>.
Create workarea
CREATE DATA l_line LIKE LINE OF <l_tab>.
ASSIGN l_line->* TO <l_wa>.
CASE r_ucomm.
When a record is selected
WHEN '&IC1'.
Read the selected record
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
rs_selfield-tabindex.
IF sy-subrc = 0.
Store the record in an internal table
APPEND <dyn_wa> TO <l_tab>.
Fetch the field catalog info
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'Z_DEMO_PDF_JG'
i_structure_name = p_table
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
Make all the fields input enabled except key fields
w_field-input = 'X'.
MODIFY i_fieldcat FROM w_field TRANSPORTING input
WHERE key IS INITIAL.
ENDIF.
Display the record for editing purpose
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
it_fieldcat = i_fieldcat
i_screen_start_column = 10
i_screen_start_line = 15
i_screen_end_column = 200
i_screen_end_line = 20
TABLES
t_outtab = <l_tab>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
Read the modified data
READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
If the record is changed then track its index no.
and populate it in an internal table for future
action
IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
<dyn_wa> = <l_wa>.
i_index = rs_selfield-tabindex.
APPEND i_index.
ENDIF.
ENDIF.
ENDIF.
When save button is pressed
WHEN 'SAVE'.
Sort the index table
SORT i_index.
Delete all duplicate records
DELETE ADJACENT DUPLICATES FROM i_index.
LOOP AT i_index.
Find out the changes in the internal table
and populate these changes in another internal table
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
IF sy-subrc = 0.
APPEND <dyn_wa> TO <dyn_tab_temp>.
ENDIF.
ENDLOOP.
Lock the table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
Modify the database table with these changes
MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
REFRESH <dyn_tab_temp>.
Unlock the table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table.
ENDIF.
ENDCASE.
rs_selfield-refresh = 'X'.
ENDFORM. "user_command
Regards,
Joy. -
Hi Developer,
i have issues that i need stop or restrict the same entries provided in the selection screen parameters it should no display that data but it should give an alert message by saying the data all ready viewed or displayed.
example: organisation :getha pvt.td.
name :ramesh.
start date:10.2.2013.
these are parameter which has been displayed by clicking execute ,if provide the same value to display again it should give waring message.
Please guide me in solve the problem.
thanks.
ravi.Hi Somendra,
Thanks for your response sir , i have provided the according to your provided information sir but it was not displaying the data first time also its giving message which i have provided ,my issues is if i provide data from time should display if i provide same data next time then only it should restrict the data and give a message.
example:
types:BEGIN OF str1,
ROOMNO type zROOMNO,
NAME TYPE zname3,
BRANCH type zBRANCH,
PHONENUMBER type zPHONENUMBER,
END OF str1.
data:it_str1 type TABLE OF str1,
wa_str1 type str1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
skip.
PARAMETERS:s_roomno type ZTABLE_2-roomno.
skip.
parameters:s_name type ztable_2-name.
skip.
PARAMETERS:s_branch type ztable_2-branch.
skip.
PARAMETERS:s_pho type ztable_2-phonenumber.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT roomno
name
branch
phonenumber from ztable_2 into TABLE it_str1
WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
READ TABLE it_str1 INTO wa_str1 with KEY roomno = s_roomno name = s_name branch = s_branch phonenumber = s_pho.
if sy-subrc eq 0.
MESSAGE 'THE DATA IS ALL READY VIEWED' TYPE 'E'.
RETURN.
ENDIF.
START-OF-SELECTION.
SELECT roomno
name
branch
phonenumber from ztable_2 into TABLE it_str1
WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
loop at it_str1 into wa_str1.
WRITE:/1 wa_str1-roomno,
10 wa_str1-name,
30 wa_str1-branch,
60 wa_str1-phonenumber.
ENDLOOP.
please guide me in solving the issue sir.
thanks,
Ravi -
Reset selection screen parameters.
Hi,
I enter values in parameters on screen and generte output(add values to table/view report). After I return to originial screen, the fields should be reset to initial empty status.
How do I do that.
Thanks
PraveenHi,
U Clear the Selection Screen Parameters in At Selection Screen event, before clearing the value pass the Parameter value to some global variable for further use.
eg:
PARAMETERS : p_matnr TYPE matnr.
DATA : gv_matnr TYPE matnr.
AT SELECTION-SCREEN.
gv_matnr = p_matnr. "Passing the P_matnr value to global variable gv_matnr
CLEAR : p_matnr.
START-OF-SELECTION.
WRITE : gv_matnr.
Hope it helps!!
Rgds,
Pavan -
Submit selection screen options of one report to another report
hi ,
My requirement is as follows . i have a report with a selection screen .The report fetches data from a ztable according to multiple parameters and select options in the selection screen. The mandatory parameters are two diffrent dates according to which the data is fetched. If one of the dates is the CURRENT date then the data to be fetched is not present in the Ztable as the data is updated daily at midnight. What is required if the user enters the current date in one of the dates then my report should save the selection screen parameters present in therest of the select options and submit these parameters to the second report which updates the data into the table so that my report can fetch it accordingly. If i am getting a bit confusing i am sorry . This is the best i could explain .If any clarififcations are required please ask. Please could u help me with this problem and guide me how to do this . Thanks in advances and helpful answers will be rewarded.Hi,
When you start an executable program, the standard selection screen normally appears, containing the selection criteria and parameters of both the logical database connected to the program and of the program itself. When you start an executable program using SUBMIT, there are various additions that you can use to fill the input fields on the selection screen:
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>].
Ex.
The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
REPORT REP1.
DATA NUMBER TYPE I.
PARAMETERS PARAMET(14).
SELECT-OPTIONS SELECTO FOR NUMBER.
The program REP1 is called by the following program using various parameters:
REPORT REP2 NO STANDARD PAGE HEADING.
DATA: INT TYPE I,
RSPAR LIKE RSPARAMS OCCURS 10 WITH HEADER LINE.
RANGES SELTAB FOR INT.
WRITE: 'Select a Selection!',
SKIP.
FORMAT HOTSPOT COLOR 5 INVERSE ON.
WRITE: 'Selection 1',
/ 'Selection 2'.
AT LINE-SELECTION.
CASE SY-LILLI.
WHEN 4.
SELTAB-SIGN = 'I'. SELTAB-OPTION = 'BT'.
SELTAB-LOW = 1. SELTAB-HIGH = 5.
APPEND SELTAB.
SUBMIT REP1 VIA SELECTION-SCREEN
WITH PARAMET EQ 'Selection 1'
WITH SELECTO IN SELTAB
WITH SELECTO NE 3
AND RETURN.
WHEN 5.
RSPAR-SELNAME = 'SELECTO'. RSPAR-KIND = 'S'.
RSPAR-SIGN = 'E'. RSPAR-OPTION = 'BT'.
RSPAR-LOW = 14. RSPAR-HIGH = 17.
APPEND RSPAR.
RSPAR-SELNAME = 'PARAMET'. RSPAR-KIND = 'P'.
RSPAR-LOW = 'Selection 2'.
APPEND RSPAR.
RSPAR-SELNAME = 'SELECTO'. RSPAR-KIND = 'S'.
RSPAR-SIGN = 'I'. RSPAR-OPTION = 'GT'.
RSPAR-LOW = 10.
APPEND RSPAR.
SUBMIT REP1 VIA SELECTION-SCREEN
WITH SELECTION-TABLE RSPAR
AND RETURN.
ENDCASE.
Regards,
Bhaskar -
How to get selection screen details of any report dynamically
Hi
We have a requirement where we need to submit different reports based upon certain conditions. I need to know FM or other way around to fetch the details of selection screen (name of selection screen parameters or select option and whether its a parameter or select option) any report. Please guide me in this regard.
Regards
SwetabhDATA : SEL_TAB TYPE RSPARAMS OCCURS 0.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = 'ZRP_PACKING_INVOICE_MAIN'
TABLES
SELECTION_TABLE = SEL_TAB.
SUBMIT ZSH_SD_INVOICE_NEW WITH
SELECTION-TABLE SEL_TAB AND RETURN.
above f.m will get the all details of selection screen and give u in internal table and that can be passed to submit statement... -
How to apply List box for multiple selection of rows in ALV report ?
Hi Exprots,
1: How to apply List box for multiple selection of rows in ALV report ?
Thanking you.
Subashhi,
check the below program.
REPORT zalv_dropdowns.
*Type pools declarations for ALV
TYPE-POOLS : slis.
*data declarations for ALV container,ALV grid, Fieldcatalogues & layout
DATA: g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
wa_outtab TYPE t517a.
START-OF-SELECTION.*Call to ALV
CALL SCREEN 600.*On this statement double click it takes you to the screen painter SE51.
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen , Here we can give a title and customized menus
Here we also call the subroutine for ALV output.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
PERFORM alv_output.
ENDMODULE. "pbo OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
ENDMODULE. "pai INPUT
*& Form BUILD_FIELDCAT
FORM build_fieldcat.
DATA ls_fcat TYPE lvc_s_fcat.
*Build the field catalogue
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'T517A'
CHANGING
ct_fieldcat = gt_fieldcat.
To assign dropdown in the fieldcataogue
LOOP AT gt_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'SLART'.
*is the first list box
ls_fcat-drdn_hndl = '1'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
is the second list box
WHEN 'ABART'.
ls_fcat-drdn_hndl = '2'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
ENDCASE.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form ALV_OUTPUT
FORM alv_output .*Create object for container
CREATE OBJECT g_custom_container
EXPORTING container_name = 'CCONT'.
*create object for grid
CREATE OBJECT g_grid
EXPORTING i_parent = g_custom_container.
Build fieldcat and set column
*Assign a handle for the dropdown listbox.
PERFORM build_fieldcat.
*Build layout
PERFORM build_layout.
Define a drop down table.
PERFORM dropdown_table.
*fetch values from the T517A table
SELECT * FROM t517a INTO TABLE gt_outtab.
*Display ALV output
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab.ENDFORM. "ALV_OUTPUT
*& Form dropdown_table
text
--> p1 text
<-- p2 text
FORM dropdown_table.*Declarations for drop down lists in ALV.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
First SLART listbox (handle '1').
ls_dropdown-handle = '1'.
ls_dropdown-value = '01 Primary school'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
ls_dropdown-value = '02 Lower Secondary'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
ls_dropdown-value = '03 Upper Secondary'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '04 Professional School'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '05 College'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '06 University'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '09 Other Establishment'.
APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2'). ls_dropdown-handle = '2'.
ls_dropdown-value = '10 Primary School certificate'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = '20 Lower secondary/Junior high'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '30 High school diploma(B-levels)'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = '31 Vocational'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '32 Matriculation'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '40 Specialist vocational certificate'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '50 College degree Level1'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '51 College degree Level2'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '52 Masters degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '60 Univ Degree level1'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '61 Bachelors degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '62 Masters degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '63 Licenciate'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '64 Doctors Degree Ph.D'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '89 None'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '90 Unknown'.
APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
CALL METHOD g_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.ENDFORM. " dropdown_table
*& Form build_layout
text
*layout for ALV output
FORM build_layout . gs_layout-cwidth_opt = 'X'.
gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
gs_layout-no_toolbar = 'X'.ENDFORM. " build_layout
endform.
Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M.
Maybe you are looking for
-
Wireless printer does not work after update
I have VM fusion running on my MAC with a wireless printer enabled on my MAC. Prior to the security update, the printer worked seamlessly. Since the update, I can no longer "see" the printer in Windows XP. Any suggestions?
-
How to delete one of your photo albums but doesn't have a red thing
I went on my friend's computer to download my pictures from my pervious phone, I noticed that the pictures came up twice in 2 different albums. It won't allow me to delete on or both of the albums. Also when I take a picture it goes into a third albu
-
JDev 11g 113 designer - Composite with BPM and BAM does not compile
Using JDev1113 with SOA additions. Weblogic 11g. I have an Application which includes a BPM project..... This project makes and can be deployed to the Middleware and executes successfully. However, when I add a BAM adapter to the composite and wire i
-
Using the latest version of iPhoto, yet it says it's not good enough
I'm getting the following message in iPhoto when I try to open it: "You have made changes to your photo library using a newer version of iPhoto. Please quit and use the latest version of iPhoto." I even reinstalled it from the iLife 09 disc and ran s
-
[SOLVED] ath9k_htc not loading
I just built a needed wireless driver (ath9k_htc) from AUR. I thought that installing it from pacman would place it in the correct location for loading, but after reboot, 'lspci -k' showed the module hadn't been loaded, even though I'd set up a conf