2007 Apr 04 10:18 AM
Hi Folks
I was created an Delivery Block field as Parameter in the selection screen.
I want to create the F4 help on that field .
Reference field for the same is : vbak-lifsk.
Can anybody give me the code.
Points are assured for correct answers.
Regards,
Sreeram
2007 Apr 04 10:35 AM
Hi Sree,
You declare the parameter of type vbak-lifsk and F4 help will come automatically.
PARAMETERS : v_lifsk LIKE vbak-lifsk.
This is a standard F4 help which is populated from table TVLS.
You can get the F4 help the way you want by using FM F4IF_INT_TABLE_VALUE_REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lifsk.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LIFSK'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_LIFSK'
value_org = 'S'
TABLES
value_tab = i_lifsk
i_lifsk is the internal table which you can populater to display in F$ help.
Regards,
Pankaj Sharma
2007 Apr 04 10:21 AM
See the following simple ex: Change the fields & table as per your reqirement.
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for p_mat.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
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 SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to p_mat.
ENDIF.
2007 Apr 04 10:22 AM
Hi,
For example, look at this code
=====================================================
TABLES : MARD.
DATA: BEGIN OF IT_MARD OCCURS 0,
WERKS LIKE MARD-WERKS,
LGORT LIKE MARD-LGORT,
END OF IT_MARD.
DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
parameters : P_WERKS LIKE MARD-WERKS.
parameters : P_LGORT LIKE MARD-LGORT.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WERKS.
SELECT WERKS LGORT FROM MARD UP TO 10 ROWS INTO table IT_MARD.
DELETE ADJACENT DUPLICATES FROM IT_MARD COMPARING WERKS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'WERKS'
DYNPPROG = SY-REPID
DYNPNR = '1000'
DYNPROFIELD = 'P_WERKS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_MARD
RETURN_TAB = T_RETURN
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
if sy-subrc = 0.
read table it_mard index 1. "transporting werks.
move it_mard-lgort to p_lgort.
endif.
Cheers,
Simha.
Reward all the helpful answers..
2007 Apr 04 10:22 AM
You will get the F4 help automatically
chk this
REPORT ztest.
TABLES : vbak.
PARAMETERS : v_lifsk LIKE vbak-lifsk.
2007 Apr 04 10:22 AM
Hi,
parameters
p_lifsk like vbak-lifsk. it will give f4 help.
if you want to create own f4 help for that field use
<b>F4IF_INT_TABLE_VALUE_REQUEST</b> fm
regards,
ananth
2007 Apr 04 10:22 AM
you can refer to dictionary field it will show the f4 help for that field defined in dictionary
or
you have to do like this.
at selection-screen on value-request for p_lifsk.
here call the fm F4IF_SHLP_EXIT or popup_with_table or like that.
regards
shiba dutta
2007 Apr 04 10:24 AM
2007 Apr 04 10:24 AM
hi,
refer to this sample code
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.regards,
Santosh
2007 Apr 04 10:27 AM
The field VBAK-LIFSK is attached to data element LIFSK domain LIFSP which has a table of value TVLS and a text table TVLST.
So if your refer your parameter/Select-optinos with the correct field, a F4 help is automatically generated.
TABLES vbak.
PARAMETERS p_lifsk LIKE vbak-lifsk.
SELECT-OPTIONS so_lifsk FOR vbak-lifsk.Regards
2007 Apr 04 10:35 AM
Hi Sree,
You declare the parameter of type vbak-lifsk and F4 help will come automatically.
PARAMETERS : v_lifsk LIKE vbak-lifsk.
This is a standard F4 help which is populated from table TVLS.
You can get the F4 help the way you want by using FM F4IF_INT_TABLE_VALUE_REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lifsk.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LIFSK'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_LIFSK'
value_org = 'S'
TABLES
value_tab = i_lifsk
i_lifsk is the internal table which you can populater to display in F$ help.
Regards,
Pankaj Sharma
2007 Apr 04 11:00 AM
Hi
Use this, It may helpful to you
parameter : p_lifsk like vbak-lifsk.
data : begin of i_lifsk occurs 0,
lifsk type lifsk,
end of i_lifsk.
DATA: return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
select lifsk from vbak into table i_lifsk.
at selection-screen on value request for <delivery block field>
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = i_lifsk-lifsk
dynpprog = sy-repid
dynprofield = <Delivery Block field>P_lifsk.
value_org = 'S'
TABLES
value_tab = i_lifsk
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.
READ TABLE return_tab INDEX 1.
MOVE return_tab-fieldval TO p_lifsk.
2007 Apr 05 11:39 AM
Hi ,
you will get the help automatically when u declare the paramter by using the field in the table.
parameters : p_matnr like mara-matnr.
reward if is helpful
regards,
Sangeetha.A
2007 May 23 8:52 AM