Skip to Content
author's profile photo Former Member
Former Member

How to add input fields dynamically in module pool ?

Dear Experts,

I have to create a module pool report for QC test certificates. The number of items in a test certi. is not fixed.

So while inputting the data I want to have a button which on pressed every time creates a new row of labels/input boxes/radio buttons/check boxes dynamically. And when the data is saved all the items' data is stored in database table.

I have searched this forum for this but I only found such requirements for WebDynpros and not for module pools.

So pls help me with this requirement.

Thanks,

Vishal.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2013 at 05:09 AM

    Hi

    In module pool it will be difficult for you to add labels and fields and radio buttons dynamically..

    One simple solution what i feel is if you have the complete format of the certificate layout with the maxium attibutes on the screen.....Then design the screen with the maxium attibutes one will use and u can make the fiedls invisbile according to you requirements.......Depending on the users you the make the appropriate fields visbile for him.

    Use of table control is suggested for this. (But depends on your requirements)

    With regrads

    Suneesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 11:36 AM

    Hi,

    I think it is not possible to add input fields dynamically in module pool screen. One think you can do is to add maximum fields in the screen and make it visible/invisible as per your requirement.

    Sample code to visible a field is:

    loop at screen.

    if screen-name eq 'your_screen_name'.

    screen-active = 1.

    endif.

    endloop.

    Regards,

    Riju Thomas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 27, 2013 at 04:41 PM

    Hi Vishal.

    You are using alv oo with container? or table control?

    In both cases is possible.

    Please inform us.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2013 at 12:05 AM

    Man,

    Did you tried Step Loop before?

    You can solve this using this option...

    Take a look below:

    http://saptechnical.com/Tutorials/ABAP/Steploop/Index.htm

    I hope it helps...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 09:26 AM

    Hi Vishal,

    As per as my understanding, I tried ur requirement. Please check this below codes.

    ******* Create dynamic internal table and assign to FS

    CALL METHOD cl_alv_table_create=>create_dynamic_table

    EXPORTING

    it_fieldcatalog = ifc

    i_length_in_byte = 'X'

    IMPORTING

    ep_table = dy_table.

    ASSIGN dy_table->* TO <dyn_table>.

    ******* Create dynamic work area and assign to FS

    CREATE DATA dy_line LIKE LINE OF <dyn_table>.

    ASSIGN dy_line->* TO <dyn_wa>.

    with regards

    Arnab....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.