11-23-2005 9:18 PM
People, I have this code into a smartform but I don't know why the system give me this error. Any body can help me!!
This is the part of the select code.
SELECT SINGLE VERTN SGTXT PSWBT
FROM BSID INTO IT_BSID.
LOOP AT IT_BSID INTO WA_BSID.
TEST = WA_BSID-SGTXT.
ENDLOOP.
This is the error of the system:
"IT_BSID" is neither specified under "TABLES" nor is it defined as an internal table.
Thanks for the help.
11-23-2005 9:23 PM
Hi,
You need to define the table IT_BSID in the global definitions.
11-23-2005 9:32 PM
IN THE GLOBAL DATA OF GLOBAL DEFINITION I DEFINE THE INTERNAL TABLE LIKE:
IT_BSID STANDARD TABLE OF TY_BSID WITH HEADER LINE
11-24-2005 5:02 AM
Hi,
Did you declared ty_bsid in global definition->Types Tab?
types: begin of ty_bsid,
...
end of ty_bsid.
And if you need only single record,then declare
workarea in Global definitions->Global Data.
wa_bsid like ty_bsid.
text type BSID-SGTXT.
In Program logic,
SELECT SINGLE VERTN SGTXT PSWBT
FROM BSID INTO wa_BSID.
TEST = WA_BSID-SGTXT.
Kindly reward points by clicking the star on the left of reply,if it helps.
Message was edited by: Jayanthi Jayaraman
11-23-2005 9:35 PM
11-23-2005 10:00 PM
Carlos
Don't you need to set the INTO TABLE clause instead only INTO ?
select x x x from bsid INTO TABLE it_bsid
(In addition to declare it_bsid and wa_bsid with the same 3 fields you are using)
Regards
Frank
11-23-2005 10:47 PM
Hi Carlos,
It looks like IT_BSID is declared correctly, referring to BSID.
You should use:
(Don't use SINGLE)
SELECT VERTN SGTXT PSWBT
FROM BSID INTO CORRESPONDING FIELDS OF TABLE IT_BSID.
(Or)
SELECT * FROM BSID INTO TABLE IT_BSID. "(If TY_BSID is exactly like BSID or has BSID as the first component)
LOOP AT IT_BSID INTO WA_BSID.
TEST = WA_BSID-SGTXT.
ENDLOOP.
If this helps, please remember to award the points and close the post.
Good luck,
Bhanu
11-24-2005 5:02 AM
The reason for your error is the omision of TABLE term in your select statement. Without this addition, you are trying to move your selected rows into the header of your ITAB, whereas your itab may not be having a header line.
So change your code as follows and it should work, if not please let us know.
SELECT VERTN SGTXT PSWBT FROM BSID
INTO <b><u>TABLE</u></b> IT_BSID.
LOOP AT IT_BSID INTO WA_BSID.
TEST = WA_BSID-SGTXT.
ENDLOOP.
Regards,
Srinivas
11-24-2005 5:04 AM
Sorry, I just noticed that you have a header line for your internal table. Please ignore my previous message.
11-24-2005 5:06 AM
hi,
In the program lines specify the IT_BSTD and WA_BSTD in the Input parameters
cheers,
sasi
11-24-2005 6:05 AM
hi,
try this....
step 1 .
in the types tab declare as
types : begin of ty_itab,
"required fields ,
end of ty_itab.
types : t_itab type table of ty_itab.
step 2.
in the global data declare
it_itab like t_itab .
now u can use the table it_itab.