Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Select statement on VBPA

Former Member
0 Kudos

Hi all,

I have written select statement on VBPA table, it not working as expected.

my code:

data wa type land1.

Select land1 from VBPA into wa where vbeln = 12 and parvw = 'SH'.

Endselect.

write: 'Destination', wa.

when i keep where part it is not working, i mean result is empty.

Thanks & regards,

NarsiReddy.

5 REPLIES 5

Former Member
0 Kudos

Hi

VBELN is a NUMC type field. You should have '(00)00000012' in the WHERE clause (don't remember if it is 10 or 8 characters).

And if you only want to get the first record that matches your criteria better user SELECT SINGLE.

regards

former_member183607
Contributor
0 Kudos

Hi,

     Check Vbeln field is having conversion routine pass vbeln = '0000000012'

Former Member
0 Kudos

USE vbeln = '0020000001' STRING VALUE OR USE FM CONVERSION_EXIT_ALPHA_INPUT

raymond_giuseppi
Active Contributor
0 Kudos

Actually BOTH fields have conversion exit, so

  • VBELN ->ALPHA -> CONVERSION_EXIT_ALPHA_INPUT -> '12' -> '0000000012'
  • PARVW  -> PARVW -> CONVERSION_EXIT_PARVW_INPUT -> 'SH' -> 'WE'

Regards,

Raymond

Former Member
0 Kudos

I assume you tested if you get a result when you enter this in SE16?

Best regards,

Thomas Wagner