Restrict the no. of rows entered in select-options
Dear ABAPers,
I have used CALL FUNCTION 'SELECT_OPTIONS_RESTRICT' to only allow user key in single value. The field is BUKRS(Company Code). Can I restrict the number of company code entered by user in this select-option? Please advise.
Thanks in advance.
Best Regards,
Hikaruno
Sure, just do a check in the AT SELECTION-SCREEN event.
at selection-screen.
data: lines type i.
describe table s_bukrs lines lines.
if lines > 10.
message e001(00) with 'More than 10 entries'.
endif.
Regards,
RIch Heilman
Similar Messages
-
Restrict the user should not allow to select No Excise entry tab in MIGO
Hi
how to restrict the user should not allow to select No Excise entry tab in MIGO
if the material Excisable user can bale to select the No Excise entry tab in MIGO . my requirement .... if the Pop come Please enter Excise Invoice number and Excise Invoice Date user should not change the No Excise how to restrict pls advise me
@sakhiThese are the options provided by SAP keeping in mind Indian Scenario. Sometimes, vendor forget to send excise invoice copy with the material, in such case, you can select 'Only Part I'.
Even if you have maintain vendor excise details & material excise details (By mistake) in J1ID, system will throw an error message, excise invoice value is zero. In such case, we can select option 'No excise entry'.
Your requirement can't be fulfilled in standard way. Even if you go for any Z- developement, you will lose the option. -
Can we restrict the data to be entered in payroll area
Can we restrict the data to be entered in payroll area?
Hi,
In my lilmited knowledge I think we can only default the payroll area using ABKRS feature.
We probably have to use a user exit of BADI to restrict it.
cheers
Ajay -
How to restricting the no. of rows to be inserted
How can you restrict the insertion of data in a table up to 1000 no. of rows and throw an error if something row is trying to get inserted. Is it through a trigger, if so how can you do that?
Regards,
Rajesh GurramBut, with some compromise in the table structure you can do it in this way -
SQL> set lin 10
SQL>
SQL> desc tab_res;
Name Null? Type
EMPNO NUMBER(4)
ENAME VARCHAR2(30)
JOB VARCHAR2(9)
SQL>
SQL>
SQL>
SQL>
SQL>
SQL> set lin 100
SQL>
SQL> alter table tab_res add(seqno number(1),
2 constraints ck_tab_res check(seqno<5));
Table altered.
SQL>
SQL>
SQL> desc tab_res;
Name Null? Type
EMPNO NUMBER(4)
ENAME VARCHAR2(30)
JOB VARCHAR2(9)
SEQNO NUMBER(1)
SQL>
SQL>
SQL> create sequence tab_res_s
2 start with 1
3 increment by 1;
Sequence created.
SQL>
SQL> insert into tab_res
2 with t
3 as
4 (
5 select 8530 empno,'Billy' ename,'SW' job from dual
6 union all
7 select 8531,'Cd','SW' from dual
8 union all
9 select 8532,'Blueshadow','SW' from dual
10 union all
11 select 8533,'Justin','SW' from dual
12 )
13 select empno,ename,job,tab_res_s.nextval seqno from t;
4 rows created.
SQL> commit;
Commit complete.
SQL>
SQL>
SQL> select * from tab_res;
EMPNO ENAME JOB SEQNO
8530 Billy SW 1
8531 Cd SW 2
8532 Blueshadow SW 3
8533 Justin SW 4
SQL>
SQL> insert into tab_res values(8534,'Williams','SW',tab_res_s.nextval);
insert into tab_res values(8534,'Williams','SW',tab_res_s.nextval)
ERROR at line 1:
ORA-02290: check constraint (SCOTT.CK_TAB_RES) violatedN.B.: Personally i don't think this is feasible for some specific circumstances. I mean may be the project environment restrict you to change the table structure for a specific reason.
Regards.
Satyaki De. -
How to change the valueswhich are entered in select-options
Hi ,
Iam passing Material Numner Vlaues through select-options.
My requirement is i need to prefix and postfix star to the Material.
For that i have written logic like below.
LOOP AT S_MATNR.
S_MATNR-SIGN = 'I'.
S_MATNR-OPTION = 'EQ'.
CONCATINATE '' S_MATNR-LOW '' INTO S_OBJKY-LOW.
APPEND S_OBJKY.
ENDLOOP.
What my problem is if user enters high low and high values how we can write the logic.>
vinay raj wrote:
> What my problem is if user enters high low and high values how we can write the logic.
Hello Vinay,
I suppose you want to prefix & postfix a '*' to allow for selecting data using patterns.
Unfortunately you cannot use CP (read: patterns) if the HIGH value is not initial. read SAP documentation on SELECT-OPTIONS.
BR,
Suhas -
How to restrict the functions in People Enter and Maintain - Others LOV
I want to restrict the functions appearing when i click on People Enter and Maintain -> Others screen.
Can this be done through form personalization ?
If not how can this be achived.
I want to restrict the list in Assignmnet -> Others list also.
Thanks in advance
-DebojyotyChange the underlying taskflow.
In the form function parameters, you can find the taskflow name for the WORKFLOW parameter.
Make a copy of the seeded taskflow and add/remove nodes as you wich.
4 nodes in a taskflow can be checked to appear as a button, if you have more nodes linked to the form, they will appear under the other button.
This is configuration, no customization or personalization! -
Can i restrict the number of rows in Connect by clause
Hi,
I have atable with data with two columns as
MAIN SUB
9 10
9 11
11 13
12 13
The query which i am using
SELECT Main,Sub
FROM My_Tab
START WITH Main = 9
CONNECT BY PRIOR Sub= Main
gives
9 10 also in the result
My question is can i restirct the output by specifying the the child eg in case 13
so that i dont get a row in the output with 9 10 in it.
ThanksNikhil Juneja wrote:
My question is can i restirct the output by specifying the the child eg in case 13
so that i dont get a row in the output with 9 10 in it.
Can you explain this please...
Do you mean..
if you give like child is 13 in your query, then it should give only nodes which has 13 as their childs??
with tab as
select 9 MAIN,10 SUB from dual union all
select 9 MAIN,11 SUB from dual union all
select 11 MAIN,13 SUB from dual union all
select 12 MAIN,13 SUB from dual
SELECT Main,Sub
FROM tab
START WITH sub=13
CONNECT BY Sub=PRIOR Main is this??
Ravi Kumar -
How to restrict the no of rows to be displayes in ALV in webdynpro
Hi All,
Can any one suggest how to restrict the no of records to be displayed in the portal in the ALV through webdynpro ABAP.
Thanks & Regards,
Sreelatha Gullapalli.HI,
If you want to change the Source (Design time) then you can do that via the alv configuration.
Something like this in the component SALV_WD_COLUMNS_UI
lr_available_model->if_salv_wd_table_settings~set_visible_row_count( lc_row_count ). -
How to restrict more than one 1 range in select option on selection screen.
Hi all,
I have a requirement where I need to restrict user from giving more than 1 range for a date selct option ..other all features of multiple selection will be as usual...
for eg we can do this if we disable / hide other cells if the user clicks on multiple ranges tab.. If only 1 cell is available to give the range user will not be able to give more than 1 range....
I was thinking if I could use select_options_restrict but how do i fill its parameters...
Can anyone send me the sample code or the same to achieve this functionality...I have used select_options_restrict to hide multiple ranges itself ... But here user will be able to give range but only 1....
Thanks and Regards
SwetaHI,
Please try the below logic.
SELECT-OPTIONS: so_addr FOR ADR6-SMTP_ADDR NO INTERVALS.
***********remove_range_for_select_option******************* .
DATA: ls_restrict TYPE SSCR_RESTRICT, "The type for SELECT_OPTIONS_RESTRICT
ls_opt_list TYPE SSCR_OPT_LIST, "One list of options
ls_asn TYPE SSCR_***. "One line of table associating selection screen
"object with opt. list
CLEAR: ls_restrict,
ls_opt_list,
ls_asn.
*Only EQ valid, discrete values, Include & Exclude
ls_opt_list-name = 'EQ'.
ls_opt_list-options-eq = 'X'.
APPEND ls_opt_list TO ls_RESTRICT-OPT_LIST_TAB.
LS_ASN-KIND = 'S'.
LS_ASN-NAME = 'SO_ADDR'. "Select Option
LS_ASN-SG_MAIN = 'I'.
LS_ASN-SG_ADDY = '*'.
LS_ASN-OP_MAIN = 'EQ'.
LS_ASN-OP_ADDY = ' '.
APPEND LS_ASN TO LS_RESTRICT-***_TAB.
*Make use of SELECT-OPTIONS easier on the selection screen
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = LS_RESTRICT
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edited by: Rajasekhar Reddy P on Mar 16, 2009 2:03 PM -
How to prevent the use of wild cards in select-option
Hello experts,
Is it possible to prevent the use of wild cards in a select-option? If yes, how is it done please?
I have a
SELECT-OPTIONS: o_comp FOR dbtab-field OBLIGATORY DEFAULT 'FI'.
and, I want to prevent the users for giving in some thing like FI* with the wildcard bc it would lead to dump.
I want an error message to display and prevent the users for making such entry.
Please I need your help and I would be very grateful.
Thanks
NadinYou have to use SELECT_OPTIONS_RESTRICT to restrict input allowed. Call this FM in INITIALIZATION or SELECTION-SCREEN OUPUT sections.
Sample :
TYPE-POOLS: sscr.
INITIALIZATION.
* Restrict SELECT-OPTIONS
PERFORM restrict_select.
FORM restrict_select.
DATA: restrict TYPE sscr_restrict,
opt_list TYPE sscr_opt_list,
*** TYPE sscr_***.
* Défine select-options modes (aka option list)
* - ALL standard - all options allowed
CLEAR opt_list.
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
* - EQU only equality allowed (list of values)
CLEAR opt_list.
MOVE 'EQU' TO opt_list-name.
MOVE 'X' TO opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
* Affect modes to parameters or block of parameters
* ALL by default
CLEAR ***.
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'ALL' TO ***-op_main.
APPEND *** TO restrict-***_tab.
* EQU to internal material number
CLEAR ***.
MOVE: 'S' TO ***-kind,
'S-MATNR' TO ***-name,
'I' TO ***-sg_main, " no exclusion
'EQU' TO ***-op_main. " only value list
APPEND *** TO restrict-***_tab.
* Call FM
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
OTHERS = 1.
ENDFORM. " restrict_select
In the sample, only select-options for matnr is restricted to single value list.
For your request build a mode with all options except "pattern" ones : CP and NP.
Regards -
Event should trigger when press enter on select option in web dynpro.
I want to trigger a event for validation when enter is pressed in select option in web dynpro.
as the select option is created by the coding and there is no method to trigger the event.
please advice.Pls post it ABAP Forum
Rgds
Sumanth.Gururaj
Consultant/Systems Analyst- SAP SD/MM -
Creating select option with the search help based on other select option
Hi,
I have displayed a selection screen with two select options S1 and S2.
My requirement is that the values in the search help of S2 should get filled based on the values selected in S1.
Note: User has option to select multiple values in S1.
Does anybody know how to implement this?
Thanks,
Feroz>
Sanjeeva wrote:
> Hi,
>
> With standard f4 you cannot acheive this. You need to write customise with OVS or Simple value selector by reading S1 selected values.
>
> Thanks,
> Sanjeev
I'm getting fairly tired of seeing this completely incorrect information on this forum. As stated before and already found out by this poster, you can map input and output values between multiple data dictionary search helps. You do NOT have to resort to using OVS for this option. -
How to avoid the truncation of field values in select-options
Hi all,
I have a requirement where i have used select-options to select multiple filenames. I have taken the filename of type rlgrap-filename(128 char) But the problem is in select-options if the values of the filename which is selected has length ( i.e the length of the selected field value) exceeds 45 character , then he remaining charactes are truncated. Hence i am not able to get the
correct field value in the internal table of the select-options.
i came to know that if NO_DISPLAY addition is used then this truncation wont occur. But in my case user has to select the files and hence this addition cannot be used.
please let me know if anyone has a solution for this or if there is any other way to select multiple entries in selection screen.
Regards
Manipal parkalarlgrap-filename is having the length of only 128 characters.If the file path exceeds 128 characters then the rest will get truncated.If you file name exceeds more than 128 characters and the pafth is fixed,then harcode the entire path in the program and later on concatenate the path and the file name into a string which can be used for further processing.
paramters:p_file like rlgrap-filename.
here just give the filename as say 1234.XLS.(Assuming that you are not browsing for the file using F4_filename).
In the program harcode the path say C:\Documents and setting\sapworkdir\user\.
Now concaternate these two and pass it to string which can be used for further processing.
If the user intneds to browse the file and the path name exceeds 128 characters then follow the way to delcare the paramter in the selection screen as said above.If it is working for parameters then I think it should be working for select option also. -
Function to append a 0 to the front of values in a Select-Options range?
Hi,
Is anyone aware of any function or class that will append a 0 (or any character) to the front of a range (or set of ranges) in an internal table of a Select-Options from a selection screen?
Hope that made sense.
Thanks,
AndyHi
Why not?
My code it's only a sample, but it can create a routine for a generic range table based on the fields of the internal table for the range have always the same names:
SIGN, OPTION, LOW and HIGH:
TABLES: BKPF.
SELECT-OPTIONS: SO_BELNR FOR BKPF-BELNR,
SO_GJAHR FOR BKPF-GJAHR,
SO_BUKRS FOR BKPF-BUKRS.
AT SELECTION-SCREEN.
PERFORM CONV_RANGE USING: SO_BELNR[],
SO_GJAHR[],
SO_BUKRS[].
*& Form CONV_RANGE
* text
* -->T_RANGE text
FORM CONV_RANGE USING T_RANGE TYPE TABLE.
FIELD-SYMBOLS: <W_RANGE> TYPE ANY,
<W_LOW> TYPE ANY,
<W_HIGH> TYPE ANY.
LOOP AT T_RANGE ASSIGNING <W_RANGE>.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <W_RANGE> TO <W_LOW>.
ASSIGN COMPONENT 'HIGH' OF STRUCTURE <W_RANGE> TO <W_HIGH>.
PERFORM CONVERSION_EXIT_ALPHA_INPUT USING: <W_LOW>,
<W_HIGH>.
ENDLOOP.
ENDFORM. "CONV_RANGE
*& Form CONVERSION_EXIT_ALPHA_INPUT
* text
* -->INPUT text
FORM CONVERSION_EXIT_ALPHA_INPUT USING P_INPUT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_INPUT
IMPORTING
OUTPUT = P_INPUT.
ENDFORM. "CONVERSION_EXIT_ALPHA_INPUT
Max -
Path of the application which is entered in Viewer option
Hi,
What is the path of the application that is entered in the viewer options. I basically want to see the applications that are available for the MIME types. Also is there a way by which we can add new applications.
Ex: Lets say I want to open the CP output directly in Notepad. Is there a way to achieve this. If notepad application is not there already is there a way to add the custom applications. Kindly let me know.
Kindly apologise if this is not the correct forum.
ThanksHi,
If you are referring to Oracle Apps concurrent request output viewer, check on the metalink note below:
Note 184375.1 - How to Setup The Report Output to Different Viewer Types in Oracle Applications 11i
Hope it helps.. E-Business Suite-> AOL forum could provide additional info.
Regards,
Rownald
Maybe you are looking for
-
How to Play Overdrive Media Books on an iPod Shuffle 4th Gen
Hi, Many libraries use Overdrive Media to manage audio books in various formats. Once you have downloaded the book to the Overdrive Media Console on your computer, you can then choose to transfer it to a device (such as an iPod or other mp3 player).
-
Hello ppl, I have requirement wherein I need to provide an ALV display in a search help for a Selection Screen Field, kindly let me know if this is possible. If yes the method in brief. Will we need to use a exit in this case?
-
Hi, i have creted a function module which read stock quantity using BAPI_MATERIAL_AVAILABILITY. Import - MFRPN Export - QNTY If i execute function module from SAP the result it's OK but when i call function from PHP it does not output nothing. $sap =
-
[solved] Wireless USB adaptor says its something its not?
So I have a TP-Link TL-WN321G USB adaptor I just purchased. I was looking up chipset and drivers for it but when I do lsusb it comes back with ID 148f:2070 Ralink Technology, Corp. RT2070 Wireless Adapter This seems strange to me as everywhere I loo
-
My photo library icon on the task bar had a question mark on it. I couldn't open it. Then I noticed it was in the trash. I can't seem to remove it from the trash and return it to my task bar. Today I noticed that the icon was gone and just a question