Avalados por :

Problema al actualizar tipos de condiciones en transacción ME21N con BAPI_PO_CREATE1

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 18 Vistas
0
Cargando...

¡Hola a todos!

Estoy subiendo los datos para la transacción ME21N a través de BAPI_PO_CREATE1.

Cada vez que pruebo esta BAPI, me da el número de pedido, pero los tipos de condiciones no se actualizan ni a nivel de encabezado ni a nivel de ítem.

El tipo de condición de encabezado y el valor de la condición los estoy dando en las estructuras POCONDHEADER, POCONDHEADERX y el tipo de condición de ítem y el valor de la condición los estoy dando en las estructuras POCOND, POCONDX.

Gracias de antemano.

Saludos,

Shiv Kant

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

3 Respuestas

0
Cargando...

Echa un vistazo a este ejemplo:

AGREGA 10 A v_item.

e_poheader-comp_code = t_cabec-bukrs.

e_poheader-doc_type = 'EC'.

e_poheader-vendor = t_cabec-lifnr.

e_poheader-creat_date = sy-datum.

e_poheader-created_by = sy-uname.

e_poheader-item_intvl = '0010'.

e_poheader-langu = sy-langu.

e_poheader-langu_iso = sy-langu.

e_poheader-incoterms1 = t_cabec-inco1.

e_poheader-incoterms2 = t_cabec-inco2.

e_poheader-currency = t_cabec-waers.

e_poheader-purch_org = v_ekorg.

e_poheader-pur_group = t_saida3-ekgrp.

e_poheader-pmnttrms = t_cabec-zterm.

e_poheader-telephone = t_cabec-telf1.

e_poheader-sales_pers = t_cabec-verkf.

e_poheaderx-comp_code = 'X'.

e_poheaderx-doc_type = 'X'.

e_poheaderx-vendor = 'X'.

e_poheaderx-creat_date = 'X'.

e_poheaderx-created_by = 'X'.

e_poheaderx-item_intvl = 'X'.

e_poheaderx-langu = 'X'.

e_poheaderx-langu_iso = 'X'.

e_poheaderx-incoterms1 = 'X'.

e_poheaderx-incoterms2 = 'X'.

e_poheaderx-currency = 'X'.

e_poheaderx-purch_org = 'X'.

e_poheaderx-pur_group = 'X'.

e_poheaderx-pmnttrms = 'X'.

e_poheaderx-telephone = 'X'.

e_poheaderx-sales_pers = 'X'.

SI t_saida3-elem_pep NO ES INICIAL.

MOVER 'P' A t_saida3-knttp.

SINO SI t_saida3-aufnr NO ES INICIAL.

MOVER 'F' A t_saida3-knttp.

SINO SI t_saida3-kostl NO ES INICIAL.

MOVER 'K' A t_saida3-knttp.

FIN-SI.

t_poitem-po_item = v_item.

t_poitem-plant = s_werks.

t_poitem-short_text = t_saida3-txz01.

t_poitem-quantity = t_saida3-menge.

t_poitem-po_unit = t_saida3-meins.

t_poitem-acctasscat = t_saida3-knttp.

t_poitem-matl_group = t_saida3-matkl.

t_poitem-tax_code = t_saida3-mwskz.

t_poitem-order_reason = t_saida3-bsgru.

t_poitem-indus3 = t_saida3-j_1bindus3.

t_poitem-matl_usage = t_saida3-j_1bmatuse.

t_poitem-mat_origin = t_saida-j_1bmatorg.

t_poitem-item_cat = t_saida-epstp.

t_poitem-net_price = t_saida3-netpr.

t_poitem-price_unit = t_saida3-peinh.

t_poitem-bras_nbm = t_saida3-j_1bnbmco1.

t_poitem-PREQ_NAME = t_saida3-requisitante.

AGREGAR t_poitem.

t_poitemx-po_item = v_item.

t_poitemx-plant = 'X'.

t_poitemx-short_text = 'X'.

t_poitemx-quantity = 'X'.

t_poitemx-po_unit = 'X'.

t_poitemx-acctasscat = 'X'.

t_poitemx-matl_group = 'X'.

t_poitemx-tax_code = 'X'.

t_poitemx-order_reason = 'X'.

t_poitemx-indus3 = 'X'.

t_poitemx-matl_usage = 'X'.

t_poitemx-mat_origin = 'X'.

t_poitemx-item_cat = 'X'.

t_poitemx-net_price = 'X'.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Echa un vistazo a este ejemplo:

AGREGAR 10 A v_item.

e_poheader-comp_code = t_cabec-bukrs.

e_poheader-doc_type = 'EC'.

e_poheader-vendor = t_cabec-lifnr.

e_poheader-creat_date = sy-datum.

e_poheader-created_by = sy-uname.

e_poheader-item_intvl = '0010'.

e_poheader-langu = sy-langu.

e_poheader-langu_iso = sy-langu.

e_poheader-incoterms1 = t_cabec-inco1.

e_poheader-incoterms2 = t_cabec-inco2.

e_poheader-currency = t_cabec-waers.

e_poheader-purch_org = v_ekorg.

e_poheader-pur_group = t_saida3-ekgrp.

e_poheader-pmnttrms = t_cabec-zterm.

e_poheader-telephone = t_cabec-telf1.

e_poheader-sales_pers = t_cabec-verkf.

...

...

LLAMAR A LA FUNCIÓN 'BAPI_PO_CREATE1'

EXPORTAR

poheader = e_poheader

poheaderx = e_poheaderx

testrun = ' '

IMPORTAR

exppurchaseorder = v_pedido

TABLAS

return = t_bapiret2

poitem = t_poitem

poitemx = t_poitemx

poschedule = t_schedule

poschedulex = t_schedulx

poaccount = t_account

poaccountx = t_accountx

potextitem = t_textitem

potextheader = t_textheader.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?