2007 Jan 10 5:52 AM
select belnr into (itab1-l_belnr) up to 1 rows
from BKPF .
append itab1.
endselect.
2007 Jan 10 5:56 AM
Hi Mansi
As you are appending internally you can try using INTO TABLE in select to remove ENDSELECT.
Try this:
select belnr into <b>table itab1</b> up to 1 rows
from BKPF .
*append itab1.
*endselect.
Make sure that belnr is the first field in internal table itab1.
If belnr is not the first field, then you have to use INTO CORRESPONDING FIELDS OF TABLE <itab>.
Regards
Eswar
Hi Mansi
As you are appending internally you can try using INTO TABLE in select to remove ENDSELECT.
Try this:
select belnr into <b>table itab1</b> up to 1 rows
from BKPF .
*append itab1.
*endselect.
Make sure that belnr is the first field in internal table itab1.
If belnr is not the first field, then you have to use INTO CORRESPONDING FIELDS OF TABLE <itab>.
Regards
Eswar
2007 Jan 10 5:54 AM
2007 Jan 10 5:55 AM
Use the following statement.
select belnr from bkpf into corresponding fields of table itab1.
Manoj
2007 Jan 10 5:56 AM
Hi Mansi
As you are appending internally you can try using INTO TABLE in select to remove ENDSELECT.
Try this:
select belnr into <b>table itab1</b> up to 1 rows
from BKPF .
*append itab1.
*endselect.
Make sure that belnr is the first field in internal table itab1.
If belnr is not the first field, then you have to use INTO CORRESPONDING FIELDS OF TABLE <itab>.
Regards
Eswar
2007 Jan 10 5:58 AM
demo code -
tables :pa0006.
data begin of itab occurs 0.
include structure pa0006.
data end of itab.
Select * from Pa0006 up to 20 rows into table itab.
loop at itab.
write:/itab-pernr.
endloop.
2007 Jan 10 5:58 AM
select belnr into corresponding fields of table itab1 from bkpf up to 1 rows.
or use select single if you can define the condition in where clause.
regards
shiba dutta
Message was edited by:
SHIBA DUTTA
Message was edited by:
SHIBA DUTTA
Message was edited by:
SHIBA DUTTA
2007 Jan 10 5:59 AM
i thin ur requirtement is to add one filked in the internal table.
u dont want to use select-endselect.
types: begin of Ty_bkpf,
belnr type bkpf-belnr,
end of ty_bkpf.
data: it_bkpf type table of ty_bkpf.
select belnr from bkpf into table it_bkpf.
i created types, and internal table.
u can follow the same logic to include other fields,
also to filter the values from BKPF u can use appropriate conditions in the where clause of the select statement.
reward if useful.
2007 Jan 10 6:00 AM
Hi
Use the following:
SELECT SINGLE belnr
FROM bkpf
INTO CORRESPONDING FIELDS OF TABLE itab1.
PLZ REWARD POINTS
2007 Jan 10 6:02 AM
select belnr into table itab1 up to 1 rows
from BKPF .
append itab1.
2007 Jan 10 6:04 AM
2007 Jan 10 6:05 AM
hi mansi,
declare one more internal table like
data: itab2 type bkpf-belnr occurs 0.
then write the select statement
select belnr into table itab2 up to 1 rows from bkpf.
in this way also u can avoid endselect...
~~Guduri
2007 Jan 10 6:12 AM
if ur table is like this ..
data: begin of itab occurs 0,
belnr like bkpf-belnr,
end of itab.
select belnr from BKPF into table itab.
if ur table is like this (contains other than belnr fied..)
data: begin of itab occurs 0,
belnr like bkpf-belnr,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
end of itab.
if u want to selct only belnr field...
select belnr from BKPF into corresponding of table itab.
Regards.
Ramesh.
if u want to specific recored use <b>up to N rows</b>
if u r useing any condition add WHERE <field name > = <pass condition value>
ok
2007 Jan 10 6:13 AM
select belnr from bkpf into table itab.
if u want to restrict with condition, u can do it with where clause in select statement.
Regards,
Sujatha.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |