Search code examples
oracleoracle11goracle-sqldevelopererporacle-apps

Oracle Applications - Next Step Attribute


When using the Oracle database frontend application, under the Shipping Transactions Screen, there is an attribute called "Next Step". This attribute sits next to the "Line Status" attribute. My question is, where does this attribute, "Next Step" stay within the standard Oracle backend tables/views, such that I can query for this value?

The contents of this attribute are commonly things like:

  • Ship Confirm/Close Trip Stop
  • Transact Move Order
  • Pick Release

If the answerer could provide a table name or view name, i.e. WSH_DELIVERY_DETAILS, that would be great.

Thanks!


Solution

  • The "Next Step" item is generated by function function get_next_step() in one of the shipping transaction form's program units, see code further below. To use it in SQL, this function logic can be transformed into a case statement, for which you find a code example in the ONT Order Headers and Lines Blitz Report, which shows the 'Next Step' in column CB of the generated Excel file.

        function get_next_step(p_detail_id in number,
                           p_current_released_status in varchar2,
                           p_source_code in varchar2,
                           p_oe_interfaced_flag in varchar2,
                           p_inv_interfaced_flag in varchar2,
                           p_container_flag  in varchar2
                               ) return varchar2 is
    begin
    --
    --bug#3264295 : next step for lpns should be 'not applicable' 
    --
     if p_container_flag in ('Y', 'C') then
       return(:parameter.not_applicable_next);
     else
       if p_current_released_status = 'C' then       
         --bug 9671087 - standalone and lsp project changes to populate
         --            - "next step" as "not applicable" after interfacing with inv.
         if p_source_code = 'OE' and p_inv_interfaced_flag in ('X', 'Y') and
         (
         p_oe_interfaced_flag = 'Y' or
         p_oe_interfaced_flag = 'X' and (:parameter.p_wms_deployment_mode = 'D' or :parameter.p_wms_deployment_mode = 'L' and name_in(:parameter.p_dlvb_mode||'.CLIENT_ID') is not null)
         )
         or
         --bug11680443::for shipped oke lines  if inv flag is 'x',
         --             'next status' should be 'not applicable '
         p_source_code <> 'OE' and p_inv_interfaced_flag in ('X','Y') then
           return(:parameter.not_applicable_next);
         else
           return(:parameter.interface_trip_stop_next);
         end if;
       elsif p_current_released_status in ('B','R') then
         -- bug # 6689448 (replenishment project):
         if name_in(:parameter.p_dlvb_mode||'.replenishment_status') = 'R' then
         -- replenishment requested dd line.
           return(:parameter.replenishment_complete_next);
         else 
           return(:parameter.pick_release_next);
         end if;      
         -- bug # 6689448 (replenishment project):     
       elsif p_current_released_status = 'S' then
         --anxsharm, x-dock
         if name_in(:parameter.p_dlvb_mode||'.move_order_line_id') is null then
           -- displayed value is planned x-dock
           return(:parameter.receive_xdock_next);
         else -- mol is not null
           return(:parameter.pick_confirm_move_order_next);
         end if;      
         --anxsharm, end of x-dock
       elsif p_current_released_status in ('X','Y') then
         return(:parameter.ship_confirm_next);
       elsif p_current_released_status = 'D' then
         return(:parameter.not_applicable_next);
       elsif p_current_released_status = 'N' then
         return(:parameter.progress_order_next);
       end if;
     end if; 
    end get_next_step;