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

Dynamic SUBMIT statement

Former Member
0 Likes
1,465

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
896

Use a variable in parenthesis:

data: v_name(40).

v_name = 'PROGRAM1'.

submit (v_name).....

2 REPLIES 2
Read only

Former Member
0 Likes
897

Use a variable in parenthesis:

data: v_name(40).

v_name = 'PROGRAM1'.

submit (v_name).....

Read only

0 Likes
896

Great !!! thanks a lot.

---Akashdeep