Creación de función SM37 function zsd_create_mov_merc. *"---------------------------------------------------------------------- *"*"Interfase local *" IMPORTING *" VALUE(FECHA_CONTAB) TYPE BUDAT *" VALUE(FECHA_CREACION) TYPE BLDAT *" VALUE(DOCUMENTO_REF) TYPE XBLNR *" VALUE(HACER_COMMIT) TYPE BOOLEAN OPTIONAL *" EXPORTING *" VALUE(GOODSMVT_HEADRET) LIKE BAPI2017_GM_HEAD_RET STRUCTURE *" BAPI2017_GM_HEAD_RET *" VALUE(MATERIALDOCUMENT) TYPE BAPI2017_GM_HEAD_RET-MAT_DOC *" VALUE(MATDOCUMENTYEAR) TYPE BAPI2017_GM_HEAD_RET-DOC_YEAR *" TABLES *" ITEMS STRUCTURE BAPI2017_GM_ITEM_CREATE *" SERIAL STRUCTURE BAPI2017_GM_SERIALNUMBER OPTIONAL *" RETURN STRUCTURE BAPIRET2 *"---------------------------------------------------------------------- data: goodsmvt_header like bapi2017_gm_head_01, goodsmvt_code like bapi2017_gm_code. goodsmv