Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

Posted on by Microsoft Employee

Hi, i am getting the following message when displaying a certain PO in the "purchase order processing document inquiry" window. I only get the message when "receipts received" is checked off. If i only have "open purchase orders" check off, i dont get the message. However checking off receipts will bring it up.

annot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

followed by

DBMS: 515.

I've check a few tables and there seems to be NO blank fields. Any ideas?

*This post is locked for comments

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,928 Most Valuable Professional on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    Frank's answer should be it.

    I would say that the value of the DOCTYNAM (Document Type Name) field will be left as NULL when the DOCTYPE is an invalid value (0) and that would generate the error.

    Regards

    David

  • Kuldeep Saini Profile Picture
    Kuldeep Saini 5 on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    Thank you, Frank.

  • Suggested answer
    Frank Hillsnipe Profile Picture
    Frank Hillsnipe 1,330 on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    I ran into this error in a production environment this past week. I was able to resolve the issue, but I do not recommend attempting the solution without your Dynamics GP Partner.

    Similar to Soma's suggestions we had a record with POPTYPE = 0 in POP10300. I was able to identify the transaction as an Invoice, not a Shipment and updated it to 2 accordingly. 

    Harry's suggestion was also close, the record was still in Work so it showed up in popWorkTransactions. I also suggest querying it with:

    SELECT *
    FROM popWorkTransactions
    WHERE DOCTYPE IS NULL OR DOCTYPE = 0

    When you use the Purchase Order Document Inquiry window a stored procedure washes POPTYPE through a CASE statement that only accounts for values 1 - 8, the POPTYPE of 0 ends up supplying NULL to the NOT NULL field DOCTYNAM in a the temp table #PODetailed.

  • Rosemary Profile Picture
    Rosemary 2 on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    I have seen this where a PO for a particular vendor contained a non-inventory item. I did a manual receipt to receive the item. I then checked if there were any other items and changed the non-inventory to an inventory item from SQL.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    This should work.

  • Suggested answer
    Redbeard Profile Picture
    Redbeard 12,931 on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    You guys have covered a lot of territory on this one, with some good ideas.

    Try running this query to identify if you have in NULLS in DOCTYNAM

    select DOCNUMBR from popHistoryTransactions

    where DOCTYNAM is null

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    I believe that field cannot have a value greater than 4 - check for any values greater than 4.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    Hi Soma,

    That was one of the first things I did. I saw that from my searchings'. The POTYPE was 1 to begin with but I ran a UPDATE just in case. It was not successful. truly a baffling error. All fields look good. I've check 30300, 30100, 10100, and 10110. All fields are filled out and they are no 0's where other rows don't have 0's.

  • soma Profile Picture
    soma 24,406 on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    Look the PO record in the table POP30300 and check the POTYPE field. If the field value 0, update to 1 and check again.

    Hope this helps!!!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot insert the value NULL into column 'DOCTYNAM', table 'tempdb.dbo.#PODetailed__________

    Sanjay,

    did not work.  thanks for the try though.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans