SAP Program RGJVROLLUP - Find the correct rollup and start the rollup processing

Description
This function will do the following tasks:

  • You can mark a flag if the company code set should be regenerated. If
  • this flag is marked, the following is done:
    read the company code set 5J3-PSC-RBUKRS
    read all company codes which are assigned to PSC with source "JV" fromPSC customizing (table T8PSCSRCCC)
    double-check that all company codes found are also assigned to JV.Therefore read table T822 with the company code and ledger 4A. Use onlythose company codes which are also assigned to JV
    re-create the set 5J3-PSC-RBUKRS using the existing header and allcompany codes found. All company codes are entered as single value intothe set, a range is not used.
    • The program will then read all company codes which should be processed
    • (from the rollup set 5J3-PSC-RBUKRS). If any of those company codes hasthe ledger 4C assigned, it will start the rollup 4A-PSC-1 (which hastwosteps: one for ledger 4A and one for ledger 4C). If the ledger 4C isnotassigned to any of those company codes it will start the rollup4A-PSC-0 (a copy from 4A-PSC-1 but the sequence for ledger 4C isblocked).
      • the rollup will read all data from JVTO1 which is specified in the
      • header set or sequence set.
        • before the rollup of the data, a deletion sequence is processed. If the
        • rollup is processed twice, it will first delete the existing data.
          • During the rollup of the data to the PSC ledger, also the PSC specific
          • fields are filled. This is done by using the PSC customizing in anrollup exit.
            The rollup will work in the following way:
            read all records of the JV summary table according to the rollup set
            For each record all fields are moved into the PSC record.
            The PSC is substituted. To do that the program checks table T8JVPSC(transaction PSC23 - Venture assignment to PSC). If the venture fromthe JV table is assigned to a PSC, this PSC is moved to the PSC record.If the venture is not assigned to a PSC, the record will not be takenover to PSC. The processing for this record will then stop here.
            The PSC product is substituted. To do that the program checks tableT8PSCSRCPROD (transaction PSC26 - Product determination). With thecompany code from the JV record and the PSC found in the previous step,the program reads all corresponding records of this table. For eachline it will check if the rule is true. If so, a product is found andtaken over into the PSC record. If all corresponding rules are not trueor no entries are found at all in this table, the record will not betaken over to PSC. The processing for this record will then stop here.
            The calculation type is substituted. To do that the program checkstable T8PSCSRCCT (transaction PSC27 - Calculation type determination).With the company code from the JV record and the PSC and product foundin the steps before, the program reads all corresponding records ofthis table. For each line it will check if the rule is true. If so, acalculation type is found and taken over into the PSC record. If allcorresponding rules are not true or no entries are found at all in thistable, the record will not be taken over to PSC. The processing forthis record will then stop here.
            If a PSC, a PSC product and a calulation type was found, the PSC recordis complete and will update the PSC ledger.