2007 Aug 31 1:24 PM
Hi. I have a small question. I have a PARAMETERS on my SELECTION-SCREEN. I'd like to set them emty when program ends and backs to SELECTION-SCREEN. How to do this? Greetings. P.
2007 Aug 31 2:17 PM
Hi,
see this code.
PARAMETERS:name(10),num(2).
write:/ name.
write:/ num.
AT SELECTION-SCREEN OUTPUT.
clear name.
<b>reward if helpful</b>
rgds,
bharat.
Hi. I have a small question. I have a PARAMETERS on my SELECTION-SCREEN. I'd like to set them emty when program ends and backs to SELECTION-SCREEN. How to do this? Greetings. P.
2007 Aug 31 1:27 PM
Try clearing it at the end of the program.
CLEAR p_xyz.
Provided there no memory id is attached to the parameter.
<b>Do Reward If Useful Answer</b>
Thanks
Vishwanath Purohit
2007 Aug 31 1:27 PM
Hi,
End-of-selection.
clear p_param.
rewards if useful,
regards,
nazeer
2007 Aug 31 1:28 PM
2007 Aug 31 1:28 PM
at end of program use:
p_field = ' '.
plz reward points if it helps
2007 Aug 31 1:35 PM
I try but there's no effect. Maybe it's connected with my program structure below.
REPORT zgr_package .
TABLES: zpackage.
DATA: adrnr TYPE adrnr.
DATA: internalname TYPE rs38l_fnam.
DATA: control_parameters TYPE ssfctrlop.
INCLUDE <ICON>.
SELECTION-SCREEN begin of block b1 with frame.
PARAMETERS werks LIKE zpackage-werks OBLIGATORY.
PARAMETERS datum LIKE zpackage-datum OBLIGATORY.
PARAMETERS vendor LIKE zpackage-vendor OBLIGATORY.
PARAMETERS pack LIKE zpackage-pack OBLIGATORY.
PARAMETERS note LIKE zpackage-note.
SELECTION-SCREEN END OF BLOCK b1 .
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
SELECTION-SCREEN COMMENT 01(20) v_icon FOR FIELD print.
PARAMETERS: print as checkbox.
SELECTION-SCREEN END OF BLOCK b2.
INITIALIZATION.
GET PARAMETER ID 'WRK' FIELD werks.
datum = sy-datum.
v_icon = '@2P@'. "icon_test.
START-OF-SELECTION.
AUTHORITY-CHECK OBJECT 'M_BEST_WRK' ID 'WERKS' FIELD werks.
IF sy-subrc NE 0.
MESSAGE e398(00) WITH text-001.
ELSE.
SELECT SINGLE * FROM zpackage WHERE
werks = werks AND pack = pack.
IF sy-subrc = 0.
MESSAGE i398(00) WITH text-002.
ELSE.
zpackage-werks = werks.
zpackage-datum = datum.
zpackage-vendor = vendor.
zpackage-pack = pack.
zpackage-uname = sy-uname.
zpackage-note = note.
IF print = 'X'.
PERFORM PREPARE_ADDR.
PERFORM PRINT_DOCUMENT.
ENDIF.
INSERT zpackage.
MESSAGE s398(00) WITH text-003.
ENDIF.
ENDIF.
END-OF-SELECTION.
CLEAR vendor.
CLEAR note.
pack = ''.
2007 Aug 31 1:39 PM
i think da probelm is dat u've declared da fields obligatory and so dey cannot be blank..
check if removing da obligatory option helps or not
plz reward points if it helps..
2007 Aug 31 1:38 PM
2007 Aug 31 1:40 PM
2007 Aug 31 1:57 PM
OK. One more thing. I'd like to clear not all fields. Only note, pack and vendor. And the most important - when fields clears I'd like werks to set it's value on value which was inserted by user.
2007 Aug 31 1:59 PM
2007 Aug 31 2:04 PM
Ok, so now we also want to use parameter ids for the WERKS and DATUM fields, so that we hold the values that the user has entered, but clear everything else.
selection-screen begin of block b1 with frame.
parameters werks like marc-werks memory id zwrk obligatory .
parameters datum like sy-datum memory id zdat obligatory.
parameters vendor like lfa1-lifnr obligatory.
parameters pack type char20 obligatory.
parameters note type char20.
selection-screen end of block b1 .
initialization.
start-of-selection.
write:/ 'Start-of-selection'.
end-of-selection.
write:/ 'End-of-selection'.
free memory.
set parameter id 'ZWRK' field werks.
set parameter id 'ZDAT' field datum.
Regards,
RIch Heilman
2007 Aug 31 2:17 PM
Hi,
see this code.
PARAMETERS:name(10),num(2).
write:/ name.
write:/ num.
AT SELECTION-SCREEN OUTPUT.
clear name.
<b>reward if helpful</b>
rgds,
bharat.
2007 Aug 31 2:50 PM
It appears that you have marked Bharat's answer as solving your problem. I can assure you that you have recieved some bad information. Why? Well, test that example solution. If you enter a value into the fields and hit enter, the NAME field will be cleared. This is no the behavior that you want, I'm sure. I strongly suggest that you use the logic in my example above, this is the only way you will get the functionality that you require.
Regards,
Rich Heilman
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |