‎2008 Jun 11 11:07 AM
i want to select from bsak table and append the records to the existing records of itab_bsis
wat should be the syntax
‎2008 Jun 11 11:14 AM
hi,
you can get all the records in one internal table then use loop to get perticuler fields records by using READ statement you will get your result.
try by following code for your table.
SELECT matnr " Material Number
werks " Plants
prctr " Profit Center
FROM marc
INTO TABLE i_marc
FOR ALL ENTRIES IN i_mara
WHERE matnr = i_mara-matnr
AND werks IN s_werks.
ENDIF. " IF i_mara[] IS NOT INITIAL
LOOP AT i_marc INTO wa_marc.
wa_output-matnr
hope this wil be help ful....
regards,
praveena.
‎2008 Jun 11 11:08 AM
Hello.
With,
SELECT * FROM bsak APPENDING TABLE itab_bsis WHERE ....
You'll keep previous record, contrary to
SELECT * FROM bsak INTO TABLE itab_bsis WHERE ....
Regards,
Valter Oliveira.
‎2008 Jun 11 11:10 AM
Hi.
Type SELECT and APPEND in your ABAP editor, set the cursor on each of the words and press F1. If the online documentation is not sufficient please use SDN's search. You will find a huge number of questions like yours.
Best regards,
Jan Stallkamp
‎2008 Jun 11 11:11 AM
HI,
use select * from bsak appending table itab.
se this example below.
DATA:itab type bsak occurs 0.
DATA:lin TYPE sy-tfill.
select * from bsak INTO TABLE itab UP TO 10 rows.
select * from bsak APPENDING TABLE itab UP TO 10 rows.
DESCRIBE TABLE itab LINES lin.
WRITE:/ lin.
rgds,
bharat.
‎2008 Jun 11 11:12 AM
Hi,
You need to use appending corresponding fields of table itab statement in your select statement for BSAK.
Thanks,
Sriram Ponna.
P.S. Don;t create new thread for same query.
‎2008 Jun 11 11:13 AM
hii,
you can append your fields by using
SELECT carrid connid cityfrom cityto
FROM spfli
INTO (wa-carrid, wa-connid, wa-cityfrom, wa-cityto).
thx
twinkal
‎2008 Jun 11 11:13 AM
hi gayathri,
you can get all the records in one internal table then use loop to get perticuler fields records by using READ statement you will get your result.
try by following code for your table.
SELECT matnr " Material Number
werks " Plants
prctr " Profit Center
FROM marc
INTO TABLE i_marc
FOR ALL ENTRIES IN i_mara
WHERE matnr = i_mara-matnr
AND werks IN s_werks.
ENDIF. " IF i_mara[] IS NOT INITIAL
LOOP AT i_marc INTO wa_marc.
wa_output-matnr = wa_marc-matnr.
wa_output-werks = wa_marc-werks.
wa_output-prctr = wa_marc-prctr.
lw_frecid = lw_frecid + 1.
wa_output-frecid = lw_frecid.
APPEND wa_output TO i_output.
ENDLOOP. " LOOP AT i_marc
regards,
sindhu.
‎2008 Jun 11 11:14 AM
hi,
you can get all the records in one internal table then use loop to get perticuler fields records by using READ statement you will get your result.
try by following code for your table.
SELECT matnr " Material Number
werks " Plants
prctr " Profit Center
FROM marc
INTO TABLE i_marc
FOR ALL ENTRIES IN i_mara
WHERE matnr = i_mara-matnr
AND werks IN s_werks.
ENDIF. " IF i_mara[] IS NOT INITIAL
LOOP AT i_marc INTO wa_marc.
wa_output-matnr
hope this wil be help ful....
regards,
praveena.
‎2009 Jul 20 8:17 AM