Application Development and Automation 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: 
Read only

most efficient, MODIFY / UPDATE?

Former Member
0 Likes
1,166

Hi,

I need to modify (empty) 1 field for all enteries in table EANL?

What is the most efficient way to do it?

tnx,Adibo.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,107

Hi,

To modify a single field for all the entries in the table try this,

UPDATE dbtab set field = space.

Reward if useful.

Thanks,

Muthu.

9 REPLIES 9
Read only

Former Member
0 Likes
1,107

Loop over it and modify.

Loop at itab.

MODIFY...

endloop.

Read only

Former Member
0 Likes
1,107

Hi,

Refer to the following example.It is updating a table(ZCBU) with the field sfid for all entries in the table.

SELECT cbu sfid FROM zcbu INTO TABLE zcbu_temp_update

FOR ALL ENTRIES IN zcbu_update WHERE cbu = zcbu_update-cbu.

LOOP AT zcbu_update.

UPDATE zcbu SET sfid = zcbu_update-sfid

WHERE cbu = zcbu_update-cbu.

IF sy-subrc = 0.

count = count + 1.

ENDIF.

ENDLOOP.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,107

Hi

loop

Modify along with TRANSPORTING option

endloop

Regards,

Arun

Read only

Former Member
0 Likes
1,108

Hi,

To modify a single field for all the entries in the table try this,

UPDATE dbtab set field = space.

Reward if useful.

Thanks,

Muthu.

Read only

Former Member
0 Likes
1,107

I need to modify EANL (database table)

Read only

piyush_mathur
Active Participant
0 Likes
1,107

Hi Adible

loop on table

Modify table with TRANSPORTING field name

endloop

Piyush

Read only

Former Member
0 Likes
1,107

Update EANL set <field name> = <value> [where <condn>].

where condition is optional....

Read only

Former Member
0 Likes
1,107

Hi,

isn't possible to use tcode EL59?

I think it's better to modify a sap-table via BDC, TCODE, BAPI etc.

as via abap.

Regards, Dieter

Read only

Former Member
0 Likes
1,107

Hi,

To empty the contents of the particular field name use this logic.

LOOP AT ITAB.

CLEAR ITAB-'give fieldname here' .

MODIFY ITAB TRANSPORTING 'give fieldname here' .

ENDLOOP.

Pls reward me points if it is useful.

Thanks & Regards,

D. Ramya.