Skip to Content
0
Former Member
Aug 06, 2014 at 09:10 AM

Problem in table control wizard in module pool programming

216 Views

Hi all,

i have created a table control wizard in my screen and in that my need is to populate automatically increasing serial number in it.

For this purpose i have written these code lines, but i am not getting what i wants, but i get the row has been appended one after another.

Please see my code and tell me where i am doing wrong. Here it_zlname is the name of my internal table i have used in my table control wizard

and SNO is the field which i need to auto increment.

DATA: count(2) TYPE n.

MODULE MODIFY INPUT.

DESCRIBE TABLE it_zlname LINES count.
count = count + 1.

IF wa_zlname-SNO IS INITIAL.
wa_zlname-sno = count.
APPEND wa_zlname to it_zlname.
ELSE.

MODIFY IT_ZLNAME
FROM WA_ZLNAME
TRANSPORTING sno PER_RES name CONTACT_NO
ADDRESS ADV_FEES WHERE sno = wa_zlname-sno.

ENDIF.

ENDMODULE.