How to restrict io field length...?
hi,
how can we restrict the io screen field length on the screen with out changing field type....
Regards,
Anil.
Hi ,
Do you want to restrict the display or the input length.
In case you want to restrict the display with the select-options or parameters then simply use the extension
... VISIBLE LENGTH vlen
Effect
This addition allows you to shorten the visible length of the corresponding screen field on the selection screen to vlen.
and in case you want to restrict it based on the number of characters then check out the following code.
PARAMETERS p_test TYPE c LENGTH 10.
DATA test TYPE i.
AT SELECTION-SCREEN ON p_test.
test = STRLEN( p_test ).
IF test > 4 .
MESSAGE 'Length greater than 4' TYPE 'E'.
ENDIF.
reward if usefull.
regards
taher
Similar Messages
-
How to change the field length in standard sap program.
Hi All,
How to change the field length in standard sap program.
Urgent
Example:
Text1 type c length 75,
To change :
Text1 type c length 150,
Point will be rewarded..
Thank you,
Vikram.CIf the only solution is to change the sap standard program, simply change the program, it will prompt for an access key. This key can be retrieved in the SAP support portal (service.sap.com) at keys and requests, sccr keys, register object.
Sometimes these actions are outsourced to a competence center, so maybe youre not entitled to do this, in any case ask a resident senior developer for support.
regards, Rob -
How to restrict the fields in a std screen i.e addtional data b of va01
how to restrict the fields in a std screen i.e addtional data b of va01
certain document type
as i already added some fields in it
can u help me with the setp
With regards
rohan ShettyHi Rohan,
Can you please let us know the solution that you had, i have similar requirement?
Thanks,
Manohar. -
Can any one know how do restrict that fields in mm
hi gurus
can any one know how do we restrict the fields in the material master. Where do we control do any one know the transaction code for that.
Thanks in advanceOMSR
and
OMS9
Help for OMSR
Assign Fields to Field Selection Groups
To define whether a field is hidden or displayed, or whether an entry is mandatory or optional in material master maintenance, you must assign the field to a field selection group. You may assign a field to one field selection group only.
Before including customer-defined fields in a field selection group together with standard fields, or assigning standard fields to a different field selection group, familiarize yourself with the assignment of fields to field selection groups in the standard R/3 System.
Standard settings
The values of the field selection groups have been preassigned as follows:
001-110 Material master for industry
111-120 Reserved for customers (except where the values are already in use)
121-150 Material master for industry
151-210 Material master for retail
211-240 Reserved for customers
Recommendation
If possible, use the setting in the standard R/3 System. No further action is then required. If you want to make individual fields inaccessible, the easiest way is to group them together in a single field selection group and to set it to Display or Hide.
Activities
1. Check the setting in the standard R/3 System.
For this, you need to know the data screen on which the relevant field appears in the material master, and the name of the screen field, for example, MARA-MEINS in the case of the base unit of measure.
2. If necessary, change the assignment of fields to field selection groups as required.
Further notes
In the case of long texts, you define whether the entire screen is hidden or displayed, or whether entries are mandatory or optional. For this reason, each screen has been assigned to one of the following dummy fields:
LTEXT_BEST Purchase order text
LTEXT_GRUN Basic data text
LTEXT_IVER Internal comment
LTEXT_PRUE Inspection text
LTEXT_VERT Sales text
help for OMS9
Maintain Field Selection for Data Screens
In this IMG activity, you create and maintain field references. You can see where a field reference is used by choosing Where-used list.
Activities
Define or change the field references as required (except for field references with the prefix SAP which must not be changed). New field references must begin with Y or Z.
Changing the Field Selection Options for a Field Selection Group
1. Specify the field selection group.
2. Select the field selection option (hide, display, required entry, or optional entry) for each field reference as required.
3. Save your data.
Creating a Field Reference
1. Choose New entries.
2. Specify a field reference beginning with Y or Z.
3. Select the field selection option for each field selection group as required.
4. Save your data.
Changing a Field Reference
1. Double-click the relevant field reference.
2. Change the field selection option for each field selection group as required.
3. Save your data.
reward if usefull
Message was edited by:
Umakant Bhangale -
Restrict TextEdit field length to 240 chars
Hi,
In my Web-Dynpro application, I need to restrict the TextEdit field length to 240 chars maximum size.
The users shouldn't be allowed to enter more than 240 characters!
Best Regards,
AmolHi,
try creating a simple type under the dictionaries->logical dictionary->data types->simple type of type String and in the Definition tab set the max length to 240. create a value attribute under the context and set the type to the simple type created and bind it to the Input field.
This will restrict the length to 240.
Regards,
Poojith MV -
How to increase the Field length
Hi All ,
I have to increase the Standard Field length in a transaction.
is that possible ? if yes , how we can do that ?
thanks and regards,
Deepak Rana.it is not advisable to change the format of standard SAP table fields. most of them are being used in many different places, you will have a hard time making sure that all functionality still works OK after such a change.
maybe you can append new fields to ADRC and work with these.
Greetings
Thomas -
How to extend the fields length
Hi Experts,
I want to increase the fields length of my BP name in portal .
now it is 40 char in one line but i want 60 char in one line .Can any body send the solution.
Thanx in advance
Regards,
KhurramDefault length of BP Name field is 40 chars in length.You cannot change this ..
Thirumala. -
How to get fixed field length when download a CSV file ?
hi all ,
I had downloaded a CSV file from an ALV list which created by myself. the current layout of the CSV file is :
aaa;bbbbbbbbbb;cc;
for example . but what i want is :
aaa ;bbbbbbbbbbb ;cc ;
it means these three fields are all with fixed length don't ommitting spaces when you preview the CSV file. how should i do this ?
best regards
Kevini got the solution.
-
How to restrict Date field entered in a text field should be of MM/dd/yyyy
Hi,
I have an text field for Date entry,the Date format is MM/dd/yyyy,while entering the value i want to verify wether the values entered are valid or not,like month should n't be more than 12,date value depends on month should not exceed 30,31 or 28,year should not exceed 9999 like,if not possible at the time of entery i want to stop at least before submission.Right now i am traing to use my own model which extends PlainDocument calss,
as in the fallowing way.But i t could not stop me to enter the wrong values ,Any help would be appreciated.
mport javax.swing.text.PlainDocument;
import javax.swing.text.AttributeSet;
import javax.swing.text.Document;
import javax.swing.text.BadLocationException;
import java.awt.Toolkit;
* Insert the type's description here.
* Creation date: (11/26/2001 6:22:14 PM)
* @author: Administrator
class DateFormatDocument extends javax.swing.text.PlainDocument {
* DateFormatDocument constructor comment.
String sInputMask; DateFormatDocument(){
// sInputMask="MM/dd/yyyy";
sInputMask="09/30/2000";
try{
// insertString(0,"MM/dd/yyyy",null);
insertString(0,"09/30/2000",null);
}catch(BadLocationException ex){System.err.println(ex);}
public void insertString(int offs,String str,AttributeSet a) throws BadLocationException{
String sText=super.getText(0,getLength());
if(sText.length()==0)
super.insertString(offs,str,a);
return;
int len=str.length();
String sText1 = super.getText(0,2);String sText2 = super.getText(3,5);String sText3 = super.getText(6,10);
int str1=Integer.parseInt(sText1);int str2=Integer.parseInt(sText2);int str3=Integer.parseInt(sText3);
// System.out.println("str1:"+str1);
if(offs<2 && str1<=12){
if(len<=2){
super.remove(offs,len);
super.insertString(offs,str,a);
else if(offs==2){
super.remove(offs,1);
super.insertString(offs,"/",a);
else if(offs<5 && str2<=30){
if(len<=2){
super.remove(offs,len);
super.insertString(offs,str,a);
else if(offs==5)
super.remove(offs,1);
super.insertString(offs,"/",a);
else if(offs<10 && str3<=9999 ){
if(len<=4){
super.remove(offs,len);
super.insertString(offs,str,a);
else{
System.err.println("Beep!");
//Toolkit.beep();
public void remove(int offs,int len) throws BadLocationException{
System.err.println(offs + " " + len);
if(offs<2){
if(len==1){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==2){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(offs==2){
//do nothing
else if(offs<5){
if(len==1){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==2){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(offs<10){
if(len==1){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==2){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==3){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==4){
super.remove(offs,len);
super.insertString(offs," ",null);
}<code>
mport javax.swing.text.PlainDocument;
import javax.swing.text.AttributeSet;
import javax.swing.text.Document;
import javax.swing.text.BadLocationException;
import java.awt.Toolkit;
* Insert the type's description here.
* Creation date: (11/26/2001 6:22:14 PM)
* @author: Administrator
class DateFormatDocument extends javax.swing.text.PlainDocument {
* DateFormatDocument constructor comment.
String sInputMask; DateFormatDocument(){
// sInputMask="MM/dd/yyyy";
sInputMask="09/30/2000";
try{
// insertString(0,"MM/dd/yyyy",null);
insertString(0,"09/30/2000",null);
}catch(BadLocationException ex){System.err.println(ex);}
public void insertString(int offs,String str,AttributeSet a) throws BadLocationException{
String sText=super.getText(0,getLength());
if(sText.length()==0)
super.insertString(offs,str,a);
return;
int len=str.length();
String sText1 = super.getText(0,2);String sText2 = super.getText(3,5);String sText3 = super.getText(6,10);
int str1=Integer.parseInt(sText1);int str2=Integer.parseInt(sText2);int str3=Integer.parseInt(sText3);
// System.out.println("str1:"+str1);
if(offs<2 && str1<=12){
if(len<=2){
super.remove(offs,len);
super.insertString(offs,str,a);
else if(offs==2){
super.remove(offs,1);
super.insertString(offs,"/",a);
else if(offs<5 && str2<=30){
if(len<=2){
super.remove(offs,len);
super.insertString(offs,str,a);
else if(offs==5)
super.remove(offs,1);
super.insertString(offs,"/",a);
else if(offs<10 && str3<=9999 ){
if(len<=4){
super.remove(offs,len);
super.insertString(offs,str,a);
else{
System.err.println("Beep!");
//Toolkit.beep();
public void remove(int offs,int len) throws BadLocationException{
System.err.println(offs + " " + len);
if(offs<2){
if(len==1){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==2){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(offs==2){
//do nothing
else if(offs<5){
if(len==1){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==2){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(offs<10){
if(len==1){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==2){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==3){
super.remove(offs,len);
super.insertString(offs," ",null);
else if(len==4){
super.remove(offs,len);
super.insertString(offs," ",null);
</code> -
How to restrict the field in invoice documnet
Hi All,
We don't want to allow users to change the vendor at the time of creation of invoice.
we want to restict the filed invoice praty (under details tab) to display only.
Is it possible?
How to achieve it.
Thank you.Hi,
For MIRO, SAP doesn't provide any field selection facility, this can be done by creating screen variants for MIRO in OLMRLIST
You can also use transaction SHD0 for creation of Screen variants of MIRO. -
How to compare text field length with the length of input characers
I hae a problem with the length of text field
I want to fix the length of TextField by taking the length of attribute to, whihc i have to use in text field
Like i have set the max length of Attribut to 10 and set the length of textfield also 10.
But the problem is that if i enter 10 'i' it dosn't fill even half the space in TextField
And opposit if i enter 10 'W'
I wonder if there is a solution for this problem
i ma using True Type of Font* paint method in your own class that extends Canvas
* @param g where to paint e.g. printer, screen, ram
public void paint (Graphics g)
// display word "today" centred at x,y
FontMetrics fm = getFontMetrics( g.getFont( ) );
String wording = "today" ;
int xadj = fm.stringWidth( wording )/ 2;
// position bottom left corner of the text
g.drawString(wording , x-xadj, y );
// draw a red line from x1,y1 to x2,y2
g.setColor( Color .red );
g.drawLine( x1 , y1, x2, y2);
// draw an pre-existing Image. imX,imY is top left corner of the Image.
g.drawImage ( image , imX, imY , imWidth, imHeight , this);
} //end paint -
How to restrict sensitive fields while WF in Approval process?
Hi Gurus,
we have a requirement where few fileds should be restricted while WF is in approval prcess and an error msg should display to them that Wf is in process and you cannot change the values.so please help me out on this.Hi,
you could fiddle around with lock mechanisms.
But ottherwise you would have to do some additional programming at the transaction side.
If there is a badi, use fm SAP_WAPI_WORKITEMS_TO_OBJECT to retrieve the workitem for that workflow.
Kind regards, Rob Dielemans -
Hello Experts,
I got a basic question to ask. Iu2019ve created a custom table and then attached a check table with one of its field. This field is not PK. Now through help u2018F4u2019 I can see the values coming from check table. But other then those values let say if I enter any data (any garbage) it is getting stored in the table. Can somebody tell me how to restrict this field so that user must have to select the values from the list not on his own?
ThanksDo a validation of the input that the user gives.
Select single xxx from Ztable
where xxx ( eq selection screen parameter )
( IN select options )
If Sy-subrc eq 0.
Through an error message
Message e000 'Pls enter a correct value for the XXX '
Endif.
The whole code should be under AT selection screen event.
i guess you will agree with this solution.
Thanks,
Karthik -
Leading Zero w/ variable field length...
I'm creating a form in which I need a particular field to:
- Accept/Display a leading zero (or multiple leading zeros);
- Accept numbers numbers;
- Have a maximum field length of six numerals, but with the ability to accept fewer;
- Display an error message if the above criteria are not met.
I have some code (see below), but don't know how to make the field length variable.
var fmt = /^\d\d\d\d\d\d$/;
if(event.value != "")
if(!fmt.test(event.value))
app.alert("Incorrect format, field must contain numbers only.");
event.rc = false;
Make sense...? Can anyone help...?
Thank you.This drops the leading zero(s) and does not display the error message.
Adjustments...?
Thank you for your promp reply. -
RESTRICTING XBLNR_LONG FIELD OF FIDCC1IDOC IN ECC6
Hi All,
The segemets E2FIKPF006 has been added to FIDCC1 idoc as part of ECC6.0.This segment contains the field XBLNR_LONG.
Could someone let me know how to restrict this field as we dont want to populate this field and send and the idoc.Hi
Looks like BASIS issue.
Pls check the OSS Note - Note 787418 - Sent documents are not readable after upgrade
Pls contact your BASIS person
Regards
MD
Maybe you are looking for
-
Hi, I have 12 more folders that I could see and use yesterday. Now they are not there, and I have a lock symbol over my email address. Is this preventing me from being able to see the other folders? Or is this another issue that you tell me how to co
-
Bank statement issue with ending balance less than 1 euro
Hello, we have an issue. When the ending balance amount in the ebs is 0,15 the system reads this amount as a BAI status instead of an amount. Consequently the number near the 015 is read as an amount. For example this is a row of the ebs: 88, 045,015
-
READ UNCOMPLETE DATE FROM SESSION ATTRIBUTE
i have servlet read from DB and set result at vector and put it in session attribute to jsp that read it and print it but this view does takes 10 sec on my computer and on hosting server it shows date un complete what is do you thing it wrong
-
After 10.7.2 update OS does not boot...
After installing 10.7.2 update the OS does not boot. I tried to recover from recovery hd disk but after 3 attempts I am still not able to download lion! Any thoughts????
-
Multiple events triggered by one modification
Hello, I'm trying to trigger multiple events with the modification of a single user field. In Lookup.USR_PROCESS_TRIGGERS, I've defined the same field twice and associated them with two different events. My lookup looks something like : Code Key Deco