Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP scenario...

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.