SAP Function Modules

RM_BACKFLUSH_CHECK_AO SAP Function module - Input Check: Confirmations Planned Order - Assembly Order







RM_BACKFLUSH_CHECK_AO is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RM_BACKFLUSH_CHECK_AO into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BARM
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RM_BACKFLUSH_CHECK_AO - RM BACKFLUSH CHECK AO





CALL FUNCTION 'RM_BACKFLUSH_CHECK_AO' "Input Check: Confirmations Planned Order - Assembly Order
  EXPORTING
*   ext_commit = SPACE          " cm61q-camod   If 'X', Commit to be triggered outside function module
    im61b =                     " rm61b         Dynpro 100 Fields: Input Information
*   mode = 'B'                  " cm61q-camod   B for confirmation, N for postpr. conf., Z for reporting point confirmation
*   no_dialog = SPACE           " rm61f-selekt  If 'X', function module does not run in dialog mode
*   lock_flag = 'X'             " rm61f-selekt  If 'X', run schedule header locked
*   reptp = '02'                " t437x-reptp   REM activity cat.: 01 REM planning 02 assembly order, 03 kanban
*   tcode = SPACE               " sy-tcode      Transaction code for goods movement inspection
*   mdakt = SPACE               " t450-mdakt    Activity Category Authorization Check
*   iplaf =                     " plaf          Planned order already read
*   imatnr =                    " cm61k-matnr   Material Number in Case of Component Confirmations
*   commit_wait = SPACE         " cm61q-camod   COMMIT WORK AND WAIT active
*   iposid = SPACE              " prps-posid    Work Breakdown Structure Element (WBS Element)
*   hubackfl = SPACE            " vhurm_hubackfl  Indicator for HU Backflush
*   bapi_call = SPACE           " c             Indicator for Invocation per BAPI
  IMPORTING
    em61b =                     " rm61b         Dynpro 100 Fields: Additionally-Read Data
    emaktx =                    " cm61k-maktx
    part_canc =                 " rm61f-selekt  Partial Cancellation
* TABLES
*   sernrx =                    " e1rmsno       Serial numbers (IM61B-ERFMG = number of entries)
*   t_venumlist =               " vhurm_t_compl_venum
*   t_cowb_comp =               " cowb_comp     Interface Structure of Goods Movement
*   t_clbatch =                 " clbatch_t     Batch Characteristics
  EXCEPTIONS
    ALORT_NOT_FOUND = 1         "               Storage location not entered or does not exist in MT61D
    INVALID_AUART = 2           "               Invalid order type in repetitive manufacturing profile
    INVALID_POSTING_DATE = 3    "               Invalid posting date
    INVALID_TABLE_ENTRY = 4     "               Invalid table entry
    LOCK_ERROR = 5              "               Locking Error
    MATERIAL_IN_PLANT_NOT_FOUND = 6  "          Material does not exist in plant
    NO_BACKFLUSH_AUTHORITY = 7  "               No authorization for backflush
    PLAF_NOT_FOUND = 8          "               Planned order does not exist
    QUANTITY_REQUIRED = 9       "               Entry quantity and scrap quantity not entered
    REASON_WITHOUT_SCRAP = 10   "               Scrap reason without scrap quantity
    TABLE_ACCESS_ERROR = 11     "               Error accessing a table
    UNIT_CONVERSION_ERROR = 12  "               Error converting creation unit of entry
    QUANTITY_ERROR = 13         "               Error entering quantities
    WRONG_UNIT_OF_MEASURE = 14  "               Wrong unit of measure
    SPECIAL_STOCK_NOT_FOUND = 15  "             Error reading special stock
    AUFPL_FIND_ERROR = 16       "               Error determining plan number for operations/orders
    ASSY_ORDER_LOCKED = 17      "               Assembly order blocked
    PLAF_NOT_UNIQUE = 18        "               Planned order selection not unique
    PLAF_ERROR = 19             "               Error processing a planned order
    OT_ERROR = 20               "               Other check error
    VERID_NOT_FOUND = 21        "
    PRODLOT_ERROR = 22          "
    NO_SALES_ORDER = 23         "
    FIND_ROUTING_ERROR = 24     "
    ME_DISTRIBUTE_ERROR = 25    "
    .  "  RM_BACKFLUSH_CHECK_AO

ABAP code example for Function Module RM_BACKFLUSH_CHECK_AO





The ABAP code below is a full code listing to execute function module RM_BACKFLUSH_CHECK_AO including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_em61b  TYPE RM61B ,
ld_emaktx  TYPE CM61K-MAKTX ,
ld_part_canc  TYPE RM61F-SELEKT ,
it_sernrx  TYPE STANDARD TABLE OF E1RMSNO,"TABLES PARAM
wa_sernrx  LIKE LINE OF it_sernrx ,
it_t_venumlist  TYPE STANDARD TABLE OF VHURM_T_COMPL_VENUM,"TABLES PARAM
wa_t_venumlist  LIKE LINE OF it_t_venumlist ,
it_t_cowb_comp  TYPE STANDARD TABLE OF COWB_COMP,"TABLES PARAM
wa_t_cowb_comp  LIKE LINE OF it_t_cowb_comp ,
it_t_clbatch  TYPE STANDARD TABLE OF CLBATCH_T,"TABLES PARAM
wa_t_clbatch  LIKE LINE OF it_t_clbatch .


DATA(ld_ext_commit) = some text here
DATA(ld_im61b) = 'Check type of data required'.

DATA(ld_mode) = some text here

DATA(ld_no_dialog) = some text here

DATA(ld_lock_flag) = some text here

