Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Update dbtable &for all entries

Hi all,

I have an internal table with the following structure

TYPES:

BEGIN OF ty_struct,

pernr type persno,

begda type begda,

BEGIN OF ty_struct,

TYPES :

it_persons TYPE TABLE OF ty_struct.

FIELD-SYMBOLS :

<fs_person> TYPE ty_struct.

I want to set the field stat2 of PA0000 (Infotype 0000) table to '03' for all occurring persons in it_persons .

A simple solution is :

LOOP AT it_persons ASSIGNING <fs_person>.

update pa0000 set stat2 = '03' WHERE pernr = <fs_person>-pernr

AND begda = <fs_person>-begda.

ENDLOOP.

Any beter solution (performance) ?

it_persons is about 500 entries.

Thanks

Tags:
Not what you were looking for? View more on this topic or Ask a question