04-06-2006 7:28 AM
Hello people,
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.
04-06-2006 7:33 AM
Chad,
This statement is working for me.
data : w_program(20).
w_program = 'PROGRAM NAME'.
submit (w_program) exporting list to memory and return.
Regards,
Ravi
04-06-2006 7:31 AM
Hi Chad, Program Name in the Submit statement should be hardcorded i think there is no other way to do other than this way...as u have said that taking the program name in to a variable will cause a runtime error is true ...
Regards,
Santosh
04-06-2006 7:33 AM
Chad,
This statement is working for me.
data : w_program(20).
w_program = 'PROGRAM NAME'.
submit (w_program) exporting list to memory and return.
Regards,
Ravi
04-06-2006 7:33 AM
Hi chad,
1. it works.
<b>IMPORTANT:
the program name should be CAPITAL.
(if in lower, it will give run time error)</b>
2.
report abc.
data : prog type sy-repid.
prog = 'ZAM_TEMP00'.
submit (prog) exporting list to memory and return.
regards,
amit m.
04-06-2006 7:37 AM
hi Chad,
try this way out take the program name in to a variable and enclose that within a brace
i.e, pro = 'Z_TEST'.
<b>Submit (pro) ....</b>
04-06-2006 7:37 AM
hi Chad,
try this way out take the program name in to a variable and enclose that within a brace
i.e, pro = 'Z_TEST'.
<b>Submit (pro) ....</b>
04-06-2006 7:37 AM
hi Chad,
try this way out take the program name in to a variable and enclose that within a brace
i.e, pro = 'Z_TEST'.
<b>Submit (pro) ....</b>
04-06-2006 7:37 AM
hi Chad,
try this way out take the program name in to a variable and enclose that within a brace
i.e, pro = 'Z_TEST'.
<b>Submit (pro) ....</b>
04-06-2006 7:40 AM
Thanks guys. Many of you have all been very helpful. I may have a few more questions in time but I think now! This will be great! Thanks again and take care.