SAP Function Modules

J_7LC_MFIELD_HELP SAP Function module







J_7LC_MFIELD_HELP is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name J_7LC_MFIELD_HELP into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: J7LC
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM J_7LC_MFIELD_HELP - J 7LC MFIELD HELP





CALL FUNCTION 'J_7LC_MFIELD_HELP' "
  EXPORTING
    i_headline =                " c
    i_modus =                   " c             Display/Change Mode
*   i_max_fieldlength = 0       " i
    i_table =                   " dd03l-tabname
    i_tabfeld_dynpro =          " help_info-dynprofld
    i_prog =                    " sy-repid
    i_dynnr =                   " sy-dynnr      ABAP Program, Current Screen Number
  IMPORTING
    o_fieldname =               " dd03l-fieldname  Selected field
* TABLES
*   i_datatype_tab =            " j7lr1_datatype
  EXCEPTIONS
    NO_SELECTION = 1            "               No Selection
    .  "  J_7LC_MFIELD_HELP

ABAP code example for Function Module J_7LC_MFIELD_HELP





The ABAP code below is a full code listing to execute function module J_7LC_MFIELD_HELP including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_o_fieldname  TYPE DD03L-FIELDNAME ,
it_i_datatype_tab  TYPE STANDARD TABLE OF J7LR1_DATATYPE,"TABLES PARAM
wa_i_datatype_tab  LIKE LINE OF it_i_datatype_tab .

DATA(ld_i_headline) = 'Check type of data required'.
DATA(ld_i_modus) = 'Check type of data required'.
DATA(ld_i_max_fieldlength) = 'Check type of data required'.

SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_i_table).


DATA(ld_i_tabfeld_dynpro) = some text here
DATA(ld_i_prog) = 'some text here'.
DATA(ld_i_dynnr) = 'some text here'.

"populate fields of struture and append to itab
append wa_i_datatype_tab to it_i_datatype_tab. . CALL FUNCTION 'J_7LC_MFIELD_HELP' EXPORTING i_headline = ld_i_headline i_modus = ld_i_modus * i_max_fieldlength = ld_i_max_fieldlength i_table = ld_i_table i_tabfeld_dynpro = ld_i_tabfeld_dynpro i_prog = ld_i_prog i_dynnr = ld_i_dynnr IMPORTING o_fieldname = ld_o_fieldname * TABLES * i_datatype_tab = it_i_datatype_tab EXCEPTIONS NO_SELECTION = 1 . " J_7LC_MFIELD_HELP
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_o_fieldname  TYPE DD03L-FIELDNAME ,
ld_i_headline  TYPE C ,
it_i_datatype_tab  TYPE STANDARD TABLE OF J7LR1_DATATYPE ,
wa_i_datatype_tab  LIKE LINE OF it_i_datatype_tab,
ld_i_modus  TYPE C ,
ld_i_max_fieldlength  TYPE I ,
ld_i_table  TYPE DD03L-TABNAME ,
ld_i_tabfeld_dynpro  TYPE HELP_INFO-DYNPROFLD ,
ld_i_prog  TYPE SY-REPID ,
ld_i_dynnr  TYPE SY-DYNNR .

ld_i_headline = 'some text here'.

"populate fields of struture and append to itab
append wa_i_datatype_tab to it_i_datatype_tab.
ld_i_modus = 'some text here'.
ld_i_max_fieldlength = 'some text here'.

SELECT single TABNAME
FROM DD03L
INTO ld_i_table.


ld_i_tabfeld_dynpro = some text here
ld_i_prog = 'some text here'.
ld_i_dynnr = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name J_7LC_MFIELD_HELP or its description.