2006 Oct 16 1:47 AM
Hi,
My select statement is failing because in the where clause material number(matnr) in the table(ekbe) is having leading zeros where as material number of wa_poauto-matnr does not.
select ebeln ebelp vgabe gjahr belnr buzei wrbtr lfbnr
into table ts_ekbe
from ekbe
where ebeln = wa_poat-ponum and
xblnr = wa_poat-contr and
matnr = wa_poat-matnr and
vgabe in ('1', '2').
Please let me know if you don't understand the issue. Any clue is appricitated.
Thanks,
Surya.
2006 Oct 16 2:24 AM
Before your select USE A CONVERSION EXIT TO GET THE WA_POAUTO NUMBER IN THE SAME FORMAT AS THE DB:
eg,
use conversion exit
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = wa_poat-matnr
IMPORTING
output = wa_poat-matnr .
Hi,
My select statement is failing because in the where clause material number(matnr) in the table(ekbe) is having leading zeros where as material number of wa_poauto-matnr does not.
select ebeln ebelp vgabe gjahr belnr buzei wrbtr lfbnr
into table ts_ekbe
from ekbe
where ebeln = wa_poat-ponum and
xblnr = wa_poat-contr and
matnr = wa_poat-matnr and
vgabe in ('1', '2').
Please let me know if you don't understand the issue. Any clue is appricitated.
Thanks,
Surya.
2006 Oct 16 1:53 AM
If you selecting the matnr from the database for the field wa_poat-matnr..you don't have to do anything..
Check if there is any record available in the table EKBE for the corresponding combination in the where clause...
Thanks,
Naren
2006 Oct 16 2:24 AM
Before your select USE A CONVERSION EXIT TO GET THE WA_POAUTO NUMBER IN THE SAME FORMAT AS THE DB:
eg,
use conversion exit
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = wa_poat-matnr
IMPORTING
output = wa_poat-matnr .
2006 Oct 16 2:29 AM
One way is to use the conversion routine to change the value of input to 18chars before the select statement.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = wa_poat-matnr
IMPORTING
output = wa_poat-matnr
EXCEPTIONS
OTHERS = 0.
select ebeln ebelp vgabe gjahr belnr buzei wrbtr lfbnr
into table ts_ekbe
from ekbe
where ebeln = wa_poat-ponum and
xblnr = wa_poat-contr and
matnr = wa_poat-matnr and
vgabe in ('1', '2').Hope this helps you.
Kind Regards
Eswar
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |