project QadFinancials > class BPosting > method StopExternalInstances

Description

Stop instances that are started in AdditionalUpdates as part of current transaction


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BPosting.AdditionalUpdates
method BPosting.AdditionalUpdatesBQPosting
method BPosting.ValidateComponent


program code (program/bposting.p)

    
    /* =================================================== */
    /* Actions to Stop possibly started and closed classes */
    /* =================================================== */
    if viBQCrossCyPostingFromPostingID <> 0 
    then do:
        <I-77 {bFcStopInstance
             &CLASS           = "BQCrossCyPosting"}>
        assign viBQCrossCyPostingFromPostingID = 0.              
    end.
    if viBGLOpenItemPostingID <> 0
    then do:
        <I-1 {bFcStopInstance
            &CLASS           = "BGLOpenItem"}>
        assign viBGLOpenItemPostingID = 0.
    end.
    if viBPostingTemplatePostingID <> 0
    then do:
        <I-2 {bFcStopInstance
            &CLASS           = "BPostingTemplate"}>
        assign viBPostingTemplatePostingID = 0.
    end.
    if viBQPostingPostingID <> 0 and viBQPostingPostingID <> ?
    then do:
        <I-3 {bFcStopInstance
            &CLASS           = "BQPosting"}>
        assign viBQPostingPostingID = 0.
    end.
    if viBQBudgetActualPostingID <> 0 and viBQBudgetActualPostingID <> ?
    then do:
        <I-4 {bFcStopInstance
            &CLASS           = "BQBudgetActual"}>
        assign viBQBudgetActualPostingID = 0.
    end.
    if viBFACapitalPostingID <> 0 and viBFACapitalPostingID <> ?
    then do:
        <I-5 {bFcStopInstance
            &CLASS           = "BFixedAssetCapital"}>
        assign viBFACapitalPostingID = 0.
    end.
    
    /* ========================================================================================================================== */
    /* Note: No actions required here for classes BPeriod, BVatGroup and BSaf.                                                    */
    /* BSaf is used in method ApiStdMaintainTT (and it submethods) to in-flight create Saf-records: the instance can thus not be  */
    /* stopped here as this method is also called from the beginning of method ValidateComponent                                  */
    /* BPeriod is used in methods AddPostingHeader, ValidateComponent and ValidateComponentPosting to check whether a certain     */
    /* period exists in the Period-instance when the Period does not yet exist in the db                                          */
    /* ========================================================================================================================== */
    
    
    
<ANCESTOR-CODE>