Fonction SAP BAPI_CONTROL_RECIPE_REQUEST - Request and Transfer Control Recipes

Paramètre Reférence Long. Facultatif Description
CNTLRECCHARAC BAPI_RCOFVAPI 98 Export: Process Instruction Characteristics
CNTLRECHEADER BAPI_RCOCHAPI 291 Export: Header Data of Control Recipes
CNTLRECPROCINSTR BAPI_RCOFTAPI 43 Export: Process Instructions of the Control Recipe
CNTLRECTEXTLINES BAPI_RCOCRTXT 164 X Export: Long Texts of the Process Instruction Characteristics
CONTROLRECIPE BAPI_CNTLRECID 18 Import: Numbers of Control Recipes Requested
RETURN BAPIRET2 548 Export: System Messages on Method Call

Functionality
Using this method, you request and transfer controlrecipes from the SAP system.
For example, you can call this method from a process control system toexport control recipes from the SAP system to the control system.
A control recipe is only transferred if:

  • The destination assigned to it is of type 3 (Download to external
  • system, initiated by process control)
    • It has not yet been processed, that is, the control recipe must have the
    • status Created
      After the control recipe has been transferred, its status is set toDownloaded.

      Notes
      Authorizations
      You need the following authorization to carry out the method:
      Authorization object,,Field ,,Value
      C_CREX_WRK ,,Destination address,,RFC destination of the
      ,, ,,control recipe destination
      ,,Activity ,,90 (Request controlrecipe)
      ,,Plant ,,Plant of the control recipe
      When the method is carried out, the SAP system does not check whetherthe system calling the method and the control recipe destination are thesame. For this reason, make sure to define user authorizations in such away that users can only request control recipes created for their owndestination address.
      Selection Criteria
      In parameter ControlRecipe, you specify the control recipes to betransferred. Before this, you can request the header data of the controlrecipes available using method ControlRecipe.GetList.
      Control Recipe Transfer
      The data of the requested control recipes is returned in the parametersCntlRecHeader, CntlRecProcInstr, CntlRecCharac, andCntlRecTextlines.
      System Messages
      System messages issued during method processing are returned inparameter Return. For information on possible system messages andtheir meaning, see the parameter documentation.
      Update
      When control recipes are transferred, data is changed (for example, thecontrol recipe status). To update the SAP system so that these changestake effect, you have to carry out the standard method for the commitwork after the current method has been completed. You will find thisstandard method and its documentation in the R/3 Business ObjectRepository, section Cross-Application Components -> BusinessFramework Architecture.
      If the commit work terminates, re-call the method for transferringcontrol recipes using the same selection criteria as before. If the datahas not been updated in the previous call, the same control recipes arereturned again.
      If one or more control recipes are locked at the time of the secondmethod call, call the method again at a later time.

      Further information
      For more information on control recipe processing, see the SAP Library,section PP Production Planning - Process Industries ->Process Management -> Control Recipes.

      Description
      In this table, the SAP system passes on the characteristics contained inthe process instructions. For information about the meaning of the tablefields, see the documentation of the corresponding data elements.
      Table Structure
      CNTL_REC_ID ,,Control recipe number
      PROC_INSTR_NUMBER ,,Internal process instruction number
      CHAR_LINE_NUMBER ,,Sort number of the process instructioncharacteristic
      NAME_CHAR ,,Name of the process instructioncharacteristic
      CHAR_VALUE ,,Characteristic value
      DATA_TYPE ,,Data type of characteristic value
      INSTR_CHAR_LINE_NUMBER,,Number of the process instruction characteristicin the order

      Value range
      Display Format of Characteristic Values
      Depending on the characteristic format, the characteristic values(CHAR_VALUE) are passed on as follows:
      Format ,,Display format of characteristic values
      CHAR,,As a string
      NUM,,E
      ,, consisting of an arithmetical sign (+/,-)
      ,,one character before the decimal point, a decimal point
      ,,(,/.), and up to 15 decimal digits.
      ,,However, if you use many decimal digits, rounding errors may occur
      ,,depending on the platform.
      ,, consisting of the arithmetical sign and up to two
      ,,decimal digits
      DATE ,,yyyymmdd
      TIME ,,hhmmss

      Description
      In this table, the SAP system passes on the header data of the controlrecipes requested. For more information on the meaning of the tablefields, see the documentation of the corresponding data elements.
      Table Structure
      CNTL_REC_ID ,,Control recipe number
      PLANT ,,Plant of the control recipe
      PROC_ORDER ,,Process order to which the controlrecipe belongs
      DEST ,,Control recipe destination
      DEST_ADDRESS ,,Address of the control recipedestination
      DEST_TYPE ,,Type of control recipe destination
      CNTL_REC_STATUS ,,Control recipe status
      TEST_FLAG ,,Indicator: Control recipe for testpurposes
      RECIPE_TEXT ,,Short text of master recipe used in the order
      MATERIAL ,,Material for order
      MATERIAL_TEXT ,,Material description
      INSPLOT ,,Inspection lot number for order
      BATCH ,,Batch number of the material to be produced
      SCHEDULED_START_DATE,,Earliest scheduled start date of the ctrl recipe
      ,,(Date)
      SCHEDULED_START_TIME,,Earliest scheduled start time of the ctrl recipe
      ,,(Time)
      DEST_TYPE ,,3 ,,Download to ext. system, initiated by
      ,, ,,process control
      CNTL_REC_STATUS ,,00003 ,,Downloaded
      TEST_FLAG ,,X ,,Control recipe for test purposes
      ,,' ' ,,Productive control recipe
      For information on the allowed values for the other table fields, seethe ABAP Dictionary.

      Description
      In this table, the SAP system passes on the header data of the processinstructions contained in the control recipes. For more information onthe meaning of the table fields, see the documentation of thecorresponding data elements.
      Table Structure
      CNTL_REC_ID ,,Control recipe number
      PROC_INSTR_NUMBER ,,Internal process instruction number
      PROC_INSTR_TYPE ,,Type of process instruction
      PROC_INSTR_CATEGORY ,,Process instruction category
      PROC_INSTR_LINE_NO ,,Sort number of the processinstruction
      PHASE_NUMBER ,,Number of the phase containing the process
      ,,instruction

      Description
      In this table, the SAP system passes on the long texts of the processinstruction characteristics. The table only contains an entry for thosecharacteristics whose value is a long text as specified in SAPCustomizing (see IMG for Process Management,Define characteristics for process instructions).
      For more information on the meaning of the table fields, see thedocumentation of the corresponding data elements.
      Table Structure
      CNTL_REC_ID ,,Control recipe number
      PROC_INSTR_NUMBER ,,Internal process instruction number
      CHAR_LINE_NUMBER ,,Sort number of process instructioncharacteristic
      TDFORMAT ,,Format key of text line
      TDLINE ,,Text line

      Description
      In this table, you pass on the keys of the requiredcontrol recipes.

      Value range
      All control recipes that are available in the system and have statusCreated.

      Default

      Description
      In this table, the SAP system returns the messages issued during themessage call.

      Value range
      System Messages on Authorizations
      Type,,ID ,,Number,,System message
      E ,,CB1,,404 ,,No authorization to request
      ,, ,, ,,control recipes for address &2
      System Messages on Control Recipe Header
      Type,,ID ,,Number,,System message
      E ,,CB ,,082 ,,Control recipe & has already been sent
      E ,,CB1,,401 ,,Control recipe & not created in the system
      E ,,CB ,,014 ,,Control recipe & is locked
      A ,,CB ,,201 ,,Further processing not possible
      ,, ,, ,,(contact system administrator)
      System Messages on the Characteristics
      Type,,ID ,,Number,,System message
      E ,,CB1,,207 ,,Characteristic & not created in the system
      E ,,CB1,,301 ,,Error when converting value to format &1