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

select single problem

Former Member
0 Likes
636

We moved following include program from dev to prod.

TABLES: CABN.

……..

SELECT SINGLE * FROM CABN WHERE

atinn = cabn-atinn AND

klart = '001' AND

objek = i_biw_mara_s-matnr.

It was working fine in dev but it failed in prd probably because this table was already declared in prd but not dev (sync issue). It gave this this error:

Program SAPLXRSA, Include ZBWF00007: Syntax error in line 000020

'CABN' has already been declared.

Then we commented the tables section and moved the transport again. This time it gave the following error:

The INTO clause is missing at SELECT.

Then we put into’s in the code as follows:

* TABLES: CABN.

……..

SELECT SINGLE * FROM CABN into CABN WHERE

atinn = cabn-atinn AND

klart = '001' AND

objek = i_biw_mara_s-matnr.

Then it gave the following error:

Field "CABN" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement

Any suggestions for how to fix this problem is greatly appreciated..

Thanks,

6 REPLIES 6
Read only

Former Member
0 Likes
611

Declaration TABLES: CABN might have been already declared in global data declaration include. Goto SE80, comment out this statement in your z include and activate all the includes.

Note: Before moving the transport to PROD, do the consistency check in SE09 of your transport. This avoids failure of transport everytime.

OK. Try ACTIVATING IT ANYWAY. I really encountered this problem earlier.

Thanks,

SKJ

Message was edited by:

SKJ

Read only

0 Likes
611

As I said in my message, I already commented out it but I am still having errors.

Read only

rahulkavuri
Active Contributor
0 Likes
611

hi with the code you have written its mandatory that u need to comment out the tables declaration

tables: vbak.

select single * FROM vbak into vbak where vbeln is NOT NULL.

If I dont declare VBAK it reports an error, I guess when you use the select single * you need to have the tables declared

Dont forget to award points if found helpful

Read only

0 Likes
611

I did this but still having errors..

Read only

0 Likes
611

Please use a work area. Also, I'm a little confused here, you are selecting from CABN but you are also using CABN-ATINN in your WHERE clause. Something is not right here.


data: wa_Cabn type cabn.

clear wa_cabn.
SELECT SINGLE * FROM CABN into WA_CABN
             WHERE atinn = cabn-atinn 
                  AND klart = '001'
                 AND  objek = i_biw_mara_s-matnr.

REgards,

Rich HEilman

Read only

0 Likes
611

I am sorry, I copied wrong line.. It was going to be like this.

SELECT SINGLE * FROM cabn into cabn WHERE

atnam = 'LOW_SOLIDS'.

Thanks for your answer. I'll try this. Assigned points.