‎2006 Mar 15 9:50 AM
Hi all,
Happy Holi...
I have requirment like
user has to give his intrnal ordernumber as an input which is 12 digits number. But the acutal internal oreder number is lessthatn 12 digits . so whenever the user enter lessthan 12dgits then that number should be leftjustified and zeros(0)padded right
ex:
000001800920 (Order number for IO 1800920, with leading 0)
Thanks in Advance
Ravi
‎2006 Mar 15 9:52 AM
DATA ionr(12) TYPE N.
ionr = '12334'.
Now use variable <b>ionr</b>.
In this variable zeros will be padded to the left.
Message was edited by: Wenceslaus G
‎2006 Mar 15 9:56 AM
hi Ravi ,
use
<b>CONVERSION_EXIT_ALPHA_INPUT</b> which converts any number into a string fill with zeroes, with the number at the extreme right ..
a sample..
parameters : num(10) type c .
data : str(10) type c.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = num
IMPORTING
OUTPUT = str
.
write : str.regards
satesh
‎2006 Mar 15 9:58 AM
hi Charan ,
use <b>CONVERSION_EXIT_ALPHA_INPUT</b>
hope this helps
Regards,
Santosh P
‎2006 Mar 15 9:58 AM
‎2006 Mar 15 10:01 AM
Hai Ravi,
CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right
Example:
input = 123
output = 0000000000000...000000000000123
CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
Example:
input = 00000000000123
output = 123
Regards,
Srikanth.
reward points if helpful.
‎2006 Mar 15 10:06 AM
i guess its selection screen field. in such a case simply refet to the internal oder number talbe field.
parameters: iord type AUFNR .
The system will automatically take care of converting it
Regards
Raja
‎2006 Mar 15 10:33 AM
HI
YOU CAN DEFINE THE ORDER NUMBER WITH ANY VARIABLE OF TYPE 'N' WITH LENGTH 12. SO THAT IF THE NO.OF DIGITS IS LESS THAN 12 ZEROS WILL BE PADDED TO THE LEFT.
<u>DATA ORD_NO(12) TYPE N.</u>
THIS WILL BE ENOUGH. NOW USE THIS ORD_NO
IF THIS WORKS OUT FOR YOU PLEASE REWARD POINTS
REGARDS
ANOOP
Message was edited by: ANOOP R.S