2009 Jun 09 9:30 AM
Hi
When I execute this query through abap report I am not getting the correct result
using se11 vbak vbeln = '3504131'
also
using se11 vbpa vbeln = u20183504131u2019 parvw = 'Z4'
then I am getting the result
What is wrong with my query.
d_zuonr = u20183504131u2019
SELECT SINGLE vbak~vgbel AS aubel
vbak~vbeln
vbpa~pernr
tvkbt~bezei
tvkot~vtext
INTO CORRESPONDING FIELDS OF wa_cmtype
FROM vbak
LEFT JOIN vbpa ON vbpavbeln EQ vbakvbeln AND
vbpa~parvw EQ 'Z4'
LEFT JOIN tvkot ON vbakvkorg EQ tvkotvkorg AND
tvkot~spras EQ sy-langu
LEFT JOIN tvkbt ON vbakvkbur EQ tvkbtvkbur AND
tvkbt~spras EQ sy-langu
WHERE vbak~vbeln EQ d_zuonr
sy-subrc is 4 only after executing the query.
regards
Sebastian John.
2009 Jun 09 9:38 AM
Hi ,
Use CONVERSION_EXIT_ALPHA_INPUT for vbeln (d_zuonr ).
Regards,
Deepthi
Edited by: Deepthi Upadhyaya on Jun 9, 2009 10:39 AM
2009 Jun 09 9:33 AM
Try this.
d_zuonr = u20180003504131u2019. --------- > Change here
SELECT SINGLE vbak~vgbel AS aubel
vbak~vbeln
vbpa~pernr
tvkbt~bezei
tvkot~vtext
INTO CORRESPONDING FIELDS OF wa_cmtype
FROM vbak
LEFT JOIN vbpa ON vbpa~vbeln EQ vbak~vbeln AND
vbpa~parvw EQ 'Z4'
LEFT JOIN tvkot ON vbak~vkorg EQ tvkot~vkorg AND
tvkot~spras EQ sy-langu
LEFT JOIN tvkbt ON vbak~vkbur EQ tvkbt~vkbur AND
tvkbt~spras EQ sy-langu
WHERE vbak~vbeln EQ d_zuonr.
2009 Jun 09 9:36 AM
Provide the value of vbeln with leading zeros. to get the value with leading zero use the conversion FM.
Hope this will help.
2009 Jun 09 9:38 AM
Hi ,
Use CONVERSION_EXIT_ALPHA_INPUT for vbeln (d_zuonr ).
Regards,
Deepthi
Edited by: Deepthi Upadhyaya on Jun 9, 2009 10:39 AM
2009 Jun 09 12:07 PM