11-25-2007 11:16 AM
I have one scenario in that i need to create one search help for a particular field in table control(input field). The field has no data element, that is an email id field for that i need to have search help with fields userid, first name, last name and email is, userid, first name and last name fields have data element and i have to concatenate userid field with the domain name(ex. @web.com) and put it in emailid field.
Please any one suggest me how to do this and give me sample code if you have.
11-25-2007 11:25 AM
11-27-2007 3:52 PM
Hi,
In the POV you write
field <email id> module <mod1>.
In se38 program.
declare the internal table.
data: begin of itab occurs 0,
userid(10),
domain_name(15),
email(30),
end of itab.
data: v_index like sy-tabix.
module <mod1>
select userid domain_name
from <dbtable>
into corresponding fields of itab.
call function 'POPUP_WITH_TABLE_DISPLAY'
EXPORT itab
import v_index.
read table itab index v_index.
concatenate userid domain_name into email.
modify table itab index sy-tabix.
it_dynpread-fieldname = 'ITAB-EMAIL'.
it_dynpread-fieldvalue = itab-email.
append it_dynpread.
call function dynp_values_update.
endmodule.
I think this will help you
regards,
kamala.
11-30-2007 8:39 AM
&----
*& Module VENDORVALUE INPUT
&----
text
----
POV for vendor field
module vendorvalue input.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'LFA1'
fieldname = 'LIFNR'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ZG8_EKKO-LLIEF'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
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. " VENDORVALUE INPUT
&----
*& Module CURRENCYVALUE INPUT
&----
text
----
POV for currency field
module currencyvalue input.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'EKKO'
fieldname = 'WAERS'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ZG8_EKKO-WAERS'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
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. " CURRENCYVALUE INPUT
&----
*& Module PRICEHELP INPUT
&----
text
----
POH for price field
module pricehelp input.
call function 'HELP_OBJECT_SHOW'
exporting
dokclass = 'TX'
doklangu = sy-langu
dokname = 'ZHELPFORPRICE1'
DOKTITLE = ' '
CALLED_BY_PROGRAM = ' '
CALLED_BY_DYNP = ' '
CALLED_FOR_TAB = ' '
CALLED_FOR_FIELD = ' '
CALLED_FOR_TAB_FLD_BTCH_INPUT = ' '
MSG_VAR_1 = ' '
MSG_VAR_2 = ' '
MSG_VAR_3 = ' '
MSG_VAR_4 = ' '
CALLED_BY_CUAPROG = ' '
CALLED_BY_CUASTAT =
SHORT_TEXT = ' '
CLASSIC_SAPSCRIPT = ' '
tables
links = links
EXCEPTIONS
OBJECT_NOT_FOUND = 1
SAPSCRIPT_ERROR = 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.
endmodule. " PRICEHELP INPUT
try this out