09-19-2007 3:25 PM
Hi,
I have a following scenario.
I have a custom ZTABLE. I want to update these ZTABLE directly from an excel sheet. Now if the data does not exist for the records in particular column then I do not want to update it in ZTABLE.
Ex:
COL1........ COL2................COL3
IKEA......... 9/10/1007..........$100.56
SONY...... .9/20/2007
SAP......... .9/25/2007..........$32.27
Now I want to add in table only the records which has value in COL3, So here IKEA and SAP from excel sheet and not SONY because it does not have any value in COL3 ?
Any ideas....
Regards,
Rajesh.
09-19-2007 3:28 PM
from excel u load into an itab before ZTBALE update right.. just delete the unwanted entries from this itab ie
DELETE ITAB WHERE COL3 IS INITIAL.
Arya
09-19-2007 3:35 PM
Hi
declare the internal table with 3 fields
use GUI_UPLOAD fun module and get the data from EXcel to itab.
then use
DELETE ITAB WHERE COLUMN3 = ' '.
then use the command INSERT or MODIFY to update the Ztable
Reward if useful
regards
Anji
09-19-2007 4:05 PM
hi rajesh,
please see the below logic....
1) declare a int table with 3 fields
2) get the data from respective database tables into ur internal table.
3) upoad the data into internal table from XL sheet using ws_upload function module or gui_upload function module.
3) write below command...
delete <int table> where colomn = space.
so it will delete the entries where colomn 3 contains space.
to update the ztable use below insert command or modify command.
insert into ztable from <int table> .
commit work; --> saving the data.
thanks,
maheedhar
09-19-2007 4:17 PM
check for the condition if the particular variables in the row is initial.
if any of the row is initial
delecte the value and upload.
reward point if convienced.