Anuncio
Colapsar
No hay anuncio todavía.
BAPI_CUSTOMERRETURN_CREATE datos de cliente incorrectos.
Colapsar
X
-
Originalmente publicado por juanma Ver MensajeHola!
si no lo solucionaste te comento que el problema es que estás tomando el KUNAG en lugar del KUNNR, uno es el solicitante y el otro el cliente.
Avisame si con eso comienza a darte bien el valor.
Saludos
Gracias por tu respuesta, pero ese no es el problema. Me explico, para clientes esporádicos la información del cliente, como nombre, identificación fiscal, etc se especifican por factura con un mismo identificador kunnr, es decir si me refiero a un kunnr 123 que está asignado para clientes esporádicos su información no está en la tabla de maestro de clientes.
Dejar un comentario:
-
Hola!
si no lo solucionaste te comento que el problema es que estás tomando el KUNAG en lugar del KUNNR, uno es el solicitante y el otro el cliente.
Avisame si con eso comienza a darte bien el valor.
Saludos
Dejar un comentario:
-
BAPI_CUSTOMERRETURN_CREATE datos de cliente incorrectos.
Buenas tardes.
Estoy utilizando la BAPI: BAPI_CUSTOMERRETURN_CREATE para crear devolución a partir de una factura en una función.
Se crea bien, pero se guarda la información del solicitante (ADRNR) se crea incorrectamente en la tabla (Documento comercial: Interlocutor) VBPA.
Por ejemplo para el cliente 20, en vez de guardarme los datos del cliente solicitante específico se guardan los del solicitante general. Entonces en vez de "Pepito Perez" está haciendo referencia a "CONSUMIDOR FINAL", por eso, la información no es del cliente que realizó la devolución.
Dejo parte del código donde se hace la asignación del interlocutor.
order_partners-partn_role = 'AG'.
SELECT SINGLE kunag
INTO order_partners-partn_numb
FROM vbrk
WHERE vbeln = lv_vbeln.
APPEND order_partners.
CLEAR: order_partners.
order_partners-partn_role = 'WE'.
SELECT SINGLE kunag
INTO order_partners-partn_numb
FROM vbrk
WHERE vbeln = lv_vbeln.
APPEND order_partners.
CLEAR: order_partners.
order_partners-partn_role = 'ZT'.
CLEAR: wa_param-valor.READ TABLE ti_param TRANSPORTING valor INTO wa_param WITH KEY nombre = 'PEDIDO_EMPLEADO' .
MOVE wa_param-valor TO order_partners-partn_numb.
* order_partners-partn_numb = '0000006618'.
APPEND order_partners.
De esta forma llamo a la BAPI
CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'
EXPORTING
* salesdocumentin = " Sales Document
return_header_in = order_header_in1
return_header_inx = order_header_inx
* sender = " Logical system of sender
* binary_relationshiptype = " Link type
* int_number_assignment = " Single-Character Indicator
* behave_when_error = " Single-Character Indicator
* logic_switch = " SD Checkbox for the Logic Switch
* testrun = " Single-Character Indicator
* convert = SPACE " Single-Character Indicator
IMPORTING
salesdocument = e_salesdocument " Sales Document
TABLES
return = return " Return parameter
return_items_in = order_items_in1
return_items_inx = order_items_inx
return_partners = order_partners
return_schedules_in = order_schedules_in " Communication Fields for Maintaining SD Doc. Schedule Lines
return_schedules_inx = order_schedules_inx " Checkbox List for Maintaining Sales Document Schedule Line
return_conditions_in = order_cond " Communication Fields for Maintaining Conditions in the Order
* return_cfgs_ref = " CU: Configuration data
* return_cfgs_inst = " Instances of Several Configurations
* return_cfgs_part_of = " Part_of entries of several configurations
* return_cfgs_value = " Characteristic values of several configurations
* return_cfgs_blob = " BLOB Internal Configuration Data (SCE)
* return_cfgs_vk = " Variant Condition Keys in Configurations
* return_cfgs_refinst = " CU: Reference order item / instance in configuration
* return_text = " Communication Fields: SD Texts
* return_keys = " Key in Sales and Distribution Document
* extensionin = " Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIO
* partneraddresses = " BAPI Reference Structure for Addresses (Org./Company)
.
COMMIT WORK AND WAIT.
ELSE.Etiquetas: Ninguno
Dejar un comentario: