Fonction SAP BAPI_PTMGREXTWOSCHED_INSWCOST - Insert Operative Planned Working Time (With Cost Assignment)

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 Confirmations
WORKSCHEDULE_GENERAL_INFO BAPI7031_1 352 Interface Structure for IT 2003: General Info on Day
WORKSCHEDULE_INTERVALS BAPI7031_2 300 Interface Structure for IT 2003: Interval Info

Functionality
You can use this method to transfer data on an employee's operativeplanned working time from external systems to the SAP System.
You can use WORKSCHEDULE_GENERAL_INFO to enter the general data on aplanned working time in the SAP System's interface tables. You can useparameter WORKSCHEDULE_INTERVALS to supply the SAP System with explicitplanned working time intervals and breaks.
The following fields represent a unique document key for an operativeplanned working time:

  • EXTSYSTEM

  • EXTAPPLICATION

  • EXTDOCUMENTNO

  • If you have entered several clock-time intervals as operative plannedworking time for an employee on one day, the system uses the documentkey (EXTSYSTEM, EXTAPPLICATION, EXTDOCUMENTNO) to establish the linkbetween the data.
    You can specify an operative planned working time for one day and apersonnel number by specifying a line in parameterWORKSCHEDULE_GENERAL_INFO and by entering one or more lines inparameter WORKSCHEDULE_INTERVALS; the entries must match the line ofstructure WORKSCHEDULE_GENERAL_INFO in fields EXTSYSTEM,EXTAPPLICATION, and EXTDOCUMENTNO. All of this data is referred tocollectively in the following as a data block (for the operativeplanned working time).
    If you want to cancel a data block, field REVERSED of parameterWORKSCHEDULE_GENERAL_INFO must have the value "X". The system alsoautomatically cancels all related data of parameterWORKSCHEDULE_INTERVALS, since the data is linked by means of the uniquedocument key.
    The data block is the unit that can be cancelled as a whole. Forthe data block to be cancelled, the current method must be accessed;parameter WORKSCHEDULE_GENERAL_INFO must be filled with the fields thatdetermine the data block, EXTSYSTEM, EXTAPPLICATION, andEXTDOCUMENTNO and field REVERSED of the same parameter must have thevalue "X". The system also cancels the related data for the datablock that was specified in parameter WORKSCHEDULE_INTERVALS, thatis, explicit planned working time intervals and breaks.
    You can transfer several data blocks to the system for each dayand personnel number, that is, data records that have different entriesin at least one of the fields EXTSYSTEM, EXTAPPLICATION, andEXTDOCUMENTNO, but that relate to the same day and the same personnelnumber. In this case, the two data blocks must be compatible.This means that:
    • Fields DWS_GROUPING of parameter WORKSCHEDULE_GENERAL_INFO either have
    • identical planned working times, or the field is initial for at leastone planned working time. The same applies to field DAY_TYPE.
      • The field DAILYWORKSCHEDULE is not filled for either data block
      • in structure WORKSCHEDULE_GENERAL_INFO, and the explicit plannedworking time intervals specified in parameter WORKSCHEDULE_INTERVALS donot overlap.
        Several data blocks are entered in the interface table withoutbeing validated, for each day and personnel number; in the transferprocess, data blocks that are not compatible with the existingrecords (including those that have already been transferred) receive anerror status and are not transferred.
        You can also transfer data on a different payment and cost assignment.

        Notes
        This method stores the data records in the interface tablesPTEX2003GEN, PTEX2003SPEC, and PTEXDIR. The data is then read fromfiles PTEX2003GEN and PTEX2003SPEC by report RPTEXTPT(Transfer External Data -> Human Resources) andcreated as records of the Substitutions infotype (2003).

        Description
        Table containing messages from record processing.
        Critical errors are indicated by E (error) and A (abort),warnings by W, and information and success messages by Iand S respectively.

        Description
        In this parameter, general data on the planned time specifications forthe day DATE and the personnel number EMPLOYEENUMBER is specified. Incontrast to the optional entry of data in the WORKSCHEDULE_INTERVALSparameter, exactly one line of this parameter must be filled for oneday planned time specification. The following fields must be filled:

        • Logical system of source document (EXTSYSTEM field)

        • External application (EXTAPPLICATION field)

        • Document number (EXTDOCUMENTNO field)

        • Personnel number (EMPLOYEENUMBER field)

        • Date (DATE field)

        • Substitution type (WS_SPEC_TYPE field)

        • In addition, by specifying DAILYWORKSCHEDULE and optionallyDWS_VARIANT, you can enter a daily work schedule and its variant. Inthis case, you are not allowed to enter interval type DWS_INTERVALTYPE= 10, that is explicit planned time intervals, in theWORKSCHEDULE_INTERVALS parameter.
          By entering WORKBREAKSCHED, you can specify a work break schedule. Inthis case, you are not allowed to enter interval type DWS_INTERVALTYPE= 40, that is enter breaks manually, in the WORKSCHEDULE_INTERVALSparameter.
          You can use the DWS_GROUPING and DAY_TYPE fields to define a specialdaily work schedule class or a special day type. The daily workschedule class may however only be specified if the theDAILYWORKSCHEDULE field is not filled (that is if the planned workingtime has not been entered manually in the WORKSCHEDULE_INTERVALSparameter).
          The LOCKINDICATOR field specifies whether the whole day planned timespecification also transfers locked records to HR during transfer toHR.
          If the REVERSED field is selected, the entire day's planned timespecification is cancelled. The cancellation relates to the currentline of the parameter and to all lines of parameterWORKSCHEDULE_INTERVALS whose entries in fields EXTSYSTEM,EXTAPPLICATION, and EXTDOCUMENTNO match the current entry.
          Fields WORKTAXAREA through EXTRA_PAY_INDIC define specifications on adifferent payment, and fields COMP_CODE through SERVICE_CATEGORYdetermine a cost assignment. All these fields may only be filled inthis parameter if the DAILYWORKSCHEDULE field has an entry. If theplanned working time is entered using explicit intervals in theWORKSCHEDULE_INTERVALS parameter and if you want to assignspecifications on a different payment and cost assignment to theseplanned working time intervals, this must be done in the correspondingfields of the WORKSCHEDULE_INTERVALS structure.
          The NO_BREAKS field is currently not evaluated.

          Description
          You can enter explicit working time intervals in this parameter. Aclock-time interval of interval type DWS_INTERVALTYPE = 10 is a plannedworking time interval, and DWS_INTERVALTYPE = 40 signifies a break. Alllines of this parameter in fields EXTSYSTEM, EXTAPPLICATION andEXTDOCUMENTNO that match an entry in the WORKSCHEDULE_GENERAL_INFOparameter define, along with the second parameter, the planned workingtime for a day.
          Entries must be made in the following fields:

          • Logical system of original document (EXTSYSTEM)

          • External application (EXTAPPLICATION)

          • Document number (EXTDOCUMENTNO)

          • Start time (START_TIME)

          • End time (END_TIME)

          • Interval type (DWS_INTERVALTYPE)

          • If the interval represents a break, that is, the interval type is 40,entries can also be made for break durations in fields PAID_BREAK_DURand UNPAID_BREAK_DUR for paid and unpaid breaks respectively. The sumof the two durations must not be greater than the duration fromSTART_TIME to END_TIME of this entry.
            Permitted values for START_TIME and END_TIME are clock times between00:00 and 48:00; END_TIME must always be greater (that is, later) thanSTART_TIME. For example, an interval from 23:00 to 1:00 is entered asSTART_TIME = 230000 and END_TIME = 250000. The duration of the intervalbetween START_TIME and END_TIME must not exceed 24 hours.
            All breaks, that is, lines where DWS_INTERVALTYPE = 40 must becontained in a planned working time interval of the existing day'splanned working time, that is, in a line where DWS_INTERVALTYPE = 10.No more than two breaks may occur within one planned working timeinterval, and these two breaks must not overlap.
            Two planned working time intervals, that is, intervals of typeDWS_INTERVALTYPE = 10 that belong to the planned working time for a daymust not overlap.
            The date DATE in the WORKSCHEDULE_GENERAL_INFO parameter is a logicaldate. A planned working time "11/22/1999 from 2:00-3:00 Uhr" that is tobe logically assigned to the previous day is therefore entered usingthe planned working time on the previous day, that is using value DATE= 21.11.1999 in the WORKSCHEDULE_GENERAL_INFO parameter, intervalSTART_TIME = 260000, END_TIME = 270000, with INTERVAL_TYPE = 10 in theexisting parameter.
            Only intervals of type DWS_INTERVALTYPE = 10 may exist in the currentparameter if field DAILYWORKSCHED in the WORKSCHEDULE_GENERAL_INFOparameter is empty in the same day's planned working time.
            Only intervals of type DWS_INTERVALTYPE = 40 may exist in the currentparameter if field WORKBREAKSCHED in the WORKSCHEDULE_GENERAL_INFOparameter is empty.
            Fields WORKTAXAREA through EXTRA_PAY_INDIC define entries on adifferent payment, and fields COMP_CODE through SERVICE_CATEGORYdetermine a cost assignment. All of these fields may only be filled inthis parameter if the interval type DWS_INTERVALTYPE equals 10, thatis, for planned working time intervals.