Changing field value to upper case
I am using EditCurrentRecord. How do I convert the value that the user enters to uppercase?
There is a setOnChange() method in HTMLInputElement. But how do I get HTMLInputElement from HTMLFieldRenderer in EditCurrentRecord?
Thanks in advance.
Stephen
One central way to solve this problem is to add a method in the Entity Object attribute setter like this:
public void setYourAttributeName( String value ) {
// If non-null, uppercase the value before setting it.
if (value != null) value = value.toUpperCase();
setAttributeInternal(....);
}Then, regardless of client, the value will be forced to uppercase.
Similar Messages
-
Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
I am using this code :
<HTML>
<HEAD>
<SCRIPT>
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length;
for(var i=0; i<colCount; i++ ) {
var newcell = row.insertCell(i);
newcell.innerHTML = table.rows[1].cells[i].innerHTML;
switch(newcell.childNodes[0].type) {
case "text":
newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select-one":
newcell.childNodes[0].selectedIndex = 0;
break;}}}
function deleteRow(tableID) {
try {var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(null != chkbox && true == chkbox.checked) {
if(rowCount <= 2) {
alert("Cannot delete all the rows.");
break;}
table.deleteRow(i);
rowCount--;
i--;}}}catch(e) {alert(e);}}
</SCRIPT>
</HEAD>
<BODY>
<INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
<INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
<TABLE id="dataTable" width="350px" border="1">
<TR>
<TD width="32"></TD>
<TD width="119" align="center"><strong>Activity</strong></TD>
<TD width="177" align="center"><strong>Cost</strong></TD>
</TR>
<TR>
<TD><INPUT type="checkbox" name="chk"/></TD>
<TD>
<select name="s1" id="s1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</TD>
<TD><input type="text" name="txt1" id="txt1"></TD>
</TR>
</TABLE>
</BODY>
</HTML>Hi,
Let me make sure u r working with table control.
First u have to create a event(VALIDATE) to do the validation.
Inside the event,
1. First get the current index where user has pointed the curson
2. Once u get the index read the internal table with index value.
3. Now u can compare the col1 and col2 values and populate the error message.
1. DATA : lo_elt TYPE REF TO if_wd_context_element,
l_index type i.
lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
CALL METHOD LO_ELT->GET_INDEX( RECEIVING MY_INDEX = l_index.
above code should be written inside the event.
Thanks, -
How to cast a fieldinput value to upper case.
Im not a java programer I guess that this must be a silly thing.
Im searching data in R/3 from 2 fields 1 numeric and the other alphanumeric. This alphanumeric fields if I put it in upper case works, if I wirte it in lower case doesnt works.
In R/3 when I test the FM doesnt matter if I put it lower or upper case, it works fine.
so I wanna know how can I in WD cast the value that I put in that fieldinput be converted to upper case when I hit the search button.
Thx> Im not a java programer I guess that this must be a
> silly thing.
>
> Im searching data in R/3 from 2 fields 1 numeric and
> the other alphanumeric. This alphanumeric fields if I
> put it in upper case works, if I wirte it in lower
> case doesnt works.
>
> In R/3 when I test the FM doesnt matter if I put it
> lower or upper case, it works fine.
>
> so I wanna know how can I in WD cast the value that I
> put in that fieldinput be converted to upper case
> when I hit the search button.
>
> Thx
Hi,
When you test the FM in SE37 in R3 there is an option at the top of the screen Called Uppercase/Lowercase - this controls whether the input is automatically converted to upper case for alphanumeric fields.
The other option you have, if it is a custom FM, is to translate the input of the alphanumeric fields in the ABAP - it is quite common to have to translate or convert input data to make sure it is in the same format as the backend system.
I prefer to do this sort of conversion on the backend system as usually you have a better guarentee that it will be in the correct format, than if you do it in the Java element.
Just my opinion,
Gareth. -
How to change field values AFTER Inbound IDOC Posted successfully
Hi SAP Experts,
In my project I receive the inbound IDOC PORDCR05 from PI and posted as an Purchase Order in ECC.
I create the Z process code and Z function module (which is a copy version of IDOC_INPUT_PORDCR) and complete all the necessary configuration steps. It works perfectly.
My problem is: I have to collect some inbound idocs (that satisfied some criteria) and change the value of field EKPO-TXJCD and EKKN-KOSTL of the PO AFTER it posted successfully (means the purchase order is created and save in database).
How can I do this? I've try to put the logic code in Z function module, but it does not work, since at that time, the Inbound IDOC is not updated to the database yet.
Aprreciate your advise.
Regards,
Elaine.Hi Elaine ,
as per your cretiria pick the idocs and take created PO# from status 53 & use the BAPI (BAPI_PO_CHANGE) to change the neccessary values in the PO. We can't reprocess those idocs again.
Reddy -
Change field value in standard table
Hello Experts,
Could you please guide me to change i.e update field CESS value in standard table j_1irg23d.
Thanks and regards,
SirishaHi sirisha,
if you want to change the value in the CESS field of j_1irg23d table. ( sales tax )
since it is a standard table dont try to do it using update ot modify statsments.. standard tables are updated using standard transaction and it is not advicable to change using abap statments..
just try to find a bapi or field module to update that field in the j_1irg23d table.
1) To find a bapi or function module just do a whereused list on the table name you may get some fms or bapi
2) check the forum you may get some links on it..
Regards
Satish Boguda -
Changing field values in a Interactive form
I am trying to modify the fields of a Interactive form after the user presses the go button. The following code appears in my onSubmit method.
IPrivateIntPDFv1View.IPDFDataElement element = wdContext.nodePDFData().createPDFDataElement();
element.setForename("Wrighty08");
wdContext.nodePDFData().bind(element);
When I then get the byte[] in the following code it does not have the changes I made above however the changes do appear on screen when the program finishes. Any ideas?
IPrivateIntPDFv1View.IContextElement contextElement = wdContext.currentContextElement();
ByteArrayInputStream byteInput = new ByteArrayInputStream(contextElement.getPDFObject());
Thanks,
EllisI am trying to get the byte[] with the new values set. The implementation of the byte[] retrieval is in the submit-method. But just before I get the byte[] I am trying to change some values in the interactive form.
So first I run this code to change the value of a given field in the interactive form.
IPrivateIntPDFv1View.IPDFDataElement element = wdContext.nodePDFData().createPDFDataElement();
element.setForename("Wrighty08");
wdContext.nodePDFData().bind(element);
Then I get the byte array as follows.
IPrivateIntPDFv1View.IContextElement contextElement = wdContext.currentContextElement();
ByteArrayInputStream byteInput = new ByteArrayInputStream(contextElement.getPDFObject());
The problem is that the changed values are not in the byte[].
Thanks,
Ellis -
Hi all,
I wanna change the field value into "No data" if the field value is null. How to do it ? any suggestion is welcome.Thank very much.Here's an example:
<?if:ADDRESS2=''?>No Data<?end if?><?if:ADDRESS2!=''?><?ADDRESS2?><?end if?>
To format it correctly, you may have to use if@inlines instead of if.
<?if@inlines:ADDRESS2=''?>No Data<?end if?><?if@inlines:ADDRESS2!=''?><?ADDRESS2?><?end if?>
Shreedev -
COR1 create process order change field value when save(PPCO0001)
Dears
When tcode: COR1 create process order, i want to change some fields value on the tab: "Goods Recpt", for example the field: Goods Recipient: , anyone konws how to do this? now i am trying to using the exit: PPCO0001( EXIT_SAPLCOBT_001)
in thie eixt tables POSITION_TABLE : has this field: WEMPF (Goods Recipient) , i add some coding to change this field and save , but the change is not affect on the order . that is when open the order just create , this field is still empty.
do i need some other process or call some other functions or some other exit to do this?
thanks a lot for your posting.
Edited by: Jackyguoguo on Mar 11, 2010 3:51 AM
Edited by: Jackyguoguo on Mar 11, 2010 4:21 AM1. Use BADI: WORKORDER_UPDATE--> Method: BEFORE_UPDATE
2. Use ASSIGN "(SAPLCOBT)AFPO_BT[]" statement to access and modify the desired fields.
Regards,
Suraj -
Ho to convert to lower case values and upper case
hi
pls let me know how to convert the varlues to lower case
and how to conver values to uppoer case
whichis funtion module to do so?
regards
AroraHi,
<b>TRANSLATE</b>
Converts characters to strings.
Syntax
TRANSLATE <c> TO UPPER|LOWER CASE
|USING <r>.
The characters of the string <c> are converted into upper- or lowercase, or according to a substitution rule specified in <r>. -
Using ADF Security user in role context to change field value
Hi I was wondering if it was possible to change an input text field value depending on the ADF authentication login values.
So if the user in role is manager value is dino2dy if it's Boss its Frank Nimphius.
My idea is that I want the field user to be read only so no one could change it, but since it's a foreign key in the table I need to have values in it for committing to the database.
Since different users will be accessing the application I want every user to have his user name automatically entered into a read only field. Then commit that value into the database.
I have ran into some problems so far, as if I put in a straightforward value in a field, and make it read only, when committing I get an error User field needed. As if the field is empty even though I can see the value on the page.
Hope you guys can helpYeah I have tried that but I can only use it for true or false values, I do not know how to use it to change a value. I ve used it to make something read only or disabled depending on the user in role.
It still wont work if I change the value in the field. It has to be the database value thing in there. As soon as I change it it starts giving me the you need Korisnik error. But I cant put it as a default value in the database because it defeats the purpose. -
Hai all,
I need to set a value for mseg-erfme in mb31 using BADI.
The value is 'ST' in mseg while debugging. But i need to change the value 'ST' to 'PC'(base unit) using BADI.
Can anyone helpme?HI,
In this WORKORDER_GOODSMVT method 'GOOD_RECEPIT' u can change the value of meins.
other wise look at this.
WB2_GOODS_REC_INPUT
Thanks, -
Change string to all upper case...
How can I make a string all upper case?
Thanksvar str : String = "ToUpperCase" ;
trace( str.toUpperCase() ) ; // TOUPPERCASE
is that what you want ????? -
Hello friends
I have to change some fields in SP01 whenever a spoll request is generated. I have to change the default device type from printer LP01 to specific Fax device, and give the vendor fax number in the reciepient name, whenever the spool is generated from MIRO when the document is holded and not posted.
Thanks
BhavnaHi Bhavna ,
u have to design ur output type like that ? there is seperate Medium for FAX check in tcode NACE.
Regards
Peram -
Change field value in CRM complaint header
Dear All,
We are trying to find a way to update the ref. field in the complaint header with external data from R/3 online.
please help!!!!!!!!!!!!!!
Thanks,
NataliHello Natali,
Could you give us more details?
When do you want to do this update? During a complaint process in transaction CRMD_ORDER or in background?
Regards,
Frédéric -
How can I use this "toUpperCase"
e.g.
char a = 'b';
a=toUpperCase(a);
I can't compile it.
Please help me to solve this problem..thank you...use this:
char a = 'b';
a=Character.toUpperCase(a);
best regards
Maybe you are looking for
-
Last week, bought mid-2014 base model rMPB 13.3. Display was warm yellowish with greenish tint. Compared with store models, which all had cool blue. Replacement had same issue, so I asked for refund. Display looked worse than my late 2010 base model
-
I can no longer follow links on my Gmail page, can sometimes open in tab
Do not have the same problem using Safari. Oddly, also can't open Mozilla after closing it unless I reboot; even if I try from the start menu. Gmail appears to be the only site where the link problem exists. It's started after the auto upgrade.
-
Popup for a attachment in Purchase order change
Hi Friends, when ever i change Purchase order , a popup window with data 'Attachement is there' is displayed in Purchase order if file is attached to PO. How to do it ? Please suggest me. Thanks in advance . Balaji.T.
-
How do I get them approved or verified or whatever... Web host is bluehost.com
-
Track doesn't show elapsed play time in itunes
hello. when i play a track in itunes, the track window does not show the elapsed time played (although the track title and artist shows). can you help ?