Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 21, 2016 at 10:46 AM

    Hi Thi ri,

    I think Quantity can be set in below path.

    OB.Item.ItemBusinessTransactionDocumentReferenceSiteLogisticsLotMaterialOutput.MaterialOutputQuantity.ConfirmQuantity

    Regards, May.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Jul 21, 2016 at 10:49 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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