2010 Jan 11 9:25 AM
Hi ,
i'm doing an module pool programming....and i have written the following code in PAI event...
IF OK_CODE = 'DISPLAY'.
LEAVE TO LIST-PROCESSING.
SELECT SINGLE NAME1 ORT01 ADRNR FROM KNA1 INTO
(W_NAME1, W_ORT01, W_ADRNR) WHERE KUNNR = KUNNR.
when i debug, i an see the value of kunnr only say i am taking 10000. and no value is found in name1 ort01 or adrnr...
and also all the other events are working correctly say back, cancel..
plz suggest what could be the probable problem...
thnks n regards,
Mukesh
Hi ,
i'm doing an module pool programming....and i have written the following code in PAI event...
IF OK_CODE = 'DISPLAY'.
LEAVE TO LIST-PROCESSING.
SELECT SINGLE NAME1 ORT01 ADRNR FROM KNA1 INTO
(W_NAME1, W_ORT01, W_ADRNR) WHERE KUNNR = KUNNR.
when i debug, i an see the value of kunnr only say i am taking 10000. and no value is found in name1 ort01 or adrnr...
and also all the other events are working correctly say back, cancel..
plz suggest what could be the probable problem...
thnks n regards,
Mukesh
2010 Jan 11 9:28 AM
Try passing KUNNR with leading zeros ( Use conversion routine ).
SELECT SINGLE NAME1 ORT01 ADRNR FROM KNA1 INTO
(W_NAME1, W_ORT01, W_ADRNR) WHERE KUNNR = '0000010000'.
2010 Jan 11 9:32 AM
thnks keshav...
but how should i do that?...plz help...m new in module pool programming...
2010 Jan 11 9:36 AM
hi
usin gthis fm: Conversion routine,Pass the kunnr value
CONVERSION_EXIT_ALPHA_INPUT
import --->kunnr
export --->kunnr
2010 Jan 11 9:42 AM
In your screen field there is a option to provide your conversion routine.
Check the domain of KUNNR for the conversion exit used,
give the same in screen attributes->dictionary tab of the screen field KUNNR.
Or do as suggested by Dharmaraj.
2010 Jan 11 9:46 AM
Hi Mukesh,
Give ALPHA in the Conv.exit option of field. This will automatically carry out conversion routine...
Hope this helps...
Nag
2010 Jan 11 9:46 AM
Hi, Mukesh,
Copy paste this code and see if it is working
IF OK_CODE = 'DISPLAY'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = kunnr
IMPORTING
output = kunnr.
SELECT SINGLE NAME1 ORT01 ADRNR FROM KNA1 INTO
(W_NAME1, W_ORT01, W_ADRNR) WHERE KUNNR = KUNNR.
LEAVE TO LIST-PROCESSING.
Hope it helps you,
Regards,
Abhijit G. Borkar
2010 Jan 11 9:54 AM
THNKS TO ALL OF U...
but can anybody tell me why is this conversion required?
2010 Jan 11 9:59 AM
Hi Mukesh,
Conversion exit ALPHA, external->internal
ALPHA conversion is used especially with account numbers. During conversion from the external to the internal format, the system checks to see if input in the INPUT field is purely numeric, that is, if this input consists only of numbers, possibly with spaces before and after them. If this is the case, then the number string is inserted right- justified in the display field OUTPUT and all spaces to the left of the value are filled with zeroes ('0'). If the input is not purely numeric, it is inserted in the display field from left to right and all extra spaces are filled with blanks.
Hope it clears your doubt.
Regards,
Abhijit G. Borkar
2010 Jan 11 10:03 AM
2010 Jan 11 10:04 AM