‎2008 May 15 10:38 PM
Hi,
I want to clear the parameters after I process something and then go back. After all
the process I have tried something like this.
CLEAR P_VAR.
P_VAR = ''.But doesn't work, it still have the previous value. Someone knows how can I solve this?
Regards,
Isaac Melendez
‎2008 May 15 10:41 PM
I recently did the same and it works
Did you placed the code in at selection-screen?
‎2008 May 15 10:41 PM
I recently did the same and it works
Did you placed the code in at selection-screen?
‎2008 May 15 10:41 PM
Is P_VAR a parameter on the selection screen? can you show us how you declared it?
‎2008 May 15 10:52 PM
Hi Isaac,
using debugging you can find exactly where the data is append into your parameter.
Check the declaration of the field. It may contain any default values.
The best solution for youe query is Debugging.
Thanks.
‎2008 May 15 11:00 PM
yes, debugging should show you why it's not clearing.
even with a default value in the parameter declaration, you should be able to easily clear it.
PARAMETERS: p_var like rlgrap-filename DEFAULT 'c:\test'.
START-OF-SELECTION.
WRITE: /5 p_var.
CLEAR p_var.{/code}
‎2008 May 15 11:01 PM
Hi,
I solve my problem, thanks to you guys. The problem was that I put the code
in the START-OF-SELECTION, not in AT SELECTION-SCREEN.
Regards,
Isaac Melendez
‎2008 May 16 3:19 PM
Hi again,
I have a problem when clearing the parameters. I clear them in AT SELECTION-SCREEN, but they are clear when I press Execute button.
How can I clear them just when I go back, not in the Execute button.
Regards,
Isaac Melendez
‎2008 May 16 3:33 PM
Hi,
can you give me the part of code, Under At selection-screen, where you are using CLEAR statement.
In my program...its working properly.
Give me the code...will go thru that.
Regards
Sandeep reddy
‎2008 May 16 3:45 PM
Hi Sandeep,
Here is the code:
DATA: LV_MES(2) TYPE C.
PARAMETERS: P_MES(2) TYPE c OBLIGATORY.
AT SELECTION-SCREEN.
CLEAR: P_MES.
START-OF-SELECTION.
* Here is empty P_MES when I execute
LV_MES = P_MES.
END-OF-SELECTION.Regards,
Isaac Melendez
‎2008 May 16 3:50 PM
Issac is working ok.
Why do you want it to clear when you go back?
It is possible, but you will exit the report, so I don't get why you would want that
‎2008 May 16 3:57 PM
Hi Ramiro,
It isn't working like I want. The process is.
- I fill the parameters values.
- I execute the program.
- Then it show me a report.
- Then I go back to the parameters screen (and I want to clear the parameters here).
The problem is that if I Clear the parameters in AT SELECTION-SCREEN, then the
parameters are cleared when I press execute button.
- I fill the parameters values.
- I execute the program. (before, the parameters are cleared, and I can't process them)
- Then it show me a report.
- Then I go back to the parameters screen (and I want to clear the parameters here).
Regards,
Isaac Melendez
‎2008 May 16 3:56 PM
Hi,
DATA: LV_MES(2) TYPE C.
PARAMETERS: P_MES(2) TYPE c OBLIGATORY.
AT SELECTION-SCREEN.
CLEAR: P_MES.
START-OF-SELECTION.
Here is empty P_MES when I execute
LV_MES = P_MES.
END-OF-SELECTION.
You are writing CLEAR , immediately aftr AT SELECTION-SCREEN..
SO, when you press execute...this event will get trigerd. And the Parameter will get cleared.
But, at wat stage you want to clear the parameetr , tell me.
I modified your code like this....jus chk.
In case ur requirement is not fullfilled...please revert back.
If it solves ur problem, dont forget to reward points.
DATA: LV_MES(2) TYPE C.
PARAMETERS: P_MES(2) TYPE c OBLIGATORY.
AT SELECTION-SCREEN.
LV_MES = P_MES.
CLEAR: P_MES.
write : lv_mes.
Regards
Sandeep reddy
‎2008 May 16 4:15 PM