2010 Feb 16 5:43 AM
Hi All
I created two i/p field(I.E - Quantity & percentage) & one more o/p field result.in result final data will display depending upon quantity & percentage.& i use one push bottom that is submit.my problem is that when i hit on submit button , Data will display but when i use enter button from keyboard the data will not display ,(only first time of execution ).... but when i use that push bottom first from mouse its work & then i use from key board its also work.but when i use first time from keyboard it wont work.can u give me plz solution .how it be work.
Thanks & Regards
Laxmikanta
HI,
I Created yeild calculation : in that two field quantity & percentage (default is 1.6). customer wants default percentage 1.6.& one more o/p field is there, that is final calculation field.i created all things but my problem when i calculate default y 1.6 comes & calculation will be done successfully , but if i change that percentage value 1.6 to any other percentage(like 3.6) , result will come normally & correct , but in percentage field by default showing 1.6 again.so end user be confused .bcz end user calcuate that time with 3.6.so i want percentage field default showing 1.6 & when end user wants to change different percentage it also show that percentage.till up to clear the window.i already clear i clear button .its working fine. so i m worried about percentage.can any one help me??
Thanks
Laxmikanta
2010 Feb 16 1:01 PM
HAI,
i guess, for the first time the cursor is not over the Submit button. Use set cursor field and try. Try ur luck.
Best Regards,
rama
2010 Feb 16 3:07 PM
Hi Laxmikant,
Try like below.
1. In PBO, SET PF-STATUS like below.
module STATUS_0100 output.
SET PF-STATUS 'ZTEST'.
endmodule. " STATUS_0100 OUTPUT
2. Double click 'ZTEST' and create PF status.
3. Expand 'Function Keys', assign function code for the first one(Tick) in Standard Toolbar as 'ENTER'.
4. Activate and come back to ur program.
5. In PAI write like below,
MODULE user_command_0100 INPUT.
DATA: ok_code TYPE sy-ucomm.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'SUBMIT' or 'ENTER'. " For both SUBMIT and ENTER output value is calculated
" Ur logic for calculating result depending upon quantity & percentage values
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Hope solves ur problem
Thanks
2010 Feb 19 5:18 AM
Hi,
Generally when we press ENTER Sy-Ucomm will be space. So please include Space also in WHEN condition.
In previous When first time you are pressing ENTER the SY_UCOMM have no value (means space).When you press SUBMIT button with mouse it is taking value as u2018SUBMITu2019. When you press enter again SY-UCOMM value is not overwritten with initial (space) value. I think in your program the SY-UCOMM is not cleared. So because of this when you press ENTER after pressing SUBMIT (with mouse) it is working.
Please check this in Debugging mode again.
Please follow the below Code.
MODULE user_command_0123 INPUT.
DATA ok_code TYPE sy-ucomm.
MOVE sy-ucomm TO ok_code.
CLEAR sy-ucomm. u201C This clear is useful to when Ever we press Enter
u201C It will overwrite with Space.
CASE ok_code.
WHEN 'SUBMIT' OR space.
v_val3 = v_val1 + v_val2.
ENDCASE.
ENDMODULE. " USER_COMMAND_0123 INPUT
Regards,
Veera.
2010 Feb 19 6:12 AM
Thanks For helping.otherwise u can do
go to PBO -> double click on that PBO -> module status. There u got
*SET PF-STATUS 'xxxxxxx'.
SET TITLEBAR 'xxx'.
change 'xxxxxx' to SET PF-STATUS 'set_pf'. or change any name ->
double click on that name -> go to FUNCTIONAL KEY -> put ENTER on first -> Save -> check -> active
come to ur program -> in PAI write code
CASE OK.
WHEN 'ENTER'.
-
-
(WHAT R THE CONDITION HERE U CAN WRITE : AFTER ENTER & BEFORE ENDCASE.)
-
ENDCASE.
2010 Feb 19 6:26 AM
HI,
I Created yeild calculation : in that two field quantity & percentage (default is 1.6). customer wants default percentage 1.6.& one more o/p field is there, that is final calculation field.i created all things but my problem when i calculate default y 1.6 comes & calculation will be done successfully , but if i change that percentage value 1.6 to any other percentage(like 3.6) , result will come normally & correct , but in percentage field by default showing 1.6 again.so end user be confused .bcz end user calcuate that time with 3.6.so i want percentage field default showing 1.6 & when end user wants to change different percentage it also show that percentage.till up to clear the window.i already clear i clear button .its working fine. so i m worried about percentage.can any one help me??
Thanks
Laxmikanta
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |