Skip to Content

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

creating new fields with arithmetic operations

data : begin of wa, kunnr type kunnr, end of wa, it like table of wa.

select kunnr into table it from kna1 up to 10 rows.

loop at it into wa. write : / wa-kunnr. endloop.

Here 5 customer numbers are displayed.. i want a another new column with adding 100 to each of customer number which is disaplyed from kna1 table .

can anyone solve my problem with codings..

Regards.

Thiru.

Tags:
Former Member
Former Member replied

Changed the above code....little bit....

DATA : BEGIN OF wa,
kunnr TYPE kunnr,
END OF wa,

v_kun TYPE i.

DATA it LIKE TABLE OF wa.

SELECT kunnr INTO TABLE it FROM kna1 UP TO 10 ROWS.

LOOP AT it INTO wa.
  v_kun = wa-kunnr + 100.
  WRITE : / wa-kunnr, v_kun.
  CLEAR: wa, v_kun.
ENDLOOP.

0 View this answer in context

Helpful Answer

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