cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic instance using subform

Former Member
0 Kudos

Hi all,

My requirement is to have a set of fields that needs to grow dynamically based on the input (at runtime). I wrapped those fields in a subform and in initialise event, i wrote a following logic.

<subformname>.instanceManager.setInstances(variable)

Variable will hold the no. of instance, which i am passing from context node. I have one more requirement, i am having a button in the form, if the user press the button, then the set of fields (wrapped in subform) needs to be add one more time in the form. I wrote a logic in Click event as,

<subformname>.instanceManager.addInstance(1).

My problem is, the form is showing as many instances (initially) and if i press the button, i am not able to get one more set of fields. If i remove the coding in initialise event (in subform), then if i press the button, its adding one more set of fields. Please help where i am going wrong.

P.S.: I am using Formcalc and run at client

Regards

V Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

NoJo
Active Participant
0 Kudos

your scripting seams ok, is your form a dynamic form (when you create it using abap you have to pass a parameter for this!)

docparams-fillable = abap_true. (to make it interactice)

docparams-DYNAMIC = abap_true.

Former Member
0 Kudos

Hi Norbert,

I am using WDY Abap and not calling the form using FM. Whether i need to change the script coding. Please help in this regard.

Regards,

V Kumar

chintan_virani
Active Contributor
0 Kudos

Please post your form hierarchy with code and check whether you you have set the enabled property in WD ABAP.

Chintan

NoJo
Active Participant
0 Kudos

Hi Kumar,

i agree to chintan, in web dynpro you have to activate ("X") the enabled property of UI element of the pdf. please try this. i tried your scenario and it worked....

br

norbert

Former Member
0 Kudos

Hi,

In the Button click add the count and check weather it increase the variable value.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi,

Thanks for your reply and could you explain me in detail. As in click event, i am increasing the instance using addInstance.

Regards,

V Kumar