Application Development and Automation 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: 
Read only

find mistake

Former Member
0 Likes
902

Hi all,

please tell what is the wrong in the below select query

this one is not working even i provide right data

  • get payer number

SELECT SINGLE kunnr adrnr

FROM vbpa

INTO (l_payer_n, l_adrnr_py)

WHERE vbeln = v_vbeln

AND parvw = 'RG'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
876

Hello,


I think there is no problem with the select statement.

Check the table VBPA for the below combination of the record is availble or not
SELECT SINGLE kunnr adrnr
FROM vbpa
INTO (l_payer_n, l_adrnr_py)
WHERE vbeln = v_vbeln
AND parvw = 'RG'. 

Regards,

Vasanth

Hi all,

please tell what is the wrong in the below select query

this one is not working even i provide right data

  • get payer number

SELECT SINGLE kunnr adrnr

FROM vbpa

INTO (l_payer_n, l_adrnr_py)

WHERE vbeln = v_vbeln

AND parvw = 'RG'.

6 REPLIES 6
Read only

suresh_datti
Active Contributor
0 Likes
876

Your WHERE clause should have tehy field POSNR also. Only thne the SELECT SINGLE will return the matching entry.

~Suresh

Read only

Former Member
0 Likes
876

Hi Shobhan,

Declare a structure tvbpa like vbpa and then write code like

SELECT SINGLE kunnr adrnr
FROM tvbpa
INTO (l_payer_n, l_adrnr_py)
WHERE vbeln = v_vbeln
AND parvw = 'RG'.

Hope it solves your problem.

Regards

Aneesh.

Read only

Former Member
0 Likes
877

Hello,


I think there is no problem with the select statement.

Check the table VBPA for the below combination of the record is availble or not
SELECT SINGLE kunnr adrnr
FROM vbpa
INTO (l_payer_n, l_adrnr_py)
WHERE vbeln = v_vbeln
AND parvw = 'RG'. 

Regards,

Vasanth

Read only

Former Member
0 Likes
876

1 .while using SELECT SINGLE you have mention all the key fields in the WHERE condition , you have to give POSNR also in WHERE condition,

2. check if v_vbeln is with LEADING ZEROES or not , or else use

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = v_vbeln

IMPORTING

OUTPUT = v_vbeln .

SELECT SINGLE kunnr adrnr
FROM vbpa
INTO (l_payer_n, l_adrnr_py)
WHERE vbeln = v_vbeln
AND parvw = 'RG'.

Read only

Former Member
0 Likes
876

Hi,

Write the Conversion exit for VBELN

Regards

Sudheer

Read only

0 Likes
876

Hi,

First check whether v_Vbeln is prefixed with zeros or not and then check whetrher that combination exixt in the table r not by going to SE11 by debugging.