Inventory Trx Map again
Hi,
I am trying to follow the suggestion from this thread:
http://www.eonesolutions.com/discussion/inventory-trx-map/
I am creating initial inventory quantity load into Dynamics GP and I am loading it as Adjustment inventory transactions.
I am using Inventory group and Inventory Transactions node type for my mapping and I have 2 mappings in it:
Create Inventory Transaction and Add Line Item.
I want to create one batch with multiple lines in it, therefore I use grouping in “Create Inventory Transaction” – it is one of my source table columns which has same value for all rows in the source table.
I hard code document number as local constant in both mappings (just use next available document number after looking up directly in GP database).
However, seems like use of grouping does not help and map after successfully creating very first row tries to create new document over and over.
Here is the error message:
Id Success Key Message
4 Unchecked ID = ‘459355’ “Sql procedure error codes returned:
Error Number = 276 Stored Procedure= taIVTransactionHeaderInsert Error Description = Input variable contains a duplicate document number (IVDOCNBR) in Inventory – IV10000 or IV30200
Node Identifier Parameters: taIVTransactionHeaderInsert
BACHNUMB = INITIALLOAD
IVDOCNBR = 00000000000000020
IVDOCTYP = 1
DOCDATE = 12/15/2016
<taIVTransactionHeaderInsert>
<BACHNUMB>INITIALLOAD</BACHNUMB>
<DOCDATE>12/15/2016</DOCDATE>
<IVDOCTYP>1</IVDOCTYP>
<IVDOCNBR>00000000000000020</IVDOCNBR>
<POSTEDDT>12/16/2016</POSTEDDT>
<PTDUSRID>eugenfr</PTDUSRID>
<NOTETEXT>Initial load</NOTETEXT>
<MDFUSRID>eugenfr</MDFUSRID>
</taIVTransactionHeaderInsert>
“
Please advise how to get around this.
Thank you!
I am trying to follow the suggestion from this thread:
http://www.eonesolutions.com/discussion/inventory-trx-map/
I am creating initial inventory quantity load into Dynamics GP and I am loading it as Adjustment inventory transactions.
I am using Inventory group and Inventory Transactions node type for my mapping and I have 2 mappings in it:
Create Inventory Transaction and Add Line Item.
I want to create one batch with multiple lines in it, therefore I use grouping in “Create Inventory Transaction” – it is one of my source table columns which has same value for all rows in the source table.
I hard code document number as local constant in both mappings (just use next available document number after looking up directly in GP database).
However, seems like use of grouping does not help and map after successfully creating very first row tries to create new document over and over.
Here is the error message:
Id Success Key Message
4 Unchecked ID = ‘459355’ “Sql procedure error codes returned:
Error Number = 276 Stored Procedure= taIVTransactionHeaderInsert Error Description = Input variable contains a duplicate document number (IVDOCNBR) in Inventory – IV10000 or IV30200
Node Identifier Parameters: taIVTransactionHeaderInsert
BACHNUMB = INITIALLOAD
IVDOCNBR = 00000000000000020
IVDOCTYP = 1
DOCDATE = 12/15/2016
<taIVTransactionHeaderInsert>
<BACHNUMB>INITIALLOAD</BACHNUMB>
<DOCDATE>12/15/2016</DOCDATE>
<IVDOCTYP>1</IVDOCTYP>
<IVDOCNBR>00000000000000020</IVDOCNBR>
<POSTEDDT>12/16/2016</POSTEDDT>
<PTDUSRID>eugenfr</PTDUSRID>
<NOTETEXT>Initial load</NOTETEXT>
<MDFUSRID>eugenfr</MDFUSRID>
</taIVTransactionHeaderInsert>
“
Please advise how to get around this.
Thank you!
Which Key Fields do you have setup in the map?
in my source table I have primary key named “ID”, so I have picked that.
For grouping in “create inventory transaction” i used another column from my source table named “type” – it has same value in all rows of my source table, and to my understanding this is what makes the map to force all line items into one inventory transaction.
For the Key Field, try using just the Batch name. Let me know the results.
Key field where? Key field in the mapping is the SOURCE field, and batch number is the DESTINATION field.
I simply hard code (i.e. use local constant) document number in both “create inventory transaction” and “add line item” and for batch number I also hard code (use local constant) predefined value that I have prepared in advance, so I would use existing batch. I can’t group by document number either, since it is destination field.
Are you suggesting
In the source… you mentioned you were using a Key Field called “ID”. If this is unique for all records, then this might be the reason why it’s trying to split up all the records. Try using the “type” field for the source Key Field.
It helped! I was able to run my mapping with no errors, create one multi-line inventory adjustment and then post my batch once loaded and see inventory on hand on each item.
Thank you!