cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

WTR1.NumPerMsr

former_member629150
Participant
0 Kudos
2,593

Hello,

A user could not add an inventory transfer because it contained an item with null for the field "Items per Unit" which is not an editable field and furthermore, was not even visible to the user.  I have looked through the REFDB.chm documentation and it does not list anything being related to this field.  I have looked over the item master for the item that caused this issue and have not seen anything there either.  Google turns up surprisingly few results, all pointing back here to this site... but no answer that I can find.  Does anyone know where this field is being populated or what it is related to?  More importantly, does anyone know of any resource to go-to to find out this kind of information as it arises in the future?

Much thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member629150
Participant
0 Kudos

This is the Audit Report of one of the problem items.

Former Member
0 Kudos

From the report, it is clear that the opening balance is > 0 and 1st GRPO was created after 1st AR Invoice. That is problematic.

former_member629150
Participant
0 Kudos

Sorry Gordon, I should have explained that the report was quite large and I just took the last month's worth of data.  Here is the very beginning of the report for this item:

Former Member
0 Kudos

Anyway, the 1st transaction is ST. "Stock Take". It could be done through DTW. That may cause the initial setup problematic.

It is possible you had upgraded your B1 version before, right?

former_member629150
Participant
0 Kudos

Yes, we did upgrade more than a year ago to 8.81.314 PL06

So if it was done through the DTW and that is causing the issue with certain items, how can I identify those items to correct them?  Many items were imported via DTW and work fine, why would a few of them become problematic?

Former Member
0 Kudos

Check the 1st transaction after opening balance. If it related to sales, it might be problematic.

former_member629150
Participant
0 Kudos

I checked the 1st transaction after the opening balance.  Nothing stands out as being unusual from other items.  Of the two problem Items that I checked, one was an A/R Invoice and the other and Inventory Transfer.

Former Member
0 Kudos

All Inventory transfer documents should not count.

former_member629150
Participant
0 Kudos

Ok,

the A/R Invoice documents that are after the transfer look fine too.  I'm confused at where the problem may lie.  What specifically should I be looking for?  I have attached the first Invoice for one

of the problem items.  All looks normal to me.

Former Member
0 Kudos

The problem is: item cost may not be setup correctly but sales had been done.

former_member629150
Participant
0 Kudos

Gordon,

Thank you for all your time in helping me get to the bottom of this, I really appreciate it. 

So how can I tell if the item cost was not setup correctly by looking at the first transaction after the opening balance?

Why would this only cause problems in the SDK but not for manual users?  Specifically: why would the cost affect the WTR1.NumPerMsr field?

Thanks

Former Member
0 Kudos

B1 application has internal logic to default to certain value. However, your SDK cant reproduce all the logic that built in to B1 application.

We are not developer of B1 application. To find out what is wrong in your data is not an easy job. Or it could be mission impossible in certain case.

former_member629150
Participant
0 Kudos

Thanks for all of your help Gordon.

Yes, I think this case is "mission impossible"!!!

ramzychehab
Explorer
0 Kudos
For future reference: SAPbobsCOM.StockTransfer.Lines.UnitsOfMeasurment must be set to 1 in the SDK (or add-on) otherwise it will default to 0 and will prevent document to save.

Answers (4)

Answers (4)

Former Member
0 Kudos

Check all Units related fields.

former_member629150
Participant
0 Kudos

Gordon,

Thank you for your help with this issue.  I've compared ALL fields in the OITM table.  I've looked at two known-to-be-problematic items and two known-to-work items.  Below are all the fields that contain differences.  I don't spot anything out of the usual.  What related tables should I be looking at here?

I'm still trying to get at where the WTR1.NumPerMsr field comes from so that I can trace that back.

bad to goodbad to goodbad to goodbad to goodgood to goodbad to bad
ghij
101158 to 100082101158 to 112224105293 to 100082105293 to 112224100082 to 112224101158 to 105293
BWeight1BWeight1BWeight1
BWght1UnitBWght1UnitBWght1Unit
CardCodeCardCodeCardCodeCardCodeCardCode
CreateDateCreateDateCreateDate
DataSourceDataSourceDataSource
DocEntryDocEntryDocEntryDocEntryDocEntryDocEntry
FirmCodeFirmCodeFirmCodeFirmCodeFirmCodeFirmCode
FrozenCommFrozenCommFrozenComm
ItemCodeItemCodeItemCodeItemCodeItemCodeItemCode
ItemNameItemNameItemNameItemNameItemNameItemName
LastPurDatLastPurDatLastPurDatLastPurDatLastPurDatLastPurDat
LastPurPrcLastPurPrcLastPurPrcLastPurPrcLastPurPrcLastPurPrc
LeadTimeLeadTimeLeadTime
LstEvlDateLstEvlDateLstEvlDateLstEvlDateLstEvlDateLstEvlDate
LstEvlPricLstEvlPricLstEvlPricLstEvlPricLstEvlPricLstEvlPric
MaxLevelMaxLevelMaxLevelMaxLevelMaxLevelMaxLevel
MinLevelMinLevelMinLevelMinLevelMinLevelMinLevel
OnHandOnHandOnHandOnHandOnHandOnHand
PicturNamePicturNamePicturNamePicturNamePicturNamePicturName
PlaningSysPlaningSysPlaningSys
PurFactor1PurFactor1PurFactor1
ShipTypeShipTypeShipType
TaxTypeSWeight1SWeight1SWeight1
SWght1UnitSWght1UnitSWght1Unit
TaxTypeTaxType
UpdateDateUpdateDateUpdateDateUpdateDateUpdateDateUpdateDate
UserSignUserSignUserSign
UserSign2UserSign2UserSign2UserSign2UserSign2UserSign2
UserTextUserTextUserTextUserTextUserTextUserText
ValidCommValidCommValidComm
WarrntTmplWarrntTmplWarrntTmpl
Former Member
0 Kudos

You need to check OITM for these 2 items' setup.

former_member629150
Participant
0 Kudos

Gordon,

I apologize, but I've been working with SAP Business One for less than six months.  I'm not sure what you mean by the "Items' setup"

Former Member
0 Kudos

You can query OITM table to compare these two items to find out difference between them. Such as:

SELECT * FROM OITM T0

WHERE T0.ItemCode LIKE '[%0]%' OR T0.ItemCode LIKE '[%1]%'

former_member629150
Participant
0 Kudos

Gordon,

This is precisely what I did.  I then dumped the results into Excel, looked for differences in fields and posted them in a post above.  I do not see any significant differences between the items.  I'm reasonably confident that the problem is not with the data in the OITM table.  Do you know where I can find out more about the WTR1.NumPerMsr field?

Former Member
0 Kudos

Check OITW table too. The problem is in the setting, not in the WTR1.

former_member629150
Participant
0 Kudos

No smoking gun in OITW either. Hmmm... I'm really not sure what else to look at or try.

Former Member
0 Kudos

Are these 2 items with same G/L determination and Inventory valuation methods? Are they BOM or no BOM?

former_member629150
Participant
0 Kudos

They are both Non-BOM and the G/L and Inventory Valuation methods match.  Any other idea?

Former Member
0 Kudos

How about the warehouse? From and To warehouse are the same too?

former_member629150
Participant
0 Kudos

Yes, I've checked those as well.

Former Member
0 Kudos

What Item Group is this problematic one?

former_member629150
Participant
0 Kudos

It is in the Item group named "Purchased"; the same as the known-to-work items.

Former Member
0 Kudos

If it is 'Purchased', are there any Goods Receipts (PO) yet? 

former_member629150
Participant
0 Kudos

Hi Gordon,

Yes there are Goods Receipts for these items.  I'm not sure I understand what I should be looking for on the Good Receipts.  What will that tell us?  There are Goods receipts for known-to-work items as well.

Former Member
0 Kudos

Could you post this item's audit report screenshot?

Former Member
0 Kudos

Hi,

WTR1 table shares the structure with other marketing documents such as INV1, RDR1, PCH1 and POR1 etc. Therefore, not all columns may be used in this table.

Thanks,

Gordon

former_member629150
Participant
0 Kudos

Gordon,

thanks for the reply, but that does not tell me how the WTR1.NumPerMsr field got set to another value for an item in an inventory transfer.  Where does that field get its value from?  I've looked in OITM for this item and I do not see any candidate for a link to this field and I'm not sure where else to look.  Any ideas? 

Former Member
0 Kudos

What values have you got? Post a screenshot.

former_member629150
Participant
0 Kudos

I'm not sure a screenshot would be of any help here.  The value in the "Items per Unit" was blank (Null I"m assuming) on the Inventory Transfer form and would not allow "Add" displaying a message saying that the Items Per Unit must be greater than zero, but this field is not editable (and wasn't even displayed to the user at the time).  I cannot reproduce the problem in the test environment and it appears that the problem may have been somehow corrected in the production environment, but I am none-the-wiser as to what caused this issue or how to track down the cause for similar issues (the REFDB.chm does not list any relationships for that field).  The WTR1.NumPerMsr field must server some purpose and be populated somehow.  One clue is that this form was created by the SDK (Info from a User query was used to populate an Inventory Transfer form).  It has been in production for a few weeks with no problem until this one item came up.  When the item was removed from the form, it was allowed to be added normally.

former_member629150
Participant
0 Kudos

We had this happen again, but now know that it is being caused somehow with the SDK.  Here is what is happening: The user runs a user query that has an add-on button to copy it to an inventory transfer.  Then the user saves the resulting inventory transfer as a draft.  They pick the transfer, make any adjustments due to inaccurate inventory and then find the draft and try to save it.  Twice, the save has not been allowed because Items Per Unit is not greater than zero.  When that item is removed, the transfer saves.  Then an inventory transfer can be created manually in the normal fashion with this item and the Items per Unit is 1 like all other items.  Any ideas on what is going on?

Former Member
0 Kudos

Is this problematic item an inventory item?

former_member629150
Participant
0 Kudos

I suppose it is possible that we have some problematic items, but I don't see how it would behave one way with the SDK and another when entered manually.  The WTR1.NumPerMsr column appears blank when and Inventory Transfer form is populated with the SDK but has the correct value of 1 when done manually.  It's happened 3 times now, so if it is a problem with the data, it's fairly widespread.

Former Member
0 Kudos

When you enter manually by using system function, all built-in links will be automatically worked. However, by using SDK, developers need more knowledge to not interfering with system process.

former_member629150
Participant
0 Kudos

Gordon,

Thanks for the reply.  I understand that more system knowledge is required to use the SDK, but what then am I missing?  When I populate a new Inventory Transfer, I loop through the results matrix of a user query and update the appropriate columns in the Inventory Transfer form matrix.  If I knew where the WTR1.NumPerMsr was populated from, I could include that in the query and explicitly copy it over to the Inventory Transfer form, but unfortunately I do not know where the WTR1.NumPerMsr comes from.  This is what I'm trying to figure out.  Also, why would the WTR1.NumPerMsr column in the Inventory Transfer form populate by itself using the SDK only 99% of the time and not 100% like when done manually?

Former Member
0 Kudos

This depends on your item master setting. Check what is the difference between problematic item and normal ones.

former_member629150
Participant
0 Kudos

Gordon,

I have compared a problematic item (OITM record) field for field with a record that is known to work and they are nearly identical except for the expected differences (name etc.).  Any other ideas of what to check?

KennedyT21
SAP Champion
SAP Champion
0 Kudos

Hi Chand Bagby,

I think the check in Inventory --  purchase --No. of Items per Purchase Unit also last purchase price

Regards

Kennedy

former_member629150
Participant
0 Kudos

Thanks Kennedy T,

There is nothing unusual that I see about this Item.  All the fields you mentioned are fine.  In fact, I've done a field comparison against items known to work and there is no significant difference in this one item in the OITM table.  It is just the WTR1.NumPerMsr field that is causing issues and I cannot figure out where that number is set.

KennedyT21
SAP Champion
SAP Champion
0 Kudos

HI Chad Bagby,

Have you check with the Item Master data  -- Inventory Tab -- Inventory UoM Have you defined there  for the items that included in the Transfer..

Regards

Kennedy

Ask a Question