MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Bapi_alm_order_maintain (foro/showthread.php?t=13039)

fence 30/04/08 12:31:03

Bapi_alm_order_maintain
 
Hola,

tengo que crearme unas ordenes con sus textos largos y demás, me han dicho que utilice esta Bapi pero no consigo hacerla funcionar. Estoy probando en la SE37, ejecutándola ahí mismo y metiéndole directamente los datos que me dan para crear las ordenes pero siempre me dice que le falta algo. Puede ayudarme alguien?


Datos que tengo:

Nº de OT
Clas de OT
Texto Breve
Ubicación Técnica
Clase Actividad de Mantenimiento
Texto Largo

Gracias de antemano ;) .

gutus 02/05/08 19:40:30

Bapi_alm_order_maintain
 
Espero te sirva estos códigos.
PARAMETERS: Material LIKE AUFM-MATNR DEFAULT 'R-1310',
Werk LIKE AFRV-WERKS DEFAULT '1200',
Lager LIKE AUFM-LGORT DEFAULT '1500',
Anzahl LIKE AUFM-MENGE DEFAULT '1',
Einheit LIKE AUFM-MEINS DEFAULT 'ST',
VorgngNr LIKE AFRU-VORNR DEFAULT '10'.
...

MethodenLine-REFNUMBER = '000001'.
MethodenLine-OBJECTTYPE = 'COMPONENT'.
MethodenLine-METHOD = 'CREATE'.
MethodenLine-OBJECTKEY = '000000500502'.
INSERT MethodenLine INTO TABLE Methoden.
CLEAR MethodenLine.

MethodenLine-REFNUMBER = '000000'.
MethodenLine-METHOD = 'SAVE'.
MethodenLine-OBJECTKEY = '000000500502'.
INSERT MethodenLine INTO TABLE Methoden.

KomponenteLine-MATERIAL = Material.
KomponenteLine-PLANT = Werk.
KomponenteLine-STGE_LOC = Lager.
KomponenteLine-ACTIVITY = VorgngNr.
KomponenteLine-REQUIREMENT_QUANTITY = Anzahl.
KomponenteLine-REQUIREMENT_QUANTITY_UNIT = Einheit.
INSERT KomponenteLine INTO TABLE Komponente.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
IT_METHODS = Methoden

IT_HEADER =
IT_HEADER_UP =
IT_HEADER_SRV =
IT_HEADER_SRV_UP =
IT_USERSTATUS =
IT_PARTNER =
IT_PARTNER_UP =
IT_OPERATION =
IT_OPERATION_UP =
IT_RELATION =
IT_RELATION_UP =
IT_COMPONENT = Komponente

IT_COMPONENT_UP =
IT_TEXT =
IT_TEXT_LINES =
EXTENSION_IN =
RETURN = Return
ET_NUMBERS = AufNummer.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING
WAIT =
IMPORTING
RETURN = Return.


Saludos.


Husos Horarios son GMT. La hora en este momento es 08:59:34.

www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web