SAP Function Modules

J_7L_MAINTAIN_ARTICLE SAP Function module - REA Article Management: Create/Change Article Data Object







J_7L_MAINTAIN_ARTICLE 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_7L_MAINTAIN_ARTICLE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: J7LARTICLE
Released Date: 22.10.2007
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM J_7L_MAINTAIN_ARTICLE - J 7L MAINTAIN ARTICLE





CALL FUNCTION 'J_7L_MAINTAIN_ARTICLE' "REA Article Management: Create/Change Article Data Object
* EXPORTING
*   i_flg_ch_doc_on = 'X'       " c             Generate Change Documents (X, )
*   i_flg_const_check_on = SPACE  " c           Consistency Check After Saving (X. )
*   i_test_modus_on = SPACE     " c             Test Mode Without Update (X, )
*   i_modus_enqueue_art = 'P'   " c             Mode for Lock Entries: (A)lways, (N)ever, (P)recl
*   i_modus_condition = 'C'     " c             Update SD Condition: (A)lways, (N)ever, (C)ustom
*   i_modus_update = 'S'        " c             Update Mode: (S)ynchronous, (A)synchronous
*   i_modus_plausib_check = 'N'  " c            Plausibility Check Before Saving: (A)lways, (N)ever, (I)nfo
*   i_copy_modus = SPACE        " c             No Checks - Parameter Enhancement Only
*   i_wf_event = 'C'            " c             Create Workflow Event (C)ustomizing, (A)lways, (Never)
*   i_no_mm_required = SPACE    " c             X=> Create Article Without Existing MM Record
  TABLES
    i_m01 =                     " j_7lm01       REA Article Master: General Data
    i_m02 =                     " j_7lm02       REA Article Master: Company Code
    i_m03 =                     " j_7lm03       REA Article Master: Sales Units
    i_m04 =                     " j_7lm04       REA Article Master: Packaging Assignment
    i_m05 =                     " j_7lm05       REA Article Master: Recycling Partner Assignment
    i_m06 =                     " j_7lm06       REA Article Master: Bills of Material
    i_m07 =                     " j_7lm07       REA Article Master: Referencing Company Codes/Countries
    i_m08 =                     " j_7lm08       REA Article Master: Referencing Company Codes/Countries
    i_m09 =                     " j_7lm09       REA Article Master: R.Partner-Depend. Data Assgmt Packaging
    i_m10 =                     " j_7lm10       REA Article Master: Filters for Regional Processing
*   i_m11 =                     " j_7lm11       REA Article Master: Declaration Key
    return =                    " bapiret2      Return Parameters
  EXCEPTIONS
    MAINTAIN_ERROR = 1          "               Error During Processing
    .  "  J_7L_MAINTAIN_ARTICLE

ABAP code example for Function Module J_7L_MAINTAIN_ARTICLE





The ABAP code below is a full code listing to execute function module J_7L_MAINTAIN_ARTICLE 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:
it_i_m01  TYPE STANDARD TABLE OF J_7LM01,"TABLES PARAM
wa_i_m01  LIKE LINE OF it_i_m01 ,
it_i_m02  TYPE STANDARD TABLE OF J_7LM02,"TABLES PARAM
wa_i_m02  LIKE LINE OF it_i_m02 ,
it_i_m03  TYPE STANDARD TABLE OF J_7LM03,"TABLES PARAM
wa_i_m03  LIKE LINE OF it_i_m03 ,
it_i_m04  TYPE STANDARD TABLE OF J_7LM04,"TABLES PARAM
wa_i_m04  LIKE LINE OF it_i_m04 ,
it_i_m05  TYPE STANDARD TABLE OF J_7LM05,"TABLES PARAM
wa_i_m05  LIKE LINE OF it_i_m05 ,
it_i_m06  TYPE STANDARD TABLE OF J_7LM06,"TABLES PARAM
wa_i_m06  LIKE LINE OF it_i_m06 ,
it_i_m07  TYPE STANDARD TABLE OF J_7LM07,"TABLES PARAM
wa_i_m07  LIKE LINE OF it_i_m07 ,
it_i_m08  TYPE STANDARD TABLE OF J_7LM08,"TABLES PARAM
wa_i_m08  LIKE LINE OF it_i_m08 ,
it_i_m09  TYPE STANDARD TABLE OF J_7LM09,"TABLES PARAM
wa_i_m09  LIKE LINE OF it_i_m09 ,
it_i_m10  TYPE STANDARD TABLE OF J_7LM10,"TABLES PARAM
wa_i_m10  LIKE LINE OF it_i_m10 ,
it_i_m11  TYPE STANDARD TABLE OF J_7LM11,"TABLES PARAM
wa_i_m11  LIKE LINE OF it_i_m11 ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .

DATA(ld_i_flg_ch_doc_on) = 'Check type of data required'.
DATA(ld_i_flg_const_check_on) = 'Check type of data required'.
DATA(ld_i_test_modus_on) = 'Check type of data required'.
DATA(ld_i_modus_enqueue_art) = 'Check type of data required'.
DATA(ld_i_modus_condition) = 'Check type of data required'.
DATA(ld_i_modus_update) = 'Check type of data required'.
DATA(ld_i_modus_plausib_check) = 'Check type of data required'.
DATA(ld_i_copy_modus) = 'Check type of data required'.
DATA(ld_i_wf_event) = 'Check type of data required'.
DATA(ld_i_no_mm_required) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m01 to it_i_m01.

