project QadFinancials > class BMfgMenu > method DeleteMenuFromResource

Description

Method used to delete menus.


Parameters


tMenuURIinputtemp-tableInput temp-table that holds the menu URI of the menu's that needs to be deleted.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBusinessComponent.AdditionalUpdates


program code (program1/bmfgmenu.p)

if oiReturnStatus = 0
then assign oiReturnStatus = -98.

if not can-find(first tMenuURI)
then do:
    assign oiReturnStatus = 0.
    return.
end.

<M-1 run ClearData
   (output viFcReturnSuper (oiReturnStatus)) in BMfgMenu>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

for each tMenuURI:

    if tMenuURI.tcResourceURI = '' or
       tMenuURI.tcResourceURI = ? 
    then next.

    assign vcFreeForm = "for each mnd_det where mnd_det.mnd_uri = '":U + tMenuURI.tcResourceURI + "'":U.
    <M-2 run DataLoad
       (input  '' (icRowids), 
        input  '' (icPkeys), 
        input  '' (icObjectIds), 
        input  vcFreeForm (icFreeform), 
        input  true (ilKeepPrevious), 
        output viFcReturnSuper (oiReturnStatus)) in BMfgMenu>
    if viFcReturnSuper = -4
    then assign viFcReturnSuper = 0.
    if viFcReturnSuper <> 0
    then assign oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0
    then return.

    for each tmnd_det where
             tmnd_det.mnd_uri = tMenuURI.tcResourceURI:
        assign tmnd_det.tc_Status = 'D':U.
    end.

end. /*for each tMenuURI*/

<M-3 run ValidateBC
   (output viFcReturnSuper (oiReturnStatus)) in BMfgMenu>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

<M-4 run AdditionalUpdates
   (output viFcReturnSuper (oiReturnStatus)) in BMfgMenu>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

<M-5 run DataSave
   (output viFcReturnSuper (oiReturnStatus)) in BMfgMenu>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

if oiReturnStatus = -98
then assign oiReturnStatus = 0.