Skip to Content
0
Former Member
Jun 20, 2007 at 06:26 AM

help in perfom

13 Views

HI ALL

in this code of mine i use name_tab nametab_3001 but i have a lot of tables that i

have to do the same code what is have to be change is the just the table <b>nametab_3001 & wa_nametab_3001</b>

i do it in perform maybe some can help me with that?

Regards

SELECT SINGLE perid pernr nachn vorna

FROM pa0002

INTO (taz9,emp_pernr,famliy_name,first_name)

WHERE pernr = wa_et_infty_modif-pernr

AND begda LE wa_et_infty_modif-bdate

AND endda GE wa_et_infty_modif-bdate.

lv_str1 = famliy_name(12). "Employee last name

SHIFT lv_str1 LEFT DELETING LEADING space. "Miror

TRANSLATE lv_str1 USING c_translate. "Chinese

wa_nametab_3001-mishpacha = lv_str1.

wa_nametab_3001-emp_pernr = emp_pernr.

APPEND wa_nametab_3001 TO nametab_3001.

CLEAR wa_nametab_3001.

lv_str2 = first_name(7). "Employee first name

SHIFT lv_str2 LEFT DELETING LEADING space. "Miror

TRANSLATE lv_str2 USING c_translate. "Chinese

wa_nametab_3001-praty = lv_str2.

LOOP AT nametab_3001 INTO wa_nametab_3001.

IF wa_nametab_3001-emp_pernr = wa_et_infty_modif-pernr.

MOVE: lv_str2 TO wa_nametab_3001-praty.

MODIFY nametab_3001 FROM wa_nametab_3001 TRANSPORTING praty.

CLEAR wa_nametab_3001.

ENDIF.

ENDLOOP.