Error when I try to post a pickinglist journal

Hi all,

I’m trying to post a pickinglist journal through x++, I’m getting an error as below:

pastedimage1527146475113v1.png

This is my journal lines

May I know how to resolve this?

Does the error comes only when you are trying to post it with code?

Were you able to post it manually?

You need stock in that location.

I believe the message is saying they are trying to post 0, so it is ignoring the consumption quantity. If you post it manually it will work, so your code is not correctly calling the quanitty to post.

No, kranthi

pastedimage1527147050931v1.png

I’m getting the error when I post manually also

“How” are you posting this manually and what do the lines and inventory transactions look like for item number test? It is telling you that you are picking 0.

I tried to post manually also but it is showing the same error

It is a test item, so if we need to post a picking list journal for an item is it onhand for tat item need to be greater than 0?

How is the journal created?

Ultimately yes. Although it depends upon your configuration. Get a functional consultant to look at how you are creating it and what you are trying to post.

wat will happen if i create a pickinglist journal for an production order manually ?

static void postHdr()
{
    ProdJournalTable pjt;
    ProdJournalBOM pjr,pjredit,pjrdel;
    ProdBOM prt;
    ProdId prodId;
   // OprNum oprNum;
   // RouteOprid oprid;
    ProdJournalTableTempPick pjttmp,pjtmp;
    ProdJournalBOMTemp pjrtmp;
    ProdJournalCheckPostBOM     prodJournalCheckPostRoute;
    ;
    //Post Journal
    while select forupdate pjttmp where pjttmp.TransactionStatus  == ProdJournalTableTempStatus::Post
    {
        try
        {
            ttsbegin;
            prodJournalCheckPostRoute= ProdJournalCheckPostBOM::newPostJournal(pjttmp.JournalId,true);
            prodJournalCheckPostRoute.run();
            pjttmp.TransactionStatus =ProdJournalTableTempStatus::Posted;
            pjttmp.PostedDateTime = datetimeutil::utcNow();
            pjttmp.update();
            ttscommit;
            info(strfmt("Posted %1 %2",pjttmp.ProdId,pjttmp.JournalId));
        }
        catch(Exception::Error)
        {
            continue;
        }
    }
}

Is it a right code to post?

Same rules apply, the validation is at posting. I however believe it is your code causing the issue, if you had stock and standard you can obviously post the journal.

so what is the proposal and consumption s specifying in pickinglist journal form?

You have the issue even when posting the journal manually, then it is not issue with your code. You need to look at the journal. If it is created through code, then try by creating it manually and posting it.

May I know what are the tables involved in posting a pickinglist journal?

Depnds whether it is the BOM or Inventory quantity. Ultimately how many the system believes are needed (depending upon processing) and how many will be consumed on the journal or have been.

If we post a journal what are the related tables need to be updated

ProdJournalTable is header and ProdJournalBOM is for lines is there any other table needs to be updated when we post a pickinglist journal

For posting you don’t have to update any tables if you already have the journal. Calling posting classes would suffice.

Do you mean table required for creating the journal?

static void postHdr()
{
    ProdJournalTable pjt;
    ProdJournalBOM pjr,pjredit,pjrdel;
    ProdBOM prt;
    ProdId prodId;

    ProdJournalTableTempPick pjttmp,pjtmp;
    ProdJournalBOMTemp pjrtmp;
    ProdJournalCheckPostBOM     prodJournalCheckPostRoute;
    ;
    //Post Journal
    while select forupdate pjttmp where pjttmp.TransactionStatus  == ProdJournalTableTempStatus::Post
    {
        try
        {
            ttsbegin;
            prodJournalCheckPostRoute= ProdJournalCheckPostBOM::newPostJournal(pjttmp.JournalId,true);
            prodJournalCheckPostRoute.run();
            pjttmp.TransactionStatus =ProdJournalTableTempStatus::Posted;
            pjttmp.PostedDateTime = datetimeutil::utcNow();
            pjttmp.update();
            ttscommit;
            info(strfmt("Posted %1 %2",pjttmp.ProdId,pjttmp.JournalId));
        }
        catch(Exception::Error)
        {
            continue;
        }
    }
}

So calling prodjournalcheckpostbom would be enough to post a journal right?

Yes to create a header and lines for pickinglist journal what are the tables need to use?