‎2006 Dec 17 7:53 AM
Hallow I doing a program and I wont to move id number to perner but not the last number ex. Id num <b>123456</b> perner have to be <b>12345</b> id num <b>1234</b> perner <b>123</b> I try to do it in my loop but it cut the first num like 23 any suggestion thanks .
LOOP AT itab1.
SPLIT itab1 AT ',' INTO:
itab-id_number
itab-hagbla
itab-date_open_hagbla
itab-date_start_hagbl
itab-date_stop_hagbla
itab-date_open_hamora
itab-date_close_hamor.
move itab-id_number to itab-pernr.
APPEND itab.
ENDLOOP.
LOOP AT itab.
MODIFY yhr_ex_mushlach FROM TABLE itab.
ENDLOOP.
<b>Id num is numc 9 and pernr is numc 8</b>
‎2006 Dec 17 8:33 AM
Do the following instead of move itab-id_number to itab-pernr.
itab-pernr = itab-id_number+0(8).
Regards,
Ravi
Note - Please mark all helpful answers
‎2006 Dec 17 8:33 AM
Do the following instead of move itab-id_number to itab-pernr.
itab-pernr = itab-id_number+0(8).
Regards,
Ravi
Note - Please mark all helpful answers
‎2006 Dec 17 1:12 PM
hallow ravikumar i try it but its good just when u have id number with 9 numbers
what can i do if i have ex. 5 or 6 number like 123456 or 12345 what can i do thankes
‎2006 Dec 17 2:17 PM
In that case
DATA : W_LENGTH TYPE I.
W_LENGTH = STRLEN( itab-id_number ).
W_LENGTH = W_LENGTH - 1.
ITAB-PERNR = ITAB-ID_NUMBER+0(W_LENGTH).Regards,
Ravi
‎2006 Dec 17 8:37 AM