on 04-03-2006 8:25 PM
HI Experts,
I have a 2 Infoobjects
1. EMPNumber Nchar (8)
2. PNumber Char (20)
now my question is i need to include zeros if there is less than 8 characters for the no.1 and 9 characters for No.2
1. 987656 should be 00987656
2. i.e; 98765 should be 000098765
I am getting No.2 from R/3 so i cant even chgange the length of it to 9 characters
Any ideas Please.
Thanks,
john
Siggi,
If possible can you please give me a step by step procedure.
john.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use a function module called 'conversion_exit_alpha_input'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John
If it is so you can use the standard object as a template to a Z-info object and then now u can check the alpha conversion routine in the General tab of Z-info object.
Cheers
Chaks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
You van use the "NUMCV Conversion Routine". Document "Conversion Routines in BW" says the next about this routine:
<i>When converting from an external into an internal format this checks whether the entry in the
INPUT field is wholly numerical, whether it consists of digits only, possibly with blank spaces
before and/or after. If yes, the sequence of digits is copied to the OUTPUT field, right-aligned,
and the space on the left is filled with zeros (0). Otherwise the blank characters are removed
from the sequence of digits, the result is transferred, left-aligned, into the output field, and this is
then filled from the right with blank characters.</i>
Hope this helps.
Regards,
Harald
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello experts,
But if i am taking the Business content which dosent have Alpha in it, lets say (0person)which is of 8 Ncharacters, can you let me know how to include zeros for it befor.
Thank You,
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John
If the object is already created and now you would like to include the aplha conversion use the T-code RSMDCNVEXIT.Click "enable the activation of conversion routine icon" next to the refresh icon.Give the Basic characteristic, the type of conversion routine (ALPHA) and then click the activate conversion routine tab.
Regards
Chaks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi john,
if your infoobject has convers. routine ALPHA,
you can tick the 'conversion' checkbox in transfer rules maintenance, last column.
or you can use following sample routine
data : lv_material(18) type c value '000000000000000000',
lv_length type i.
RESULT = TRAN_STRUCTURE-[fieldname].
lv_length = 18 - strlen( RESULT ).
if lv_length > 0 and lv_length < 18.
shift RESULT right by lv_length places.
RESULT(lv_length) = lv_material(lv_length).
endif.
hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
I dont know why you would like to get the "leading zeroes" as SAP would insert them internally for you.
Bye
Dinesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.