Selection screen time parameter error.
I see a display error on the selection screen to the left of the Run Time field. When my mouse hovers over the display error, another display then appears below the Run Time field. I believe an = sign should appear to the left of the Run Time.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-034.
PARAMETERS: p_jobnam TYPE tbtco-jobname MODIF ID 1.
SELECT-OPTIONS: s_runda FOR tbtco-strtdate DEFAULT sy-datum TO sy-datum MODIF ID 1 ,
s_runti FOR tbtco-strttime DEFAULT time_0 TO time_24 MODIF ID 1.
PARAMETERS: p_supjob AS CHECKBOX .
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
" if radio button display on screen i sselected then make subject,sheduler
and user email disable and if radio button send email is selected make
the same fields enable.
IF screen-group1 = '3' .
IF p_disp = 'X'.
screen-input = 0.
ELSEIF p_email = 'X'.
screen-input = 1.
ENDIF.
ENDIF.
*if check box report on job status is selected making jobname,rundate,runtime fields
disable and if it is not checked maiking these fields enable.
ELSEIF screen-group1 = '1'.
IF p_re_sts = ' ' .
screen-input = 0.
ELSEIF p_re_sts = 'X'.
screen-input = 1.
ENDIF.
ENDIF.
*if attach .csv check box is seleted then making the fields status,application path
*and file enable otherwise disable.
ELSEIF screen-group1 = '2'.
IF p_att = ' '.
screen-input = 0.
ELSEIF p_att = 'X'.
screen-input = 1.
ENDIF.
CLEAR : p_apdir1.
MODIFY SCREEN.
ENDIF.
this code am using i have a check box if i check that am making above selction screen parameters enable disable .
i found out that if i commented this loop at screen code am getting no error .
please help
Similar Messages
-
Selection Screen Disappearing on error
Hi
I am new to ABAP.
Below is the driver program for Smartform,
after:
Step-1 Entering data at selection screen
Step-2 Pressing Execution Button
An error is displaying 'Document no. not found' but the problem is, as soon as the error appears, selection screen goes blank, its not staying.
Please suggest correction.
With warm regards.
Yogesh.
*& Report Z_MM_GPASS
REPORT Z_MM_GPASS.
tables: MSEG,ADRC,T001W,MAKT .
data: FM_NAME TYPE RS38L_FNAM.
*& Selection Screen
Selection-screen: begin of block b1 with frame title t1.
Parameter: Docno like MSEG-MBLNR ,
YEAR like MSEG-MJAHR .
selection-screen: end of block b1.
*& Comment on selection screen
At selection-screen output .
t1 = 'Selection-Screen' .
*& Data validation at selection screen
At selection-screen .
select single * from MSEG where MBLNR = docno and MJAHR = YEAR .
if sy-subrc <> 0.
message 'Document no. not found' type 'E'.
endif.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_MM_PASS'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION FM_NAME
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
DOCNO = DOCNO
YEAR = YEAR
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
IF SY-SUBRC <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Code Formattted by: Alvaro Tejada Galindo on Jan 7, 2009 2:30 PM*I have replaced
if sy-subrc <> 0.
message 'Document no. not found' type 'E'.
endif.
with
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
INTO mtext
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
write:/1 mtext.
ENDIF.
*Program sintactically correct.
*but still I'm facing the same problem, for your kind knowledge I don't know what is return code
Edited by: Yogesh Pathak on Jan 7, 2009 9:45 AM
Messege posted more than one time due to "SERVER ERROR" while posting., sorry for inconvenience.
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:34 PM -
Selection screen with Parameter - field name not coming when made mandatory
Hi Experts,
I have added a parameter in my selection screen which has other select options as well.
I used below code in wd_initi to add parameter
create data LR_LIFNR type LIFNR.
WD_THIS->M_HANDLER->ADD_PARAMETER_FIELD(
I_ID = 'LIFNR'
I_VALUE = LR_LIFNR
I_OBLIGATORY = ABAP_TRUE
I_READ_ONLY = L_READ_ONLY ).
I have a submit button in the selection screen, so when ever the value is empty in parameter for LIFNR, system throws an error *Enter selection in Field "" * but error message is unable to take the name of the parameter?
It is expected to give as Enter selection in Field "Vendor"
This throwing of error message is working fine for another select-options for PO which is also mandatory.
What could be the error?
Any clue is highly appreciated.
Regards,
AjayHi,
WDDOINIT the code is:
lt_range_table = wd_this->m_handle->create_range_table(
i_typename = 'ZRM_T_CV_END_DATE1' ).
wd_this->m_handle->add_selection_field(
i_id = 'ZRM_T_CV_END_DATE1'
i_description = 'Project End Date (MM.YYYY)'
it_result = lt_range_table
i_read_only = read_only ).
on submit the code is :
rt_prj_end = wd_this->m_handle->get_range_table_of_sel_field(
i_id = 'ZRM_T_CV_END_DATE1' ).
ASSIGN rt_prj_end->* TO <fs_prj_end>.
1.is the data element the same in both the methods u mentioned.i,e on WDDOINIT AND ON ACTION OF SUBMIT.
please check it once.
2.2does the data element LIFNR has field label assosciated with it.(check in domain).
3.check adding description to the field shown as below.
wd_this->m_handle->add_selection_field(
i_id = 'ZRM_T_CV_END_DATE1'
i_description = 'Project End Date (MM.YYYY)'
it_result = lt_range_table
i_read_only = read_only )
Try checking these 3 cases.
Priya -
Dear All,
I am executing a report in web in Java runtime (BI 7 enviornment). I get the selection screen.
I have a variable for which I have to give the range. I press F4. A new sub window openes where I can give from and to value. I click on F4 again for giving the From value. All valus for the characteristic are displayed in a new sub window. On top right corner in this window, there is a setting button. When I click on this, it gives error
500 Internal Server Error
The initial exception that caused the request to fail was:
java.lang.NullPointerException
Has any one faced this error. Any pointer to solve this will be helpful.Hi Niraj,
Apply the below note which is very similar to your issue...
SAP Note Number: 856741
Find the below thread...
500 Internal Server Error when clicked on Add/Remove Button
Also find the below search links which are very helpful to you...
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=500InternalServer+Error&adv=false&sortby=cm_rnd_rankvalue
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=java.lang.nullpointerexception&cat=sdn_all
Assign points if this helps u...
Regards,
KK. -
To display selection screen date parameter in smart form
Hi to all
My requirement is to display date parameters which are given at selection screen (module pool program ) on the smart forms.
I just want to dispaly this on selection.
SO_BLDAT-LOW
SO_BLDAT-HIGH
Please guide.
Regards
AnubhavHi,
If you are calling the smartform from the module program then export the parameters from the calling FM
and import the same in the smartform.
Regards,
Sandeep -
Printer option in selection screen (Input Parameter)
Hi All,
I want to give printer option in selection screen.
Please do needful help.
Regards.Hi,
in the PF-STATUS if u enable the Printer Icon on Application Tool Bar and in the PAI Event in the
User Command Module get the FCODE and apply the following FM ALINK_PRINT_FRONTEND
Hope this works ....
Best of luck!!
Thanks
Ravi -
Hello Experts,
Please help me this below query. If I ran the program, it will take so much time to execute the below query and its goes to time out.
Please help me.
SELECT mvgr1 "Line of Business
werks "Plant
lgort "Storage Location
charg "Batch
matnr "Material Number
kwmeng "Ordered quantity
posnr "Item
vbeln "Sales Order Number
FROM vbap
INTO TABLE gt_salesdatatemp
FOR ALL ENTRIES IN gt_matmerge
WHERE matnr EQ gt_matmerge-matnr
AND werks EQ gt_matmerge-werks
AND mvgr1 EQ gt_matmerge-mvgr1
AND lgort EQ gt_matmerge-lgort
AND charg EQ gt_matmerge-charg
AND abgru EQ space.
Thanks in advance.Hi,
If the number of records to be fetched is very very high then you can use the cursor concept.
Please see the below code.
=====
OPEN CURSOR dbcur FOR SELECT .... FROM ....... WHERE ...... .
DO.
FETCH NEXT CURSOR dbcur INTO TABLE itab PACKAGE SIZE 10000.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDDO.
CLOSE CURSOR dbcur.
=====
Using this concept you can fetch the data in packets.
Additionally, you can take care of the following points to have better performance.
a. Check that your query is using the index.
b. Check that the internal table is not initial. If it is initial then the select will happen for all records in the DB.
Regards,
Saurabh -
Bdc: selection screen error
HI,
In the bdc program, after uploading a file in the selection screen using parameter selection, the screen gets refrehed and returns to the selection screen with no further action. How do I solve this error?*& Report ZSALES2
REPORT ZSALES2.
tables:VBAK,
vbkd,
kuagv,
rv45a,
vbap.
types :begin of t_records,
AUART type VBAK-AUART,
BSTKD type VBKD-BSTKD,
BSTDK type VBKD-BSTDK,
KUNNR type KUAGV-KUNNR,
KETDAT type RV45A-KETDAT,
KPRGBZ type RV45A-KPRGBZ,
PRSDT type VBKD-PRSDT,
ZTERM type VBKD-ZTERM,
MABNR type RV45A-MABNR,
KWMENG type RV45A-KWMENG,
POSNR type VBAP-POSNR,
end of t_records.
data: it_records type table of t_records,
wa_records type t_records.
DATA : BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
PARAMETERS : P_FILE LIKE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM GET_FILE.
start-of-selection.
PERFORM GET_DATA.
PERFORM BDCDATA.
*& Form GET_FILE
text
form GET_FILE .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE.
endform. " GET_FILE
form GET_DATA.
DATA:V_FILE TYPE STRING.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = V_FILE
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = it_records
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " GET_DATA.
form BDCDATA.
loop at it_records into wa_records.
*CALL TRANSCATION "VA01" USING BDCDATA.
perform bdc_dynpro using 'SAPMV45A' '0101'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-SPART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBAK-AUART'
'OR'.
perform bdc_field using 'VBAK-VKORG'
perform bdc_field using 'VBAK-VTWEG'
perform bdc_field using 'VBAK-SPART'
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'07/12'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'VBKD-BSTKD'.
perform bdc_field using 'VBKD-BSTKD'
'123'.
perform bdc_field using 'VBKD-BSTDK'
'08.10.2008'.
perform bdc_field using 'KUAGV-KUNNR'
'31970063'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'04/21'.
perform bdc_field using 'BDC_OKCODE'
'PICK'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'RV45A-KETDAT'
'08.10.2008'.
perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'08.10.2008'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'VBKD-ZTERM'
'0001'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'06/11'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBKD-BSTKD'
'123'.
perform bdc_field using 'VBKD-BSTDK'
'08.10.2008'.
perform bdc_field using 'KUAGV-KUNNR'
'31970063'.
perform bdc_field using 'KUWEV-KUNNR'
'31970063'.
perform bdc_field using 'RV45A-KETDAT'
'08.10.2008'.
perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'08.10.2008'.
perform bdc_field using 'VBKD-ZTERM'
'0001'.
perform bdc_field using 'BDC_CURSOR'
'RV45A-KWMENG(01)'.
perform bdc_field using 'RV45A-MABNR(01)'
'102'.
perform bdc_field using 'RV45A-KWMENG(01)'
' 5'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'05/08'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'RV45A-MABNR(01)'
'83'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'16/04'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'RV45A-MABNR(01)'
'121'.
perform bdc_field using 'VBAP-POSNR(01)'
' 1'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'/EBAC1'.
perform bdc_field using 'BDC_CURSOR'
'RV45A-MABNR(01)'.
perform bdc_transaction using 'VA01' .
CALL TRANSCATION 'VA01' USING BDCDATA.
ENDLOOP.
endform. "BDCDATA
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
*& Form BDC_TRANSACTION
text
-->P_0428 text
form BDC_TRANSACTION using value(p_0428).
endform. " BDC_TRANSACTION -
Back to selection screen after error
Hello ABAPers,
I have a executable program (REPORT) to do some processing (e.g. read a standard table with the parameters and select-options and save the data in a Z table).
When occurs an error (e.g. when sy-subrc <> 0 after select) and a message of type E is showed, the program show the message in a "clean" screen with title SAP. Then, after ENTER or ESC, it leaves to initial screen of SAP (SAP Easy Access).
The message of type E is triggered from a routine (FORM) called from START-OF-SELECTION event. And the program don´t write nothing in list (only return a status message if everithing is ok).
How can I force the program to back to selection screen after some error?
Thanks in advance.
Best regards,
Charles Oliveirahi,
Do the following for your requirement.
in the message give the following
start-of-selection.
Perform <routine>.
Form <routine>.
if <condition>.
message 'xxxx' type 'S' display like 'E'.
exit.
endif.
endform.
This way the control returns to selection screen even after the message is triggered.
Thanks
Sharath -
Calling another report by passing selection screen parameter
Hi,
I have created a report "ZREPA" with selection screen parameter say, "creator".
Nw, i hv to call that report "ZREPA" from another report say "ZREPB" by passing an value to the selection screen field "creator".
Can anyone tell me how to resolve this??
Thanks,
Aaru.Hi,
You can call one selection screen from other selection screen program using SUBMIT command.
The syntax is as follows -
codeSUBMIT... VIA SELECTION-SCREEN
USING SELECTION-SET <var>
WITH <sel> <criterion>
WITH FREE SELECTIONS <freesel>
WITH SELECTION-TABLE <rspar>.[/code]
e.g.
The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
codeREPORT demo_program_submit_rep1.
DATA number TYPE i.
PARAMETERS paramet(14) TYPE c.
SELECT-OPTIONS selecto FOR number.[/code]
The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
DATA: int TYPE i,
rspar TYPE TABLE OF rsparams,
wa_rspar LIKE LINE OF rspar.
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 demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.
WHEN 5.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
wa_rspar-low = 14. wa_rspar-high = 17.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
wa_rspar-low = 'Selection 2'.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
wa_rspar-low = 10.
APPEND wa_rspar TO rspar.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar
AND RETURN.
ENDCASE.
=> To leave a called program, you can use SUBMIT .... AND RETURN. by choosing F3 or F15 from list level 0 of the called report.
Regards,
Omkaram. -
Report - parameter name in selection screen
Hi,
I am working with a report and in that I am using a parameter for my selection screen.
Parameter : lifnr like lfa1-lifnr.
My question is: when i execute the program i see in the selection sreen 'Lifnr'. How to get a text say 'Vendor no.' instead of LIFNR in selection screen.
ThanksHi,
Go to the TEXT ELEMENTS of the program from the SE38 screen. Click on the SELECTION TEXTS tab, and you can give whatever desription you want for the selection screens here.
If you want the description from the data dictionary just check the check box on the right hand side.
Regards,
Ravi
Note : Please mark the helpful answers -
Dynamic text in selection screen
Hi all,
I have one requirement in selection screen. I have a parameter and one pushbutton in selection screen .
To the right side of the parameter, i need to display the text based on some manipulation in a internal in the program.
If I click on the pushbutton in selection screen , manipulations will be done in the program in a internal table. if the result is ok i need to display the text in the right side of the parameter otherwise no need to display.
How can I achieve this.
Urgent
Thanks
SaravanaHi
Write the code in the
AT selection-screen ON PARAMETER of the Button.
So when pressed on button, that code will do some process and the result will be displayed.
check it, whether it displays the text or not on selection screen.
see the doc
AT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION.
Reward points if useful
Regards
Anji
Message was edited by:
Anji Reddy Vangala -
Validating a selection screen on input parameters
hi,
on my selection screen ,a parameter called no. of boxes and 3 select options are given.
i want to validate the 3 select options according to the entry done in no. of box .
ex. if 2 is entered in no. of boxes then only the 2 select options would be available to user for entering rest 1 would be isolated
Thanks in advance !!!
amitHi,
Check this,
PARAMETERS: p_1 type i.
SELECT-OPTIONS:num1 for mara-matnr.
SELECT-OPTIONS:num2 for mara-matnr.
SELECT-OPTIONS:num3 for mara-matnr.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if p_1 = '1'.
IF screen-name cs 'NUM2'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-name cs 'NUM3'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
elseif p_1 = '2'.
IF screen-name cs 'NUM3'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
endif.
endloop.
Regards,
Vik -
Selection screen : matchcode on RYEAR and also question on FILE_SAVE_DIALOG
Hiii
Question 1 -->
i have on the selection screen a parameter of type RYEAR i check in database and theere is no matchcode attach to it.
can you please advise whether there is a standard matchcode i can used or am i missing something?
Question 2 -->
And also on my selection screen i have 2 parameter
P_path type string
P_name type string
on the P_path we need to put the directory name and also implement a F4 where user can browse the directory. On the p_name we will put the file name
have done somwthing like that. sorry i don't remember the exact name?
at selection screen on value request p_path
call method cl_xxxxx-file_save_dialogue
the problem is that the FILE_SAVE_DIALOGUE i must enter the a file name on the pop-up before clicking on save,
I don't want an F4 of P_PATH i want to only the browse directory path not save. can you please advise if there are another method for that?Check this code;
PARAMETER: p_path TYPE char50,
p_name TYPE char50.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
DATA: lv_path TYPE string.
lv_path = p_path.
CALL METHOD cl_gui_frontend_services=>directory_browse
EXPORTING
* window_title = 'Jay'
initial_folder = lv_path
CHANGING
selected_folder = lv_path
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
p_path = lv_path. -
Need help on selection screen optation
1)PARAMETER: P_DETAIL RADIOBUTTON GROUP G1 DEFAULT 'X'.
2)PARAMETER: P_SUMM RADIOBUTTON GROUP G1
3)SELECT-OPTIONS: S_PGI FOR ZAPDDLIV-ZDATE
i have 2 parameters depending on parameter i need to accept selection screen for parameter 1 accept data in dd.mm.yyyy. and for parameter need to accept only mm.yyyy
only
need help on this selection criteria..Hi Anil,
It is very much possible. Use Modif ID concept. First dont display any date, depending on radio button selected display date in which ever form u need.
See the sample coding for Modif id.
PARAMETERS: test1(10) TYPE c MODIF ID sc1,
test2(10) TYPE c MODIF ID sc2,
test3(10) TYPE c MODIF ID sc1,
test4(10) TYPE c MODIF ID sc2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-intensified = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF screen-group1 = 'SC2'.
screen-intensified = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Dont forget to reward points if found useful.
Thanks,
Satyesh
Maybe you are looking for
-
Excise invoice created using J1IS and movement type 122
Hello Can you please suggest whether we need to run J2IUN for the following process in order to show the debit entries in extracted RG23A PART2 register. 1. Returning the material with refernce to the original Goods receipt document (101) using MIGO
-
How do i control my object effects when i use a button?
I want to use a button so when I click on it a square rises up from the bottom of my slide. What I'm finding is by the time I click the button to make the square visible its effect has already loaded with the slide so you don't get to see the square
-
Cross-Company Sales and Billing doesn't call BUV transaction settings
Hello Dear Experts. Please help me with the following issue: 1) The Company consists of Headquater and branches (one legal entity) - several Company codes are set in the system for each unit. 2) The Contract for deliverying goods/implementation servi
-
Error in executing stored procedure using DAAB
Hi i am calling a stored proc which returns me a record set as follows Database db = DatabaseFactory.CreateDatabase(); try DataSet ds; ds = db.ExecuteDataSet("GetDropDownCodes",null); return ds; My stored proc is as follows: create or replace procedu
-
Creating an RF Amplifier in Multisim
Hello, I am trying to design an RF transformer in multisim. It is named TK1235 or also 42IF123 in the attached pdf. I tried using the user manual (page 298 of 374483a.pdf) but i am not sure how do i go about defining the values that are speci