cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create Outbound Delivery using Outbound Delivery Request in ABSL?

Former Member

Dear Experts,

I would like to create Outbound Delivery using Outbound Delivery Request by ABSL Code. When creation of Outbound Delivery, I also would like to set the values of Delivery Quantity (Actual Delivery Quantity) and Shipment Date. In standard business process, those two fields can be manually entered the values when creation of Outbound Delivery.

How can I create it using ABSL? Please kindly share your knowledge.

Thanks and Regards,

Thiri

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member535084
Participant
0 Kudos

Hello may.thitsaoo ,

I have trouble when creating Outbound Delivery from Outbound Delivery Request .

I followed the example code from Repository Explorer, release all item schedule line of Outbound Delivery Request. But I only created 3PL Request.

I already try put false for TaskBasedIndicator parameter of RequestDeliveryExecution function but nothing happens.

Can I have some suggestion from you ?

Former Member
0 Kudos

Hi Thiri,

If you look in the repository explorer you can see that for the BO OutboundDeliveryRequest there is some example code on how to release each line item to an outbound delivery.


// ABSL example for releasing all schedule lines of an Outbound Delivery Request for delivery execution

import ABSL;

import AP.LogisticsExecution.Global;

// declare variables

var outboundDeliveryRequest : OutboundDeliveryRequest;

var query;

var selectionParameters;

var queryResult;

var emptyUUID;

// retrieve an Outbound Delivery Request (with ID = 4711)

query = OutboundDeliveryRequest.QueryByElements;

selectionParameters = query.CreateSelectionParams();

selectionParameters.Add( query.BaseBusinessTransactionDocumentID.content, "I", "EQ", "4711" );

selectionParameters.Add(

query.BaseBusinessTransactionTypeCode, "I", "EQ", "68" );

queryResult = query.Execute(selectionParameters);

outboundDeliveryRequest = queryResult.GetFirst();

// create initial UUID

emptyUUID = outboundDeliveryRequest.UUID;

emptyUUID.Clear();

// request delivery execution for all schedule lines

foreach (var odrItemScheduleLine in outboundDeliveryRequest.Item.ItemScheduleLine) {

odrItemScheduleLine.RequestDeliveryExecution(

true, // TaskBasedIndicator

true, // AllowSplitIndicator

  emptyUUID, // TargetSiteLogisticsRequestUUID

false, // SplitByShippingOrPickupDateTimeIndicator

true, // SplitByOrderIndicator

false // SplitByDeliveryPriorityCodeIndicator

);

}

Once you've created the outbound delivery, depending on the status of it, you could then retrieve the BO instance and make your changes to the quantity's and shipment date.

Will

Former Member
0 Kudos

Hi Will,

Thanks for your information.

>Once you've created the outbound delivery, depending on the status of it, you could then retrieve the

>BO instance and make your changes to the quantity's and shipment date.

The problem is once we created the outbound delivery, we cannot edit the quantity.

It is also the same in standard process.

I tried the method you provide "RequestDeliveryExecution(false)" with TaskBaseIndicator to false.

The outbound delivery is created with the status "Not Released" and "Not Canceled". But I cannot change the value of quantity.

So, I think we should set the value of Quantity at creation time of Outbound Delivery (before the outbound delivery is created).

Thanks and Regards,

Thiri

may_thitsaoo
Contributor
0 Kudos

Hi Thi ri,

I think Quantity can be set in below path.

OB.Item.ItemBusinessTransactionDocumentReferenceSiteLogisticsLotMaterialOutput.MaterialOutputQuantity.ConfirmQuantity

Regards, May.

Former Member
0 Kudos

Hi May,

Thanks for your information.

Yes. This is the path of actual quantity value. I already tried that way also. But the problem is how and when we can set it correctly.

I used "PGIInBackground()" method to release Outbound Delivery Request to Outbound Delivery.

Then, I tried to update the quantity (the path you provide) but it shows error.

At standard process, once we created Outbound Delivery, we cannot edit the quantity value.

Please check it.

Thanks and Regards,

Thiri