Selection screen in ALV output
Hi Experts,
My requirement is - A selection screen should pop up on the click of a button in the ALV output. Using the parameters I input on the selection screen anothor ALV should be displayed on the same page at the bottom. I'm displaying ALV using cl_gui_alv_grid.
Thanks.
Ajith
Hi Nimesh,
The requirement has slightly been updated so as to display the 2nd ALV is another screen.
As you suggested I used the call selection screen. How ever I did not use events for the same. I called the selection screen on checking sy-ucomm in PAI.
After I input the values in the pop up selection screen , even if I click the cancel button(at bottom) or the close button( top corner) the execution still follows and the second ALV is displayed.
Please help me in this so that If I click on cancel or close the second ALV is not displayed and the control remains in the first ALV
Thank you.
Edited by: Ajith Krishna on Oct 31, 2008 10:24 PM
Similar Messages
-
How get window between selection screen and alv output
Hi Friends,
I am displaying ALV report now i want to display small window with one button and it should show list of fields before displaying alv output.
means i want a window showing list of fields of internal table coming from program.and when i will click on yes button it should show ALV output.
how can i achive this .
Pls. help
thanks in advance.Hi,
Try to use the following command:
<b><i>WINDOW STARTING AT <some-value> <some-value> ENDING AT <some-value> <some-value>.
</i></b>
notice that there is a space between <> <>.
This statement should be used inside the AT USER-COMMAND event.
i.e.,
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'XXX'.
<b> <i> WINDOW STARTING AT <> <> ENDING AT <> <>.</i></b>
..............statements....................
ENDCASE.
This should help you some what.
Bye -
How to create Multiple Selection Screen in ALV
Hi,
Can anybody tell me how to create the Multiple Selection screen in ALV reports.
Plse give me code sample if possible.
Thanks in advance
KPHi Rich,
thanks for the reply.
I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen.
Hope my problem is understood.
Thanks
KP -
Symbol as default in a selection screen in alv
hi all,
how to bring GE(>=) symbol as default in a selection screen in alv report.
by
Ramesh.Hai Ramesh,
Create Pushbuttons in selection screen ,In pushbutton write the ' >=' instead of providing the text.
Try like this may be u will find the answer,
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
This example defines four pushbuttons on a selection screen that is displayed as a dialog box. The selection screen is defined in a statement chain for keyword SELECTION-SCREEN.
If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4', the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
CLI1, CLI2, CLI3 and CLI4 are used for <ucom>. When the user clicks one of the pushbuttons, the AT SELECTION-SCREEN event is triggered, and the FLAG field is set. The FLAG field can be further processed during subsequent program flow after the user has chosen Execute.
Refer the above code, and make change just to clear all the fields in the selection screen, when corresponding push button is clicked..
May be this answer is helpful to u.
Regards,
Skumari -
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!! -
Selection-screen in the output of the program
Hi,
I want to print the selection criteria ( or Values ) in the output of the program on the RIGHT HAND SIDE OF THE HEADER. I am doing code through ALV and I want to include the respective code in 'TOP_OF_PAGE'
If there are no values in the selection screen fields, then I DO NOT Print them. Start the values with the texts, such as 'Material', 'Plant', 'MRP Controller' etc. For single values, print the values separated by commas, For a range of values, print the values separated by '-', For the exclusion of single values, print 'EX' before the values.
Thanks in Advance.To get the parameter list, use [RS_REFRESH_FROM_SELECTOPTIONS|https://forums.sdn.sap.com/search.jspa?objID=c42&q=RS_REFRESH_FROM_SELECTOPTIONS], the rest is basic Abap.
Regards,
Raymond -
Add new selection fields and ALV output fields in VA05
Hi,
I want to add two new selection fields in VA05 'Further selection criteria' screen, also want to add some more fields in VA05 ALV output.
Please help me how i can do it using user exit ?
Thanks ,
Archanahi,
You have to copy the standard program SAPMV75A to ZSAPMV75A, change them accordingly. -
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. -
Selection-screen fields in output.
hi experts,
i have one requirement.
here i am giving some values in parameters(upto 12).
PARAMETERS:
apr LIKE sy-datum MODIF ID 1yr,
may LIKE sy-datum MODIF ID 1yr,
jun LIKE sy-datum MODIF ID 1yr,
jul LIKE sy-datum MODIF ID 1yr,
aug LIKE sy-datum MODIF ID 1yr,
sep LIKE sy-datum MODIF ID 1yr,
oct LIKE sy-datum MODIF ID 1yr,
nov LIKE sy-datum MODIF ID 1yr,
dec LIKE sy-datum MODIF ID 1yr,
JAN LIKE sy-datum MODIF ID 1yr,
FEB LIKE sy-datum MODIF ID 1yr,
MAR LIKE sy-datum MODIF ID 1yr.
SELECTION-SCREEN:END OF BLOCK 1yr.
DATA: BEGIN OF it_display OCCURS 0,
month(4) TYPE c, "month
year(2) TYPE n, "year
totalemp(4) TYPE n VALUE 0, "total
esiwage TYPE pc207-betrg,
empesi LIKE pc207-betrg,
empyresi LIKE pc207-betrg,
total LIKE pc207-betrg,
paydate LIKE sy-datum,
END OF it_display.
i am having itab with 8 fields. the last field is date.
for this field i have to get data from selection-screen.
Some of these fileds i require in the output. Not all the 12 months .....dates ..with respect to the output...
if output is coming for 3 months jan, feb, mar.
then i have to pass to move the dates to 3 months(jan feb mar) (payment of esi).
Message was edited by:
dasr r
Message was edited by:
dasr r
Message was edited by:
dasr r
Message was edited by:
dasr rhi,
do the necesseray validations in this event and make the parameters visible and invisible.
<b>At selection-screen output</b> : triggered when the selection screen is loaded in memory before being displayed.
Regrds
Anversha -
Show the drop down list of variant on the selection screen in ALV reports
Hi,
i have a alv report when i execute this display will come and then i click display layout it save as a variant on the selection screen and when i go back to selection screen and press f4 on the display variant its show the drop down list of varient.
can u send me some code for this functionality...its very urgent.
thanks!
VipinHi,
try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
START HERE
PARAMETERS: pa_vari TYPE disvariant-variant.
INITIALIZATION.
g_repid = sy-repid.
CLEAR e_variant.
e_variant-report = sy-cprog.
e_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pa_vari = e_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM alv_variant_f4 CHANGING pa_vari.
*& Form ALV_VARIANT_F4
FORM alv_variant_f4 CHANGING pa_vari.
DATA: l_exit(1) TYPE c.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = e_variant
i_tabname_header = 'ANYTHING'
i_save = 'A'
IMPORTING
e_exit = l_exit
es_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit = space.
pa_vari = e_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
END
Hope iy helps!
Alfonso -
Hi All,
Am creating am alv report in oops .,., but am facing an unusual problem ,,,am unable to display selection-screen ..,
its really unusual which i never came across
Kindly provide me suggestions to fix it up..
thanks
jackPlease provide the solution.
Regards,
Sumit Nene. -
Variants on tabbed selection screen for ALV reports
Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
Question: How can I code such a check?
Edited by: Alridge Tom on Jul 4, 2008 3:43 PMHi,
try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
START HERE
PARAMETERS: pa_vari TYPE disvariant-variant.
INITIALIZATION.
g_repid = sy-repid.
CLEAR e_variant.
e_variant-report = sy-cprog.
e_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pa_vari = e_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM alv_variant_f4 CHANGING pa_vari.
*& Form ALV_VARIANT_F4
FORM alv_variant_f4 CHANGING pa_vari.
DATA: l_exit(1) TYPE c.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = e_variant
i_tabname_header = 'ANYTHING'
i_save = 'A'
IMPORTING
e_exit = l_exit
es_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit = space.
pa_vari = e_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
END
Hope iy helps!
Alfonso -
How to put Layouts in selection screen for ALV
Dear All,
I have developed an ALV report . The users will create many layouts and save it. The requirement is that:
In the selection screen , they need to get the list of saved layouts and select one from that so that they need not have to select layout after running the report.
That means .. they want to select the layout before running the report.
Hope that you understood my problem and will help me out...
Thanking you,
ShankarHi,
PARAMETERS P_LAYOUT LIKE DISVARIANT-VARIANT.
INITIALIZATION.
*Get Default display variant
PERFORM F100_DISPLAY_DEFAULT_VARIANTS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAYOUT.
*Value Help for Layouts
PERFORM F1001_VALUE_REQUEST.
*& Form F100_DISPLAY_DEFAULT_VARIANTS
Initializing ALV Values *
FORM f100_display_default_variants.
w_variant-report = sy-repid.
w_variant-handle = c_handle.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = c_a
CHANGING
cs_variant = w_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 0.
p_layout = w_variant-variant.
ENDIF.
ENDFORM.
*& Form F1001_VALUE_REQUEST
Get the values for the layout.
form F1001_VALUE_REQUEST.
DATA: lv_exit TYPE c,
lw_variant LIKE w_variant.
w_variant-report = sy-repid.
w_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = w_variant
i_save = c_a
IMPORTING
e_exit = lv_exit
es_variant = lw_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc IS INITIAL.
IF lv_exit IS INITIAL.
p_layout = lw_variant-variant.
ENDIF.
ELSE.
MESSAGE i029."No layouts found
ENDIF.
endform. " F1001_VALUE_REQUEST
Hope this helps.
Regards,
J.Jayanthi -
Can we call a selection screen from List output
Hi Folks,
Can we call a selection screen from the list output?
I mean for ex:-
i am getting the data from MAKT and displaying it in the list output having a button EMAIL.
When I press that button it should call a selection screen asking the user to enter EMAIL id .
Thanks,
K.Kiran.Hi
U can create a dynpro as SELECTION SCREEN and call it using CALL SELECTION-SCREEN statament:
SELECTION-SCREEN BEGIN OF SCREEN 100.
PARAMETERS: P_MAIL(80) TYPE C.
SELECTION-SCREEN END OF SCREEN 100.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'MAIL'.
CALL SELECTION-SCREEN 100.
IF SY-SUBRC = 0. "User press F8
ELSE.
" User press exit or back
ENDIF.
U can use the addition STARTING AT ..... ENDING AT ..... if you need to show the selection-screen as popup
Max -
Reg: GOING TO SELECTION SCREEN FROM ALV GRID.
Hi all,
Iam using an ALV grid display.
I have called the grid display every times when i select a check box in the grid display.
Then when i click on the back button the screen navigates to the previous ALV grid. My requirement is to go to the first selection screen.
For this I have coded in the Back button as Call selection--screen <screen no>.
When i do this, and after navigation to the selection-screen when i click on the back button on the selection screen its navigating back to the ALV grid.
But i need to exit to the program in this case.
Can anyone Help me on this issue?
Regards
NaveenYou have to use LEAVE TO SCREEN 0.
Regards
Eswar
Addition: Also see that you are releasing the grid with statement like CALL METHOD g_grid->free.
So the code should be something like:
CASE ok_code.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
CALL METHOD g_grid->free.
LEAVE TO SCREEN 0.
ENDCASE.
Edited by: Eswar Rao Boddeti on Feb 19, 2008 1:48 PM
Maybe you are looking for
-
Adobe Bridge CS5 in windows 7 not working?
Adobe Bridge CS5 in windows 7 not working. I was using bridge perfectly for last 2 years. It stops working since 3 days. I tried to install updates. Showing some error to install. Tried to install creative cloud..again some error. Error code : 82 Cou
-
HT1338 how can I remove an app store app from 10.6.8
I downloaded an app from the appstore and want to remove it, but it remains in the "installed" state in app store. How can I remove it from the app store's idea of what's installed?
-
Hi to all, anyone knows how to attach a word file in SO_DOCUMENT_SEND_AP1 ? Please note that the file is not on application server but I need to catch it with an "OPEN DATASET" instruction . So I was thinking to use BINARY MODE but how to transfer th
-
We're looking at possibly upgrade our r3 instance from solaris 8 to solaris 10, and in the process, possibly not at the same time though, upgrade the Oracle version that we're currently using (9.2.0.4) to a more recent version. Can anybody point me t
-
Hi experts i want to configure infotype 0025 and Infotype 0024 want to know how does it work in the payroll Run . does it require to configure template