SAP Function Modules

MASS_SAVE_ARTICLE_USING_BAPI SAP Function module







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

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


Pattern for FM MASS_SAVE_ARTICLE_USING_BAPI - MASS SAVE ARTICLE USING BAPI





CALL FUNCTION 'MASS_SAVE_ARTICLE_USING_BAPI' "
  EXPORTING
    seldata =                   " mass_tabdata
    testmode =                  "
  IMPORTING
    msg =                       " mass_msgs
* TABLES
*   smakt =                     " makt
*   smalg =                     " malg
*   smamt =                     " mamt
*   smara =                     " mara
*   smarc =                     " marc
*   smard =                     " mard
*   smarm =                     " marm
*   smaw1 =                     " maw1
*   smbew =                     " mbew
*   smean =                     " mean
*   smlea =                     " mlea
*   smlgn =                     " mlgn
*   smlgt =                     " mlgt
*   smpgd =                     " mpgd
*   smpop =                     " mpop
*   smprw =                     " mprw
*   smveg =                     " mveg
*   smveu =                     " mveu
*   smvke =                     " mvke
*   swlk2 =                     " wlk2
*   smartstatus =               " martstatus
    .  "  MASS_SAVE_ARTICLE_USING_BAPI

ABAP code example for Function Module MASS_SAVE_ARTICLE_USING_BAPI





The ABAP code below is a full code listing to execute function module MASS_SAVE_ARTICLE_USING_BAPI 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_msg  TYPE MASS_MSGS ,
it_smakt  TYPE STANDARD TABLE OF MAKT,"TABLES PARAM
wa_smakt  LIKE LINE OF it_smakt ,
it_smalg  TYPE STANDARD TABLE OF MALG,"TABLES PARAM
wa_smalg  LIKE LINE OF it_smalg ,
it_smamt  TYPE STANDARD TABLE OF MAMT,"TABLES PARAM
wa_smamt  LIKE LINE OF it_smamt ,
it_smara  TYPE STANDARD TABLE OF MARA,"TABLES PARAM
wa_smara  LIKE LINE OF it_smara ,
it_smarc  TYPE STANDARD TABLE OF MARC,"TABLES PARAM
wa_smarc  LIKE LINE OF it_smarc ,
it_smard  TYPE STANDARD TABLE OF MARD,"TABLES PARAM
wa_smard  LIKE LINE OF it_smard ,
it_smarm  TYPE STANDARD TABLE OF MARM,"TABLES PARAM
wa_smarm  LIKE LINE OF it_smarm ,
it_smaw1  TYPE STANDARD TABLE OF MAW1,"TABLES PARAM
wa_smaw1  LIKE LINE OF it_smaw1 ,
it_smbew  TYPE STANDARD TABLE OF MBEW,"TABLES PARAM
wa_smbew  LIKE LINE OF it_smbew ,
it_smean  TYPE STANDARD TABLE OF MEAN,"TABLES PARAM
wa_smean  LIKE LINE OF it_smean ,
it_smlea  TYPE STANDARD TABLE OF MLEA,"TABLES PARAM
wa_smlea  LIKE LINE OF it_smlea ,
it_smlgn  TYPE STANDARD TABLE OF MLGN,"TABLES PARAM
wa_smlgn  LIKE LINE OF it_smlgn ,
it_smlgt  TYPE STANDARD TABLE OF MLGT,"TABLES PARAM
wa_smlgt  LIKE LINE OF it_smlgt ,
it_smpgd  TYPE STANDARD TABLE OF MPGD,"TABLES PARAM
wa_smpgd  LIKE LINE OF it_smpgd ,
it_smpop  TYPE STANDARD TABLE OF MPOP,"TABLES PARAM
wa_smpop  LIKE LINE OF it_smpop ,
it_smprw  TYPE STANDARD TABLE OF MPRW,"TABLES PARAM
wa_smprw  LIKE LINE OF it_smprw ,
it_smveg  TYPE STANDARD TABLE OF MVEG,"TABLES PARAM
wa_smveg  LIKE LINE OF it_smveg ,
it_smveu  TYPE STANDARD TABLE OF MVEU,"TABLES PARAM
wa_smveu  LIKE LINE OF it_smveu ,
it_smvke  TYPE STANDARD TABLE OF MVKE,"TABLES PARAM
wa_smvke  LIKE LINE OF it_smvke ,
it_swlk2  TYPE STANDARD TABLE OF WLK2,"TABLES PARAM
wa_swlk2  LIKE LINE OF it_swlk2 ,
it_smartstatus  TYPE STANDARD TABLE OF MARTSTATUS,"TABLES PARAM
wa_smartstatus  LIKE LINE OF it_smartstatus .

