‎2009 Jul 14 11:02 AM
hi sap,
i have RFC where the remote system sends the notification number for an ex : 0019833737.
if they send like the above it works fine. but when they dont give that two '00' s it will not work
so how can i say to my RFC to add those two zeros before it process the action.
how can i say to the prog specifically add 2 zeros if the remote system does not give 2zeros?
they import notification number : such as 100003837.
buy system accepts it is is like : 00100003837.
how can i do it can you all please help me?
thank you,
laya.
‎2009 Jul 14 11:05 AM
Hi,
Chcek this FM CONVERSION_EXIT_ALPHA_INPUT ...it adds the leading Zero's
‎2009 Jul 14 11:06 AM
Hi,
If the system accepts the data only if it is preccedded by 2 zeros, then before sending the data chk if the data begins with 2 zeros if not then concatenate 2 zeros to the data.
Thanks,
Harini
‎2009 Jul 14 11:16 AM
See, in most of the cases, where data type is character and we store some value with leading zeroes, system shows the values trimming the leading zeroes, but when we are going to store values, it accepts only with leading ZEROS.
Other values if system stores the values, you will not be able to access the data depending upon this field value.
So in such cases SAP has given a CONVERSION EXIT Function Module.
CONVESRION_EXIT_ALPHA_INPUT.
Try using this FM within your code always for Customer Number, Material Number, Vendor Number, Notification Number, Equipment Number etc.
Regds,
Anil
‎2009 Jul 14 11:24 AM
hi anil
so far i have not used the FM CONVESRION_EXIT_ALPHA_INPUT.
Can you please tell me as to how use it.
the field name is QMNUM
view name is viqmel
this is my select statement select QMNUM
TPLNR
QMDAT
EQUNR
*PLTXT
STRMN
LTRMN
PRIOK
MSAUS
QMTXT
from viqmel into CORRESPONDING FIELDS OF TABLE ZPM_STRUCT "ZIOMS_SAP
where qmnum = zQmnum.
so how can use it can you pls give me little more code pls
‎2009 Jul 14 11:29 AM
Hi Laya,
Try like this.
TPLNR
QMDAT
EQUNR
*PLTXT
STRMN
LTRMN
PRIOK
MSAUS
QMTXT
from viqmel into CORRESPONDING FIELDS OF TABLE ZPM_STRUCT "ZIOMS_SAP
where qmnum = zQmnum.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INTPUT'
EXPORTING
INPUT = QMNUM
IMPORTING
OUTPUT = QMNUM.
Regards,
Vijay
‎2009 Jul 14 11:50 AM
hi vijay,
i am using the database view which is VIQMEL it does not have the ALPHA.
as result when i use the FM it is giving me the runtime error.
what should i do to avoid this?
thanks in advance
laya.
‎2009 Jul 14 11:53 AM
hi anil,
i have used the FM as it is a VIEW it is not having the FM that which u asked me to use it... so what can we do to get the results
is there any way to achieve this target.
regards,
laya.
‎2009 Jul 14 12:00 PM
HI Laya again,
this is working.
DATA : pm_struct LIKE viqmel OCCURS 0 WITH HEADER LINE.
SELECT qmnum
tplnr
qmdat
equnr
*PLTXT
strmn
ltrmn
priok
msaus
qmtxt
FROM viqmel INTO CORRESPONDING FIELDS OF TABLE pm_struct "ZIOMS_SAP
WHERE qmnum = '000000000001'.
LOOP AT pm_struct.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = pm_struct-qmnum
IMPORTING
output = pm_struct-qmnum.
ENDLOOP.
Regards,
Vijay
‎2009 Jul 14 12:22 PM
Munna,
Simply go with below logic if Conversion_Alpha Exit won't work for you. I belive QMNUM length is 11 characters.
Qmnum = 100003837.
OVERLAY QMNUM WITH '00000000000'.
Result: 00100003837
‎2009 Jul 17 1:24 PM