2008 Dec 30 6:23 AM
Hi
This is Prabaha. I am facing a problem. while i am desiging selection serean in alv report there is no search help in some select option and parameters. how could i solve this by coding? please help me out.
Hi
This is Prabaha. I am facing a problem. while i am desiging selection serean in alv report there is no search help in some select option and parameters. how could i solve this by coding? please help me out.
2008 Dec 30 6:26 AM
Hi Prabha,
Welcome to SCN.
Give your variable dictionary reference while declaring them. Like
carrid type scarr-carrid, so on.
Regards,
Anirban
2008 Dec 30 6:28 AM
hi,
try this code...
SELECT DISTINCT
bwtar
FROM MBEW
INTO TABLE it_help
WHERE matnr EQ <your_tab>-matnr
AND bwtar <> ' '.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BWTAR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = '<YOUR_TAB>-MATNR'
value_org = 'S'
TABLES
value_tab = it_help
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF it_help IS INITIAL.
MESSAGE i398(00) WITH 'There is no valuation type for' <your_tab>-matnr.
ENDIF.
Arunima
Edited by: Arunima Rudra on Dec 30, 2008 11:58 AM
2008 Dec 30 6:28 AM
hi,
Use the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_month.
and this FM CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'VJAHR'
dynpprog = sy-repid
dynpnr = sy-dynnr
window_title = 'Year' "#EC NOTEXT
value_org = 'S'
TABLES
value_tab = i_year_tab
return_tab = lt_select_values
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
2008 Dec 30 10:07 AM
Hi Pratibha,
Please check this sample codes and revert.
F4 Help - Calling it from a program and limiting values
To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST in the program and add a field
statement for the field that should trigger the F4 help. In the mdoule called from PROCESS ON-VALUE-REQUEST, call function module
F4IF_FIELD_VALUE_REQUEST.
Example 1 - Dynpro
process before output.
.....
process after input.
.....
PROCESS ON VALUE-REQUEST.
FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.
MODULE f4_help_for_pctr INPUT.
NOTE:
Tabname/fieldname is the name of the table and field
for which F4 should be shown.
*
Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field
in which the f4 value should be returned.
*
Value: The value of the Dynpro fuield when calling the F4 help.
You can limit the values shown, by inseting a value in this parameter
e.g '50*' to show only values beginning with 50
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'ZSD00003'
fieldname = 'PRCTR'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = 'ZSD00002_BRUGERKONV_LISTE'
dynpnr = '0100'
dynprofield = 'IT_ZSD00003-PRCTR'
STEPL = 0
value = '50*'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " F4_help_for_pctr INPUT
Example 2 - Report
To control F4 help in a selection screen use the
AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>
event.
Note that for ranges both the low and high value of the field
must have there own ON VALUE-REQUEST
Example:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-low.
PERFORM f4_help_prctr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-high.
PERFORM f4_help_prctr.
REPORT f4help.
PARAMETERS:
p_auart LIKE vbak-auart.
START-OF-SELECTION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_auart.
PERFORM f4_help_aaurt.
----
FORM f4_help_auart *
----
........ *
----
FORM f4_help_auart.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'VBAK'
fieldname = 'AUART'
SEARCHHELP = ' '
SHLPPARAM = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |