Submit ... using variables to specify the program name.
I have a small question/problem/concern regarding the Submit statment. I have noticed that you use
<b>"SUBMIT (Program Name) EXPORTING LIST TO MEMORY AND RETURN"</b>.
You have to hardcode the Program name in the submit button; if you try using a variable to store the program name the program will encounter a runtime error. Which is awkward, because I want to make the program as flexible as possible. In any event, I was thinking if there could be a way to use a variable or equivalent in a Submit statment. Thank you all and good day.
This statement is working for me.
data : w_program(20).
w_program = 'PROGRAM NAME'.
submit (w_program) exporting list to memory and return.