MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Viejo 15/10/09, 19:33:04
hrosas hrosas is offline
Member
 
Fecha de Ingreso: jun 2008
Mensajes: 31
bapi para UM

Hola alguien sabra de alguna bapi para poder crear y/o modificar unidades de medida?

gracias
Responder Con Cita
  #2  
Viejo 19/10/09, 16:16:16
hrosas hrosas is offline
Member
 
Fecha de Ingreso: jun 2008
Mensajes: 31
aqui esta la solucion:

data: it_unitsofmeasure type standard table of bapi_marm.
data: it_unitsofmeasurex type standard table of bapi_marmx.

loop at int_mat.
* Header
bapi_head-material = int_mat-matnr.
* bapi_head-ind_sector = int_mat-mbrsh.
* bapi_head-matl_type = int_mat-mtart.
* bapi_head-basic_view = 'X'.
* bapi_head-purchase_view = 'X'.
* bapi_head-account_view = 'X'.
wa_unitsofmeasure-alt_unit = int_mat-alt_unit.
wa_unitsofmeasure-denominatr = int_mat-denominatr.
wa_unitsofmeasure-numerator = int_mat-numerator.
wa_unitsofmeasure-ean_upc = int_mat-ean11.
append wa_unitsofmeasure to it_unitsofmeasure.
wa_unitsofmeasurex-alt_unit = int_mat-alt_unit.
wa_unitsofmeasurex-denominatr = 'X'.
wa_unitsofmeasurex-numerator = 'X'.
wa_unitsofmeasurex-ean_upc = 'X'.

append wa_unitsofmeasurex to it_unitsofmeasurex.
write:/ bapi_head, bapi_marc1.

call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = bapi_head
* clientdata = bapi_mara1
* clientdatax = bapi_marax
* plantdata = bapi_marc1
* plantdatax = bapi_marcx
* valuationdata = bapi_mbew1
* valuationdatax = bapi_mbewx
importing
return = bapi_return
tables
* materialdescription = int_makt
unitsofmeasure = it_unitsofmeasure
unitsofmeasurex = it_unitsofmeasurex.



if bapi_return-type = 'E'.
write:/ 'Error Message ', bapi_return.
endif.

endloop.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 12:18:56.


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