2010 Jan 04 2:38 PM
My requirement is to have a parameter taking input as "HH:MM" not "HH:MM:SS". It should also have a F4 help. Is there any standard solution (any API?) for this or do I have to write a custom F4 help?
My requirement is to have a parameter taking input as "HH:MM" not "HH:MM:SS". It should also have a F4 help. Is there any standard solution (any API?) for this or do I have to write a custom F4 help?
2010 Jan 04 2:58 PM
2010 Jan 04 3:00 PM
No need to have any complex logic. Addition VISIBLE LEN would work for you..!
PARAMETERS: p_time type sy-uzeit VISIBLE LENGTH 5.
Regards,
Naimesh Patel
2010 Jan 04 3:16 PM
@gautham,
F4_clock is by default functionality of a time variable.
@naimesh,
visible length only shortens the visibility but the format remains same as HH:MM:SS.. and with same F4..as of F4_clock...
@Saurav,
you can replicate the F4 help with your own modal screen with listboxes. that will help i guess. little tedious process but will work.. mean while lets carry on checking more ways...
2010 Jan 04 3:22 PM
@naimesh,
visible length only shortens the visibility but the format remains same as HH:MM:SS.. and with same F4..as of F4_clock...
You can simply ignore last two characters...
Regards,
Naimesh Patel
2010 Jan 04 3:43 PM
what about F4... lets try this..
type-POOLs : vrm.
DATA : v TYPE vrm_values.
DATA : vw LIKE LINE OF v.
INITIALIZATION.
vw-key = '1'.
vw-text = '01'.
APPEND vw TO v.
vw-key = '2'.
vw-text = '02'.
APPEND vw TO v.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P1'
values = v.
refresh v.
vw-key = '10'.
vw-text = '10'.
APPEND vw TO v.
vw-key = '20'.
vw-text = '20'.
APPEND vw TO v.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P2'
values = v.
PARAMETERS: p_time type sy-uzeit VISIBLE LENGTH 5 MODIF ID AA.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECTION-SCREEN BEGIN OF line.
PARAMETERS: p1(2) as LISTBOX VISIBLE LENGTH 4.
PARAMETERS: p2(2) as LISTBOX VISIBLE LENGTH 4.
SELECTION-SCREEN end OF line.
SELECTION-SCREEN end OF SCREEN 100.
at SELECTION-SCREEN on VALUE-REQUEST FOR P_TIME.
call SELECTION-SCREEN 100 STARTING AT 10 10.
p_time(2) = P1.
P_time+2(2) = p2.
P_time+4(2) = 00.
2010 Jan 04 4:01 PM
Using data element ATIM ( or any data elemnt with domain HHMM) will create parameter with right output length
parameters : p_time type ATIM .
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |