How to insert dimension into journal

nikeman77nikeman77 Member Posts: 517
Hi guys,

I am trying to insert stocks balance (for new implementation) using item journal using dataport.

The data imported is successful but when i tried to post error message:

A dimension used in Item Journal ITEM, OPENBAL, 100 has caused an error. Select Dimension Value code 'ABC' for the Dimension Code BRAND for Item 123456

The brand dimension (check from default dimension) is set for this particular item.
CHECKS:
-In my dataport I had added,
DimMgt.InsertJnlLineDim(83, 'ITEM','OPENBAL', LineNo, 0, GlobalDimCod1, GlobalDimCod2);

-Journal Line Dimension Table:
The item 123456 dimension (Shortcut Dimension 1-Product, Shortcut Dimension2- Brand) is there.

Is there any code that i should include in my dataport ?

Answers

  • Yashojit_PandhareYashojit_Pandhare Member Posts: 38
    Hi,

    After importing the file, check your Item Journal whether the dimensions are populated for the lines.
    If not then there is something missing while making entry in the journal line dimension, check for data correctness.

    on second thoughts why not try this:

    If you have defined default dimension values on the item master then in the data port instead of writing the code for DimMgt,
    why not just validate the item no. field, the validate trigger on Item No. field will automatically populate the default dimension set on the item card.

    Item Journal Line - OnAfterImportRecord()
    VALIDATE("Item Journal Line"."Item No.");

    or even more decent:

    while defining the dataport fields, select the item no. field and set the property of CallFieldValidate to Yes. This will fire the onvalidate trigger of item no. field and would eventually populate the default dimension.
  • nikeman77nikeman77 Member Posts: 517
    while defining the dataport fields, select the item no. field and set the property of CallFieldValidate to Yes. This will fire the onvalidate trigger of item no. field and would eventually populate the default dimension
    :thumbsup:

    i check my journal line dimension, the dimension is being populated...
    :(
  • Yashojit_PandhareYashojit_Pandhare Member Posts: 38
    A dimension used in Item Journal ITEM, OPENBAL, 100 has caused an error. Select Dimension Value code 'ABC' for the Dimension Code BRAND for Item 123456


    ensure that the dimension for 123456 is ABC. That is the dimension value on item journal is same as the one set on item card.
Sign In or Register to comment.