Append 0 in front of a number from 1 to 9
Hi,
I am trying to create a textfield that accepts the months of a year expressed in a MM format. The unfortunate thing is that when I go to the Format tab and set the Format category as Number, when I type in 01 representing Jan, it will remove the 0 in front.
How do I use Javascript to append 0 in front when it is from 1 to 9 and not append when it is from 10 to 12?
Thanks for reading!
To fully understand this code you need to be versed in core JavaScript, Acrobat-specific JavaScript and Regular Expressions...
You can read about JS here:
https://developer.mozilla.org/en/JavaScript/Reference
or here:
http://w3schools.com/js
Acrobat-specific JS reference can be found here:
http://www.adobe.com/devnet/acrobat/javascript.html
There are many excellent tutorials about this subject here:
http://acrobatusers.com/tutorials
Here's a short description of what the keystroke code does:
event.rc is the property of the event object that determines whether or not to accept the keystroke.
event.change is the value of the keystroke.
So what this line says is this:
Accept the keystroke if:
- It is blank (for example, when the user deletes a character) OR
- if it is composed of a single digit (expressed with a Regular Expression)
Similar Messages
-
Leading zeroo in front of kunnr number from kna1 after selecting from kna1
hi
i and selecting kunnr from kna1 table which is char 10
i want to place leading zeros in front of customer number after selection from the table
pls suggest the way to do so
also let me know the funtion module to remove leading zeros
regards
Arorahi
arora
first export reuired value to fm
and get the import value into another intermediate varable
and pass this intermediate variable to the required select statement where condition
REPORT zvcrconversionroutines .
PARAMETERS v_matnr LIKE mara-matnr MATCHCODE OBJECT zmara .
START-OF-SELECTION.
SELECT SINGLE matnr FROM mara INTO v_matnr
WHERE matnr EQ v_matnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_matnr
IMPORTING
output = v_matnr
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = v_matnr
IMPORTING
output = v_matnr
IF sy-subrc EQ 0.
WRITE :/1 v_matnr.
ELSE.
WRITE: /2 'invilad material'.
ENDIF.
reward for use ful points
regards
Nagesh.Paruchuri -
How to fetch accounting document number from known material document number
Hi,
Using MIGO transaction, by giving mblnr(material document number) as input, I get accounting document number by clicking FI document.I have to add this accounting document number in my report for corresponding known mblnr(material document number) values.
My question is how to fetch the accounting document number present in MIGO to add in my report program.
I used the xblnr(Reference Document Number) which is present both in mkpf and bkpf tables to fetch values.
I extracted xblnr values with known mblnr values from mkpf (Header: Material Document table).
and then extracted belnr(accounting document number) from bkpf (Accounting Document Header table) by using xblnr values.
But the query is running for a long time.
Is there any other method to extract the values in a simpler way.
Kindly advise.
Thanks and Regards,
SanjeevI had the values of xblnr and some other fields such as mblnr, budat etc in wi_item table.
I created a new internal table i_xblnr and got down those values.
And then created a new internal table i_belnr and tried to get values of belnr in it.
The code I wrote is given below:
IF not wi_item[] is initial.
loop at wi_item.
at new xblnr.
ws_xblnr-xblnr = wi_item-xblnr.
append ws_xblnr to i_xblnr.
endat.
endloop.
select belnr xblnr from bkpf into table i_belnr for all entries in i_xblnr where xblnr = i_xblnr-xblnr.
ENDIF.
Kindly look after it.Thank you.
Regards,
Sanjeev -
Forgetting to enter zeroes in front of the number
Post Author: ANTJIM
CA Forum: Deployment
I am new to CrystalReport XI and any of its versions. How do you write the script so that if enduser forgot to enter zeroes (ie.,00504), the application will know to pull the data on number 504 from {Log.TicketNumber}? Thanks.It just happens on calls.It doesn't cause any issues when calling.I don't
store contacts with "+1" in front of their name.Can you ask if it's just a
software issue or a carrier issue?
In a message dated 3/27/2015 9:29:52 A.M. Eastern Daylight Time,
[email protected] writes:
(https://community.verizonwireless.com/)
A message from the Verizon Wireless Community
(https://community.verizonwireless.com/)
(https://www.verizonwireless.com/wcms/consumer/explore.html)
(http://www.verizonwireless.com/wcms/consumer/shop.html)
(http://www.verizonwireless.com/b2c/myverizonlp/) (http://www.verizonwireless.com/support/)
I just bought the Nexus 6.Everytime I go to make a cell or receive a call
there's a +1 in front of the number?Any way to turn the +1 off?
created by Verizon Wireless Customer Support
(https://community.verizonwireless.com/people/vzw_customer_support) in Android - _View the full
discussion_ (https://community.verizonwireless.com/message/1239836#1239836) -
Cannot edit phone number from dialer
How can you edit a phone number in the dialer if it originally came from a text message?
I would like to add *67 to the front of the number.
-
Hello,
I am using a simple expression to make a calendar, going from 1 to 31
Until the number 10 i would like to display a 0 in front of the number.
Unfortunately everything I am trying doesn't work.
Here is the expression:
v=time/thisComp.frameDuration;
t = (v%31)+1;
if (t >0 && t < 10){
value=""+"0"+t;
}else{
value=t;}
I am on AE CC with Mac maverick.
Thanks
NIcoI assume this is being applied to a Text layer?
Your expression seemed to work ok for me, but here's how I would generally do something like this:
v=Math.round(time/thisComp.frameDuration);
t = (v%31)+1;
padLength = 2;
t = t.toString();
while (t.length < padLength) {
t = "0" + t; -
Removing Serial Number from Delivery
Hi Folks,
I have a requirement of Removing Serial Number from Delivery Document. Is there is some BAPI or FM available for this?
Thanks in Advance,
PunitHi Anirban,
I tried the FM. By Using the FM status of Serial Number 'Assigned to Delivery' is removed.
But I could still see the Serial Number attached to Line Item in tran VL02N.
Following is the code I have written.
MOVE: '0085003031' TO DA_SERXX-LIEF_NR,
'000030' TO DA_SERXX-POSNR,
'0000034226' to DA_SERXX-OBKNR,
'M047SBX050034' TO SERNO-SERNR.
APPEND serno.
CALL FUNCTION 'SERNR_DEL_FROM_DOCUMENT'
EXPORTING
objkopf = 'SER01'
serxx = DA_SERXX
operation = 'SDD1'
MATERIAL = 'BM20847'
j_vorgang = 'PMSA'
BSTCH =
BSTUP =
DEL_COMPLETE = ' '
PROFILE =
BUDAT =
IMPORTING
ANZSN =
SERIAL_COMMIT =
STATUS_NOT_ALLOWED =
TABLES
SERNR = serno
R_SERNR = e_serno
CHANGING
T_SMESG = t_msg
EXCEPTIONS
OBJECTLIST_NOT_FOUND = 1
PARAMETER_ERROR = 2
OTHERS = 3
Please Let me know if I am worng someware.
Thanks a lot,
Punit -
Since downloading the new operating system on my iPhone 4S, I'm having trouble with my phone messaging. I enter a number or input a number from my contacts and send my message. I then receive a error message stating the message can't be sent and it shows a set of "1s" were added in front of the number I entered. Ex: 1 (1) xxx-xxx-xxxx. Does anyone know why this is happening and how I can fix it?
I realize this. When calling prepaid cus service it only gives you the option to input your #. If you dont the system hangs up on you. When I input my number the system doesnt recognize it and hangs up on me.
-
Standard program to fetch the article number from the EAN
Hi all,
Is there any standard report, that retrieves the article number from the EAN provided. I don't require a function module which satisfies this requirement.
Kindly provide your valuable inputs.
Thanks & Regards,
Revathi.Here is code that can fetch any site.
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class fetchresult extends Frame implements ActionListener{
TextField t1;
TextArea ta;
Button b1;
public fetchresult(){
super("Fetch Result");
t1=new TextField("http://www.sitename.com",20);
b1=new Button("Get");
ta=new TextArea("",20,80);
setLayout(new FlowLayout());
add(t1);
add(b1);
b1.addActionListener(this);
add(ta);
setSize(200,200);
setVisible(true);
public void actionPerformed(ActionEvent e)
try
String s = t1.getText();
URL u = new URL(s);
URLConnection uc = u.openConnection();
InputStream is = uc.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String str;
while((str = rd.readLine()) !=null){
ta.append(str);
ta.append("\n");
rd.close();
int available = is.available();
int z;char c;
for(int x=0;x<available;x++){
z=is.read();
c=(char)z;
ta.append(String.valueOf(c));
catch(Exception ee){ta.append(ee.toString());}
public static void main(String args[]){
fetchresult obj = new fetchresult();
Manu -
I have a confirmation number from American Airlines for a flight with my family all under my name and for some reason I cannot add all of our tickets to Passbook. To clarify, I went to the American Airlines app and put in the confirmation number along with my name which pulled up my boarding pass only. Although I was able to add this boarding pass to Passbook, I was not able to add any of the other boarding passes for my children to Passbook that should have also been under the flight reservation. In fact I couldn't even see them in the American Airlines app. I tried to use their names and the same confirmation number but nothing happened, and nothing else seems to be working. How can I add all of these boarding passes to my Passbook?
Fair enough.
I started doing this before unlimited data and emails on phones was a common commodity, on my Samsung Blackjack.
I then continued it due to its convenience. My only counter argument is this:
Even when emails are set to immediately push, I am always notified earlier by this forwarding message (sometimes by several minutes/hours due to the fact that it is not dependent on my being connected to 4G or wifi to receive it.
Also, to contradict snozdop's point that both methods use data and battery, I say this - when I use the forwarding method, the information comes in a pure text format and therefore uses considerably less information than an HTML and CSS rich email, with embedded images and such -also, unlimited text messages aids curve costs.
I will, however, give this method a go. In any case, a solution to my original question would still be greatly appreciated.
Thanks guys. -
How can you get your ipod touch serial number from apple beacause my ipod was stolen
how can i get my ipod serial number from apple
http://support.apple.com/kb/HT2526?viewlocale=en_US
Basic troubleshooting steps
17" 2.2GHz i7 Quad-Core MacBook Pro 8G RAM 750G HD + OCZ Vertex 3 SSD Boot HD
Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
In Memory of Steve Jobs -
My friend switched his phone number from an iPhone to a Blackberry. My phone still wants to use iMessage to send him a text and won't let me send it as a text unless I turn off iMessage on my phone. Is there a fix for this?
jengrz wrote:
My friend switched his phone number from an iPhone to a Blackberry. My phone still wants to use iMessage to send him a text and won't let me send it as a text unless I turn off iMessage on my phone. Is there a fix for this?
TechCrunch posted a solution today that applies to this problem, I think.
Go to: https://supportprofile.apple.com/MySupportProfile.do
Click your old iPhone and "unregister" it.
More info here:
http://m.techcrunch.com/2012/01/05/i...d=tc_home_art& -
How to find PO number from ORDRSP Idoc.
Hi,
Can anybody let me know how to find the PO number from the Idoc ORDRSP.
Scenario is as below:
SAP system1 will send PO to SAP system2.(Idoc type ORDRS05).
When SO is created in SAP system2, it will send a confirmatory Idoc of message type ORDRSP.
From this I have to find the PO number as I can find only VBLNR.
Points assured for workful solutions.
-B S BHi BSB,
CHECK THIS CODE
DATA : BEGIN OF itab_status OCCURS 0,
idoc LIKE edids-docnum,
date_stauus LIKE edids-logdat,
status_counter LIKE edids-countr,
status LIKE edids-status,
descrp(70),
ponumber LIKE ekpo-ebeln,
mess LIKE edidc-mestyp,
END OF itab_status.
DATA: text111 LIKE e1mbxyi.
DATA: text11 LIKE e1edp02.
IF itab_status-MESS = 'WMMBXY'.
select single * from edid4 INTO ITAB where segnam = 'E1MBXYI' AND
HLEVEL = '02' AND DOCNUM = itab_status-idoc.
MOVE : ITAB-SDATA TO TEXT111 ,
text111-EBELN TO itab_status-ponumber.
ELSE.
YOUR CASE FALLS IN THIS CATEGORY****
select single * from edid4 INTO ITAB where segnam = 'E1EDP02' AND
HLEVEL = '03' AND DOCNUM = itab_status-idoc.
MOVE : ITAB-SDATA TO TEXT11 ,
text11-BELNR TO itab_status-ponumber.
ENDIF.
endif.
LET ME KNOW IF YOU NEED ANYTHING ELSE.
THANKS
VENKI -
Cinema display serial number from plist
Hi, I need help getting my cinema display serial number from an old Plist file. My office was broken into recently and someone made off with the monitor. It's a long shot but I thought I could find the serial number for the campus police. I was able to find an old com.apple.windowserver.plist file that had some information for the display. I tried the command <defaults read ./com.apple.windowserver.plist> and came up with the following. Problem is they don't look like serial numbers for a cinema display. Any suggestions?
DisplayID = 69530633;
DisplayProductID = 37430;
DisplaySerialNumber = 42039688;
DisplayVendorID = 1552;Hi ,
Go to /Library/Preferences/com.apple.windowserver.plist. Open this with TextWrangler or a similar utility. Look for a DisplaySerialNumber key with an integer value that isn't 0. With any luck, this should be the s/n of your display.
If you haven't used this display for a while, the records of it may be gone.
Also, it appears that this isn't guaranteed. Double-check if possible. -
I replaced my iPhone with a Samsung Galaxy5 and I am not receiving all of my text messages now. The rep at the store told me to go to iTunes and take my phone # off of the account and that would fix the problem. Is that true? What does iTunes have to do with text messages anyway?
You need to remove your phone number from the iMessage system.
Read here: http://support.apple.com/kb/ts5185
~Lyssa
Maybe you are looking for
-
How to get several users on one computer their own iTunes account???
We have 3 of us on one computer. ipod, ipod nano, and a shuffle. I don't want my 8 year old to access my 16 year olds music files. How can we all have our own, I guess you call it, "account" or "library" so when my 8 year old plugs in her shuffle, it
-
Self or powered generic USB port, works on every OS except Leopard...
I've got a puzzling one. I just ordered some nice 4 port USB hubs, that run on bus power, or self powered with an AC adapter. First thing I did was plug it into my MacBook, and plug in my external HD and ram drive. They did not mount. So I grabbed th
-
I am runnning itunes 11 I can use command-u to open a URL how can I add this stream to a playlist?
-
Hi, I have a Role with the name siud_Data (select, insert, update, delete in shema Data). When a User has this Role, he can Select, Insert, Update and Delete in the shema Data. Now i have the problem that evry time i create a table in Data i must gra
-
Not able to open Mac mini with regular users?
I should never work when I am tired. Using my MBPro to administer Lion Server 10.7.5 on my Mac Mini, I changed the settings from using the server as a .local to a registered **.com. Now at the Mac Mini I am unable to log in with any of the normal us