‎2006 Nov 23 10:37 AM
i need to find out the data belongs to the attributes of a function module.
ex: normal,remteenabled like that..
i need all the data regarding the attributes of a function module.
regards
sitaram.
‎2006 Nov 23 10:38 AM
Please check table
<b>TFDIR</b>
It contains all that you require
‎2006 Nov 23 10:38 AM
Please check table
<b>TFDIR</b>
It contains all that you require
‎2006 Nov 23 11:04 AM
i know through TFDIR we can get the attributes,
but how those are coming, through some program only........
i need that program name .........
thank u for u r reply....
‎2006 Nov 23 11:12 AM
‎2006 Nov 23 11:53 AM
check whether it exists or not. he re iam not getting it .
not exists is the answer.
thanks and regards
‎2006 Nov 23 12:01 PM
FUNCTION_IMPORT_INTERFACE exits in 4.6B , which version r u using
‎2006 Nov 23 12:09 PM
Hi
I am in SAP 4.7
Check out this FM
<b>OM_FUNC_MODULE_EXIST</b>
Hope fully it shoudl exist in your system
‎2006 Nov 23 12:41 PM
hi this is useful for finding the attributes like iimport and export and all.....----
but my requirement is to find the =============
The function module data like whther it is normal or rfc one...
2nd waht is the program behind it.
ex: function_exists.
here in the attributes tab--two subcategory tabs exist.
1.processing type.---noramal or rfc.
2.general data--package,program name,include name.this is my requirement
this is my requirement.----
input-function module name.
output-rfc or normal
-program name
-include name
Message was edited by:
dasr r
Message was edited by:
dasr r
‎2006 Nov 23 1:04 PM
Hi,
If you look in the FM OM_FUNC_MODULE_EXIST
the exporting parameter is TFDIR_INFO
This contains
TFDIR_INFO-PNAME - Program Name
TFDIR_INFO-INCLUDE- Include Name
TFDIR_INFO-FMODE - If RFC value = 'R' if normal then blank
Hope this helps
‎2006 Nov 23 1:05 PM
if u want only those 3 fields , then u can write a simple select on TFDIR table
select pname include fmode where funcname = <ur func module name>.
‎2006 Nov 23 10:38 AM
‎2006 Nov 23 11:05 AM
i know through TFDIR we can get the attributes,
but how those are coming, through some program only........
i need that program name .........
thank u for u r reply....
‎2006 Nov 23 11:23 AM
data: begin of exception_list occurs 1.
include structure rsexc.
data: end of exception_list.
data: begin of export_param occurs 1.
include structure rsexp.
data: end of export_param.
data: begin of import_param occurs 1.
include structure rsimp.
data: end of import_param.
data: begin of tables_param occurs 1.
include structure rstbl.
data: end of tables_param.
call function 'FUNCTION_IMPORT_INTERFACE'
exporting
funcname = 'REUSE_ALV_GRID_DISPLAY'
tables
exception_list = exception_list
export_parameter = export_param
import_parameter = import_param
tables_parameter = tables_param.
‎2006 Nov 23 11:27 AM
‎2006 Nov 23 11:54 AM
‎2006 Nov 23 12:09 PM
This is the code written in Function_get
FUNCTION FUNCTION_GET. "10.07.2003
*"----
*"Globale Schnittstelle:
*" IMPORTING
*" FUNCNAME LIKE TFDIR-FUNCNAME
*" TABLES
*" PRMTAB STRUCTURE CATFU
*" EXCEPTIONS
*" FM_NOT_FOUND
*" NAMETAB_FAULT
*" REF_FIELD_MISSING
*" REF_STRUCTURE_MISSING
*"----
REFRESH: IF_IMPORT, IF_EXPORT, IF_TABLES, IF_EXCEPT, PRMTAB,
IF_CHANGE.
CLEAR: IF_IMPORT, IF_EXPORT, IF_TABLES, IF_EXCEPT, PRMTAB,
IF_CHANGE.
CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
EXPORTING
FUNCNAME = FUNCNAME
IMPORTING
GLOBAL_FLAG = I01
REMOTE_CALL = I02
UPDATE_TASK = I03
TABLES
EXCEPTION_LIST = IF_EXCEPT
EXPORT_PARAMETER = IF_EXPORT
IMPORT_PARAMETER = IF_IMPORT
CHANGING_PARAMETER = IF_CHANGE
TABLES_PARAMETER = IF_TABLES
EXCEPTIONS
ERROR_MESSAGE = 01
FUNCTION_NOT_FOUND = 02
INVALID_NAME = 03.
IF SY-SUBRC > 0.
RAISE FM_NOT_FOUND.
ENDIF.
PERFORM MOVE_IF_IMPORT.
PERFORM MOVE_IF_CHANGE.
PERFORM MOVE_IF_EXPORT.
PERFORM MOVE_IF_TABLES.
PERFORM MOVE_IF_EXCEPT.
LOOP AT PRMTAB WHERE TABNAME = 'SY '.
PRMTAB-TABNAME = 'SYST'.
MODIFY PRMTAB.
ENDLOOP.
*-- get ddic-information on each field i.e. all im-/export-parameters -*
PERFORM DDIC_INFO_GET_1.
*-- get ddic-information on each field in import/export-structures -
*
PERFORM DDIC_INFO_GET_2.
ENDFUNCTION.
----
FORM MOVE_IF_IMPORT *
----
FORM MOVE_IF_IMPORT.
LOOP AT IF_IMPORT.
CLEAR PRMTAB.
PRMTAB-PARAMTYPE = IMPORT.
PRMTAB-NAME = IF_IMPORT-PARAMETER.
IF IF_IMPORT-DBFIELD CA '-'.
ASSIGN IF_IMPORT-DBFIELD(SY-FDPOS) TO <F>.
PRMTAB-TABNAME = <F>.
POSITION = SY-FDPOS + 1.
ASSIGN IF_IMPORT-DBFIELD+POSITION(*) TO <F>.
PRMTAB-FIELDNAME = <F>.
IF PRMTAB-FIELDNAME = SPACE.
PERFORM MOVE_INITIAL.
ENDIF.
PRMTAB-IMPDEFAULT = IF_IMPORT-DEFAULT.
APPEND PRMTAB.
ELSE.
PRMTAB-TABNAME = IF_IMPORT-DBFIELD.
IF PRMTAB-TABNAME = SPACE.
PERFORM MOVE_INITIAL.
PRMTAB-IMPDEFAULT = IF_IMPORT-DEFAULT.
ENDIF.
APPEND PRMTAB.
ENDIF.
ENDLOOP.
ENDFORM.
----
FORM MOVE_IF_CHANGE *
----
FORM MOVE_IF_CHANGE.
LOOP AT IF_CHANGE.
CLEAR PRMTAB.
PRMTAB-PARAMTYPE = CHANGE.
PRMTAB-NAME = IF_CHANGE-PARAMETER.
IF IF_CHANGE-DBFIELD CA '-'.
ASSIGN IF_CHANGE-DBFIELD(SY-FDPOS) TO <F>.
PRMTAB-TABNAME = <F>.
POSITION = SY-FDPOS + 1.
ASSIGN IF_CHANGE-DBFIELD+POSITION(*) TO <F>.
PRMTAB-FIELDNAME = <F>.
IF PRMTAB-FIELDNAME = SPACE.
PERFORM MOVE_INITIAL.
PRMTAB-LOWERCASE = SPACE.
ENDIF.
PRMTAB-IMPDEFAULT = IF_CHANGE-DEFAULT.
APPEND PRMTAB.
ELSE.
PRMTAB-TABNAME = IF_CHANGE-DBFIELD.
IF PRMTAB-TABNAME = SPACE.
PERFORM MOVE_INITIAL.
PRMTAB-LOWERCASE = SPACE.
PRMTAB-IMPDEFAULT = IF_CHANGE-DEFAULT.
ENDIF.
APPEND PRMTAB.
ENDIF.
ENDLOOP.
ENDFORM.
----
FORM MOVE_IF_EXPORT *
----
FORM MOVE_IF_EXPORT.
LOOP AT IF_EXPORT.
CLEAR PRMTAB.
PRMTAB-PARAMTYPE = EXPORT.
PRMTAB-NAME = IF_EXPORT-PARAMETER.
IF IF_EXPORT-DBFIELD CA '-'.
ASSIGN IF_EXPORT-DBFIELD(SY-FDPOS) TO <F>.
PRMTAB-TABNAME = <F>.
POSITION = SY-FDPOS + 1.
ASSIGN IF_EXPORT-DBFIELD+POSITION(*) TO <F>.
PRMTAB-FIELDNAME = <F>.
IF PRMTAB-FIELDNAME = SPACE.
PERFORM MOVE_INITIAL.
PRMTAB-LOWERCASE = SPACE.
ENDIF.
APPEND PRMTAB.
ELSE.
PRMTAB-TABNAME = IF_EXPORT-DBFIELD.
IF PRMTAB-TABNAME = SPACE.
PERFORM MOVE_INITIAL.
PRMTAB-LOWERCASE = SPACE.
ENDIF.
APPEND PRMTAB.
ENDIF.
ENDLOOP.
ENDFORM.
----
FORM MOVE_IF_TABLES *
----
FORM MOVE_IF_TABLES.
LOOP AT IF_TABLES.
CLEAR PRMTAB.
PRMTAB-PARAMTYPE = ITAB.
PRMTAB-NAME = IF_TABLES-PARAMETER.
PRMTAB-TABNAME = IF_TABLES-DBSTRUCT.
IF PRMTAB-TABNAME = SPACE.
PRMTAB-TABNAME = 'RSSOURCE'.
RAISE REF_STRUCTURE_MISSING.
ENDIF.
APPEND PRMTAB.
ENDLOOP.
ENDFORM.
----
FORM MOVE_IF_EXCEPT *
----
FORM MOVE_IF_EXCEPT.
LOOP AT IF_EXCEPT.
CLEAR PRMTAB.
PRMTAB-PARAMTYPE = EXCEPT.
PRMTAB-NAME = IF_EXCEPT-EXCEPTION.
APPEND PRMTAB.
ENDLOOP.
ENDFORM.
----
FORM DDIC_INFO_GET_1 *
----
get ddic-info on each each im-/export and itab-field *
----
FORM DDIC_INFO_GET_1.
CLEAR TABNAME_SAVE.
SORT PRMTAB BY TABNAME PARAMTYPE.
COUNT = 0.
READINDEX = 1.
DESCRIBE TABLE PRMTAB LINES COUNT.
WHILE READINDEX <= COUNT.
READ TABLE PRMTAB INDEX READINDEX.
CHECK PRMTAB-FIELDNAME <> SPACE.
IF PRMTAB-TABNAME <> SPACE AND PRMTAB-TABNAME <> TABNAME_SAVE.
TABNAME_SAVE = PRMTAB-TABNAME.
PERFORM NAMETAB_GET USING PRMTAB-TABNAME RC.
IF RC = 0 OR RC = 8.
LOOP AT PRMTAB
WHERE TABNAME = TABNAME_SAVE.
IF PRMTAB-TABNAME = 'SYST' AND
PRMTAB-FIELDNAME = 'REPID'.
PRMTAB-DATATYPE = 'CHAR'.
PRMTAB-INTTYPE = 'C'.
PRMTAB-DDLEN = 40.
PRMTAB-INTLEN = 40.
MODIFY PRMTAB.
ELSE.
LOOP AT NAMETAB
WHERE TABNAME = PRMTAB-TABNAME
AND FIELDNAME = PRMTAB-FIELDNAME
AND LANGU = SY-LANGU.
PERFORM MOVE_NAMETAB.
MODIFY PRMTAB.
ENDLOOP.
ENDIF.
ENDLOOP.
ELSE.
RAISE NAMETAB_FAULT.
ENDIF.
ENDIF.
READINDEX = READINDEX + 1.
ENDWHILE.
SORT PRMTAB.
ENDFORM.
----
FORM DDIC_INFO_GET_2 *
----
solve all im-/export and itab-structures *
get ddic-info *
----
FORM DDIC_INFO_GET_2.
LOOP AT PRMTAB
WHERE PARAMTYPE = IMPORT OR PARAMTYPE = EXPORT OR
PARAMTYPE = CHANGE OR PARAMTYPE = ITAB.
CHECK PRMTAB-TABNAME <> SPACE.
CHECK PRMTAB-FIELDNAME = SPACE.
PERFORM NAMETAB_GET USING PRMTAB-TABNAME RC.
IF RC = 0 OR RC = 8.
CASE PRMTAB-PARAMTYPE.
WHEN IMPORT.
PRMTAB-PARAMTYPE = IMP_STRUC_FIELD.
WHEN CHANGE.
PRMTAB-PARAMTYPE = CHA_STRUC_FIELD.
WHEN EXPORT.
PRMTAB-PARAMTYPE = EXP_STRUC_FIELD.
WHEN ITAB.
PRMTAB-PARAMTYPE = ITAB_FIELD.
ENDCASE.
LOOP AT NAMETAB.
PRMTAB-FIELDNAME = NAMETAB-FIELDNAME.
PERFORM MOVE_NAMETAB.
APPEND PRMTAB.
ENDLOOP.
ELSE.
RAISE NAMETAB_FAULT.
ENDIF.
ENDLOOP.
ENDFORM.
----
FORM NAMETAB_GET *
----
--> RC *
----
FORM NAMETAB_GET USING TABNAME RC.
CALL FUNCTION 'NAMETAB_GET'
EXPORTING
LANGU = SY-LANGU
TABNAME = TABNAME
IMPORTING
HEADER = TABHEAD
TABLES
NAMETAB = NAMETAB
EXCEPTIONS
INTERNAL_ERROR = 4
NO_TEXTS_FOUND = 8
TABLE_HAS_NO_FIELDS = 12
TABLE_NOT_ACTIV = 16.
RC = SY-SUBRC.
ENDFORM.
----
FORM MOVE_NAMETAB *
----
........ *
----
FORM MOVE_NAMETAB.
PRMTAB-DATATYPE = NAMETAB-DATATYPE.
PRMTAB-INTTYPE = NAMETAB-INTTYPE.
PRMTAB-DDLEN = NAMETAB-DDLEN.
PRMTAB-INTLEN = NAMETAB-INTLEN.
PRMTAB-DECIMALS = NAMETAB-DECIMALS.
PRMTAB-LOWERCASE = NAMETAB-LOWERCASE.
PRMTAB-SIGN = NAMETAB-SIGN.
ENDFORM.
----
FORM MOVE_INITIAL *
----
........ *
----
FORM MOVE_INITIAL.
PRMTAB-DATATYPE = 'CHAR'.
PRMTAB-INTTYPE = 'C'.
PRMTAB-DDLEN = 20.
PRMTAB-INTLEN = 20.
PRMTAB-LOWERCASE = 'X'.
ENDFORM.