2006 Nov 15 10:31 AM
hi all,
I have got a requrement like i should create a f4 help for a parameter in this i shd see 4fields when i press f4.how can i do this? i know that i shd use F4IF_INT_TABLE_VALUE_REQUEST function but am not able to use it properly can anyone guide me in this
Thanks,
SriRatna
hi all,
I have got a requrement like i should create a f4 help for a parameter in this i shd see 4fields when i press f4.how can i do this? i know that i shd use F4IF_INT_TABLE_VALUE_REQUEST function but am not able to use it properly can anyone guide me in this
Thanks,
SriRatna
2006 Nov 15 10:33 AM
Hi
U can create your search help in dictionary and then call it in the program:
PARAMETERS: P_PARAM MATCH CODE ID <SEARCH HELP>.
Max
2006 Nov 15 10:59 AM
Hi Sri ratna,
Can u paste the FM so that we can correct it and send it back.
Murthy
2006 Nov 15 12:12 PM
Hi
You can create collective search help for the 4 fields in dictionary and call it in the program.
Regards
Haritha
2006 Nov 15 12:57 PM
Hi all,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SBCTC.
PERFORM f_screen_validation_sbctc.
FORM f_screen_validation_sbctc .
REFRESH : GT_SUBCTRTY[],
GT_FIELDTAB[],
GT_RETURNTAB[].
GT_FIELDTAB-FIELDNAME = 'ZZSUBCONTRACT_TY'.
GT_FIELDTAB-TABNAME = 'EKKO'.
APPEND GT_FIELDTAB.
SELECT ZZSUBCONTRACT_TY FROM EKKO INTO TABLE GT_SUBCTRTY
WHERE ZZSUBCONTRACT_TY IS NOT NULL.
SORT GT_SUBCTRTY.
DELETE ADJACENT DUPLICATES FROM GT_SUBCTRTY.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = GT_FIELDTAB-FIELDNAME
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = GT_SUBCTRTY
FIELD_TAB = GT_FIELDTAB
RETURN_TAB = GT_RETURNTAB
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC = 0.
P_SBCTC = GT_RETURNTAB-FIELDVAL.
ENDIF.
ENDFORM. " f_at_screen_validation_sbctc
now the code is working fine but when am trying pick data from database
it not pulling up the correct values for the parameter .
for example if i don't give any value then it's taking null value.
can anyone help on this.
Thanks,
Sriratna
2006 Nov 16 3:15 AM
Hi,
When you r using Parameters it always consider the Null as Null whereas Select-options considers Null as all, this is one of the main difference between these 2(parameters and select-options), Try using Obligatory in Parameters, so that you can avoid the Null values in the selection-screen itself.
Cheers...
Santosh.
P.S. Mark usefull Answers.
2006 Nov 16 3:25 AM
Please read below info.
F4IF_INT_TABLE_VALUE_REQUEST
This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the users selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
FM DYNP_VALUES_READ can read the values of screen fields
Have a look at below sample code:
REPORT DEMO_DYNPRO_F4_HELP_MODULE.
TYPES: BEGIN OF VALUES,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
END OF VALUES.
DATA: CARRIER(3) TYPE C,
CONNECTION(4) TYPE C.
DATA: PROGNAME LIKE SY-REPID,
DYNNUM LIKE SY-DYNNR,
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
CALL SCREEN 100.
MODULE INIT OUTPUT.
PROGNAME = SY-REPID.
DYNNUM = SY-DYNNR.
CLEAR: FIELD_VALUE, DYNPRO_VALUES.
FIELD_VALUE-FIELDNAME = 'CARRIER'.
APPEND FIELD_VALUE TO DYNPRO_VALUES.
ENDMODULE.
MODULE CANCEL INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE VALUE_CONNECTION INPUT.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = PROGNAME
DYNUMB = DYNNUM
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = DYNPRO_VALUES.
READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
SELECT CARRID CONNID
FROM SPFLI
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
WHERE CARRID = FIELD_VALUE-FIELDVALUE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'CONNID'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'CONNECTION'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB.
ENDMODULE.
The screen flow logic is as follows:
PROCESS BEFORE OUTPUT.
MODULE INIT.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
PROCESS ON VALUE-REQUEST.
FIELD CONNECTION MODULE VALUE_CONNECTION.
For the Flight number field, the POV module VALUE_CONNECTION is called. The
function module DYNP_VALUE_READ transports the value of the screen field CARRIER into the program. The program then reads the corresponding values from the database table SPFLI into the internal table VALUES_TAB using a SELECT statement, and passes the internal table to F4IF_INT_TABLE_VALUE_REQUEST. This displays the internal table as input help, and places the users selection into the screen field CONNECTION.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
2006 Nov 16 6:55 AM
Very Simple...
Create a collective search help in thee dictionary and then add the help in the parameter like this :
PARAMETERS: P_NMAE MATCH CODE ID <SEARCH HELP NAME>.
Thats all...
Plz Mark all the helpful answers.
2006 Nov 16 9:56 AM
santhosh,
u got my point so how can i overcome this?
and moreover i can't declare it as obligatory for that parameters
so i shd declare range for that parameter and how can i do this?
Thanks,
SriRatna
2006 Nov 16 10:00 AM
Hi
For declaring a parameter/select-options as mandatory we need to use the addition <b>OBLIGATORY</b>.
parameters: p_werks like t001w-wekrs <b>obligatory</b>.
Kind Regards
Eswar
2006 Nov 16 10:00 AM
Hi
For declaring a parameter/select-options as mandatory we need to use the addition <b>OBLIGATORY</b>.
parameters: p_werks like t001w-wekrs <b>obligatory</b>.
Kind Regards
Eswar
2006 Nov 16 10:14 AM
Seems your requirement is to provive 4 fixed values for input of a paramter.
Below code somewhat helps you on the same.
TYPE-POOLS vrm.
parameters: p_text TYPE vrm_id AS LISTBOX VISIBLE LENGTH 20 MODIF ID pro
.
data: tab type vrm_values,
wa like line of tab.
initialization.
move: '1' to wa-key,
'First' to wa-text.
append wa to tab.
move: '2' to wa-key,
'Second' to wa-text.
append wa to tab.
move: '3' to wa-key,
'Thrid' to wa-text.
append wa to tab.
move: '4' to wa-key,
'Fourth' to wa-text.
append wa to tab.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_TEXT'
values = tab
* EXCEPTIONS
* ID_ILLEGAL_NAME = 1
* OTHERS = 2
.
Just incase you need to know how a selection-parameter is made mandatory.
Eg: parameters: p_text(10) type c <b>obligatory</b>.
Kind Regards
Eswar
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |