SAP Function BAPI_REQUIREMENTS_CHANGE - Planned independent requirement: Change planned independent reqmt

Parameter Reference Type Length Default Optional Text
DELETE_OLD BAPISPARAM-DELETE_OLD C 1 'X' X Control Parameters for Planned Independent Requirements
DO_COMMIT BAPISPARAM-DO_COMMIT C 1 'X' X Control Parameters for Planned Independent Requirements
MATERIAL BAPISITEMR-MATERIAL C 18 Material
MATERIAL_EVG BAPIMGVMATNR u 82 X Long Material Number
MRP_AREA BAPISITEMR-MRP_AREA C 10 X MRP Area
NO_WITHDR BAPISPARAM-NO_WITHDR C 1 SPACE X Control Parameters for Planned Independent Requirements
PLANT BAPISITEMR-PLANT C 4 Plant
REQMTSPLANNUMBER BAPISITEMR-REQ_NUMBER C 10 Requirements Plan Number
REQUIREMENTSTYPE BAPISITEMR-REQU_TYPE C 4 Requirements Type
REQUIREMENT_PARAM CM60R u 14 X Requirements Parameters
UPDATE_MODE BAPISPARAM-UPDATE_MODE C 1 'X' X Control Parameters for Planned Independent Requirements
VERSION BAPISITEMR-VERSION C 2 Version
VERS_ACTIV BAPISITEMR-VERS_ACTIV C 1 Version active

Parameter Reference Type Length Text
REQUIREMENT_ITEM_OUT BAPISITEMR u 131 Item data output

Parameter Reference Length Optional Text
REQUIREMENTS_CHAR_IN BAPISCHARR 80 X Configuration data input
REQUIREMENTS_SCHEDULE_IN BAPISSHDIN 31 X Schedule line data input
RETURN BAPIRETURN1 470 Return Parameter

Functionality
This method can be used tochange planned independent requirements.
To do this,you must transfer at least the item and schedule line data.For configurable materials, you can alsodefine additional configuration supporting points for the schedulelines.
The item data is transferred back after the successful creationof a planned independent requirement.
Any errors that occur are returned in the parameter RETURN.

Notes

  • The
  • authorization object C_PPBD with the activityV (change) is checked.
    • The command COMMIT WORK
    • is entered within the BAPI. You can prevent this by settingparameter DO_COMMIT with initial value.
      In this case, you call up methodBapiService.TransactionCommit to writethe planned independent requirements to the database.
      • If you have created a planning profile for a configurable material, you
      • can define
        configuration supporting points for the schedule lines. Note thefollowing:
        Define the usage probabilities using parameterREQUIREMENTS_CHAR_IN.
        The requirements date of the configuration supporting point (
        REQUIREMENTS_CHAR_IN-REQU_DATE) must correspond to therequirements date of the schedule line(REQUIREMENTS_SCHEDULE_IN-REQ_DATE).
        Do not create any schedule lines on non-working days, as these will beautomatically moved to a workday.

        Existing Schedule Lines/>

        • Existing schedule lines are deleted, and the system creates the
        • schedule lines transferred in parameterREQUIREMENTS_SCHEDULE_IN again.
          • When parameter DELETE_OLD has initial value,
          • the existing schedulelines are not changed if the transferredschedule lines with the same requirements date do not overwrite them.
            • Existing schedule lines must be deleted for the following items (

            • DELETE_OLD = X'):
              Items for which automatic splitting is carried out
              Items for which configuration supporting points are created

              Further information
              Additional methods:

              • PlannedIndepReqmt.CreateFromData

              • PlannedIndepReqmt.GetDetail

              • BapiService.TransactionCommit
              • Description
                This parameter contains the data for the item whose schedulelines have been changed.
                INCLUDE BAPI_DATAELEMENT

                Description
                You use this parameter to determine whether exising schedule lines are deleted.

                Value range

                • X: All existing schedule lines are deleted and the transferred
                • schedule lines are entered.
                  • Initial: Existing schedule lines are not deleted.

                  • Newly transferred schedule lines for existing requirement datesoverwrite the existing schedule lines.

                    Default
                    X: All existing schedule lines are deleted and the transferredschedule lines are entered.

                    Description
                    You use this parameter to define whether the commandCOMMIT WORK is entered within the method.

                    Value range

                    • X: A COMMIT WORK is entered

                    • Initial: No COMMIT WORK is entered
                    • Default
                      X: A COMMIT WORK is entered

                      Description
                      For information on the material number see the dataelement documentation: Material.

                      Description
                      Parameter for the long material number
                      This parameter can be used to transfer long material numbers. Thesenumbers can be up to 40 characters long.
                      To be able to use this parameter you must activate the switch for thebusiness function LAMA (long material number) in the system.
                      The business function LAMA is available as a component of the businessfunction set for DIMP.

                      Value range
                      None

                      Default
                      None

                      Description
                      For information on the MRP area see the data element documentation:MRP area.
                      The field MRP_AREA should only be filled if MRP areas are active.In this case you can change planned independent requirements for anMRP area.
                      If the MRP area field is empty, the planned independent requirementsare automatically changed for the plant MRP area.

                      Description
                      You can use this parameter to define whether the transferredplanned quantity is reduced by the withdrawal quantity of thesame period.

                      Value range

                      • X: The schedule lines are created with the transferred planned
                      • quantity.
                        • Initial: The transferred planned quantities are reduced by the existing
                        • withdrawal quantity.

                          Default
                          Initial: The transferred planned quantities are reduced by the existingwithdrawal quantity.

                          Description
                          For information on the plant, see the data element documentation:Plant.

                          Description
                          For information on the requirements plan number, see the data elementdocumentation:Requirements Plan Number.

                          Description
                          For information on the requirements type, see the data elementdocumentation: Requirements Type.
                          If this field is empty, the requirements type is taken from theplanning strategy in the material master.

                          Description
                          As a rule, this parameter is not evaluated and should not beused.

                          Description
                          You use this parameter to define if the BAPI is executed insimulation mode or not.

                          Value range

                          • X: The created planned independent requirements are posted to
                          • the database.
                            • Initial: No database changes are made
                            • (simulation mode).

                              Default
                              X: The created planned independent requirements are posted tothe database.

                              Description
                              For information on the version number, see the data elementdocumentation: Version Number.

                              Description
                              For information on this parameter, see the data element documentation:Indicator: Version Active.

                              Description
                              This parameter is used to create configuration supporting points for planned independent requirements.
                              The following fields are required:

                              • REQU_DATE: Requirement date for configuration supporting point

                              • CH_QTY: Usage probability for characteristics combination in
                              • percent
                                • PT_NUMBER: Planning table number

                                • PT_LINE: Planning table line

                                • For each configuration supporting point to be created,create entries for the characteristics combinations to whichusage probabilities are to be assigned.
                                  The characteristics combination is clearly defined by the planning tablenumber and line. You can use the example report below todisplay the values for the characteristics combinations used.
                                  Do not use the fields INT_CHAR and CHAR_VALUE .

                                  Example Report
                                  You can use the example report Z_DISPLAY_PT_DATA to display thedata required for maintaining the configuration supporting points.
                                  The report issues the following data for a planning profile:

                                  • Internal number (parameter PROFILID)

                                  • Internal planning table number (PT_NUMBER)

                                  • Planning table line (PT_LINE) of individual characteristics
                                  • combinations
                                    If you call up the report with the indicator PL_REL set, thesystem displays the planning-relevant characteristics combinations.
                                    REPORT Z_DISPLAY_PT_DATA.
                                    TABLES: tphvp, tplvp, tpsvp, cuvtab.
                                    DATA: lv_comb_key TYPE atplb,
                                    lv_profilid LIKE tphvp-profilid,
                                    lv_pt_name LIKE cuvtab-vtnam.
                                    PARAMETERS material LIKE tphvp-objekt.
                                    PARAMETERS prof_txt LIKE tphvp-proftxt.
                                    PARAMETERS pl_rel TYPE xfeld.
                                    SELECT SINGLE profilid FROM tphvp INTO lv_profilid
                                    WHERE objekt EQ material
                                    AND proftxt EQ prof_txt.
                                    CHECK sy-subrc EQ 0.
                                    WRITE: / material, / prof_txt, / 'PROFILID:', lv_profilid, /.
                                    SELECT * FROM tplvp
                                    WHERE profilid EQ lv_profilid.
                                    SELECT SINGLE vtnam FROM cuvtab INTO lv_pt_name
                                    WHERE vtint EQ tplvp-clint.
                                    ULINE.
                                    WRITE: / 'PT_NUMBER:', tplvp-clint, '(', lv_pt_name, ')'.
                                    SELECT * FROM tpsvp
                                    WHERE profilid EQ lv_profilid
                                    AND CLINT EQ tplvp-clint.
                                    IF pl_rel EQ 'X'
                                    AND tpsvp-pl_rel NE 'X'.
                                    CONTINUE.
                                    ENDIF.
                                    CALL FUNCTION 'M60V_COMBINATION_DISPLAY'
                                    EXPORTING
                                    TABLE_LINE = tpsvp-lnpos
                                    TABLE_NUMBER = tpsvp-clint
                                    IMPORTING
                                    STRING = lv_comb_key.
                                    WRITE: /, 'PT_LINE:', tpsvp-lnpos, lv_comb_key.
                                    ENDSELECT.
                                    ENDSELECT.

                                    Description
                                    You use this parameter to determine the schedule lines that areto be created.
                                    INCLUDE BAPI_DATAELEMENT
                                    The following fields are required:

                                    • DATE_TYPE

                                    • REQ_DATE

                                    • REQ_QTY
                                    • Value range
                                      You can use the following values for theperiod indicator DATE_TYPE:

                                      • 1: Day

                                      • 2: Week

                                      • 3: Month

                                      • 4: Posting period (if defined in material master)

                                      • 5: Planning calendar (if defined in material master)
                                      • Default

                                        Description
                                        This parameter contains messages about errors that have occurred.

103822Automatically splitting dates with zero quantities
825202BAPI_REQUIREMENTS_CREATE w/ configuration data (consulting)
331696MS64 Incorrect quantities for withdrawal quantity
528481COMMIT WORK in FUNCTION BAPI_REQUIREMENTS_CHANGE