"populate fields of struture and append to itab
append wa_i_m02 to it_i_m02.

"populate fields of struture and append to itab
append wa_i_m03 to it_i_m03.

"populate fields of struture and append to itab
append wa_i_m04 to it_i_m04.

"populate fields of struture and append to itab
append wa_i_m05 to it_i_m05.

"populate fields of struture and append to itab
append wa_i_m06 to it_i_m06.

"populate fields of struture and append to itab
append wa_i_m07 to it_i_m07.

"populate fields of struture and append to itab
append wa_i_m08 to it_i_m08.

"populate fields of struture and append to itab
append wa_i_m09 to it_i_m09.

"populate fields of struture and append to itab
append wa_i_m10 to it_i_m10.

"populate fields of struture and append to itab
append wa_i_m11 to it_i_m11.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'J_7L_MAINTAIN_ARTICLE' * EXPORTING * i_flg_ch_doc_on = ld_i_flg_ch_doc_on * i_flg_const_check_on = ld_i_flg_const_check_on * i_test_modus_on = ld_i_test_modus_on * i_modus_enqueue_art = ld_i_modus_enqueue_art * i_modus_condition = ld_i_modus_condition * i_modus_update = ld_i_modus_update * i_modus_plausib_check = ld_i_modus_plausib_check * i_copy_modus = ld_i_copy_modus * i_wf_event = ld_i_wf_event * i_no_mm_required = ld_i_no_mm_required TABLES i_m01 = it_i_m01 i_m02 = it_i_m02 i_m03 = it_i_m03 i_m04 = it_i_m04 i_m05 = it_i_m05 i_m06 = it_i_m06 i_m07 = it_i_m07 i_m08 = it_i_m08 i_m09 = it_i_m09 i_m10 = it_i_m10 * i_m11 = it_i_m11 return = it_return EXCEPTIONS MAINTAIN_ERROR = 1 . " J_7L_MAINTAIN_ARTICLE
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_i_flg_ch_doc_on  TYPE C ,
it_i_m01  TYPE STANDARD TABLE OF J_7LM01 ,
wa_i_m01  LIKE LINE OF it_i_m01,
it_i_m02  TYPE STANDARD TABLE OF J_7LM02 ,
wa_i_m02  LIKE LINE OF it_i_m02,
ld_i_flg_const_check_on  TYPE C ,
ld_i_test_modus_on  TYPE C ,
it_i_m03  TYPE STANDARD TABLE OF J_7LM03 ,
wa_i_m03  LIKE LINE OF it_i_m03,
ld_i_modus_enqueue_art  TYPE C ,
it_i_m04  TYPE STANDARD TABLE OF J_7LM04 ,
wa_i_m04  LIKE LINE OF it_i_m04,
ld_i_modus_condition  TYPE C ,
it_i_m05  TYPE STANDARD TABLE OF J_7LM05 ,
wa_i_m05  LIKE LINE OF it_i_m05,
ld_i_modus_update  TYPE C ,
it_i_m06  TYPE STANDARD TABLE OF J_7LM06 ,
wa_i_m06  LIKE LINE OF it_i_m06,
ld_i_modus_plausib_check  TYPE C ,
it_i_m07  TYPE STANDARD TABLE OF J_7LM07 ,
wa_i_m07  LIKE LINE OF it_i_m07,
ld_i_copy_modus  TYPE C ,
it_i_m08  TYPE STANDARD TABLE OF J_7LM08 ,
wa_i_m08  LIKE LINE OF it_i_m08,
ld_i_wf_event  TYPE C ,
it_i_m09  TYPE STANDARD TABLE OF J_7LM09 ,
wa_i_m09  LIKE LINE OF it_i_m09,
ld_i_no_mm_required  TYPE C ,
it_i_m10  TYPE STANDARD TABLE OF J_7LM10 ,
wa_i_m10  LIKE LINE OF it_i_m10,
it_i_m11  TYPE STANDARD TABLE OF J_7LM11 ,
wa_i_m11  LIKE LINE OF it_i_m11,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.

ld_i_flg_ch_doc_on = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m01 to it_i_m01.

"populate fields of struture and append to itab
append wa_i_m02 to it_i_m02.
ld_i_flg_const_check_on = 'Check type of data required'.
ld_i_test_modus_on = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m03 to it_i_m03.
ld_i_modus_enqueue_art = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m04 to it_i_m04.
ld_i_modus_condition = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m05 to it_i_m05.
ld_i_modus_update = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m06 to it_i_m06.
ld_i_modus_plausib_check = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m07 to it_i_m07.
ld_i_copy_modus = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m08 to it_i_m08.
ld_i_wf_event = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m09 to it_i_m09.
ld_i_no_mm_required = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_m10 to it_i_m10.

"populate fields of struture and append to itab
append wa_i_m11 to it_i_m11.

"populate fields of struture and append to itab
append wa_return to it_return.

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_7L_MAINTAIN_ARTICLE or its description.