2008 May 30 11:46 AM
I have an internal table ITAB with work area WA_ITAB with (n-2) fields filled in
I need to fill two more fields from anotehr database table depending on condition databse table-fieldname = WA_ITAB
Hoe to do this
2008 May 30 11:52 AM
Hello.
Considering that the key of that database table is field1 of your internal table, do like this:
LOOP AT itab INTO wa.
SELECT SINGLE fieldn-1 fieldn
FROM database_table
INTO (wa-fieldn-1, wa-fieldn)
WHERE field1 = wa-field1.
CHECK sy-subrc EQ 0.
MODIFY itab FROM wa TRANSPORTING fieldn-1 fieldn.
ENDLOOP.
Best regards.
Valter Oliveira.
2008 May 30 11:52 AM
Hi,
Use transporting option.
then u can insert data into new fields.
2008 May 30 11:55 AM
Use "for all entries"
select query in loop is not at all advisable..
It will reduce ur performance to a level in production..
Regards..
Manish.