‎2007 Apr 23 1:46 PM
hi,
i have created one selection-screen with two field i selected on filed help the another filed automaticly fill ho to do this plz help me very arunjent.
the standrad t.code: S_P99_41000099. the same thing is there but i call same function module my screen can't fill.
‎2007 Apr 23 1:48 PM
Hi,
You could do like this
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_extwg-low.
PERFORM search_help_extwg USING 'S_MATKL-LOW' 'S_MATKL-HIGH'
s_extwg-low '1000'.
&----
*& Form search_help_extwg
&----
text
----
FORM search_help_extwg USING p_low p_high p_append p_screen.
DATA: BEGIN OF t_values OCCURS 2,
prodh LIKE t179-prodh ,
vtext LIKE t179t-vtext,
END OF t_values.
DATA : t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
*
DATA : lv_low(30) .
DATA : lv_high(30).
RANGES : r_prodh FOR t179-prodh .
DATA : gt_dynp LIKE dynpread OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = p_screen
request = 'A'
TABLES
dynpfields = gt_dynp
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
CLEAR : gt_dynp.
READ TABLE gt_dynp WITH KEY fieldname = p_low.
lv_low = gt_dynp-fieldvalue.
CLEAR : gt_dynp.
READ TABLE gt_dynp WITH KEY fieldname = p_high.
lv_high = gt_dynp-fieldvalue.
IF lv_low IS INITIAL AND
lv_high IS INITIAL .
MESSAGE text-001 TYPE 'S'.
REJECT.
ENDIF.
Value range to be shown
r_prodh-sign = 'I'.
r_prodh-option = 'BT'.
IF NOT lv_low IS INITIAL.
CONCATENATE lv_low+0(5) text-005 INTO r_prodh-low.
ELSE.
CONCATENATE lv_high+0(5) text-005 INTO r_prodh-low.
ENDIF.
IF lv_high IS INITIAL.
CONCATENATE lv_low+0(5) text-009 INTO r_prodh-high.
ELSE.
CONCATENATE lv_high+0(5) text-009 INTO r_prodh-high.
ENDIF.
APPEND r_prodh.
Values to be shown
SELECT prodh FROM t179 INTO TABLE t_values
WHERE prodh IN r_prodh
AND stufe = '2'.
LOOP AT t_values.
SELECT SINGLE vtext FROM t179t INTO t_values-vtext
WHERE spras = sy-langu AND
prodh = t_values-prodh.
MODIFY t_values.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'PRODH'
value_org = 'S'
TABLES
value_tab = t_values
return_tab = t_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
READ TABLE t_return INDEX 1.
p_append = t_return-fieldval.
ENDIF.
Cheers,
Simha.
Reward all the helpful answers..
‎2007 Apr 23 1:55 PM
hi Jaya,
As i know, i have created 5 push button on the application tool bar, each one has it owns selection criterion.
If u click any one of this, it will fill the remaining selection fields.
See the below concept and code.
Activation of two pushbuttons with icons and quick info in the application toolbar of the standard selection screen of an executable program. Selecting one of these buttons preassigns different values to the input fields.
REPORT demo_sel_screen_function_key.
TYPE-POOLS icon.
TABLES sscrfields.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
functxt-icon_id = icon_ws_plane.
functxt-quickinfo = 'Preselected Carrier'.
functxt-icon_text = 'LH'.
sscrfields-functxt_01 = functxt.
functxt-icon_text = 'UA'.
sscrfields-functxt_02 = functxt.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
WHEN OTHERS.
...
ENDCASE.
START-OF-SELECTION.
...
regrds
sreeni
‎2007 Apr 23 2:19 PM
check this code
DATA: BEGIN OF it_value4 OCCURS 0,
TEXTCODE LIKE ZXX-TEXTCODE,
TEXTDESC LIKE ZXX-TEXTDESC,
END OF it_value4.
progname = sy-repid.
dynnum = sy-dynnr.
SELECT TEXTCODE TEXTDESC
FROM xxxx
INTO CORRESPONDING FIELDS OF TABLE it_value4
WHERE LOSS_CODE = IT_VALUE1 .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TEXTCODE'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ITVALUE-TEXTCODE' "-->UR 4 th filed value in screen
value_org = 'S'
TABLES
value_tab = it_value4.
endmodule.
regards,
veeresh