Question

Migrate Code Preposting Purchase order

  • 17 May 2023
  • 1 reply
  • 126 views

Badge +3
  • Sidekick (Partner)
  • 7 replies

Hello everyone,

 

I am facing a migration problem on purchase orders.

I have two simple migration jobs, and they work perfectly for the header of the order and for the lines. 

But I have a problem, I can't find where to update the preposting. To release a purchase order I need to fill in the C code but I didn't find it in my jobs, nor did I find another job to prepost a purchase order.

Is there an easy way to update this purchase order? 

 

Thanks anyway for your attention and future responses!

 

Kind regards,

 

Sébastien


1 reply

Userlevel 4
Badge +8

Hi @ksebf 

when you migrate a purchase_order or a purchase_order_line then in both cases the field pre_accounting_id will be filled automatically with a number value.

Every record in purchase_order or purchase_order_line has a unique number value.

The reference view to this pre_accounting_id is the view pre_accounting where account, code_b etc. can be stored.

That means you have to fetch this pre_accounting_id and you must also migrate the view pre_accounting using the method pre_accounting_api.

You can create a new job to migrate this pre_accounting based on the pre_accounting_id for the migrated purchase_order (for purchase_order_line you must create a second job)

OR

you can add this pre_accounting view with the method pre_accounting_api to your existing purchase_order/purchase_order_line migration job and must inherit the pre_accounting_id from the purchase_order (for example exec seq 10 in the method list) to your pre_accounting view (e.g. exec seq 30) in the method list attribute screen of pre_accounting with a fixed value for the field pre_accounting_id with PRE_ACCOUNTING_ID@10

 

 

 

The mapping for Account, Code B etc. must be of course done in the tab Source Mapping.

 

/Jens

Reply