cancel
Showing results for 
Search instead for 
Did you mean: 

Link another production Order while creating production Order in DI API

0 Kudos
445

Hi,

i am creating Production Order using DI API. i need to link another production order.

Here is my code

SAPbobsCOM.ProductionOrders oPO = (SAPbobsCOM.ProductionOrders)Global.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders);

oPO.ItemNo = Item;

oPO.PlannedQuantity = PlannedQty;

oPO.ProductionOrderStatus = SAPbobsCOM.BoProductionOrderStatusEnum.boposPlanned;

oPO.ProductionOrderType = SAPbobsCOM.BoProductionOrderTypeEnum.bopotStandard;

oPO.ProductionOrderOrigin = BoProductionOrderOriginEnum.bopooManual;

oPO.ProductionOrderOriginEntry = Convert.ToInt32(BasedPrdOrdNo);

oPO.Add() ;

when i create production order using this code, Sales Order is Linked with created Production Order. How to change that with another production order.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi dinesh.s1,

You should mention the following in your code:

oPO.ProductionOrderOrigin = BoProductionOrderOriginEnum.bopooProductionOrder;

You appear to have the same issue as mentioned in SAP Note 3269021.

The issue has already been fixed in FP2305 for SAP Business One version 10.0.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

0 Kudos

Hi,

Thanks for the answer.i will check with my code. i am not able to access the SAP Note 3269021. can you please share it here.

0 Kudos

Hi,

i have added your code "oPO.ProductionOrderOrigin = BoProductionOrderOriginEnum.bopooProductionOrder;" but after posting the production order,example posting is given below

Origin is taking as production order.but Link to is mapped to sales order.how to change that.

Thanks.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi dinesh.s1,

This is why I have mentioned the SAP Note 3269021.

Can you check the issue in FP2305 or above?

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

ParasSood
Discoverer
0 Kudos
Ankit, your link does not work. Please share a correct link. The error we get is HTTP error
david_zapata
Explorer
0 Kudos
Sometimes, when we do the creation of the Production Order object, we have the -5002 error with this text : Invalid node index; object: %s, node: %s [OWOR.ItemCode][line: 1]