Fonction SAP BAPI_BUPR_CONTP_HRS_GETDETAIL - SAP-BP, BAPI: Read Business Hours for Contact Person Relationship

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BUSINESSPARTNER BAPIBUS1006_HEAD-BPARTNER C 10 Business Partner
CONTACTPERSON BAPIBUS1006_HEAD-BPARTNER C 10 Contact Person
SCHEDULE_TYPE BAPIBUS1006_SCHEDULE_TYPE u 1 Schedule Type
VALIDFROMDATE BAPIBUS1006002_HEADER-VALIDFROMDATE D 8 Validity Date (Valid From)
VALIDUNTILDATE BAPIBUS1006002_HEADER-VALIDUNTILDATE D 8 Validity Date (Valid To)

Paramètre Reférence Type Long. Description
RULE_ID BAPIBUS1006_RULE_ID-RULE_ID C 25 Internal Identification of Rules of Periodic Appointments

Paramètre Reférence Long. Facultatif Description
COMBINEDRULE BAPIBUS1006_RULE_R 276 X Links Rule (R)
DAILYRULES BAPIBUS1006_RULE_D 100 X Daily Rules (D)
FIXEDRULES BAPIBUS1006_RULE_T 120 X Fixed Appointments (T)
MONTHLYRULES1 BAPIBUS1006_RULE_M1 100 X Monthly Rules (M1)
MONTHLYRULES2 BAPIBUS1006_RULE_M3 100 X Monthly Rules (M3)
RETURN BAPIRET2 548 X Messages
WEEKLYRULES BAPIBUS1006_RULE_W 220 X Weekly Rules (W)

Functionality
You use this BAPI to read the calling or visting hours for a contactperson relationship between two business partners.
The schedule type of the business hours, which is mapped by means ofindividual rules or their linkage to complex sets of rules, is enteredin parameter SCHEDULE_TYPE.
The tables COMBINEDRULE, DAILYRULES, WEEKLYRULES etc. contain the datafor each rule type and the relevant linkage information.
The rule ID by means of which the data is referenced is returned in theparameter RULE_ID.
After it has been checked that the business partner exists, the validityof the schedule type is checked. Any errors that may occur are logged,and issued in the table RETURN.
If the result of the check is negative, then the business hours are notread.

Description
Internal identification of the rule for regular appointments

Value range
ID of a rule defined per schedule type.

Description
Key that identifies a business partner uniquely for each client.

Description
Key that identifies a business partner uniquely for each client.

Description
Key for identifying a schedule type.