SELECT single REPTP
FROM T437X
INTO @DATA(ld_reptp).

DATA(ld_tcode) = 'some text here'.

SELECT single MDAKT
FROM T450
INTO @DATA(ld_mdakt).

DATA(ld_iplaf) = 'some text here'.

DATA(ld_imatnr) = some text here

DATA(ld_commit_wait) = some text here

SELECT single POSID
FROM PRPS
INTO @DATA(ld_iposid).

DATA(ld_hubackfl) = 'some text here'.
DATA(ld_bapi_call) = 'some text here'.

"populate fields of struture and append to itab
append wa_sernrx to it_sernrx.

"populate fields of struture and append to itab
append wa_t_venumlist to it_t_venumlist.

"populate fields of struture and append to itab
append wa_t_cowb_comp to it_t_cowb_comp.

"populate fields of struture and append to itab
append wa_t_clbatch to it_t_clbatch. . CALL FUNCTION 'RM_BACKFLUSH_CHECK_AO' EXPORTING * ext_commit = ld_ext_commit im61b = ld_im61b * mode = ld_mode * no_dialog = ld_no_dialog * lock_flag = ld_lock_flag * reptp = ld_reptp * tcode = ld_tcode * mdakt = ld_mdakt * iplaf = ld_iplaf * imatnr = ld_imatnr * commit_wait = ld_commit_wait * iposid = ld_iposid * hubackfl = ld_hubackfl * bapi_call = ld_bapi_call IMPORTING em61b = ld_em61b emaktx = ld_emaktx part_canc = ld_part_canc * TABLES * sernrx = it_sernrx * t_venumlist = it_t_venumlist * t_cowb_comp = it_t_cowb_comp * t_clbatch = it_t_clbatch EXCEPTIONS ALORT_NOT_FOUND = 1 INVALID_AUART = 2 INVALID_POSTING_DATE = 3 INVALID_TABLE_ENTRY = 4 LOCK_ERROR = 5 MATERIAL_IN_PLANT_NOT_FOUND = 6 NO_BACKFLUSH_AUTHORITY = 7 PLAF_NOT_FOUND = 8 QUANTITY_REQUIRED = 9 REASON_WITHOUT_SCRAP = 10 TABLE_ACCESS_ERROR = 11 UNIT_CONVERSION_ERROR = 12 QUANTITY_ERROR = 13 WRONG_UNIT_OF_MEASURE = 14 SPECIAL_STOCK_NOT_FOUND = 15 AUFPL_FIND_ERROR = 16 ASSY_ORDER_LOCKED = 17 PLAF_NOT_UNIQUE = 18 PLAF_ERROR = 19 OT_ERROR = 20 VERID_NOT_FOUND = 21 PRODLOT_ERROR = 22 NO_SALES_ORDER = 23 FIND_ROUTING_ERROR = 24 ME_DISTRIBUTE_ERROR = 25 . " RM_BACKFLUSH_CHECK_AO
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 14. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 15. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 16. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 17. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 18. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 19. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 20. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 21. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 22. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 23. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 24. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 25. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_em61b  TYPE RM61B ,
ld_ext_commit  TYPE CM61Q-CAMOD ,
it_sernrx  TYPE STANDARD TABLE OF E1RMSNO ,
wa_sernrx  LIKE LINE OF it_sernrx,
it_t_venumlist  TYPE STANDARD TABLE OF VHURM_T_COMPL_VENUM ,
wa_t_venumlist  LIKE LINE OF it_t_venumlist,
ld_emaktx  TYPE CM61K-MAKTX ,
ld_im61b  TYPE RM61B ,
ld_part_canc  TYPE RM61F-SELEKT ,
it_t_cowb_comp  TYPE STANDARD TABLE OF COWB_COMP ,
wa_t_cowb_comp  LIKE LINE OF it_t_cowb_comp,
ld_mode  TYPE CM61Q-CAMOD ,
ld_no_dialog  TYPE RM61F-SELEKT ,
it_t_clbatch  TYPE STANDARD TABLE OF CLBATCH_T ,
wa_t_clbatch  LIKE LINE OF it_t_clbatch,
ld_lock_flag  TYPE RM61F-SELEKT ,
ld_reptp  TYPE T437X-REPTP ,
ld_tcode  TYPE SY-TCODE ,
ld_mdakt  TYPE T450-MDAKT ,
ld_iplaf  TYPE PLAF ,
ld_imatnr  TYPE CM61K-MATNR ,
ld_commit_wait  TYPE CM61Q-CAMOD ,
ld_iposid  TYPE PRPS-POSID ,
ld_hubackfl  TYPE VHURM_HUBACKFL ,
ld_bapi_call  TYPE C .


ld_ext_commit = some text here

"populate fields of struture and append to itab
append wa_sernrx to it_sernrx.

"populate fields of struture and append to itab
append wa_t_venumlist to it_t_venumlist.
ld_im61b = 'some text here'.

"populate fields of struture and append to itab
append wa_t_cowb_comp to it_t_cowb_comp.

ld_mode = some text here

ld_no_dialog = some text here

"populate fields of struture and append to itab
append wa_t_clbatch to it_t_clbatch.

ld_lock_flag = some text here

SELECT single REPTP
FROM T437X
INTO ld_reptp.

ld_tcode = 'some text here'.

SELECT single MDAKT
FROM T450
INTO ld_mdakt.

ld_iplaf = 'some text here'.

ld_imatnr = some text here

ld_commit_wait = some text here

SELECT single POSID
FROM PRPS
INTO ld_iposid.

ld_hubackfl = 'some text here'.
ld_bapi_call = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RM_BACKFLUSH_CHECK_AO or its description.