cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the status using absl?

former_member200995
Contributor
0 Kudos

Hi experts,

In BYD system, in "Quality Control","Change of Stock", at 2nd step, I change the status, as:

change-status.png

These is the Manual way, now I want to change the status using absl in studio.

How can I do? Or maybe someone can tell me the reference.

Thanks a lot.

Benny

Accepted Solutions (1)

Accepted Solutions (1)

former_member200995
Contributor

Hi experts,

Thanks a lot, I had finish the issue, with the code:

var newBO = GoodsAndActivityConfirmation.Create();
newBO.TransactionDateTime = GlobalDateTime.ParseFromString(ls_datetime);

var itemData : elementsof GoodsAndActivityConfirmation.InventoryChangeItem;

itemData.InventoryChangeReasonCode = "7";

itemData.InventoryItemChange.IdentifiedStockInventorySeparatingValues.IdentifiedStockKey.ID.content = "";

itemData.InventoryItemChange.MainInventorySeparatingValues.InventoryRestrictedUseIndicator = false;
itemData.InventoryItemChange.MainInventorySeparatingValues.MaterialKey.ProductID.content = "0000000000000000000000000000405307020002";
itemData.InventoryItemChange.MainInventorySeparatingValues.SupplyPlanningAreaID.content = "72990000";

itemData.InventoryItemChange.MainInventorySeparatingValues.OwnerPartyID = "0001000000";

itemData.InventoryLocation.LogisticsAreaKey.ID = "3010";
itemData.InventoryLocation.LogisticsAreaKey.SiteID.content = "72990000";

itemData.InventoryMovementDirectionCode = "1";
itemData.LogisticsDeviationReasonCode.content = "007";


itemData.TransferGroupID = "30";
itemData.TypeCode = "11";
var newItem = newBO.InventoryChangeItem.Create(itemData);

var itemquantity : elementsof GoodsAndActivityConfirmation.InventoryChangeItem.InventoryItemChangeQuantity;
itemquantity.Quantity.content = 10;
itemquantity.Quantity.unitCode = "EA";
newItem.InventoryItemChangeQuantity.Create(itemquantity);

//接收
var itemData01 : elementsof GoodsAndActivityConfirmation.InventoryChangeItem;
itemData01.InventoryChangeReasonCode = "7";

itemData01.InventoryItemChange.IdentifiedStockInventorySeparatingValues.IdentifiedStockKey.ID.content = "";
itemData01.InventoryItemChange.MainInventorySeparatingValues.InventoryRestrictedUseIndicator = true;
itemData01.InventoryItemChange.MainInventorySeparatingValues.MaterialKey.ProductID.content = "0000000000000000000000000000405307020002";
itemData01.InventoryItemChange.MainInventorySeparatingValues.SupplyPlanningAreaID.content = "72990000";

itemData01.InventoryItemChange.MainInventorySeparatingValues.OwnerPartyID = "0001000000";

itemData01.InventoryLocation.LogisticsAreaKey.ID = "3010";
itemData01.InventoryLocation.LogisticsAreaKey.SiteID.content = "72990000";

itemData01.InventoryMovementDirectionCode = "2";
//itemData.LogisticsDeviationReasonCode.content = "007";

itemData01.TransferGroupID = "30";
itemData01.TypeCode = "11";
var newItem01 = newBO.InventoryChangeItem.Create(itemData01);

var itemquantity01 : elementsof GoodsAndActivityConfirmation.InventoryChangeItem.InventoryItemChangeQuantity;
itemquantity01.Quantity.content = 10;
itemquantity01.Quantity.unitCode = "EA";
newItem01.InventoryItemChangeQuantity.Create(itemquantity01);

Best Regards,

Benny huang

Answers (1)

Answers (1)

former_member200995
Contributor
0 Kudos

Hi experts,

Who can give me some advice, I am urgent, my email:huangb.mmsh@sinopec.com, thanks a lot.

Best regards,

Benny