title: Using detail to delivery API's
body: <p>I created this procedure</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE APPS.test_dlv3
  IS
  BEGIN
  DECLARE
  
  -- STANDARD PARAMETERS.
   pApiVersion    NUMBER := 1.0;
   pInitMsgList   VARCHAR2(30);
   pCommit        VARCHAR2(30);
  
  -- PARAMETERS FOR WSH_DELIVERY_DETAILS_PUB.DETAIL_TO_DELIVERY
   pDeliveryId    NUMBER;
   pDeliveryName  VARCHAR2(30);
   pTabOfDelDet   WSH_DELIVERY_DETAILS_PUB.id_tab_type;
   pAction        VARCHAR2(30);
  
  -- OUT PARAMETERS
   xReturnStatus  VARCHAR2(10);
   xMsgCount      NUMBER;
   xMsgData       VARCHAR2(2000);
   xMsgDetails    VARCHAR2(3000);
   xMsgSummary    VARCHAR2(3000);
  
  -- HANDLE EXCEPTIONS
   vFailApiException EXCEPTION;
  
  BEGIN
  -- INITIALIZE RETURN STATUS
   xReturnStatus := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
  
  -- CALL THIS PROCEDURE TO INITIALIZE APPLICATIONS PARAMETERS.
   FND_GLOBAL.APPS_INITIALIZE(
         user_id      =&gt; ,  --hide
         resp_id      =&gt; ,  --hide
         resp_appl_id =&gt; ); --hide
  
  -- VALUES FOR WSH_DELIVERY_DETAILS_PUB.DETAIL_TO_DELIVERY
   pDeliveryId        := 379358;
   pDeliveryName      := 'Delivery01';
   pTabOfDelDet(1)    := 354601 ;
   pAction            := 'ASSIGN';
  
  -- CALL TO WSH_DELIVERY_DETAILS_PUB.DETAIL_TO_DELIVERY.
   WSH_DELIVERY_DETAILS_PUB.detail_to_delivery( 
          p_api_version       =&gt; pApiVersion, 
          p_init_msg_list     =&gt; pInitMsgList,
          p_commit            =&gt; pCommit, 
          x_return_status     =&gt; xReturnStatus,
          x_msg_count         =&gt; xMsgCount,
          x_msg_data          =&gt; xMsgData,
          p_TabOfDelDets      =&gt; pTabOfDelDet,
          p_action            =&gt; pAction,
          p_delivery_id       =&gt; pDeliveryId,
          p_delivery_name     =&gt; pDeliveryName );
  
   IF (xReturnStatus &lt;&gt; WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN RAISE vFailApiException;
  
   ELSE DBMS_OUTPUT.PUT_LINE('Detail '||pTabOfDelDet(1)|| ' assignment to the delivery '|| pDeliveryName ||' is successful');
  
   END IF;
  
   Exception
  
     WHEN vFailApiException THEN WSH_UTIL_CORE.get_messages('Y', xMsgSummary, xMsgDetails, xMsgCount);
  
      IF xMsgCount &gt; 1 THEN xMsgData := xMsgSummary || xMsgDetails;
          DBMS_OUTPUT.PUT_LINE('Message Data : '||xMsgData);
  
      ELSE xMsgData := xMsgSummary;
          DBMS_OUTPUT.PUT_LINE('Message Data : '||xMsgData);
  
      END IF;
  
  END;        
  END;
  /
  </code></pre>
  
  <p>But the result is always like this :</p>
  
  <pre><code>Message Data : Error: Error in assigning one or more details to a delivery.
  Warning: These entities can not be grouped together as their grouping attributes do not match.
  </code></pre>
  
  <p>Can anyone help me??</p>