10-14-2010 4:14 PM
Hi,
I am a BI developer with mostly no ABAP help in my team. Certain requirement I am having demands a program where I need to call another program with SUBMIT statement. But the problem is the name of the program will be dynamic depending on certain conditions. Can it be handled by field-symbols or something similar ? I tried field symbol type ANY and assigned it from a string type variable and called SUBMIT. But I am facing dump saying program not found and analysis shows that it could not resolve the field symbol.
I can concatenate & capture the name of the program into a string variable (say prg_nm). I need to to know the steps after that.
I have also thought of using CASE like :
case prg-nm.
when 'PROG1'.
SUBMIT PROG1.
when 'PROG2'.
SUBMIT PROG2.
.......
endcase.
But in this way, I'd need to change the code in future as well (because program list can increase in future). Please advise.
--Akashdeep
10-14-2010 4:30 PM
Use a variable in parenthesis:
data: v_name(40).
v_name = 'PROGRAM1'.
submit (v_name).....
10-14-2010 4:30 PM
Use a variable in parenthesis:
data: v_name(40).
v_name = 'PROGRAM1'.
submit (v_name).....
10-14-2010 4:34 PM