‎2006 Jul 19 5:11 PM
Hi all,
I am a BW developer,new to ABAP programming. There is a queue in SMQ1 that gets choked often. We created a program to run ever 6 hours to clear the queue. This worked. The problem is, we have written this program for only one queue.
We noticed that we are facing problem with 2 other queues. We do not want to create programs for each and every queue. My manager suggested creating variants for the queues and calling the variants in the program.
I have never done this. Could some guide me through the procedures.
I look forward to the advice of the experts.
Regards,
S.P
‎2006 Jul 19 5:18 PM
I really do not know what your program is and what it is intened. However, for creating a variant,
1) you need to execute the program and get the selection screen.
2) Enter your Selection creteria(Here your Query name, I guess)
3) There is a save button. Save it with name and description.
4) You could select the saved variant from the icon created to Execute button.
5) Similarly you can create variants for all you selection creterias.
Cheers,
Thomas.
‎2006 Jul 19 5:24 PM
I am not sure what your manager meant, but it probably means that you remove the hardcoding of that queue in the program and then add a parameter to your selection screen that takes in a queue name and processes the clearing of the selected queue. How do you clear the queue? Do you submit a SAP program from within your program?
‎2006 Jul 19 7:19 PM
Hi Srinivas,
Thank you for your response.
We have hardcoded the name of the queue in the program. We are executing this program in SM37. Calling the program and scheduling it to run every 6 hours. Like you said, adding parameters to the selection screen would solve the problem.
Can you give me some links that would provide me information on the selection screends and parameters.
I appreciate your help.
Regards,
S.P
‎2006 Jul 19 7:23 PM
Simply write 'PARAMETERS' or 'SELECT-OPTIONS' or 'SELECTION-SCREEN' in your program, put your cursor on it and press F1. That is the easiest way to access the documentation.