‎2008 Jan 13 2:59 PM
DATA:W_NAME1 TYPE NAME1,
W_ORTO1 TYPE ORT01,
W_ADRNR TYPE ADRNR.
SELECT SINGLE NAME1 ORT01 ADRNR INTO (W_NAME1,W_ORTO1,W_ADRNR)
FROM KNA1 WHERE KUNNR = KUNNR.
WRITE SY-SUBRC.
SY-SUBRC IS RETURNING 4 WHEN KUNNR IS ENTERED AS 1.ANY IDEAS WHY IT IS 4 EVEN IF IT HAS RECORD WITH KUNNR 1
‎2008 Jan 13 3:06 PM
Use the Following Statement before your Select statement. You shud be fine.
Unpack kunnr to kunnr.
Hope this helps.
Vinodh Balakrishnan
‎2008 Jan 13 3:06 PM
Use the Following Statement before your Select statement. You shud be fine.
Unpack kunnr to kunnr.
Hope this helps.
Vinodh Balakrishnan
‎2008 Jan 14 5:26 AM
Hi,
Place zeros in kunnr field in front of the one.
Ex.
1 (wrong)
00001 (right)
you use function module to place zero.
L.Velu
‎2008 Jan 14 8:15 AM
Hi Gopi,
When yuo check the value of KUNNR in KNA1 from SE16 you wont see 1 but you will see 0000000001, i.e. the number is prefixed with 0s to complete the 10 digits.
This is achieved by conversion exits. Hence when apply the conversion exit to add 0s to KUNNR before querying the DB.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING INPUT = KUNNR
IMPORTING OUTPUT = KUNNR.
Then place your SELECT query after this.
Regards,
Aditya
‎2008 Mar 12 11:13 AM
hi mates,
when using 'conversion_exit_alpha_input' before select queries. whether it wil add 0's to the output, or trips the prefixed 0's in output.
reply asap.
regards
manoharan