Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete field dynamically in Module pools

Former Member
0 Likes
895

Hi,

Is is possible to delete or add a particular field at runtime.

I can make it invisible but is it possible to remove it.

Thanks in advance.

Aditya

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
873

Hi,

You cannot ADD and DELETE but You can make it APPEAR and DISAPPEAR using SCREEN-ACTIVE = 0 or 1.

Regards,

Sesh

6 REPLIES 6
Read only

Former Member
0 Likes
873

Can you give some background about why you want to do this?... normal practice would be to set the Active value to '0' to make it disappear.

Read only

0 Likes
873

HI

I am giving you the example of greeting sites. you can choose the number of recipents to whom you want to send card. if you choose 5 then five input boxes appears to enter the name again if you select 3 then two of them disappears. I want to make such kind of program.

Aditya

Read only

0 Likes
873

The typical approach would be to define, say, 20 input fields in the screen, and hide those you don't want. If you name the fields carefully, you can make the coding more elegant e.g. something like this snippet (not syntax checked):


    loop at screen.
*" Name of screen fields is something like gs_9999-email_01, gs_9999-email_02 etc
      split screen-name at '-' into l_prefix l_suffix. "get email_nn in l_suffix
      l_char_2 = l_suffix+6(2). "get number from end
      if l_char_2 co '0123456789 '. "looks like a number...
        l_numc_2 = l_char_2.
        if l_numc2 > gs_9999-lines_to_show. "how many you want on screen
          screen-active = gc_screen_off. " constant = '0'
        endif.
        modify screen.
      endif.
    endloop.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
874

Hi,

You cannot ADD and DELETE but You can make it APPEAR and DISAPPEAR using SCREEN-ACTIVE = 0 or 1.

Regards,

Sesh

Read only

Former Member
0 Likes
873

Thanks

Read only

Former Member
0 Likes
873

thanks