2007 Jun 27 3:21 PM
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'.
2007 Jun 27 3:25 PM
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'.
2007 Jun 27 3:23 PM
Your WHERE clause should have tehy field POSNR also. Only thne the SELECT SINGLE will return the matching entry.
~Suresh
2007 Jun 27 3:25 PM
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.
2007 Jun 27 3:25 PM
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
2007 Jun 27 3:25 PM
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'.
2007 Jun 27 3:27 PM
2007 Jun 27 3:30 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |