‎2006 Feb 09 10:53 AM
Hi All,
Plz help me out in this regard..
I have designed a screen with 20 list boxes around and i am getting values for list boxes also.the main problem is coming when after selecting values....
that is after selecting values if i press enter on the screen the values are over written by space..
The default value for list boxes are space.
how to over come this problem...Plz help me out
Regards,
Sudha
‎2006 Feb 09 10:57 AM
Check If UR clearing the variables in the events that
follow.
‎2006 Feb 09 10:58 AM
HI sudha,
1. Ideally it should not happen !
2. Just check whehter some wrong
code is not written in pbo,
or pai, to clear the values.
3. Also, have u declared
variable with the same name as screen field ?
regards,
amit m.
‎2006 Feb 09 11:04 AM
Hi Sudha,
are you doing any thing in PAI, please show the code of PAI. i think you are clearing some thing inside PAI.
check the code..
regards
vijay
‎2006 Feb 09 11:50 AM
PAI
MODULE user_command_1000 INPUT.
CASE sy-ucomm.
WHEN 'SAVER'.
IF zrule_date_from > zrule_date_to.
MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(001)
'Than RUN_VALIDITY_FROM_DATE'(002).
EXIT.
ENDIF.
IF zrule_date_to < sy-datum.
MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(003)
'Than System Date.'(004).
EXIT.
ENDIF.
wa_rule-zrule_date_from = zrule_date_from.
wa_rule-zrule_date_to = zrule_date_to.
wa_rule-zrule_name = zrule_name.
wa_rule-zrule_id = zrule_id.
wa_rule-zrule_pref = zrule_pref.
ONCATENATE 'Where' rule_for1a operator1a values1a
andor1 rule_for2a operator2a values2a
andor2 rule_for3a operator3a values3a
andor3 rule_for4a operator4a values4a
andor4 rule_for5a operator5a values5a
andor5 rule_for6a operator6a values6a
andor6 rule_for7a operator7a values7a
andor7 rule_for8a operator8a values8a
INTO wa_rule-zrule_clause SEPARATED BY space.
In this code andor6(7,8,etc) has (and or)
and operator8a(7a,6a etc) has (+,- <,>) and when i do enter these two get cleared. why does this happen?
MY PBO code is
MODULE status_1000 OUTPUT.
SET PF-STATUS 'RULE'.
SET TITLEBAR '1000'.
ENDMODULE. " STATUS_1000 OUTPUT
&----
*& Module fill_lists OUTPUT
&----
For Filling List Boxes
----
MODULE fill_lists OUTPUT.
**********1
name = 'ANDOR1'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
**************2
name = 'ANDOR2'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
************3
name = 'ANDOR3'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
etc.
‎2006 Feb 09 12:00 PM
Hi Sudha,
i think u've forgot to paste the code in the subroutine perform list_box, please paste that code also
‎2006 Feb 09 12:05 PM
form LIST_BOX .
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = NAME
values = list.
endform.
‎2006 Feb 09 12:12 PM
Hi Sudha,
try the following code, instead of coding in PBO event use POV event.
PROCESS ON VALUE-REQUEST.
FIELD <fieldname> MODULE create_list_box.
MODULE create_lis_box INPUT.
fill the corresponding data in the internaltable(value tab) befor calling the function module.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = '<fieldname of internaltable>'
value_org = 'S'
TABLES
value_tab = <value tab>
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
...
ENDIF.
ENDMODULE.
Note: Make sure that the names of the screen field and the program field are same only then the values will not get cleared.
‎2006 Feb 09 11:18 AM
Hi Sudha,
Please check the code in PAI. Once u press enter, it will be an usercommand and may be at that point of time, the value gets cleared.
‎2006 Feb 09 12:08 PM
try this it will work and also set the property of the field as drop down.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST. VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
‎2006 Feb 09 12:12 PM
try this it will work and also set the property of the field as drop down.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST. VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.