I have made this.
class-object = bapi_head-material.
class-objecttable = 'MARA'.
class-classnum = 'ZPERU_TIPO_ARTÍCUL'.
class-classtype = '001'.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
OBJECTKEYNEW = class-object
OBJECTTABLENEW = class-objecttable
CLASSNUMNEW = class-classnum
CLASSTYPENEW = class-classtype
RETURN = returnmessages.
The problem is that doesn't appear the view for this material, what else do I have to do?