cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to call dynamic forms

Former Member
0 Likes
1,314

Hi!

I want to create a "dynamic" coding using eg field-symbols.

Eg:

FIELD-SYMBOLS: <MY_FORM> TYPE ANY.

LOOP AT WT_FIELDCATALOG.

CONCATENATE 'CONTROL' WT_FIELDCATALOG-COL_POS

INTO MY_FORM.

ASSIGN (MY_FORM) TO <MY_FORM>.

PERFORM <MY_FORM>.

ENDLOOP.

By this way I want to create control for each column of my fieldcatalog. The forms will be CONTROL1, CONTROL2,....

I tried a test using field-symbol but I can not activated the programm because the form <MY_FORM> does not exist. Is there a way to do this according to you?

Thanks for your help,

David

Edited by: David31 on Sep 21, 2009 5:54 PM

Accepted Solutions (1)

Accepted Solutions (1)

kesavadas_thekkillath
Active Contributor
0 Likes

link:[http://searchsap.techtarget.com/tip/0,289483,sid21_gci1250455,00.html]

link:[http://help.sap.com/saphelp_nw04/helpdata/en/9f/db999535c111d1829f0000e829fbfe/content.htm]

Answers (2)

Answers (2)

Former Member
0 Likes

Hi

If u want to call dynamically a form just defined in the program:

data: form_name(30).

perform (form_name) in program sy-repid.

If you need to define dynamically an abap code, u need to generate a subroutine pool (see abap help)

Max

Former Member
0 Likes

Hi, define a field lv_form TYPE string. CONCATENATE your fieldname in to this form and ASSIGN lv_form TO <my_form>. Succes