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

problem with generate subroutine pool

Former Member
0 Likes
592

hi all,

can you please check the code, and suggest am i doing wrong any were.

types: xtab(200).

data : ttab type table of xtab,

w_so type xtab.

data: routine(32) value 'TEMP_ROUTINE',

program(8),

message(128),

line type i.

AT SELECTION-SCREEN OUTPUT.

select field text DATA_ELEMENT from zauthgrptxt into table t_fieldlabel where STARALLOWED EQ c_asteriks.

DESCRIBE TABLE t_fieldlabel LINES N.

w_so = 'REPORT ZTEMP_PROGRAM.'.

append w_so to ttab.

w_so = 'FORM TEMP_ROUTINE.'.

append w_so to ttab.

loop at t_fieldlabel.

w_field = t_fieldlabel-field.

CONCATENATE 'SELECT-OPTIONS: ' ' P_' w_field zspace ' FOR ' ' T_FIELDLABEL-' w_field ' NO INTERVALS NO-EXTENTION.' INTO w_so.

append w_so to ttab.

endloop.

w_so = 'ENDFORM.'.

append w_so to ttab.

generate subroutine pool ttab name program

message message

line line.

if sy-subrc = 0.

perform (routine) in program (program).

else.

write:/ Message.

endif.

The sy-subrc = 4. nothing is coming into 'program' at generate subroutine pool

very urgent requirement please help

thanks,

vara

2 REPLIES 2
Read only

andreas_mann3
Active Contributor
0 Likes
515

1) in which line is your error

2) you cannot use select-options in a form

A.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
515

Andreas is right, you can not use the GENERATE FORM to dynamically build a selection screen.

Regards,

RIch HEilman