‎2007 Jun 14 5:17 PM
Hi ,
Please see my code
SELECT land1 adrnr
FROM vbpa INTO (lf_land1 , lf_adrnr)
WHERE vbeln = l_likps_wa-vgbel AND
parvw = 'WE' AND
land1 IN im_land1 AND
posnr = '000000'.
IF sy-subrc <> 0.
SELECT land1 adrnr
FROM vbpa INTO (lf_land1 , lf_adrnr)
WHERE vbeln = l_likps_wa-vbeln AND
parvw = 'WE' AND
land1 IN im_land1 AND
posnr = '000000'.
ENDSELECT.
ENDIF.
ENDSELECT.
I tried to debug it ....the cursor is just jumping from select to endselect after the first select is sy-subrc = 4.
I tried commenting each part of the where condition ...
the problem is with the
<b> land1 IN im_land1 AND</b>
here im_land1 is comming from the selection screen.
what can I do to avoid this?
please help ASAP
‎2007 Jun 14 5:24 PM
Hi
U've to place the second SELECT out of the first one, because if it fails the system'll not run the code beetween SELECT/ENDSELECT.
SELECT land1 adrnr FROM vbpa INTO (lf_land1 , lf_adrnr)
WHERE vbeln = l_likps_wa-vgbel AND
parvw = 'WE' AND
land1 IN im_land1 AND
posnr = '000000'.
* IF sy-subrc <> 0.
*
* SELECT land1 adrnr
* FROM vbpa INTO (lf_land1 , lf_adrnr)
* WHERE vbeln = l_likps_wa-vbeln AND
* parvw = 'WE' AND
* land1 IN im_land1 AND
* posnr = '000000'.
* ENDSELECT.
*
* ENDIF.
ENDSELECT.
IF sy-subrc <> 0.
SELECT land1 adrnr FROM vbpa INTO (lf_land1 , lf_adrnr)
WHERE vbeln = l_likps_wa-vbeln AND
parvw = 'WE' AND
land1 IN im_land1 AND
posnr = '000000'.
ENDSELECT.
ENDIF.Max
‎2007 Jun 14 5:21 PM
Hi
Give in the select option Land1 the correct entry then execute. May be with the country u r giving u dont have data in the database table and also check with the other condition which u gave with and option, check in the database table by giving these 2 values whether u have entries with these two values.
Regards
Haritha.
‎2007 Jun 14 5:23 PM
If I don't have data ...I should see the cursor going to the next select..I can't...that is what is my problem
Message was edited by:
ramana peddu
‎2007 Jun 14 5:24 PM
Hi
U've to place the second SELECT out of the first one, because if it fails the system'll not run the code beetween SELECT/ENDSELECT.
SELECT land1 adrnr FROM vbpa INTO (lf_land1 , lf_adrnr)
WHERE vbeln = l_likps_wa-vgbel AND
parvw = 'WE' AND
land1 IN im_land1 AND
posnr = '000000'.
* IF sy-subrc <> 0.
*
* SELECT land1 adrnr
* FROM vbpa INTO (lf_land1 , lf_adrnr)
* WHERE vbeln = l_likps_wa-vbeln AND
* parvw = 'WE' AND
* land1 IN im_land1 AND
* posnr = '000000'.
* ENDSELECT.
*
* ENDIF.
ENDSELECT.
IF sy-subrc <> 0.
SELECT land1 adrnr FROM vbpa INTO (lf_land1 , lf_adrnr)
WHERE vbeln = l_likps_wa-vbeln AND
parvw = 'WE' AND
land1 IN im_land1 AND
posnr = '000000'.
ENDSELECT.
ENDIF.Max