Skip to Content
author's profile photo Former Member
Former Member

Drop Production Order internally during Inventory transfer Add Operation.

Hi Experts,

I want to drop Production Order internally during Inventory transfer Add Operation.

My Item is Serial and Batch wise so give me possible event to write code(production Order code using object).

Current Code-

if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED && pVal.Before_Action == false && pVal.ItemUID == "1")

{

SAPbobsCOM.ProductionOrders oProductionOrders;

oProductionOrders = clsAddOn.LDNA_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders);

oProductionOrders.ProductionOrderType = SAPbobsCOM.BoProductionOrderTypeEnum.bopotSpecial;

oProductionOrders.ProductionOrderStatus = SAPbobsCOM.BoProductionOrderStatusEnum.boposPlanned;

""

""

""

""

""

}

At this time My PO is drop. But after that confirmation screen is occurred which is attached.

And if we press "YES" then ok but When we click "NO"+ "Cancel Inventory Transaction" what can i do about Droped PO .

Thank You & Regards

Pradeep Khodke

InvTrn with PO.PNG (27.7 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 12, 2014 at 12:39 AM

    What is Dropped PO? A Posted PO?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2014 at 05:51 AM

    First, get the DocEntry of the Dropped PO then create a Cancel document.

    Dim oDocument As SAPbobsCOM.Documents

    oDocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)

    With oDocument

    If .GetByKey("1") Then

    If Not .CreateCancellationDocument.Add = 0 Then

    MsgBox(oCompany.GetLastErrorDescription)

    End If

    End If

    End With

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.