Value range

  • A (calling hours)

  • C (visting hours)
  • Description
    The validity date (valid from) determines the start of a validityinterval of an object, here the contact person relationship on the timeaxis.

    • Only one date must be entered here if a time contstraint is forseen for
    • the relationship category.
      • If no date is entered, then the default value 01.01.0001 is set.

      • If a time constraint is not foreseen in the configuration menu for the
      • relationship category, any dates that deviate from the default value areignored and the default date is set.

        Description
        The validity date (valid to) determines the end of a validity intervalof an object, in this case the contact person relationship on the timeaxis.

        • Only one date must be entered here if a time constraint is foreseen for
        • the relationship category.
          • If no date is entered, then the default value 31.12.9999 is set.

          • If a time constraint is not foreseen in the configuration menu for the
          • relationship category, any dates that deviate from the default value areignored and the default date is set.

            Description
            Link rule (R rule) for summarizing a set of rules consisting ofindividual rules of the types D (daily rule), W (weekly rule), M(monthly rule) and T (rule for fixed appointments).
            If the business hours of a schedule type (calling or visiting hours)consist of several individual rules, these individual rules are groupedtogether in a link rule. The individual rules contained within the Rrule are referenced by means of their rule ID, whereby the highest-levelR rule, as the parent rule for the overall rule, contains the relevantdata for validity, conflicts (behavior on non-working days), and thepublic holiday or factory calendar used.
            An R rule is either of the type RO or RN. R rules of the type RO linkindividual rules on the basis of the logical OR, while those of the typeRN make the link on the basis of the logical NOT.
            This means that calling hours, for example, that occur on certain,pre-determined days are mapped by means of an RO rule and an individualrule of the type T (fixed appointment). Fixed times that do NOT occur oncertain days, are mapped by means of an RN rule together with a T rule,on the other hand.
            An R rule can contain up to eight individual rules that can beidentified by means of their rule ID. All rule types can be used,including other R rules. In this way it is possible to map rules ofunrestricted complexity.
            It does not make sense to have an R rule without individual rules.
            Parameter fields
            RULE_ID,,,,Rule ID of the link rule
            TYPE,,,,,,Type of the link rule
            START_DATE,,Overall rule valid from
            END_DATE,,,,Overall rule valid to
            CONFLICTS,,,,Exceptions
            FCALID,,,,Factory calendar
            HCALID,,,,Public holiday calendar
            RULEID1-,,,,Rule IDs of the individual rules to be linked, or additionalR rules
            RULEID8
            Factory and public holiday calendars may not be entered at the sametime.

            Value range
            TYPE,,,,,,RO, RN
            CONFLICTS,,,,SPACE, 0 ,,Appointment takes place even if the date occurson a non-working day, according to the factory or public holidaycalendar used.
            ,,,,,,K ,,,,Appointment is cancelled on non-working days
            ,,,,,,+, - ,,,,Appointment is moved by one day to the next (+) orprevious (-) working day.

            Default

            Description
            A daily rule (type D) contains data for daily occurring business hoursof a schedule type (calling or visiting hours).
            An overall rule consisting of several individual rules grouped togetherby means of a link rule (R rule), can contain any number of rules of onetype.
            In this way, business hours with different recurrences are mapped bymeans of several D rules.
            If, for example, calling hours take place every day between 9:30 and10:30, and every 3 days between 15:45 and 17:00, then two daily ruleswith the relevant data are transferred.
            Rules consisting of more than one individual rule, regardless of thetype, should be grouped together by means of a link rule. In this caseit is not necessary to enter a validity period, conflicts, and a factoryor public holiday calendar, since this information should be assigned tothe link rule. If, on the other hand, the rule consists of an individualrule, this information should be entered.
            Parameter fields
            RULE_ID,,,,Rule ID of the rule
            TYPE,,,,,,Type of the rule
            START_DATE,,Valid from
            END_DATE,,,,Valid to
            CONFLICTS,,,,Exceptions
            FCALID,,,,Factory calendar
            HCALID,,,,Public holiday calendar
            DAYS,,,,,,Recurrence in days; number of days between the appointments
            TIME_FROM,,Start time
            TIME_TO,,,,End time
            Factory and public holiday calendars may not be entered at the sametime.

            Value range
            TYPE,,,,,,D
            CONFLICTS,,,,SPACE, 0 ,,Appointment takes place even if the date occurson a non-working day, according to the factory or public holidaycalendar used.
            ,,,,,,K ,,,,Appointment is cancelled on non-working days
            ,,,,,,+, - ,,,,Appointment is moved by one day to the next (+) orprevious (-) working day.

            Description
            A fixed rule (type T) contains data for business hours of a scheduletype (calling or visiting hours) that either take place (additionally)or do not take place.
            Whether or not a fixed appointment is cancelled (that it, does not takeplace) or not, is detemined by the combination of the T rule with a linkrule of the type RN (appointment is cancelled) or RO (appointment takesplace additionally).
            It does not make sense to have a T rule without a relevant link rule.
            An overall rule consisting of several individual rules grouped togetherby means of a link rule (R rule) can contain any number of rules of onetype.
            If, for example, additional calling times for the 23.12 of a year shouldtake place from 11.00 to 12.00, but not from 02.01 to 04.01, then a Trule together with an R rule that references this rule of the type ROshould be created, as well as a T rule together with an R rule thatreferences this rule of the type RN.
            Rules consisting of more than one individual rule, regardless of thetype, should be grouped together by means of a link rule. In this caseit is not necessary to enter a validity period, conflicts, and a factoryor public holiday calendar, since this information should be assigned tothe link rule. If, on the other hand, the rule consists of an individualrule, this information should be entered.
            Parameterfelder
            RULE_ID,,,,Rule ID of the rule
            TYPE,,,,,,Type of rule
            START_DATE,,Valid from
            END_DATE,,,,Valid to
            CONFLICTS,,,,Exceptions
            FCALID,,,,Factory calendar
            HCALID,,,,Public holiday calendar
            YEAR_FROM,,Year
            MONTH_FROM,,Month
            DAY_FROM,,,,Day
            TIME_FROM,,Start time
            YEAR_TO,,,,Year
            MONTH_TO,,,,Month
            DAY_TO,,,,Day
            TIME_TO,,,,End time
            Factory and public holiday calendars may not be entered at the sametime.

            Value range
            TYPE,,,,,,T
            CONFLICTS,,,,SPACE, 0 ,,Appointment takes place even if the date occurson a non-working day, according to the factory or public holidaycalendar used.
            ,,,,,,K ,,,,Appointment is cancelled on non-working days
            ,,,,,,+, - ,,,,Appointment is moved by one day to the next (+) orprevious (-) working day.

            Description
            A monthly rule (type M1) contains data for monthly business hours of aschedule type (calling or visiting hours), whereby the business hoursoccur in a defined monthly time period on a certain day of the month.
            An overall rule that consists of several individual rules groupedtogether by means of a link rule (R rule), can contain any number ofrules of one type.
            Thus business hours can be mapped in different monthly intervals ondifferent days of the month via several rules of the type M1.
            If, for example, visiting hours should take place an the first day ofeach month between 9.30 and 11.00, and every three months on thefifteenth day from 13.30 to 15.30, then two monthly rules of the type M1are transferred with the relevant dates: one monthly rule with the timeperiod 1 and the day 1, and another monthly rule with the time timeperiod 3 and the day 15.
            Rules consisting of more than one individual rule, regardless of thetype, should be grouped together by means of a link rule. In this caseit is not necessary to enter a validity period, conflicts, and a factoryor public holiday calendar, since this information should be assigned tothe link rule. If, on the other hand, the rule consists of an individualrule, this information should be entered.
            Parameter fields
            RULE_ID,,,,Rule ID of the rule
            TYPE,,,,,,Type of rule
            START_DATE,,Valid from
            END_DATE,,,,Valid to
            CONFLICTS,,,,Exceptions
            FCALID,,,,Factory calendar
            HCALID,,,,Public holiday calendar
            DAYS,,,,,,Day of the month
            MONTH,,,,Monthly recurrence
            TIME_FROM,,Start time
            TIME_TO,,,,End time
            Factory and public holiday calendars may not be entered at the sametime.

            Value range
            TYPE,,,,,,M1
            CONFLICTS,,,,SPACE, 0 ,,Appointment takes place even if the date occurson a non-working day, according to the factory or public holidaycalendar used.
            ,,,,,,K ,,,,Appointment is cancelled on non-working days
            ,,,,,,+, - ,,,,Appointment is moved by one day to the next (+) orprevious (-) working day.
            DAYS,,,,,,[1..31]

            Description
            A monthly rule (type M3) contains data for monthly business hours of aschedule type (calling or visiting hours), whereby the business hoursrecur on a certain day of the month, at certain monthly intervals.
            An overall rule that consists of several individual rules groupedtogether by means of a link rule (R rule), can contain any number ofrules of one type.
            Thus business hours can be mapped in different monthly intervals ondifferent days of the month via several rules of the type M3.
            If, for example, visiting hours should take place an the second Tuesdayof a month from 9.30 to 11.00, and every 2 months on the first Monday ofthe month from 13.30 to 15.30, then two monthly rules of the type M3 aretransferred with the relevant data: one monthly rule with the periodfactor 2 (referring to Tuesday, the second day of the week), and aperiod factor 1 (referring to the recurrence every month); and anothermonthly rule with the period factor 1 (referring to the first day of theweek), and a period factor of 2 (referring to the recurrence everysecond month).
            Rules consisting of more than one individual rule, regardless of thetype, should be grouped together by means of a link rule. In this caseit is not necessary to enter a validity period, conflicts, and a factoryor public holiday calendar, since this information should be assigned tothe link rule. If, on the other hand, the rule consists of an individualrule, this information should be entered.
            Parameter fields
            RULE_ID,,,,Rule ID of the rule
            TYPE,,,,,,Type of rule
            START_DATE,,Valid from
            END_DATE,,,,Valid to
            CONFLICTS,,,,Exceptions
            FCALID,,,,Factory calendar
            HCALID,,,,Public holiday calendar
            DAY_NR,,,,Recurrence of the weekday
            WEEKDAY_NR,,Number of the weekday
            MONTHS,,,,Monthly recurrence
            TIME_FROM,,Start time
            TIME_TO,,,,End time
            Factory and public holiday calendars may not be entered at the sametime.

            Value range
            TYPE,,,,,,M3
            CONFLICTS,,,,SPACE, 0 ,,Appointment takes place even if the date occurson a non-working day, according to the factory or public holidaycalendar used.
            ,,,,,,K ,,,,Appointment is cancelled on non-working days
            ,,,,,,+, - ,,,,Appointment is moved by one day to the next (+) orprevious (-) working day.
            DAY_NR,,,,[1..5]
            WEEKDAY_NR,,[1..7]

            Description
            This table contains confirmations from the method call.

            Description
            A weekly rule (type W) contains data for the business hours of aschedule type (calling or visiting hours) that recur weekly.
            An overall rule that consists of several individual rules groupedtogether by means of a link rule (R rule), can contain any number ofrules of one type.
            Thus business hours that recur at different weekly intervals or ondifferent days of the month can be mapped via several rules of the typeW.
            If, for example, visiting hours should take place every Monday andWednesday from 8.00 to 9.30, and every 2 weeks on Wednesday Monday ofthe month from 16.15 to 17.30, then two weekly rules are transferredwith the relevant data: One weekly rule with the period factor 1 (forweekly recurrence) and the days Monday and Wednesday, and another weeklyrule with the period factor 2 (for fortnightly recurrence) and the dayWednesday.
            Rules consisting of more than one individual rule, regardless of thetype, should be grouped together by means of a link rule. In this caseit is not necessary to enter a validity period, conflicts, and a factoryor public holiday calendar, since this information should be assigned tothe link rule. If, on the other hand, the rule consists of an individualrule, this information should be entered.
            Parameter fields
            RULE_ID,,,,Rule ID of the rule
            TYPE,,,,,,Type of rule
            START_DATE,,Valid from
            END_DATE,,,,Valid to
            CONFLICTS,,,,Exceptions
            FCALID,,,,Factory calendar
            HCALID,,,,Public holiday calendar
            WEEKS,,,,Recurrence in weeks
            MONDAY-,,,,Indicator for the active day in the week rule
            SUNDAY
            MONDA_FROM-,,Start time for the respective active day in the week rule
            SUNDA_FROM
            MONDAY_TO-,,End time for the respective active day in the week rule
            SUNDAY_TO
            Factory and public holiday calendars may not be entered at the sametime.

            Value range
            TYPE,,,,,,W
            CONFLICTS,,,,SPACE, 0 ,,Appointment takes place even if the date occurson a non-working day, according to the factory or public holidaycalendar used.
            ,,,,,,K ,,,,Appointment is cancelled on non-working days
            ,,,,,,+, - ,,,,Appointment is moved by one day to the next (+) orprevious (-) working day.
            WEEKS,,,,[1..10]