DATA(ld_seldata) = 'Check type of data required'.
DATA(ld_testmode) = 'some text here'.

"populate fields of struture and append to itab
append wa_smakt to it_smakt.

"populate fields of struture and append to itab
append wa_smalg to it_smalg.

"populate fields of struture and append to itab
append wa_smamt to it_smamt.

"populate fields of struture and append to itab
append wa_smara to it_smara.

"populate fields of struture and append to itab
append wa_smarc to it_smarc.

"populate fields of struture and append to itab
append wa_smard to it_smard.

"populate fields of struture and append to itab
append wa_smarm to it_smarm.

"populate fields of struture and append to itab
append wa_smaw1 to it_smaw1.

"populate fields of struture and append to itab
append wa_smbew to it_smbew.

"populate fields of struture and append to itab
append wa_smean to it_smean.

"populate fields of struture and append to itab
append wa_smlea to it_smlea.

"populate fields of struture and append to itab
append wa_smlgn to it_smlgn.

"populate fields of struture and append to itab
append wa_smlgt to it_smlgt.

"populate fields of struture and append to itab
append wa_smpgd to it_smpgd.

"populate fields of struture and append to itab
append wa_smpop to it_smpop.

"populate fields of struture and append to itab
append wa_smprw to it_smprw.

"populate fields of struture and append to itab
append wa_smveg to it_smveg.

"populate fields of struture and append to itab
append wa_smveu to it_smveu.

"populate fields of struture and append to itab
append wa_smvke to it_smvke.

"populate fields of struture and append to itab
append wa_swlk2 to it_swlk2.

