08-27-2013 12:34 PM
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.
08-28-2013 6: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
08-27-2013 5:41 PM
Hi Vishal.
You are using alv oo with container? or table control?
In both cases is possible.
Please inform us.
08-31-2013 7:15 AM
Hey Ronaldo,
I am trying to use table control from screen painter but no luck yet.
Pls suggest the process to achieve this..
Thanks,
Vishal
08-28-2013 1: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...
08-28-2013 6: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
08-29-2013 10: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....
08-29-2013 12:36 PM
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