2007 Jul 13 8:13 AM
hi guru,
i ahve a f4 help in i have to add another field e-mail corresponding to the first filed
plz give me code for the follwing
this is what i have:
Example for content of internal table:
Field empf
EMPF1
EMPF2
EMPF3
EMPF4
EMPF5
EMPF6
EMPF7
EMPF8
EMPF9
EMPF10
2)modification needed
Modify this internal table like this:
You have read in database table YIBC_JOBSMAILADR the values:
Empfaenger1 [email protected]
Empfaenger2 [email protected]
Empfaenger3 [email protected]
Empfaenger4 [email protected]
Now you can modify internal table value_tab like this:
Value EMPF1 of internal table value_tab belongs to value Empfaenger1,
so you can set new field email address in internal table value_tab to [email protected]
and so on.
3)final result or the target
The finished internal table should look like this:
EMPF1 [email protected]
EMPF2 [email protected]
EMPF3 [email protected]
EMPF4 [email protected]
EMPF5
EMPF6
EMPF7
EMPF8
EMPF9
EMPF10
thank in advance
point will be awarded for the same
anuj
2007 Jul 13 8:25 AM
Hi
You create a search help using the table YIBC_JOBSMAILADR using the required fields like EMPNO and his Mail ID fields
and attach that search help to that field.
see the doc for creating the search help
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
CREATION:
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
See the links:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Search Help Exits:
<b>Reward points for useful Answers</b>
Regards
Anji
hi guru,
i ahve a f4 help in i have to add another field e-mail corresponding to the first filed
plz give me code for the follwing
this is what i have:
Example for content of internal table:
Field empf
EMPF1
EMPF2
EMPF3
EMPF4
EMPF5
EMPF6
EMPF7
EMPF8
EMPF9
EMPF10
2)modification needed
Modify this internal table like this:
You have read in database table YIBC_JOBSMAILADR the values:
Empfaenger1 [email protected]
Empfaenger2 [email protected]
Empfaenger3 [email protected]
Empfaenger4 [email protected]
Now you can modify internal table value_tab like this:
Value EMPF1 of internal table value_tab belongs to value Empfaenger1,
so you can set new field email address in internal table value_tab to [email protected]
and so on.
3)final result or the target
The finished internal table should look like this:
EMPF1 [email protected]
EMPF2 [email protected]
EMPF3 [email protected]
EMPF4 [email protected]
EMPF5
EMPF6
EMPF7
EMPF8
EMPF9
EMPF10
thank in advance
point will be awarded for the same
anuj
2007 Jul 13 8:25 AM
Hi
You create a search help using the table YIBC_JOBSMAILADR using the required fields like EMPNO and his Mail ID fields
and attach that search help to that field.
see the doc for creating the search help
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
CREATION:
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
See the links:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Search Help Exits:
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 13 8:43 AM
Hi,
try this:
TYPE-POOLS: SLIS.
*
TABLES: KNA1.
*
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(31) T_RECEIV.
PARAMETERS: P_RECEIV LIKE SOMLRECI1-RECEIVER OBLIGATORY.
SELECTION-SCREEN: END OF LINE.
***********************************************************************
Daten für F4 auf email-Adress.
DATA: BEGIN OF ITAB_EMAIL OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
E_MAIL LIKE BAPIADDR3-E_MAIL,
END OF ITAB_EMAIL.
*
DATA: FIELDCAT_EMAIL TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
SELFIELD TYPE SLIS_SELFIELD,
ALV_EXIT(1).
***********************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_RECEIV.
*
ALV als Popup ausgeben
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'Liste der USER-email Adressen'
I_TABNAME = 'ITAB_EMAIL'
IT_FIELDCAT = FIELDCAT_EMAIL
IMPORTING
ES_SELFIELD = SELFIELD
E_EXIT = ALV_EXIT
TABLES
T_OUTTAB = ITAB_EMAIL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*
IF SY-SUBRC = 0 AND ALV_EXIT = SPACE.
READ TABLE ITAB_EMAIL INDEX SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
P_RECEIV = ITAB_EMAIL-E_MAIL.
ENDIF.
ENDIF.
***********************************************************************
INITIALIZATION.
T_RECEIV = 'Receiver'.
*
SELECT * FROM KNA1 UP TO 10 ROWS.
ITAB_EMAIL-KUNNR = KNA1-KUNNR.
CONCATENATE KNA1-NAME1 '@test.de' INTO ITAB_EMAIL-E_MAIL.
APPEND ITAB_EMAIL.
ENDSELECT.
Feldkatatalog für email-Adressen
*
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EMAIL'.
WA_FIELDCAT-REF_TABNAME = 'KNA1'.
WA_FIELDCAT-REF_FIELDNAME = 'KUNNR'.
WA_FIELDCAT-FIELDNAME = 'KUNNR'.
APPEND WA_FIELDCAT TO FIELDCAT_EMAIL.
*
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'ITAB_EMAIL'.
WA_FIELDCAT-REF_TABNAME = 'BAPIADDR3'.
WA_FIELDCAT-REF_FIELDNAME = 'E_MAIL'.
WA_FIELDCAT-FIELDNAME = 'E_MAIL'.
APPEND WA_FIELDCAT TO FIELDCAT_EMAIL.
Regards, Dieter