F4 help for a field on table control
Hi All,
I have to display F4 help for a purticular field on the table control depending on one of the value in the row if the table.
There will be multiple entries in the table control and the F4 help for the field should change according to the value of other field in the row.
Can anybdy help me out doing this.....
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:46 AM
Check the FM: HELP_VALUES_GET_WITH_TABLE_EXT
Check the documentation for example code.
regards,
Ravi
Similar Messages
-
Search help for a field in table control based on another field value
Hi,
I want to attach the Search help for a field in table control based on another field value.
Please help me asap.
Will be highly rewardedHI,..
Check these links
search help in table control
Re: How to create Search Help for a field in Table control !!
How to create Search Help for a field in Table control !!
F4 Help In Table Control
Control table F4 help
Problem in F4 help in screen field
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<b> it_value4</b>
WHERE LOSS_CODE =<b> IT_VALUE1 .</b>
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.
Message was edited by:
veereshbabu ponnada -
How to create Search Help for a field in Table control !!
Hello Friends,
I like to know - How to create Search Help for a field in Table control. Is it possible, if it is please share ur knowledge, I wud be happy if U provide some source code example for this.
Thanks,
SenthilCheck the sample code:
*& Include ZSRO_MPRN_SEARCH *
MODULE PSTLZ_F4 INPUT
MODULE pstlz_f4 INPUT.
reading post code
DATA: stepl TYPE systepl,
stepl_index TYPE systepl.
CLEAR: stepl, stepl_index.
CLEAR: lt_returntab,lt_dynpfields,i_mprn1.
REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
lt_dynpfields-stepl = stepl.
APPEND lt_dynpfields. CLEAR lt_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = c_x
determine_loop_index = c_x
TABLES
dynpfields = lt_dynpfields
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.
IF sy-subrc EQ 0.
READ TABLE lt_dynpfields INDEX 1.
ENDIF.
ws_outcode = lt_dynpfields-fieldvalue.
stepl_index = lt_dynpfields-stepl.
REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
IF NOT lt_dynpfields-fieldvalue IS INITIAL.
MOVE lt_dynpfields-fieldvalue TO ws_outcode.
ws_len = STRLEN( lt_dynpfields-fieldvalue ).
IF ws_len GE 7.
ws_len = ws_len - 3.
ws_icode = ws_code+ws_len(3).
lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
CONCATENATE lt_dynpfields-fieldvalue '%'
INTO ws_outcode.
CONDENSE lt_dynpfields-fieldvalue.
REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
ELSE.
CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
INTO ws_outcode.
ENDIF.
ws_ocode = ws_code+0(3).
ENDIF.
reading MPRN
CLEAR: lt_returntab,lt_dnpfields,i_mprn1.
REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
lt_dnpfields-stepl = stepl_index.
APPEND lt_dnpfields. CLEAR lt_dnpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = lt_dnpfields
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.
IF sy-subrc EQ 0.
READ TABLE lt_dnpfields INDEX 1.
ENDIF.
MPRN blank and Post code exist
IF lt_dnpfields-fieldvalue IS INITIAL.
IF NOT lt_dynpfields-fieldvalue IS INITIAL.
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1
WHERE outcode LIKE ws_outcode.
ELSE.
MPRN blank and Post code blank
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1.
ENDIF.
ELSE.
MPRN exist and Post code exist
IF NOT lt_dynpfields-fieldvalue IS INITIAL.
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1
WHERE outcode LIKE ws_outcode AND
mprn EQ lt_dnpfields-fieldvalue.
ELSE.
MPRN exist and Post code blank
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1
WHERE mprn EQ lt_dnpfields-fieldvalue.
ENDIF.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MPRN'
dynpprog = sy-repid
dynpnr = sy-dynnr
window_title = 'Select MPRN'
value_org = 'S'
TABLES
value_tab = i_mprn1 "lt_mprn
return_tab = lt_returntab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
READ TABLE lt_returntab INDEX 1.
READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
IF sy-subrc EQ 0.
Updating post code
CONCATENATE i_mprn1-outcode i_mprn1-incode
INTO ws_postcode
SEPARATED BY space.
MOVE ws_postcode TO i_mprn-post_code.
CLEAR : i_dnpfld,
ws_dynpfld.
REFRESH : i_dnpfld.
ws_dyname = 'ZSRO_MASTER_DATA'.
ws_dynumb = '0301'.
ws_dynpfld-fieldname ='I_MPRN-POST_CODE'.
ws_dynpfld-fieldvalue = ws_postcode .
ws_dynpfld-stepl = stepl_index.
APPEND ws_dynpfld TO i_dnpfld.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname
dynumb = ws_dynumb
TABLES
dynpfields = i_dnpfld
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
Updating MPRN
MOVE i_mprn1-mprn TO i_mprn-mprn.
CLEAR : i_dnpfld,
ws_dynpfld.
REFRESH : i_dnpfld.
ws_dyname = 'ZSRO_MASTER_DATA'.
ws_dynumb = '0301'.
ws_dynpfld-fieldname ='I_MPRN-MPRN'.
ws_dynpfld-fieldvalue = i_mprn1-mprn .
ws_dynpfld-stepl = stepl_index.
APPEND ws_dynpfld TO i_dnpfld.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname
dynumb = ws_dynumb
TABLES
dynpfields = i_dnpfld
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ELSEIF sy-subrc EQ 2.
MESSAGE s005(zspa) WITH ws_postcode .
ENDIF.
ENDMODULE. "PSTLZ_F4 INPUT
MODULE MPRN_F4 INPUT
MODULE mprn_f4 INPUT.
reading post code
DATA: stepl TYPE systepl,
stepl_index TYPE systepl.
CLEAR: stepl, stepl_index.
CLEAR: lt_returntab,lt_dynpfields,i_mprn1.
REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
lt_dynpfields-stepl = stepl.
APPEND lt_dynpfields. CLEAR lt_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = c_x
determine_loop_index = c_x
TABLES
dynpfields = lt_dynpfields
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.
IF sy-subrc EQ 0.
READ TABLE lt_dynpfields INDEX 1.
ENDIF.
ws_outcode = lt_dynpfields-fieldvalue.
stepl_index = lt_dynpfields-stepl.
REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
IF NOT lt_dynpfields-fieldvalue IS INITIAL.
MOVE lt_dynpfields-fieldvalue TO ws_outcode.
ws_len = STRLEN( lt_dynpfields-fieldvalue ).
IF ws_len GE 7.
ws_len = ws_len - 3.
ws_icode = ws_code+ws_len(3).
lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
CONCATENATE lt_dynpfields-fieldvalue '%'
INTO ws_outcode.
CONDENSE lt_dynpfields-fieldvalue.
REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
ELSE.
CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
INTO ws_outcode.
ENDIF.
ws_ocode = ws_code+0(3).
ENDIF.
reading MPRN
CLEAR: lt_returntab,lt_dnpfields,i_mprn1.
REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
lt_dnpfields-stepl = stepl_index.
APPEND lt_dnpfields. CLEAR lt_dnpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = lt_dnpfields
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.
IF sy-subrc EQ 0.
READ TABLE lt_dnpfields INDEX 1.
ENDIF.
MPRN blank and Post code exist
IF lt_dnpfields-fieldvalue IS INITIAL.
IF NOT lt_dynpfields-fieldvalue IS INITIAL.
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1
WHERE outcode LIKE ws_outcode.
ELSE.
MPRN blank and Post code blank
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1.
ENDIF.
ELSE.
MPRN exist and Post code exist
IF NOT lt_dynpfields-fieldvalue IS INITIAL.
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1
WHERE outcode LIKE ws_outcode AND
mprn EQ lt_dnpfields-fieldvalue.
ELSE.
MPRN exist and Post code blank
SELECT mprn ser_num sub_bud bud_name del_pt_alias
bud_num dep_street prin_street dbl_dep_street
dep_locty post_town county outcode incode
lg_site_ind file_date FROM zspa_mprn INTO
CORRESPONDING FIELDS OF TABLE i_mprn1
WHERE mprn EQ lt_dnpfields-fieldvalue.
ENDIF.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MPRN'
dynpprog = sy-repid
dynpnr = sy-dynnr
window_title = 'Select MPRN'
value_org = 'S'
TABLES
value_tab = i_mprn1 "lt_mprn
return_tab = lt_returntab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
READ TABLE lt_returntab INDEX 1.
READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
IF sy-subrc EQ 0.
Updating MPRN
MOVE i_mprn1-mprn TO i_mprn-mprn.
CLEAR : i_dnpfld,
ws_dynpfld.
REFRESH : i_dnpfld.
ws_dyname = 'ZSRO_MASTER_DATA'.
ws_dynumb = '0301'.
ws_dynpfld-fieldname ='I_MPRN-MPRN'.
ws_dynpfld-fieldvalue = i_mprn1-mprn .
ws_dynpfld-stepl = stepl_index.
APPEND ws_dynpfld TO i_dnpfld.
**code changed by laxman 10.08.2005
ws_dynpfld-stepl = mprn-current_line.
**code changed by laxman 10.08.2005
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname
dynumb = ws_dynumb
TABLES
dynpfields = i_dnpfld
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
Updating post code
CONCATENATE i_mprn1-outcode i_mprn1-incode
INTO ws_postcode
SEPARATED BY space.
MOVE ws_postcode TO i_mprn-post_code.
CLEAR : i_dnpfld,
ws_dynpfld.
REFRESH : i_dnpfld.
ws_dyname = 'ZSRO_MASTER_DATA'.
ws_dynumb = '0301'.
ws_dynpfld-fieldname ='I_MPRN-POST_CODE'.
ws_dynpfld-fieldvalue = ws_postcode .
ws_dynpfld-stepl = stepl_index.
APPEND ws_dynpfld TO i_dnpfld.
**code changed by laxman 10.08.2005
break gblap0.
ws_dynpfld-stepl = mprn-current_line.
LOOP AT i_mprn.
MOVE i_mprn1-mprn TO i_mprn-mprn.
MOVE ws_postcode TO i_mprn-post_code.
MODIFY i_mprn INDEX
mprn-current_line." transporting MPRN POST_CODE.
ENDLOOP.
**code changed by laxman 10.08.2005
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname
dynumb = ws_dynumb
TABLES
dynpfields = i_dnpfld
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ELSEIF sy-subrc EQ 2.
MESSAGE s006(zspa) WITH i_mprn1-mprn .
ENDIF.
ENDMODULE. "MPRN_F4 INPUT
MODULE GNTC_F4 INPUT
MODULE gntc_f4 INPUT.
DATA: BEGIN OF lt_gntc OCCURS 0,
gntc LIKE iflot-zzgntc,
END OF lt_gntc.
CLEAR: lt_returntab, lt_gntc.
REFRESH: lt_returntab, lt_gntc.
lt_gntc-gntc = 'DM'.
APPEND lt_gntc. CLEAR lt_gntc.
lt_gntc-gntc = 'NDM'.
APPEND lt_gntc. CLEAR lt_gntc.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZZGNTC'
dynpprog = sy-repid
dynpnr = sy-dynnr
window_title = 'Select Gas Nomination Type Code'
value_org = 'S'
TABLES
value_tab = lt_gntc
return_tab = lt_returntab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
READ TABLE lt_returntab INDEX 1.
i_mprn-dm_ndm = lt_returntab-fieldval.
ENDIF.
ENDMODULE. "GNTC_F4 INPUT
*& Module mprn1_f4 INPUT
text
MODULE mprn1_f4 INPUT.
DATA: lt_f4 TYPE ddshretval OCCURS 0 WITH HEADER LINE,
lt_returntab1 LIKE ddshretval OCCURS 0 WITH HEADER LINE,
lt_dynpfields1 LIKE dynpread OCCURS 0 WITH HEADER LINE,
lt_dnpfields1 LIKE dynpread OCCURS 0 WITH HEADER LINE.
DATA: stepl1 TYPE systepl,
stepl_index1 TYPE systepl.
DATA : i_dnpfld1 LIKE dynpread OCCURS 0 WITH HEADER LINE,
ws_dyname1 LIKE d020s-prog,
ws_dynumb1 LIKE d020s-dnum,
ws_dynpfld1 LIKE dynpread.
CLEAR: i_dnpfld1, ws_dyname1, ws_dynumb1, ws_dynpfld1,
lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
stepl1, stepl_index1.
REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
To Determine Steploop Index
lt_dynpfields1-fieldname = 'I_MPRN-POST_CODE'.
lt_dynpfields1-stepl = stepl1.
APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
determine_loop_index = 'X'
TABLES
dynpfields = lt_dynpfields1
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.
IF sy-subrc EQ 0.
READ TABLE lt_dynpfields1 INDEX 1.
ENDIF.
stepl_index1 = lt_dynpfields1-stepl.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'IFLOT'
fieldname = 'I_MPRN-MPRN'
searchhelp = 'ZS_MPRN_PC'
dynpprog = sy-repid
dynpnr = sy-dynnr
TABLES
return_tab = lt_f4
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.
Update tablecontrol
READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
IF sy-subrc = 0.
MOVE lt_f4-fieldval TO i_mprn-mprn.
ws_dyname1 = 'ZSRO_MASTER_DATA'.
ws_dynumb1 = '0301'.
ws_dynpfld1-fieldname ='I_MPRN-MPRN'.
ws_dynpfld1-fieldvalue = i_mprn-mprn.
ws_dynpfld1-stepl = stepl_index1.
APPEND ws_dynpfld1 TO i_dnpfld1.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname1
dynumb = ws_dynumb1
TABLES
dynpfields = i_dnpfld1
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
CLEAR : i_dnpfld1, ws_dynpfld1.
REFRESH: i_dnpfld1.
READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
IF sy-subrc = 0.
MOVE lt_f4-fieldval TO i_mprn-post_code.
ws_dyname1 = 'ZSRO_MASTER_DATA'.
ws_dynumb1 = '0301'.
ws_dynpfld1-fieldname ='I_MPRN-POST_CODE'.
ws_dynpfld1-fieldvalue = i_mprn-post_code.
ws_dynpfld1-stepl = stepl_index1.
APPEND ws_dynpfld1 TO i_dnpfld1.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname1
dynumb = ws_dynumb1
TABLES
dynpfields = i_dnpfld1
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDMODULE. " mprn1_f4 INPUT
*& Module pstlz1_f4 INPUT
text
MODULE pstlz1_f4 INPUT.
CLEAR: i_dnpfld1, ws_dyname1, ws_dynumb1, ws_dynpfld1,
lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
stepl1, stepl_index1.
REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
To Determine Steploop Index
lt_dynpfields1-fieldname = 'I_MPRN-MPRN'.
lt_dynpfields1-stepl = stepl1.
APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
determine_loop_index = 'X'
TABLES
dynpfields = lt_dynpfields1
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.
IF sy-subrc EQ 0.
READ TABLE lt_dynpfields1 INDEX 1.
ENDIF.
stepl_index1 = lt_dynpfields1-stepl.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'IFLOT'
fieldname = 'I_MPRN-POST_CODE'
searchhelp = 'ZS_MPRN_PC'
dynpprog = sy-repid
dynpnr = sy-dynnr
TABLES
return_tab = lt_f4
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.
Update tablecontrol
READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
IF sy-subrc = 0.
MOVE lt_f4-fieldval TO i_mprn-post_code.
ws_dyname1 = 'ZSRO_MASTER_DATA'.
ws_dynumb1 = '0301'.
ws_dynpfld1-fieldname ='I_MPRN-POST_CODE'.
ws_dynpfld1-fieldvalue = i_mprn-post_code.
ws_dynpfld1-stepl = stepl_index1.
APPEND ws_dynpfld1 TO i_dnpfld1.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname1
dynumb = ws_dynumb1
TABLES
dynpfields = i_dnpfld1
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
CLEAR : i_dnpfld1, ws_dynpfld1.
REFRESH: i_dnpfld1.
READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
IF sy-subrc = 0.
MOVE lt_f4-fieldval TO i_mprn-mprn.
ws_dyname1 = 'ZSRO_MASTER_DATA'.
ws_dynumb1 = '0301'.
ws_dynpfld1-fieldname ='I_MPRN-MPRN'.
ws_dynpfld1-fieldvalue = i_mprn-mprn.
ws_dynpfld1-stepl = stepl_index1.
APPEND ws_dynpfld1 TO i_dnpfld1.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname1
dynumb = ws_dynumb1
TABLES
dynpfields = i_dnpfld1
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDMODULE. " pstlz1_f4 INPUT
Regards,
Prakash. -
How to provide F4 help for a field in table control
Hi Friends,
I have requirement like below.
1.Create one custom transaction code with header and item information.
2.In item level, we will be designed table control to enter/display the data.
3.Table controls first field will be material number and next DOT number (Material may have many DOT numbers) and so on.
4.First user will enter material number in the table controls first rows first field and go to DOT number field.
5.DOT number has drop down option. If user selects drop down box of DOT number, he gets all the DOT numbers available in database. User selects one DOT number and double clicks on it then it will be populated in DOT number field box.
But for point number 5, business wants like when ever user enters material number in table control first field then select DOT numbers drop down then they want to see the particular materials DOT numbers only in the drop down list for selection. Not all DOT numbers available in data base. Same thing should happen for all item lines in table control.
Please see below example.
Assume data base table has 10 DOT numbers. But material number has only 2 DOT numbers. When ever user enters material number in item level table control and selects DOT numbers drop down then it should show only 2 DOT numbers which are related to particular material number. Not all 10 DOT numbers.
Could you please suggest me, how can we achieve this?Hello,
Check this :-
For POV
Input Help in Dialog Modules
You can call dialog modules in the POV event using the event keyword PROCESS ON VALUE-REQUEST.
PROCESS ON VALUE-REQUEST.
FIELD <f> MODULE <mod>.
After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. The module <mod> is defined in the ABAP program like a normal PAI module. However, the contents of the screen field <f> are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.
Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These all have the prefix F4IF_. The most important are:
F4IF_FIELD_VALUE_REQUEST
Calls the input help of the ABAP Dictionary dynamically. You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME. The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read. 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.
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.
There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
Input help in dialog modules
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_CARRIER INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'DEMOF4HELP'
FIELDNAME = 'CARRIER1'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'CARRIER'.
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 next screen (statically defined) for screen 100 is itself. It has the following layout:
The input fields have been adopted from the program fields CARRIER and CONNECTION. The pushbutton has the function code CANCEL with function type E.
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 CARRIER MODULE VALUE_CARRIER.
FIELD CONNECTION MODULE VALUE_CONNECTION.
When the user chooses input help for the individual fields, the following is displayed:
For the Airline field, the POV module VALUE_CARRIER is called. The function module F4IF_FIELD_VALUE_REQUEST displays the input help for the component CARRIER1 of the structure DEMOF4HELP from the ABAP Dictionary, namely the search help DEMOF4DE. The users selection is returned to the screen field CARRIER.
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.
For POH------------
Field Help
There are three ways of displaying field help for screen elements:
Data Element Documentation
If you place a field on the screen in the Screen Painter by copying a ABAP Dictionary field, the corresponding data element documentation from the ABAP Dictionary is automatically displayed when the user chooses field help (as long as the help has not been overridden in the screen flow logic).
For further information about creating data element documentation, refer to data elements.
Data Element Supplement Documentation
If the data element documentation is insufficient, you can expand it by writing a data element supplement
Data element supplement documentation contains the heading Definition, as well as the following others:
Use
Procedure
Examples
Dependencies
To create data element supplement documentation for a screen, choose Goto ® Documentation ® DE supplement doc. from the element list of the screen. A dialog box appears in which the system proposes a number as the identified for the data element supplement. You can then enter help texts for the above headings using the SAPscript editor.
Data element supplement documentation created in this way is program- and screen-specific. Any data element supplement documentation created in the ABAP Dictionary with the same number is overridden by the screen-specific documentation. You can link existing data element supplement documentation created in the ABAP Dictionary with a screen field by using the table THLPF. To do this, crate a new row in THLPF containing the following data: Program name, screen name, field name, and number of the data element supplement documentation.
To display data element supplement documentation, you must code the following screen flow logic in the POH event:
PROCESS ON HELP-REQUEST.
FIELD <f> [MODULE <mod>] WITH <num>.
After PROCESS ON HELP-REQUEST, you can only use FIELD statements. If there is no PROCESS ON HELP-REQUEST keyword in the flow logic of the screen, the data element documentation for the current field, or no help at all is displayed when the user chooses F1. Otherwise, the next FIELD statement containing the current field <f> is executed.
If there is screen-specific data element supplement documentation for the field <f>, you can display it by specifying its number <num>. The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
You can fill the variables, for example, by calling the module <mod> before the help is displayed. However, the FIELD statement does not transport the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event.
For further information about data element supplement documentation, refer to Data Element Supplements.
Calling Help Texts from Dialog Modules
If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
PROCESS ON HELP-REQUEST.
FIELD <f> MODULE <mod>.
After the PROCESS ON HELP-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F1 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. However, the contents of the screen field <f> are not available in the module <mod>, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. The field help should not be dependent on the user input.
The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
HELP_OBJECT_SHOW_FOR_FIELD
This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
HELP_OBJECT_SHOW
Use this function module to display any SAPscript document. You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
For further information about how to create SAPscript documents, refer to the Documentation of System Objects documentation.
Field help on screens.
REPORT DEMO_DYNPRO_F1_HELP.
DATA: TEXT(30),
VAR(4),
INT TYPE I,
LINKS TYPE TABLE OF TLINE,
FIELD3, FIELD4.
TABLES DEMOF1HELP.
TEXT = TEXT-001.
CALL SCREEN 100.
MODULE CANCEL INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE F1_HELP_FIELD2 INPUT.
INT = INT + 1.
CASE INT.
WHEN 1.
VAR = '0100'.
WHEN 2.
VAR = '0200'.
INT = 0.
ENDCASE.
ENDMODULE.
MODULE F1_HELP_FIELD3 INPUT.
CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
EXPORTING
DOKLANGU = SY-LANGU
DOKTITLE = TEXT-002
CALLED_FOR_TAB = 'DEMOF1HELP'
CALLED_FOR_FIELD = 'FIELD1'.
ENDMODULE.
MODULE F1_HELP_FIELD4 INPUT.
CALL FUNCTION 'HELP_OBJECT_SHOW'
EXPORTING
DOKCLASS = 'TX'
DOKLANGU = SY-LANGU
DOKNAME = 'DEMO_FOR_F1_HELP'
DOKTITLE = TEXT-003
TABLES
LINKS = LINKS.
ENDMODULE.
The next screen (statically defined) for screen 100 is 100. It has the following layout:
The screen fields DEMOf1HELP-FIELD1 and DEMOF1HELP-FIELD2 from the ABAP Dictionary and the program fields FIELD3 and FIELD4 are assigned to the input fields. The pushbutton has the function code CANCEL with function type E.
The screen flow logic is as follows:
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
PROCESS ON HELP-REQUEST.
FIELD DEMOF1HELP-FIELD2 MODULE F1_HELP_FIELD2 WITH VAR.
FIELD FIELD3 MODULE F1_HELP_FIELD3.
FIELD FIELD4 MODULE F1_HELP_FIELD4.
The components FIELD1 and FIELD2 of structure DEMOF1HELP both refer to the data element DEMOF1TYPE. This data element is documented, and also has two supplements with numbers 0100 and 0200.
The following field help is displayed:
When the user chooses F1 on the input field for DEMOF1HELP-FIELD1, the data element documentation for DEMOF1TYPE is displayed, since the field does not occur in the PROCESS ON HELP-REQUEST event.
If the user chooses F1 repeatedly for the input field DEMOF1HELP-FIELD2, the data element documentation is displayed, along with the supplement documentation for either 0100 or 0200 alternately. The variable VAR is filled in the dialog module F1_HELP_FIELD2.
When the user chooses F1 on the input field for FIELD3, the data element documentation for DEMOF1TYPE is displayed, since this is called in the dialog module F1_HELP_FIELD3 by the function module HELP_OBJECT_SHOW_FOR_FIELD.
When the user chooses F1 on the input field for FIELD4, the SAPscript documentation DEMO_FOR_F1_HELP is displayed, since this is called in the dialog module F1_HELP_FIELD4 by the function module HELP_OBJECT.
Regards,
Deepu.K -
Attaching search help to a field in table control
Hi,
Please suggest a way to attach search help functionality to a field in table control.
My requirement os based on matnr the f4 help for the next field shud come.
I gave the func mod dunp_values_read, but the internal table i pass does not return with the fieldvalue of matnr field.
is there any func mod to read values of screen fields in table control so that based on that I can go to func mod f4_init_....
Will be rewarded.Check the FM: HELP_VALUES_GET_WITH_TABLE_EXT
Check the documentation for example code.
regards,
Ravi -
Search help for material number in table control
Hi
I have a table which i have generated using table control wizard.
I have used an interal table while creating the table control through wizard.
In this internal table i have field matnr.Now my requirement is to have a search help for this field.
I want a default search help for material as you get one instandard transactions.
In my other i have ip/op field i.e matnr and i have used the field directly from ztable,it has got the search help but since i am using the internal table i am notting getting a search help .
can anyone tell how to assign a search help to my table control material fieldhi deepthi,
chk a sample one which will help u. <b><i>f4 hlp in table control</i></b>
* Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*& Module help_responsibility INPUT
* text
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'EKPO-EBELN'.
dynpfields-fieldvalue = '00010' "wa_ekpo-ebeln.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'EKPO-EBELP'.
dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZZ_EKKO' "Program name
dynumb = '0100' "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
ENDMODULE. " help_ekpo INPUT
rgds
Anver
<b><i>if hlped kindly mark points</i></b> -
FILTER FOR A FIELD IN TABLE CONTROL?
DEAR GURUS,
I HAVE A REQUIREMENT WHERE IN I HAVE TO FILTER A FIELD IN TABLE CONTROL?
PLEASE HELP?
Moderator message - Please ask a specific question and do not use all caps - post locked
Edited by: Rob Burbank on May 4, 2009 4:27 PMDidn't get you.........Explain please......
-
Contolling drop down for a field in table controll.
Can we controll the drop down of a field in a table controll ..which will vary from one row to another.
Like for one row that field shud have add, delete in drop down, and for another row it shud hav only replace in the drop downIn the screen field attributes of that particular field ( i think the option will be in the third row of the attribute ),
there change it as list box with key or listbox.
Sorry i just answered looking at the thread subject.
Do you want it in drop down or whether you want to correct the error ????
Edited by: Keshav.T on Jan 7, 2010 2:28 PM -
Search Help for a Field of a Table Control
I have designed a screen using 'Table Control' with fields like Date, BoxNo,Quantity etc. Kindly tell me how to go about providing a search help for the field 'BoxNo' of this table control so that the user is not required to scroll down the entire table/list for selecting a particular box no.
Thanx in advance,
Alok.When you go to screen painer, in screen painter attributes window, there is an atribute called search help, fill it.
Another way is, after PAI put:
PROCESS ON VALUE-REQUEST.
FIELD box_no MODULE f1_help_box_no.
And gives logic in that module using FM F4IF_INT_TABLE_VALUE_REQUEST.
Regards. -
How to prvide f4 help for the particular field in table control
hi all,
my requirement is iam having one i/p field in screen 100.name of the field is sales order number. i just want to keep f4 help for this field only.when i click F4 on this field it has to show all the sales order numbers from vbak table.
anybody can send me the code please.
thanks,
maheedhar.tHi,
In POV Modlue u write
Filed (ur field name ) module get_values.
In that get_values module u declare an itab according to ur requirement and get the values into internal table using select query .After u get the values in select query u call a function popup_with_table_display in which u pass the itab along with the starting and postion , width and height of the popup window .Hope this will help u
Regards,
Shafi -
Export all data of selected line in search help to fields in table control
I've created a search help which will export 4 fields. These 4 fields should be populated to the corresponding fields in TABLE CONTROL. However, in my program, only the first column is populated and the others are blank. How to solve this problem? Do I need to include POV? Thank you.
Hi,
1. Create a search help with four exporting parameters.
( check the you have created properly the sterp step
procedure in creating the search help).
2. No need to go for POV.
3. After creating the table control assign the fieldnames into
the control, then click on the fieldname it will show the
attributes of that field . ther you can find te search help field
fill that field with your search help name .
4.After assigning the field, check it in executing the report.
Hope this will work for you, if it is not let me know.
Reward points if it is helpful .
Regards,
Madhavi -
F4 help for a field in item table in a view cluster
Hi All,
I have a view cluster with two tables. I should provide F4 help for field in item table based on the selected row of the header table.
F4 should have only values fetched based on the header table entry.
How can i achieve this. Please suggest.
Regards,
Kusuma K.Hi amar_war,
use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
H_TVBUR has no more parameters, it will display a list of al sales offices with description text
H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
Try standard search help for standard field first.
You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
Regards,
Clemens -
Value Help for a field from custom table in BSP
Please let me know, the procedure to create value help for a field from a custom table in BSP using HTMLB.
Thankshi prodigy,
check this code using drop down list.
<b>layout for first page</b>
<htmlb:dropdownListBox id = "ddlist"
table = "<%=t_mara%>"
nameOfKeyColumn = "matnr"
nameOfValueColumn = "matnr"></htmlb:dropdownListBox>
<b>event Oninitialization event of first page</b>
SELECT MATNR UP TO 10 ROWS
INTO TABLE T_MARA
FROM MARA.
<b> event Oninputprocessing event</b>
**Load the manager class
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
DATA: V_EVENT TYPE REF TO CL_HTMLB_EVENT.
DATA: DATA TYPE REF TO OBJECT.
DATA: V_DATA TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
CALL METHOD CL_HTMLB_MANAGER=>GET_EVENT
EXPORTING
REQUEST = RUNTIME->SERVER->REQUEST
RECEIVING
EVENT = V_EVENT
IF V_EVENT->NAME = 'button' AND
V_EVENT->EVENT_TYPE = 'click'.
DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST =
RUNTIME->SERVER->REQUEST
NAME = 'inputField'
ID = 'matnr'
V_DATA ?= DATA.
IF V_DATA IS NOT INITIAL.
V_MATNR = V_DATA->SELECTION.
ENDIF.
NAVIGATION->SET_PARAMETER( NAME = 'v_matnr' VALUE = V_MATNR ).
NAVIGATION->GOTO_PAGE( 'detail.htm' ).
ENDIF.
<b>in the onInitialization event for detail page</b>SELECT MATNR
ERSDA
ERNAM
LAEDA
AENAM
VPSTA
PSTAT
LVORM
MTART
FROM MARA
INTO TABLE T_MARA
WHERE MATNR = V_MATNR. -
How to refer to a particular field in Table Control.
Hi,
How can we refer to a particular field in a table control like 5th row 6th column. The actual requirement of mine is, i have a column with listbox. For each row i need to have different values for the list box. So i need to refer to that particular field in the column and assign the list values. Please kindly help.
Regards,
Vinay.hi,
TABLE CONTROL -
http://www.geekinterview.com/Interview-Questions/SAP-R-3
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
http://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
Eg of table Control:
http://members.aol.com/_ht_a/skarkada/sap/table_control/
table_control.htm
http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
Regards,
Laxmi -
Method for dble-click and table control
I'm a beginner in object. I build, with screen painter, a table control with x rows and x cols. and give the possibilty to use 'double click'.
But how to handle this event by a method and importing the number of the row and col where the action of the event has been.
which class and method can i use. thanks for your help
Moderator message: sorry, these forums are not a replacement for ABAP training, please search for available information and documentation, there is plenty available.
Edited by: Thomas Zloch on Dec 7, 2010 4:21 PMhi,
You can do this by estimating maximum no of records of that internal table used for table control to some number and then assign that number lines field of table control.
try this.
Regds
Sivaparvathi
Please reward points if helpful...
Maybe you are looking for
-
SOAP-XI-RFC sync without BPM scenario: How to catch timeout exception in PI
Hi all I made a scenario where a Webservice request was placed via XI to RFC in CRM. This is all done without BPM. Now the request came up that I have to handle undhandled exceptions from RFC such as Fatal Error, Dump in CRM etc in PI so that custome
-
Where can I get a new printer cable for my HP Laser Jet 4l with longer screw in lugs to connect to my computer? Thanks This question was solved. View Solution.
-
CATEGORY field in SLFN Support Ticket
Does anybody know how to make the CATEGORY field mandatory in the SLFN Support Ticket
-
Hello, I would like to use a silver palette Tank indicator with a scale up to 10'000 [l] I can put a full scale of 10'000 but the value exceeds the Tank indicator area. My solution was to use SI notation (10k) but the customer wants to see 10'000. Ho
-
Hi, I am studying Oracle architecture and strucked badly in UGA and PGA like sort area kinda.. can any one provide some links or doc's to get out this thing early and effectively... one more thing is there any good book or doc to become master in PL/