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: 

most efficient, MODIFY / UPDATE?

Former Member
0 Kudos

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

Former Member
0 Kudos

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

former_member223537
Active Contributor
0 Kudos

Loop over it and modify.

Loop at itab.

MODIFY...

endloop.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi

loop

Modify along with TRANSPORTING option

endloop

Regards,

Arun

Former Member
0 Kudos

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.

Former Member
0 Kudos

I need to modify EANL (database table)

piyush_mathur
Active Participant
0 Kudos

Hi Adible

loop on table

Modify table with TRANSPORTING field name

endloop

Piyush

Former Member
0 Kudos

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

where condition is optional....

Former Member
0 Kudos

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

Former Member
0 Kudos

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.