"populate fields of struture and append to itab
append wa_smartstatus to it_smartstatus. . CALL FUNCTION 'MASS_SAVE_ARTICLE_USING_BAPI' EXPORTING seldata = ld_seldata testmode = ld_testmode IMPORTING msg = ld_msg * TABLES * smakt = it_smakt * smalg = it_smalg * smamt = it_smamt * smara = it_smara * smarc = it_smarc * smard = it_smard * smarm = it_smarm * smaw1 = it_smaw1 * smbew = it_smbew * smean = it_smean * smlea = it_smlea * smlgn = it_smlgn * smlgt = it_smlgt * smpgd = it_smpgd * smpop = it_smpop * smprw = it_smprw * smveg = it_smveg * smveu = it_smveu * smvke = it_smvke * swlk2 = it_swlk2 * smartstatus = it_smartstatus . " MASS_SAVE_ARTICLE_USING_BAPI
IF SY-SUBRC EQ 0. "All OK 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_msg  TYPE MASS_MSGS ,
ld_seldata  TYPE MASS_TABDATA ,
it_smakt  TYPE STANDARD TABLE OF MAKT ,
wa_smakt  LIKE LINE OF it_smakt,
ld_testmode  TYPE STRING ,
it_smalg  TYPE STANDARD TABLE OF MALG ,
wa_smalg  LIKE LINE OF it_smalg,
it_smamt  TYPE STANDARD TABLE OF MAMT ,
wa_smamt  LIKE LINE OF it_smamt,
it_smara  TYPE STANDARD TABLE OF MARA ,
wa_smara  LIKE LINE OF it_smara,
it_smarc  TYPE STANDARD TABLE OF MARC ,
wa_smarc  LIKE LINE OF it_smarc,
it_smard  TYPE STANDARD TABLE OF MARD ,
wa_smard  LIKE LINE OF it_smard,
it_smarm  TYPE STANDARD TABLE OF MARM ,
wa_smarm  LIKE LINE OF it_smarm,
it_smaw1  TYPE STANDARD TABLE OF MAW1 ,
wa_smaw1  LIKE LINE OF it_smaw1,
it_smbew  TYPE STANDARD TABLE OF MBEW ,
wa_smbew  LIKE LINE OF it_smbew,
it_smean  TYPE STANDARD TABLE OF MEAN ,
wa_smean  LIKE LINE OF it_smean,
it_smlea  TYPE STANDARD TABLE OF MLEA ,
wa_smlea  LIKE LINE OF it_smlea,
it_smlgn  TYPE STANDARD TABLE OF MLGN ,
wa_smlgn  LIKE LINE OF it_smlgn,
it_smlgt  TYPE STANDARD TABLE OF MLGT ,
wa_smlgt  LIKE LINE OF it_smlgt,
it_smpgd  TYPE STANDARD TABLE OF MPGD ,
wa_smpgd  LIKE LINE OF it_smpgd,
it_smpop  TYPE STANDARD TABLE OF MPOP ,
wa_smpop  LIKE LINE OF it_smpop,
it_smprw  TYPE STANDARD TABLE OF MPRW ,
wa_smprw  LIKE LINE OF it_smprw,
it_smveg  TYPE STANDARD TABLE OF MVEG ,
wa_smveg  LIKE LINE OF it_smveg,
it_smveu  TYPE STANDARD TABLE OF MVEU ,
wa_smveu  LIKE LINE OF it_smveu,
it_smvke  TYPE STANDARD TABLE OF MVKE ,
wa_smvke  LIKE LINE OF it_smvke,
it_swlk2  TYPE STANDARD TABLE OF WLK2 ,
wa_swlk2  LIKE LINE OF it_swlk2,
it_smartstatus  TYPE STANDARD TABLE OF MARTSTATUS ,
wa_smartstatus  LIKE LINE OF it_smartstatus.

ld_seldata = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_smakt to it_smakt.
ld_testmode = 'some text here'.

"populate fields of struture and append to itab
append wa_smalg to it_smalg.

"populate fields of struture and append to itab
append wa_smamt to it_smamt.

"populate fields of struture and append to itab
append wa_smara to it_smara.

"populate fields of struture and append to itab
append wa_smarc to it_smarc.

"populate fields of struture and append to itab
append wa_smard to it_smard.

"populate fields of struture and append to itab
append wa_smarm to it_smarm.

"populate fields of struture and append to itab
append wa_smaw1 to it_smaw1.

"populate fields of struture and append to itab
append wa_smbew to it_smbew.

"populate fields of struture and append to itab
append wa_smean to it_smean.

"populate fields of struture and append to itab
append wa_smlea to it_smlea.

"populate fields of struture and append to itab
append wa_smlgn to it_smlgn.

"populate fields of struture and append to itab
append wa_smlgt to it_smlgt.

"populate fields of struture and append to itab
append wa_smpgd to it_smpgd.

"populate fields of struture and append to itab
append wa_smpop to it_smpop.

"populate fields of struture and append to itab
append wa_smprw to it_smprw.

"populate fields of struture and append to itab
append wa_smveg to it_smveg.

"populate fields of struture and append to itab
append wa_smveu to it_smveu.

"populate fields of struture and append to itab
append wa_smvke to it_smvke.

"populate fields of struture and append to itab
append wa_swlk2 to it_swlk2.

"populate fields of struture and append to itab
append wa_smartstatus to it_smartstatus.

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