CALL SELECTION SCREEN problem
Hello!
I have a problem. In my riport I have a selection screen (1000), a main screen (2000), and a screen (400) this is called inside a loop, to fill some datas when you hit the print button.
CLEAR L_TOTAL.
SORT LT_EBAN BY BNFPO.
LOOP AT LT_EBAN.
GT_ITEM2-FIELD01 = SY-TABIX.
GT_ITEM2-FIELD02 = LT_EBAN-MATNR.
*---Part name, Type, Maker
SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.
CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.
ITEM = LT_EBAN-BNFPO.
CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.
*---Machine
GT_ITEM2-FIELD06 = ST_400-MACHINE.
After this, i could not use the LEAVE TO SCREEN 0, because it's not going back to secreen '2000' , I'm getting a blank 400 screen.
Thatswhy I used CALL SCREEN '2000', and it's fine.
But in the case of the Selection screen (1000) something is wrong.
On the screen 2000 I using this logic.
MODULE EXIT_2000 INPUT.
CASE OK_CODE.
WHEN 'BACK' OR 'EXIT'.
CLEAR OK_CODE.
CALL SELECTION-SCREEN '1000'.
LEAVE PROGRAM.
WHEN 'CANC'.
PERFORM EXIT_PROGRAM.
LEAVE PROGRAM.
ENDCASE.
CLEAR OK_CODE.
ENDMODULE. " exit_2000 INPUT
With this logic, the program is going to the SELECTION-SCREEN, when I hit the back button, and when we are already on the SELECTION-SCREEN, it's leaving the program. This is also ok.
But when I hit the back button, and on the SELECTION-SCREEN I want to run the program again, it's not going to the program logic, it's jumping to this CALL SELECTION-SCREEN '1000', and leaving of course.
START-OF-SELECTION.
PERFORM DSP1_PROC.
IF GT_DISPLAY[] IS INITIAL.
MESSAGE S208(00) WITH 'No data.'.
EXIT.
ENDIF.
IF S_RET = '1'.
MESSAGE I208 WITH 'Document not found'.
S_RET = ' '.
ELSE.
S_RET = ' '.
CALL SCREEN '2000'.
ENDIF.
So my question is, that the above logic, when I running the program first time It's working good, at the START-OF-SELECTION, but when I trying to runnig from the SELECTION-SCREEN "second time", from the START-OF-SELECTION it's jumping to the CALL SELECTION-SCREEN '1000'. How can I avoid this. I want that from the START-OF-SELECTION, never go to the CALL SELECTION-SCREEN '1000'.
Thank You
Edited by: Roland on Dec 5, 2011 11:27 AM
Hi Max!
Yeah, I was thinking the same, that the problem is with that loop.
But I don't know, how can I solved in a different way, because when we hit the print button, we getting all the items from a table, and we starting looping on them. In the loop we passing the values to a GT_ITEM table, later this table is connected with an excell, so it will be printed out in an excell form.
So I have to call this screen so many times, how many items we have. Sometimes just 1, sometimes 4, 6, 9, and so on.
For this items I have to add 2 more fields, wich are uploaded by the user. ( The other fields are coming from the table)
So if I going out from the loop after the CALL SCREEN 400, I think the next item wont be get the values. Or maybe any of them, because this is before the APPEND GT_ITEM. So this methode wont be called, no data would be in the table, nothing will be printed.
*-Item
SELECT BNFPO MATNR TXZ01 MENGE MEINS ERNAM PREIS BEDNR EBELN EBELP
INTO CORRESPONDING FIELDS OF TABLE LT_EBAN
FROM EBAN
WHERE BANFN = GT_DISPLAY-BANFN
AND LOEKZ = ' '.
CLEAR L_TOTAL.
SORT LT_EBAN BY BNFPO.
LOOP AT LT_EBAN.
GT_ITEM2-FIELD01 = SY-TABIX.
GT_ITEM2-FIELD02 = LT_EBAN-MATNR.
*---Part name, Type, Maker
SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.
CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.
ITEM = LT_EBAN-BNFPO.
CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.
*---Machine
GT_ITEM2-FIELD06 = ST_400-MACHINE.
*---Using Qty
WRITE ST_400-USING UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD08.
*---Now Stock
CLEAR L_LABST.
SELECT SUM( LABST ) INTO L_LABST
FROM ZMM0460T
WHERE MATNR = LT_EBAN-MATNR
AND WERKS = '3A10'.
WRITE L_LABST UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD09.
WRITE LT_EBAN-MENGE UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD10.
IF NOT LT_EBAN-EBELN IS INITIAL.
CLEAR LS_EKPO.
SELECT SINGLE NETPR WAERS PEINH
INTO CORRESPONDING FIELDS OF LS_EKPO
FROM EKPO AS A INNER JOIN EKKO AS B ON A~EBELN EQ B~EBELN
WHERE A~EBELN = LT_EBAN-EBELN
AND A~EBELP = LT_EBAN-EBELP.
IF LS_EKPO-WAERS <> 'HUF'.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
DATE = SY-DATUM
FOREIGN_AMOUNT = LS_EKPO-NETPR
FOREIGN_CURRENCY = LS_EKPO-WAERS
LOCAL_CURRENCY = 'HUF'
IMPORTING
LOCAL_AMOUNT = LS_EKPO-NETPR.
ENDIF.
IF LS_EKPO-PEINH IS INITIAL. LS_EKPO-PEINH = 1. ENDIF.
LT_EBAN-PREIS = LS_EKPO-NETPR / LS_EKPO-PEINH.
ENDIF.
WRITE LT_EBAN-PREIS CURRENCY 'HUF' TO GT_ITEM2-FIELD11.
CONDENSE GT_ITEM2-FIELD11.
CONCATENATE GT_ITEM2-FIELD11 'Ft' INTO GT_ITEM2-FIELD11
SEPARATED BY SPACE.
L_NETWR = LT_EBAN-MENGE * LT_EBAN-PREIS.
WRITE L_NETWR CURRENCY 'HUF' TO GT_ITEM2-FIELD12.
CONDENSE GT_ITEM2-FIELD12.
CONCATENATE GT_ITEM2-FIELD12 'Ft' INTO GT_ITEM2-FIELD12
SEPARATED BY SPACE.
L_TOTAL = L_TOTAL + L_NETWR.
*---Unit
SELECT SINGLE UNIT INTO GT_ITEM2-FIELD13
FROM ZMM0500T
WHERE PERNR = LT_EBAN-BEDNR.
*---Name
SELECT SINGLE SNAME INTO GT_ITEM2-FIELD14
FROM PA0001
WHERE PERNR = LT_EBAN-BEDNR
AND ENDDA = '99991231'.
*---Append
GT_ITEM2-CNTR01 = ''.
APPEND GT_ITEM2. CLEAR: GT_ITEM2, ST_400, DESCR, ITEM.
ENDLOOP.
GT_ITEM2-FIELD11 = 'Total'.
WRITE L_TOTAL CURRENCY 'HUF' TO GT_ITEM2-FIELD12.
CONDENSE GT_ITEM2-FIELD12.
CONCATENATE GT_ITEM2-FIELD12 'Ft' INTO GT_ITEM2-FIELD12
SEPARATED BY SPACE.
GT_ITEM2-CNTR01 = 'B'.
APPEND GT_ITEM2. CLEAR GT_ITEM2.
ANy idea?
Thank You
Edited by: Roland on Dec 5, 2011 1:36 PM
Edited by: Roland on Dec 5, 2011 1:50 PM
Similar Messages
-
Problem in Call Selection Screen
Hi,
I am facing a problem on the call selection screen. The no. of nested screens that can be called by using call selection screen is 50. When the count reaches to 51 it is going to short dump. How can i avoid the dump. What is the system field that captures the nested screens count.
Thanx in advance,Maximum number of nested CALL SCREEN is 50, I think you cannot call 51th screen in a row.
To avoid short dump you can handle exception <b>DYNP_TOO_MANY_CALL_SCREENS</b> and give error (or information) message 'Maximum number of nested sccreen level is 50' .
TRY .
CALL SCREEN 100.
CATCH cx_root .
MESSAGE e100(00).
ENDTRY. -
Two selection screen problem in one report
i have a two selection screens 1000 & 2000 in single report , which needs to be executed one after the other ,
the problem is when i execute second selection screen(2000) , the cursor is going back to at-selection-screen once again.
but i need to trigger start-of-selection directly after executing second selection screen,
the first selection screen 1000 will be executed with the help of select options..
the sample code is below .
at-selection-screen.
perform validations.
call selection screen 2000.
at selection screen on value request p_adm
start-of-selection.
main logicModerator message - Cross post locked
Rob -
Short dump while using call selection-screen mdynnr
Hi ALL,
I need your help and information.
In programmes, We are using the statament " CALL SELECTION-SCREEN MDYNNR "
and passing the screens dynamically into variable mdynnr.
And the programme is going to dump after executing 50 times.
When we
can we use any other statement instead of CALL SELECTION-SCREEN MDYNNR.
Your information helps us lot.
Thanks in advance.
Srinivasa Reddy.Hi,
As you know Call Screen is the statement, but you will get the problem if you are going to call it in the same LUW repeatedly. So, FM is the only convenient way to do it. This is very easy. Just create a FM and replace you statement with this FM. Hopefully this will solve your problem.
Check this comment " When you call a new main program in order to use a screen sequence (for example, using CALL TRANSACTION), a new SAP LUW begins. This may be an undesired effect, especially when you are trying to modularize a transaction that updates the database.
An alternative to this is to use an external procedure, whose main program is linked to a screen sequence, and which contains the corresponding dialog modules. Procedures run in the same SAP LUW and internal session as their calling program."
Thanks, -
Selection screen problem in module pool
Hi friends,
I am working on module pool programming, I need to put select screen on the screen of the module pool porgramming. I used Input/Output field to do that and activated. But I am getting message invalid field format (screen error) can any one tell me why I am not able to run the seletion screen when I am using input/output field, also please let me know how to solve this problem.
Regards,
LineHello,
Think that this is useful for u/
SELECTION-SCREEN - Defining selection screens
Variants:
1a. SELECTION-SCREEN BEGIN OF SCREEN scr.
1b. SELECTION-SCREEN END OF SCREEN scr.
2. SELECTION-SCREEN BEGIN OF SCREEN scr AS SUBSCREEN.
Effect
Defines a selection screen with the number scr. scr may be up to 4 digits.
SELECTION-SCREEN BEGIN OF SCREEN scr.
Additions:
(zu SELECTION-SCREEN BEGIN OF SCREEN scr) 1. ... TITLE title
2. ... AS WINDOW
Notes
In reports (type 1 programs), a selection screen with number 1000 is created automatically when you use the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statments. This selection screen appears when you SUBMIT the report.
In any type of program (apart from subroutine pools - type S), you can define further selection screens using SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN. You enclose these statements between the SELECTION-SCREEN BEGIN OF SCREEN and SELECTION-SCREEN END OF SCREEN statements.
You call these screens using the CALL SELECTION-SCREEN statement.
Screen number 1000 is not allowed (reserved for standard selection screen).
When you generate the program, all user-defined selection screens are also generated.
Within a report (type 1 program), all SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements outside a SELECTION-SCREEN BEGIN/END OF SCREEN block form part of selection screen 100 (standard selection screen)
Regards,
LIJO JOHN. -
Hi all!
I have a report, and i have a selection screen in a fm. Report call fm, and it bring me selection parameters.
However i need run report in background, but option (F9) for do this, not visible. Somebody have any idea
for resolve this ?
pd: i should use fm. not using selection screen in traditional way.
Thanks for ur answer.I'm not sure if anyone is looking for an answer here still, but I'll attempt an answer.
Class Based exceptions cannot be propogated from a section of code that does not have a local memory area. This means Event (START-OF-SELECTION, AT SELECTION-SCREEN, etc) and Dialog Processing. Since the exception cannot be propogated, it hits the system and the system treats it as a dump scenario. In addition, due to the way Class Based Event Handling is processed, an exception cannot be propogated past an event handler.
I am not sure if there is a work around for your problem though. One way may be to use a variable to store the exception that occurred; then when the Function Module itself has control again, check to see if that variable contains a value, it will raise the exception to the application that called the function. Using this and checks against this variable, you would be able to prevent further processing after the exceptions actual occurance.
Global Data Definition
DATA iException TYPE I VALUE 0 .
Function Module
CALL SELECTION-SCREEN 1234
CASE iException .
WHEN 0 .
" do nothing, no exception occurred on selection screen.
WHEN 1 .
RAISE EXCEPTION CX_Your_Exception_Name .
ENDCASE .
AT SELECTION-SCREEN OUTPUT .
IF [some condition] .
iException = 1 . "If your exception occurred.
ENDIF .
This would allow you to use a global variable to log the exception and report it back to the function module; this will then allow the function module to propogate the correct exception back to the calling procedure. -
Hi,all
I've found a problem arising from this sentence "call SELECTION-SCREEN 1001 STARTING AT 10 10",in the main screen. (here the type of screen 1001 is 'Modal Dialog Box')
The 'close' button on the right-top correr of the screen has no effect to close the
screen 1001,so how can I catch the event of click on that button?
Thanksyou need to write the code as below
case sy-ucomm.
when 'EXIT'.
leave to screen 0. " always use screen 0 for modal dialog box.
when "BACK'
leave to screen 0
WHEN 'CANC'.
leave to screen 0
endcase.
Please activate buttons in Menu Painter.
Thanks
Seshu -
Hi all
I have create one selection screen as follows
SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.
SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-101.
SELECT-OPTIONS : SO_PLANT FOR ZTAB_PP_PARAM-ZPLANT NO INTERVALS NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B0 .
SELECTION-SCREEN END OF SCREEN 1001.
and call in follows
CALL SELECTION-SCREEN 1001 STARTING AT 5 5 ENDING AT 50 2.
its working properly
my problem if in the appear window has scroll in there end.
if i removed Block part its working
you can check Tcode CEWB that is standred code inthe bigining nice window displayed i want to create that type window.
please try to help me.Hi,
Call From a Program
From any program in which selection screens are defined, you can call these screens at any
point of the program flow using the following statement:
CALL SELECTION-SCREEN <numb> [STARTING AT <x1> <y1>]
[ENDING AT <x2> <y2>].
This statement calls selection screen number <numb>. The selection screen called must be
defined in the calling program either as the standard selection screen (screen number 1000) or
as a user-defined selection screen (any screen number). You must always use CALL
SELECTION-SCREEN to call selection screens, and not CALL SCREEN. If you use CALL
SCREEN, the system will not be able to process the selection screen.
You can display a user-defined selection screen as a modal dialog box using the STARTING AT
and ENDING AT additions. This is possible even if you have not used the AS WINDOW addition
in the definition of the selection screen. However, you are recommended to do so, since
warnings and error messages that occur during selection screen processing will then
also be displayed as modal dialog boxes (see example below).
When it returns from the selection screen to the program, the CALL SELECTION-SCREEN
statement sets the return value SY-SUBRC as follows:
SY-SUBRC = 0 if the user has chosen Execute on the selection screen
SY-SUBRC = 4 if the user has chosen Cancel on the selection screen
Any time a selection screen is processed, the selection screen events are triggered.
System field SY-DYNNR of the associated event blocks contains the number of the selection
screen that is currently active.
REPORT SELSCREENDEF.
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFROM,
CITYTO LIKE SPFLI-CITYTO.
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: AIRPFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2.
SELECTION-SCREEN END OF SCREEN 500.
INITIALIZATION.
TIT1 = 'Cities'.
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.
This executable program contains definitions for the standard selection screen and
the user-defined screen number 500. Selection screen 500 is defined to be displayed
as a modal dialog box and contains the SEL1 block of the standard selection screen.
Note the phase in which the titles of the screens are defined. For the purpose of
demonstration, the program calls warning messages with message class AT during
the AT SELECTION-SCREEN event.
When you start the program, the following sequence of screens is displayed:
1. The standard selection screen. If the user chooses Execute, the system displays
the warning SCREEN 1000 in the status bar.
2. Once the user has confirmed the warning by choosing Enter, selection screen 500
is called as a modal dialog box. When the user chooses Execute, the system
displays the warning SCREEN 500, also in a dialog box.
3. When the user has confirmed this warning, the standard selection screen is called
again, but this time as a modal dialog box. Since you cannot define the standard
selection screen as a modal dialog box, the warning message displayed when the
user chooses Execute appears in the status bar and not as a modal dialog box.
Consequently, you can only exit this selection screen using Cancel, since there is no
Enter function in the dialog box to confirm the warning message.
Regards,
Bhaskar -
Issue with CALL SELECTION-SCREEN
Hi experts,
I am working on a report.
Here on the selection screen , based on the selection of some radiobuttons ,i want to call a secondary selection screen.
So i am using the following program code ,
AT SELECTION-SCREEN on BLOCk blk.
IF p_abc = c_x.
CALL SELECTION-SCREEN 100 STARTING AT 20 5.
IF sy-subrc <> 0.
MESSAGE text-011 TYPE c_e .
ENDIF.
ENDIF.
so currently , once i complete my slection on the screen 100 , the popup screen stays there and rest of the programing logic is executed correctly.
My issue is that , once i complete my slection on the screen 100, i want that the pop up should be closed
And then the the rest of the program logic should continue.
please guide me how ,this can be done.
Regards,
Rajesh Kumar.Hi
The event AT SELECTION-SCREEN and AT SELECTION-SCREEN ON BLOCK are very similar, only the second event see the part of selection-screen defined in the block.
This events are triggered as soon as the user does something: so press ENTER, F8,........
If u want the second-selction screen is shown once and the main selection-screen has to be displayed under the second one, u can try to run the second one only if the report has to run, so if the user has pressed F8, code ONLI.
AT SELECTION-SCREEN on BLOCk blk.
CHECK SY-UCOMM = 'ONLI'.
IF p_abc = c_x.
CALL SELECTION-SCREEN 100 STARTING AT 20 5.
IF sy-subrc 0.
MESSAGE text-011 TYPE c_e .
ENDIF.
ENDIF.
In tihs way the rest of the program will be executed, else u need to move all code of the event START-OF-SELECTION and END-OF-SELECTION in the event AT SELECTION-SCREEN, or, just as I said before, to move the calling of POPUP to event START-OF-SELECTION.
Max -
To call Selection screen In BSP
I have written a report "zdemo" in abap editor with some selection screen. I'm desperately looking for <b>_how to call Selection screen In BSP_</b>.
Any kind of help will be apreciated.
nikhilHi Nikhil,
There is no way that, you can call a selection-screen directly or create automatically as in the case of report in ABAP.
The possible way could be
Create one more page for holding the selection screen input fields with a submit button.
On click on submit, do the processing and call the result page.
Regards,
Ravi -
Back on a CALL SELECTION-SCREEN from an ALV
Hi all,
I have created a program with a normal selection-screen (1000).
According to the selected values, when I press "Execute" I go to a next selection-screen (2000) with instruction CALL SELECTION-SCREEN 2000.
Then I display an ALV.
When I press the back button, I want to go back to screen 2000, but actually I go directly to screen 1000.
PARAMETERS : p_choic1 RADIOBUTTON GROUP cho DEFAULT 'X'.
PARAMETERS : p_choic2 RADIOBUTTON GROUP cho.
SELECTION-SCREEN BEGIN OF SCREEN 2000.
PARAMETERS : p_table TYPE char10.
SELECTION-SCREEN END OF SCREEN 2000.
START-OF-SELECTION.
IF NOT p_choic1 IS INITIAL.
CALL SELECTION-SCREEN 2000.
PERFORM alv_process.
ENDIF.
Have you got any idea of what I can do to return to screen 2000 from the ALV after pressing Back button ?
Thanks.Hi,
Follow below sample code...
SELECTION-SCREEN BEGIN OF SCREEN 2000.
PARAMETERS p_mat TYPE matnr.
PARAMETERS p_enam TYPE ernam.
SELECTION-SCREEN END OF SCREEN 2000.
START-OF-SELECTION.
set PF-STATUS 'STATUS'.
WRITE:/ p_mat,
p_enam.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'S2000'.
CALL SELECTION-SCREEN 2000.
WHEN 'EXIT'.
EXIT.
ENDCASE.
Ram. -
CALLING SELECTION SCREEN.
Hi All,
My requirement is whenever i am clicking check box on selection screen one window selection screen shu apper where i will enter some data.After pushing execute button it should go to standard selection screen.
code i hav wirtten as...
Program *********************************************
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-003 .
PARAMETERS: pa_ls1 AS CHECKBOX,
pa_ls2 AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF SCREEN 2000 TITLE text-004.
SELECT-OPTIONS: pa_vkorg FOR vbak-vkorg NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF SCREEN 2000.
at selection-screen.
IF pa_ls2 = 'X'.
do.
CALL SELECTION-SCREEN '2000'
STARTING AT 10 10.
exit.
enddo.
ENDIF.
with this code i am able to call the screen but cant go back to standard screen.HI RUSHIKESH,
MODIFICATION HAS BEEN MADE INTO YOUR CODE.SEE THE BOLD PART.
REPORT ZCLICK.
tables : vbak.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-003 .
PARAMETERS: pa_ls1 AS CHECKBOX,
pa_ls2 AS CHECKBOX USER-COMMAND CLICK.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF SCREEN 2000 TITLE text-004.
SELECT-OPTIONS: pa_vkorg FOR vbak-vkorg NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF SCREEN 2000.
at selection-screen.
IF pa_ls2 = 'X'.
<b>PA_LS2 = ''.</b>
CALL SELECTION-SCREEN '2000'
STARTING AT 10 10.
ENDIF. -
Hi,
can any one give me good links for
All variants of at selection screen..
some thing on call selection screen
Thx,
Shashi· AT SELECTION-SCREEN
You should only perform very expensive checks with AT SELECTION-SCREEN if the program is then started. Here, you can read the system field SSCRFIELDS-UCOMM (provided a statement TABLES SSCRFIELDS exists). If the field has one of the values 'ONLI' (= Execute) or 'PRIN' (= Execute and Print), the report is then started, i.e. the selection screen is closed and the processing continues with START-OF-SELECTION.
Additions:
· ... ON psel
Effect
This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel.
If the report starts an error dialog at this point, precisely these fields become ready for input.
· ... ON END OF sel
For each selection criterion sel on the selection screen, you can call a further screen by pressing a pushbutton. On this screen, you can enter any number of single values and ranges for the selection criterion sel..
When this screen has been processed (i.e. at the end of PAI for this screen), the event AT SELECTION-SCREEN ON END OF sel is executed.
At this point, all the values entered are available in the internal table sel.
· ... ON VALUE-REQUEST FOR psel_low_high
Effect
In this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. The effect of this is twofold:
1. The possible entries pushbutton for F4 appears beside the appropriate field.
2. When the user activates this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4, the system processes this rather than displaying the check table or the fixed values of the Dictionary field.
· ... ON HELP-REQUEST FOR psel_low_high
Effect
As with the addition ON VALUE-REQUEST the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. When the user presses F1 on the relevant field, the subsequent processing block is executed. You can thus implement a self-programmed help for the input/output fields of the selection screen. If the program contains such an event and the user presses F1, the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
· ... ON RADIOBUTTON GROUP radi
Effect
This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi. If the report starts at an error dialog at this point ,precisely these fields of the radio button group
radi become ready for input again.
· ... ON BLOCK block
Effect
This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block. If the report starts at an error
dialog at this point, precisely these fields of the block block become ready for input again.
The events assigned to the radio button groups are executed according to the first parameter of the radio button group.
The events assigned to the blocks are executed "from the inside to the outside".
· ... OUTPUT
Effect
This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION. Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values. Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the inout/output attributes of selection screen fields.
· ... ON EXIT-COMMAND
Effect
This event is executed at the exit command of the selection screen - that is, at Back, Cancel, or End,events executed after the screen is sent that do not cause the system to check the input and execute the PAI.
plz reward if useful
vivek -
Selection-screen problem:need to go back to selectionscreen not source code
Hello experts,
Please help me on my dillema. I have 2 reports, zreport1 and zreport2. Now, zreport1 submits
values via selection-screen to zreport2. Now here is the problem, when I press 'BACK' on the
selection-screen of zreport2(rememeber we used submit statement via selection-screen on zreport1)
instead of going back to the selection-screen of zreport1 it goes to the source code of zreport1 which
is wrong. And there are 2 selection-screens on zreport1 depending on the user if he is controller or not.
So what I need to do here is that whenever I press 'BACK' either I'm adding or modifying or displaying records
it should go back to whatever screen I called in zreport1.
Here's a diagram.
ZREPORT1**
if v_controller = 'X'
display selection-screen 1500
else
display selection-screen 500
endif.
if user wants to add records, submit values from zreport1 to zreport2
and return via selection-screen.
*same goes for edit option.
if user wants to display, get all records then display in ALV.
ZREPORT2**
So lets assume user decides not to add records and decides to go back. so he presses
the BACK button in selection-screen of zreport2. Now here's the nasty part, instead of going back to either
selection-screen 500 or 1500 in zreport1, it goes to the source code of zreport1!. I hope I explained it clearly.
Again, thanks a lot guys for your help!Hi,
Try this
START-OF-SELECTION.
*----------Sumbit Report-------*
Sumit Report......AND RETURN
*----------Check Condition & back to select screen-------*
IF condition.
MESSAGE s207(zusm_gen) DISPLAY LIKE lc_e .
EXIT.
ENDIF.
Set something in the memmory.
this can be used to check the completion of the report.
if the 2nd report executed porperly then u further execute the code.
If u dont have any thing to execute after sumbit report
then u can do is.
START-OF-SELECTION.
*----------Sumbit Report-------*
Sumit Report......AND RETURN
MESSAGE s207(zusm_gen) DISPLAY LIKE 'S' .
EXIT.
Message was edited by: Manoj Gupta -
Reg: calling selection screen from the second list
Hi all,
How can we call the selection screen from the second screen.
Can any one help me to solve this problem.HI RJ,
Try .....
case sy-ucomm.
WHEN '&F03'.
LEAVE TO SCREEN '0'.
endcase.
after the FM for grid-display
i m using the same .....
i hav selection-screen..then alv grid screen 1 then again another screen with alv grid display..
bt in my code for first alv grid ...i m using REUSE_ALV_GRID_DISPLAY_LVC
as
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'(303)
i_callback_user_command = 'USER_COMMAND'(304)
i_grid_title = 'Reconcilation Report'(305)
is_layout_lvc = it_layout
it_fieldcat_lvc = gt_fieldcat3[]
TABLES
t_outtab = gt_msg[].
here i musing set_pf_status to add one pushbutton to the screen. in ur case u can avoid that...
after that
*& Form set_pf_status
text
-->EXTAB text
FORM set_pf_status USING extab TYPE slis_t_extab. "#EC NEEDED
SET PF-STATUS 'STANDARD_FULLSCREEN'.
*get back to Selection Screen
case sy-ucomm.
WHEN '&F03'(328).
LEAVE TO SCREEN '0'.
endcase.
ENDFORM. "set_pf_status
its working for me..
Thnx
Rohit...
Edited by: Rohit Kumar on Oct 29, 2008 3:20 PM
Maybe you are looking for
-
How to handle Communication Exception
Hi, Env: Weblogic 6.1 on SUN SOlaris. Once going through the clustering EJB's documents, I came across some documents which give informatio about clustering EJB's. There I fould that, in a clustered environment cluster aware session EJB's are deploye
-
Problem printing from my iPad use to work now the paper comes out empty
-
Phone number changed, but old number still shows in iTunes and in contacts within Phone app
My phone number changed, but when my phone is plugged into iTunes, it is still showing my old phone number in the iPhone information box. Also, when you are in contacts from within the Phone app. and you you pull down the list of contacts so it reve
-
Multicam panel crops footage during playback
I recently created my first multicam sequence in Premiere Pro CS6 using source footage from 4 different cameras with different formats: Camera A (sony), Camera B (sony), Camera C (DSLR) and Camera D (HDV). Then I placed the 1920 x 1080 Multicam sourc
-
I have a string of switches trunked together, all the VLANS on the different switches work together fine. but the issue is with the management interfaces of any switch "downstream" of the srw2048, the map is Router---->Srw2048---->3750ps---->2960 eac