Item arrival journal through code

Hi Team,

We need to create item arrival journal through code for purchase order reference and post product receipt. AX 2012

Process: Inventory warehouse management → Journals → Item arrival → Item arrival

select Purchase order as reference and enter product receipt number in the header. in the lines in the lines form and do posting. In the header Function → product receipt and do posting

Please share code if anyone come across this process. Find below screenshots for reference.…/item-arrival-journal-through-code