WD4A selection screen error
Hi,
In my WD4A application, I'm using select-options and have a particular selection specified as obligatory. When the field is not entered, I get the appropriate message 'Enter selection in field...'., but I can't seem to identify that an error message has been generated so that I can stop further processing.
I've tried method IS_EMPTY of the message manager and also method CHECK_ALL_SELECTION_FIELDS of the select options interface, but neither seem to tell me what I want.
I think I'm probably missing something very simple but so far haven't been able to find out what that is!
Thanks for any help.
No worries...
I had the CHECK_ALL_SELECTION_FIELDS method in the wrong place.
Similar Messages
-
Hi
This is the program code.
Report zpm_data_cleansing_jobs.
Initialization.
but1 = text-001.
start-of-selection.
selection-screen skip 2.
selection-screen begin of line.
select-options period for sy-datum.
selection-screen pushbutton 50(16) but1 user-command create.
selection-screen end of line.
end-of-selection.
This is the error that I'm getting when I activate the program.
It says it is syntactically correct.
Error when generating the selection screen "1000" of report
"ZPM_DATA_CLEANSING_JOBS ".
Points will be given.
Thanking you
Regards
Bhanu.Hello,
Change ur statements order from
select-options period for sy-datum.
selection-screen pushbutton 50(16) but1 user-command create.
to
selection-screen pushbutton 50(16) but1 user-command create.
select-options period for sy-datum.
Check this :-
Tables: usr02.
Data: but1 type char100.
Initialization.
but1 = text-001.
*start-of-selection.
selection-screen skip 2.
selection-screen begin of line.
selection-screen pushbutton 50(5) but2 user-command create.
select-options period for usr02-TRDAT.
selection-screen end of line.
end-of-selection.
Regards,
Deepu.K -
Selection screen error message
Dear friends:
I have a report.In the selection screen,In the sales group field , I should enter only C01 , If i give C02 or other input, the system should show a error message. Please help me with sample & simple code, because i am a functional consultant.
Thanks&Regards
MSReddyhi,
u have to write all your validations at AT SELECTION-SCREEN event.
u can valdate a single field or no.of. fileds based on your requirement.
parameters: p_group like [salesgroup name].
AT selection-screen. [ for no of fields]
if p_group NE 'C01'.
message E000 with 'NTER ONLY C01 materials'.
endif.
for single field in selection screen then
AT selection-screen on fldname. [ for single field]
if p_group NE 'C01'.
message E000 with 'NTER ONLY C01 materials'.
endif.
if helpful reward soem points.
with regards,
suersh. -
Selection screen error message question
On a selection screen, I have a selection-options for kunnr. If the user enters other than 100001 or 100002 or 100003 for this field, I want to display a error message. How do you do that? Can you please provide a sample code for this?
Thanks a lot.hi,
Try this code
tables : kna1.
data: begin of it_kna1 occurs 0,
kunnr like kna1-kunnr,
end of it_kna1,
v_fnd.
select-options : s_kunnr for kna1-kunnr.
at selection-screen on s_kunnr.
select kunnr from kna1
into table it_kna1
where kunnr in s_kunnr.
if sy-subrc = 0.
read table it_kna1 with key kunnr = '0000100001'
binary search.
if sy-subrc <> 0.
read table it_kna1 with key kunnr = '0000100002'
binary search.
if sy-subrc <> 0.
read table it_kna1 with key kunnr = '0000100003'
binary search.
if sy-subrc = 0.
v_fnd = 'X'.
endif.
else.
v_fnd = 'X'.
endif.
else.
v_fnd = 'X'.
endif.
endif.
if v_fnd = ' '.
message e000(zz) with 'Invalid customer'.
endif.
regards,
Sailaja.
Message was edited by: Sailaja N.L. -
I think i found an error in the selection screen for transaction QA32/QA33. I want to check the inspection lots that have no UD, but already have some stock postings. I use qa32 or qa33. I added two field using dynamic selection:
- unrestricted use stock > 0
- valuation code = empty
I've two inspection lot that meet the requirements 10000000613 start date (12-07-2010) and 10000000779 (start date 15-09-2010). If I leave the inspection date fields empty i only get the first inspection lot (1..613). If I fill in start date 01-01-2010 and end date 16-09-2010 I still get only the first lot. If I fill in start date 01-04-2010 and end date 16-09-2010 I see both lots.
Isn't this a bit strange?
Regards,
MaartenIncrease the maximum number of hits, (or remove it entirely), in your first search when you search with no inspection start date.
The work list has a weird quirk about it. The maximum number of hits doesn't seem to necessarily relate to the number of records it displays on the screen but the number of records it initially considers. I'm not sure exactly what it uses to grab the initial set of records but it is as if it grabs a maximum number based on creation date range first, and than applies other criteria. So if your creation date range actually has 5000 records in it, and your maximum number of records is only 3000, it only applies the other selection criteria to the first 3000 records of the 5000. So any matching records in that extra 2000 will be ignored and not displayed.
If you set max number to 10,000, then all 5000 records are considered and the records in that extra 2000 records are found and displayed.
FF -
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 -
Selection screen error meassage
Hi ,
I have 1 seletion screen for a query .
in that scletion screen i have 1 veariable shoung the period from 00 to 18.
but i want user must select only 1 to 18 not 0.
so when he selects 0 it should give a error message .
JimmyHi Jimmy,
You can do this using user exit.
Here is the sample code:
data : loc_var_range like rrrangeexit.
If I_step = 3.
Loop at I_T_RANGE INTO LOC_VAR_RANGE WHREE VNAM = 'FISCPER' .
IF LOC_VAR_RANGE-LOW LE 1 OR
LOC_VAR_RANGE-HIGH GT 18.
CALL FUNCTION 'RRMS_MESSGE_HANDLING'
eXPORTING
I_CLASS =
I_TYPE =
I_NUMBER =
I_MSGV1 = 'ENTER vALUE BETWEEN BE IN 1 TO 18 ONLY'.
ENDIF.
ENDLOOP.
ENDIF.
If user enters other than 1 to 18 message will be raised.
Give your mail id.. i will send you nice how to... doc.
Hope it Helps
Srini -
Oss note 870991 Error while changing selection screen error.
When i try to implement oss note I need to change the selection text of program J_1I_QER_EFILE.
A selection text IND . But when i try to delete or rename it it shows me an error ' Delimitation text IND is an original text and cannot be deleted or renamed'
Please advice.Thanx in advance..Try translating the texts before renaming/deleting.
Regards
Karthik D -
Mix of Parameters & Select Options in a Selection screen in WD4A
Hi All.
I just created my first selection screen in WD4A couple of days back.
Now, we have to mix up some parameters and select-options just like in normal ABAP.
But I could only find a way to insert a "Range" into the WD4A screens via "Create_Range_table".
Supposing I have 2 select-options, then 2 parameters - i.e. no Pattern or range or intervals options (simple = option); then again 2 select-options.
Can't we make a simple Parameter option in WD4A selection screen? I know we can make no_extension and no_intervals as true so that it does look like a parameter. But still user can enter a pattern search in it like a select-option.
Hope my query is clear.
Another question is : As far as I understood, we ALWAYS need a IT_RESULT table in the method ADD_SELECTION_FIELD. Then why is it not mandatory in the method?
Thanks in adv.Hi Aishi,
In an early version of SelectOptions, the parameter it_result was mandatory. Some time later, a developer contacted me and showed me an example where it was benefitial to first create the field and to pass in the range table at a later point in his algorithm. This can be done by calling set_range_table_of_sel_field( ). Hence, the parameter has become optional. Of course, a range table needs to be specified before the page gets rendered.
Best regards,
Thomas -
Hi Experts,
I am getting a selection screen error while activating my program in se38. When i am doing syntax check there is no error(s) at all.
It says " Error when generating the selection screen "1000" of report "<prg name>
- line 0'.
can some one please suggest what might had happened?
Thanks
DanHi Alvaro,
Its here :
Selection Screen Definitions *
SELECTION-SCREEN:BEGIN OF BLOCK h1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_kunnr FOR kna1-kunnr DEFAULT '100000'.
"Customer number
PARAMETERS: p_apfile TYPE rlgrap-filename NO-DISPLAY.
SELECTION-SCREEN: BEGIN OF BLOCK files WITH FRAME TITLE text-t02.
SELECTION-SCREEN: SKIP 1,
BEGIN OF LINE.
PARAMETERS: r_local RADIOBUTTON GROUP fil ."workstation
SELECTION-SCREEN: COMMENT 4(10) text-p03,
POSITION 15.
PARAMETERS: P_LOCFIL TYPE rlgrap-filename. "local file
*SELECTION-SCREEN: skip 1.
PARAMETERS: r_appsrv RADIOBUTTON GROUP fil DEFAULT 'X'."app-server
SELECTION-SCREEN: COMMENT 4(15) text-p04.
SELECTION-SCREEN: COMMENT 4(17) Z_P1,
POSITION 23.
PARAMETERS: P_XLOG TYPE FC_LOGFILE DEFAULT 'ZMWVLOGICALFILE'.
SELECTION-SCREEN END OF LINE.
" Contains the required Selection Screen parameters.
*INCLUDE zfileselectblock.
SELECTION-SCREEN: BEGIN OF BLOCK XFILE WITH FRAME TITLE z_T1.
*SELECTION-SCREEN: BEGIN OF LINE.
**PARAMETERS: R_XLOG RADIOBUTTON GROUP XRD DEFAULT 'X'.
**SELECTION-SCREEN: COMMENT 4(17) Z_P1,
POSITION 23.
**PARAMETERS: P_XLOG TYPE FC_LOGFILE DEFAULT 'ZMWVLOGICALFILE'.
*SELECTION-SCREEN: END OF LINE.
*SELECTION-SCREEN: BEGIN OF LINE.
*PARAMETERS: R_XCNV RADIOBUTTON GROUP XRD.
*SELECTION-SCREEN: COMMENT 4(17) Z_P2,
POSITION 23.
*PARAMETERS: P_XCNV(20) TYPE C.
*SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: SKIP 1,
BEGIN OF LINE,
COMMENT 1(13) Z_P3,
POSITION 15.
PARAMETERS: P_XPATH TYPE RLGRAP-FILENAME.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE,
COMMENT 1(13) Z_P4,
POSITION 15.
PARAMETERS: P_XFILE TYPE RLGRAP-FILENAME.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: END OF BLOCK XFILE.
*end of include ZFILESELECTBLOCK.
SELECTION-SCREEN: END OF BLOCK files.
SELECTION-SCREEN: END OF BLOCK h1. -
Path for Directory in Selection Screen
I have one field in selection screen Error log.
I have to pick path for dirctory in that parameter, so that I can save my error log there on that path.
how i can do it ?
F4 for the path is needed. how i will define that parameter in selection screen?Hi
Check the below logic:
DATA :G_DIR1 TYPE STRING.
DATA : G_T_FILENAMES TYPE SETST_TYPE_STANDARD_TABLE,
G_WA_FILES LIKE LINE OF G_T_FILENAMES.
PARAMETERS: P_FOLDER TYPE RLGRAP-FILENAME OBLIGATORY
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FOLDER.
PERFORM F1000_GET_DIR.
START-OF-SELECTION.
IF G_DIR IS INITIAL.
G_DIR = P_FOLDER.
ENDIF.
PERFORM F1100_GET_FILENAMES USING G_DIR.
FORM F1000_GET_DIR .
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
EXPORTING
WINDOW_TITLE = 'Folder for ADP Files'
INITIAL_FOLDER = G_DIR1
CHANGING
SELECTED_FOLDER = G_DIR1
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
P_FOLDER = G_DIR1.
ENDIF.
ENDFORM.
FORM F1100_GET_FILENAMES USING P_DIR.
DATA : L_DIR TYPE STRING,
L_COUNT TYPE I,
L_COUNT1 TYPE I.
DATA : L_T_FILES TYPE SETST_TYPE_STANDARD_TABLE,
WA_FILES LIKE LINE OF L_T_FILES.
L_DIR = P_DIR.
CLEAR : G_T_FILENAMES[], G_T_FILENAMES.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
EXPORTING
DIRECTORY = L_DIR
FILTER = '.'
FILES_ONLY =
DIRECTORIES_ONLY =
CHANGING
FILE_TABLE = L_T_FILES
COUNT = L_COUNT
EXCEPTIONS
CNTL_ERROR = 1
DIRECTORY_LIST_FILES_FAILED = 2
WRONG_PARAMETER = 3
ERROR_NO_GUI = 4
NOT_SUPPORTED_BY_GUI = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
G_T_FILENAMES[] = L_T_FILES[].
LOOP AT G_T_FILENAMES INTO G_WA_FILES.
IF G_WA_FILES CS SY-DATUM.
G_WA_FILES1 = G_WA_FILES.
APPEND G_WA_FILES1 TO G_T_FILENAMES1.
ENDIF.
ENDLOOP.
Regards,
Ravinder -
ALV Filter Selection w/ error "WBS element 0000000000000000 does not exist"
Hello,
In a few ALV reports, we have WBS Element column showed in ALV list and WBS Element defined as type BSEG-PROJK, which has conversion routine ABPSP.
When WBS Element is used for ALV list Filter, in Selection screen, error message "WBS element 0000000000000000 does not exist" is pop up as we hit Enter key or click on u201CSelection optionsu201D button with no value entered in Input fields.
We get same error even after we enter an existing WBS Element in Low selection input field and hit Enter key.
Itu2019s ok if we enter existing WBS Element value in both Low and High selection input fields.
We know we have workaround by entering both Low and High input field, and we can fix ALV reports by using character based WBS Element, such as PRPS-POSKI.
BUT, as users told me, they donu2019t have this problem before and it just happened. We checked the recent Transports and couldnu2019t see anything relevant.
Could any of you let me know if you have any clue or if thereu2019s any other way to fix it besides changing report by report.
Thank you.
SLHello,
In a few ALV reports, we have WBS Element column showed in ALV list and WBS Element defined as type BSEG-PROJK, which has conversion routine ABPSP.
When WBS Element is used for ALV list Filter, in Selection screen, error message "WBS element 0000000000000000 does not exist" is pop up as we hit Enter key or click on u201CSelection optionsu201D button with no value entered in Input fields.
We get same error even after we enter an existing WBS Element in Low selection input field and hit Enter key.
Itu2019s ok if we enter existing WBS Element value in both Low and High selection input fields.
We know we have workaround by entering both Low and High input field, and we can fix ALV reports by using character based WBS Element, such as PRPS-POSKI.
BUT, as users told me, they donu2019t have this problem before and it just happened. We checked the recent Transports and couldnu2019t see anything relevant.
Could any of you let me know if you have any clue or if thereu2019s any other way to fix it besides changing report by report.
Thank you.
SL -
Custom error messages in selection-screen
Hello All,
I have one query. I have developed a vendor aging report. In the SELECT-OPTIONS, there are 5 fields namely company code, business area, vendor group, vendor code and cash management group. What the user wants is if he enters any invalid value in any of the 5 fields, custom error message should be displayed like 'invalid company code' etc. I think we have to write these messages in 'at-selection-screen' event. Can u help me out with a sample code snippet w.r.t the above program? I have written the code as:
AT SELECTION-SCREEN.
IF S_BUKRS ne BSIK-BUKRS.
MESSAGE e000. 'invalid company code' TYPE 'E'.
ENDIF.
But not giving the correct output.i.e. even if I enter a valid company code, the error message is displayed. Can u help me in solving this problem?
Thanks and Regards,
Satvik
Edited by: Satvikpanchal on Jul 22, 2011 9:42 AMHi,
use AT SELECTION-SCREEN on S_BUKRS-low.
Use select query for checking the Company code in T001 table check the
Company code already exist or not? If it is not there show the message.
Code like
AT SELECTION-SCREEN on S_BUKRS-low.
select single bukrs into lv_bukrs
from T001 where bukrs = s_bukrs-low.
if sy-subrc NE 0.
MESSAGE e000. 'invalid company code' TYPE 'E'.
ENDIF.
i think you company code is select option so you have to check S_BUKRS-high also.
using the event AT SELECTION-SCREEN on S_BUKRS-high.
Regards,
DHina.. -
Error Message in selection screen Status bar is getting truncated
Hi Guys,
Error Message in selection screen Staus bar is getting truncated (full message is not getting displayed).... can anybody tell me how to reslove thisHi
Maimum we can give the error message length is 50 char. If you give more than that it will get truncated.
What you can do this split 50 and 50 like that you can give 200 chnars.
Data : Text1 type char50
Text2 type char50
If sy-surc ne 0.
Message Text1 Text2 TYPE "E'' or 'S'
endif. -
Error in calling a selection-screen...
Hello experts,
Please look at my code below:
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_upld RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme.
PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:'.
SELECTION-SCREEN END OF LINE.
PARAMETERS: pr_list1 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list1.
SELECTION-SCREEN END OF SCREEN 500.
SELECTION-SCREEN BEGIN OF SCREEN 1500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode.
PARAMETERS: p_dcode LIKE vbak-kunnr,
p_name1 LIKE kna1-name1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_add RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_edit RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(20) text-a12 FOR FIELD p_code.
PARAMETERS: p_code LIKE zts0001-cdseq.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 1500.
IF v_compflag EQ space.
CALL SELECTION-SCREEN 500.
ELSE.
CALL SELECTION-SCREEN 1500.
ENDIF.
Now, what I want to do is that the program will call a selection-screen based on a given variable(v_compflag). But its generating an error saying that 'error generating the selection-screen'. Why is this so?
Again, thank you guys and take care!Corrected code.
REPORT ztest_errror .
data: v_compflag.
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_upld RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme.
PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list1 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 500.
*************SELECTION-SCREEN BEGIN OF SCREEN 1500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode.
PARAMETERS: p_dcode LIKE vbak-kunnr,
p_name1 LIKE kna1-name1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_add RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_edit RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit.
SELECTION-SCREEN END OF LINE.
*************SELECTION-SCREEN END OF SCREEN 1500.
IF v_compflag EQ space.
CALL SELECTION-SCREEN 500.
ELSE.
CALL SELECTION-SCREEN 1500.
ENDIF.
Regards
vijay
Maybe you are looking for
-
Hi All, I'm back already! Learning Flash is beginning to get to me again so I returned for yet more help! I've written the following AS code to get tomorrow's date . . // Calculates today's date and tomorrow's date var dToday:Date = new Date(); dToda
-
How to assign two complex type data in message payload
Hi , In my xsd file two complex type data is there , but when i am trying to add these in message type request and response payload , i can add only one payload, is it any way to add 2 complex types in message types request and response payloads. Reg
-
Sequence Number By Date Option For File Naming
I would like to see Lightroom have the option to have the sequence numbers be reset when the date changes and increment accordingly. For example, I have the file naming set to use Date (YYYYMMDD) Sequence Number (0001) and the sequence number startin
-
Included with Adobe Premiere Elements is the SmartSound Quicktracks plug-in
How do I get the plug in for Smartsound Quictracks? It says I can get Quicktrack Soundtracks from the Music Panel, but I can't find it. So do I need to download the plug in? If so, how do I do it?
-
Issue:Extending Matmas01 idoc segment
Hi all, I have a requirement to extend Matmas01.For this am clicking on create radio button option. When i extend it as zmatmas01 and while trying to save it, am getting a message- "The basic type or extension does not contain any segments and cannot