‎2007 Nov 13 7:11 AM
hi
i want to convert data type from <b> vbuk-vbeln to mkpf-xblnr</b>.
thanks.
laxman
‎2007 Nov 13 7:19 AM
Hi
MKPF-XBLNR is CHAR 16 field
where as VBUK-VBELN is Char 10 field
since both are CHAR you can use the MOVE command
or mkpf-xblnr = vbuk-vbeln.
But it gives syntax error when using for all entries of that field. so move it char 10 field and use
Regards
Anji
‎2007 Nov 13 7:14 AM
Hi,
while defining structure of internal table use data element of XBLNR
ex.
types : begin of it_vbln,
vbeln type xblnr,
end of it_vbln.
Regards,
Prashant
‎2007 Nov 13 7:15 AM
Hi
Both fields are of type CHAR 10. SO no conversion is required.
Use : MOVE vbuk-vbeln to mkpf-xblnr.
It will work....
‎2007 Nov 13 7:16 AM
HI,
no need of conversion as both are of char type.
rgds,
bharat.
‎2007 Nov 13 7:19 AM
Hi
MKPF-XBLNR is CHAR 16 field
where as VBUK-VBELN is Char 10 field
since both are CHAR you can use the MOVE command
or mkpf-xblnr = vbuk-vbeln.
But it gives syntax error when using for all entries of that field. so move it char 10 field and use
Regards
Anji
‎2007 Nov 13 8:01 AM
hi
actually i writing query
SELECT budat
cputm
xblnr
FROM mkpf
INTO TABLE int_mkpf
FOR ALL ENTRIES IN itab
WHERE xblnr = itab-vbeln.
below is error message.
When you use the addition "FOR ALL ENTRIES IN itab", the fields "XBLNR"
and "ITAB-VBELN" must have the same type and the same length.
thanks.
‎2007 Nov 13 8:11 AM
Laxman,
while declaration of internal table, declare vbeln with same length and same type as xblnr.
reward if it helps,
Satish