GOODSMVT_CODE - MFBF tcode

Hi Experts;
I want to use BAPI_GOODSMVT_CREATE bapi for MFBF Tcode process.
But I dont know  assing to GOODSMVT_CODE which number for MFBF.
Which code assign to GOODSMVT_CODE?
GOODSMVT_CODE
01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
Thanks.

Hi,
I had used the following code 2 years ago. I don't remember why I have switched from '01' to '06'. It may help you:
tables lips.
Structures for GOODS MVT BAPI
  data: gm_header type bapi2017_gm_head_01,
  gm_code type bapi2017_gm_code,
  gm_headret type bapi2017_gm_head_ret,
  gm_item type table of bapi2017_gm_item_create with header line,
  gm_return type bapiret2 occurs 0 with header line,
  gm_retmtd type bapi2017_gm_head_ret-mat_doc.
  clear: gm_return, gm_retmtd.
  clear gm_item. refresh gm_item.
  refresh gm_return.
gm_code-gm_code = '01'.
  gm_code-gm_code = '06'.
  gm_header-pstng_date = sy-datum.
  gm_header-doc_date = sy-datum.
  select single bosurunkodu
    from zsdbt011
    into bosurunkodu
    where werks = bayikodu.
  if sy-subrc = 0.
    select single *
      from lips
      where vbeln = p_teslimat_no.
    gm_item-move_type  = '511'.
    gm_item-material   = bosurunkodu.
    gm_item-entry_qnt  = lips-lfimg.
    gm_item-entry_uom  = lips-meins.
    gm_item-plant    = bayikodu.
    gm_item-stge_loc   = '0001'.
    append gm_item.
  endif.
  data material_doc_message(255).
  clear gm_retmtd.
  clear gm_return.
  refresh gm_return.
  call function 'BAPI_GOODSMVT_CREATE'
    exporting
      goodsmvt_header  = gm_header
      goodsmvt_code    = gm_code
    importing
      goodsmvt_headret = gm_headret
      materialdocument = gm_retmtd
    tables
      goodsmvt_item    = gm_item
      return           = gm_return.
  if gm_retmtd is not initial.
    call function 'BAPI_TRANSACTION_COMMIT'
      exporting
        wait = 'X'.
  endif.

Similar Messages

  • BADI or Exit for MFBF Tcode

    Hi Experts,
    I need to do difference calculation in posting date and document date. I have made the code but not able to find exact BADI or exit for MFBF tcode.
    BADI i searched - RM_BFLUSH_GOODSMVT
    EXIT ???
    Please suggest, where I have to put below code so that when user put dates into this, then it will not allow him to get more than 7 days.
    data:  d_days like po347-scrdd,
         budat like mkpf-budat,
         bldat like mkpf-bldat.
    budat = rm61b-budat.
    bldat = rm61b-bldat.
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
      EXPORTING
        I_DATUM_BIS                   = budat
        I_DATUM_VON                   = bldat
       I_STGMETH                     = '2'
    IMPORTING
       E_TAGE                        = d_days
    if d_days > 7 .
      message 'date exceeds' type 'E'.
      elseif d_days < 0.
      message 'document date should be greater than posting date' type 'I'.
    endif.
    Please suggest experts,
    Thanks.
    Deepanshu

    Hi,
    Include - LBARMFS1
    FORM - FORM get_hr_data .
    Create a implicit enhancement in the beginning of above mentioned form FORM get_hr_data and put below code inside that.
    FORM get_hr_data.
    ENHANCEMENT 1 ZTEST_TEST.
    data:  d_days like po347-scrdd,
         budat like mkpf-budat,
         bldat like mkpf-bldat.
    budat = rm61b-budat.
    bldat = rm61b-bldat.
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
      EXPORTING
        I_DATUM_BIS                   = budat
        I_DATUM_VON                   = bldat
       I_STGMETH                     = '2'
    IMPORTING
       E_TAGE                        = d_days
    if d_days > 7 .
      message 'date exceeds' type 'E'.
      elseif d_days < 0.
      message 'document date should be greater than posting date' type 'I'.
    endif.
    ENDENHANCEMENT.
    BR,
    Vijay

  • Indicator to include component scrap in the details screen of MFBF tcode

    Hi ,
    There is an indicator in the 'Details' screen of MFBF transaction to "Include Component scrap".
    User has to select this indicator everytime he wants to include the component scrap or is there a way to save this setting ?
    If it is defaulted from some config settings ..please let me know where it is maintained.
    Your inputs would be highly appreciated.
    Regards,
    Sastry

    Sastry,
    You need to Implement the solution provided in OSS Notes#361630 for your requirement.
    Regards,
    Prasobh

  • Error during Production Order Confirmation mfbf ( backflush)

    in my company in sap when i using mfbf for production Order confirmation of tractor then during backflush using mfbf tcode order confirm but in my store dept no metiral cunsume  so please regards this problem
    with warm regards
    pritpal singh

    Dear Pritpal,
    sorry dear,today i cant check  my inbox immediately. Anyway my mail id is [email protected]
    have checked as per my previous post.
    regards
    pradeep

  • How to add custom fields in BADI  Subscreen.

    Hi Friends,
    I have to include some custom fields in MFBF tcode.(In make-to-order tab page).
    To do that I have used RM_HR_INTEGRATION  BADI definition  and created implementation for this. In the provided subscreen I tried to add custom fields but it asks access key . I donu2019t know , how to proceed further. Your help is needed.
    Or kindly provide me solution to achieve my requirement.
    Thanks in Advance,
    senthil.

    Hi Venky,
    We can see the documentation in
    se18 -> badi -> LE_SHP_TAB_CUST_HEAD -> display -> documentation button above the definition name
    in the first pop-up of documentation..go to the end which says 'Further notes'
    Further notes
    Documentation on BAdI Interface LE_SHP_TAB_CUST_HEAD
    click on this and we have a detailed description of each method defined in the badi
    Hope it helps
    Regards
    Byju

  • GR/GI using tcode mfbf

    Hi
    pls help
    when i do GR/GI using tcode mfbf the error msg comes: CHECK table TFBEFU_CR: entry 10 does not exist.

    Dear Saroji,
    Please check Transaction OPK9 whether a valuation variant has been Created or not if not please create it
    and also Pl refer the below Thread
    [REM BACKFLUSH;
    Your problem will be solved
    Regards
    kumar
    Edited by: kumar kumar on Jul 15, 2009 2:46 PM

  • Error message in Tcode MFBF

    Hi,
    i want to create an REM Backflush with Tcode MFBF but i have this error message : " Planned costing is not apdated "
    Please how to resolve this ?
    Regards.
    Edited by: jehade el aoumari on Feb 5, 2009 9:22 AM

    Dear Jehade,
    1.Check whether a product cost collector exists for the material for which you want to carryout an
    assembly backflush in REM.Check this in KKF6N.
    2.If there's no product cost collector create one.For creating a product cost collector you require a
    production version which is a combination of Rate Routing & BOM.
    3.Once after these steps,goto KKF6N->change mode->click on cost calculation button and save the
    data.
    4.Then check in MFBF.
    check and revert back.
    Regards
    Mangalraj.S

  • Posting Stock Transfer Order (STO) in Tcode MIGO

    Hi,
    Is there a BAPI on posting(goods receipt) STO in tcode MIGO?
    if there is a BAPI, please provide me also table mapping for the exporting and tables parameters on that BAPI.
    Thank you so much.
    james

    Hi use this BAPI,
    data : goodsmvt_header like bapi2017_gm_head_01,
          goodsmvt_code like bapi2017_gm_code,
          testrun like bapi2017_gm_gen-testrun,
          goodsmvt_item like bapi2017_gm_item_create
                              occurs 0 with header line,
          goodsmvt_serialnumber like bapi2017_gm_serialnumber
                              occurs 0 with header line,
          return like bapiret2 occurs 0 with header line,
          goodsmvt_headret like bapi2017_gm_head_ret,
          materialdocument like bapi2017_gm_head_ret-mat_doc,
          matdocumentyear  like bapi2017_gm_head_ret-doc_year,
          returncmt like bapiret2 occurs 0 with header line .
    pass header details to goodsmvt_header,
    item details to goodsmvt_item.
    goodsmvt_code-gm_code = '01'.
    ( for Goods receipt for purchase order)
            CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
                 EXPORTING
                      goodsmvt_header  = goodsmvt_header
                      goodsmvt_code    = goodsmvt_code
                 IMPORTING
                      goodsmvt_headret = goodsmvt_headret
                      materialdocument = materialdocument
                      matdocumentyear  = matdocumentyear
                 TABLES
                      goodsmvt_item    = goodsmvt_item
                      return           = return.
    IF return[] IS INITIAL.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                   EXPORTING
                        wait   = 'X'
                   IMPORTING
                        return = returncmt.
              COMMIT WORK AND WAIT.
    ENDIF.

  • Population of custom LIS tables thorugh MFBF transaction

    Hello Friends,
    I have created a custom LIS tables S728 for Shop floor control (04) and it is updated though REM Backflush (transaction MFBF). But some of the fields are not populated. Can someone help me to understand how this LIS table is populated? I am looking for piece of code where this table is populated.
    I see some includes inside main program for MFBF transaction related to LIS structures, but control does not stop there in while debugging MFBF Tran code.
    Any direction/suggestion will help.
    Thanks.
    Sujoy

    I added the following code at the beginning of the user exit and was able to prevent the execution of user exit for S031, S032 and S033 during reload of old material documents using OLI1 or OLI2.
    DATA: lv_ex_flg TYPE c.
    DATA: lfd_string TYPE string VALUE '(SAPLMCB1)XMCINF[]'.
    FIELD-SYMBOLS : <fs1> type any,
            <fs2> type any,
            <fs> TYPE table,
            <fs_wa> TYPE any.
    IF sy-tcode EQ 'OLI1' OR sy-tcode EQ 'OLI2'.
    ASSIGN (lfd_string) TO <fs>.
    IF sy-subrc EQ 0.
    LOOP AT <fs> ASSIGNING <fs_wa>.
       ASSIGN COMPONENT 'LOW' OF STRUCTURE <fs_wa> TO <fs1>.
       ASSIGN COMPONENT 'HIGH' OF STRUCTURE <fs_wa> TO <fs2>.
       IF <fs1> EQ 'S031' OR
         <fs1> EQ 'S032' OR
         <fs1> EQ 'S033'.
         lv_ex_flg = '1'.
         EXIT.
       ELSEIF <fs2> EQ 'S031' OR
              <fs2> EQ 'S032' OR
               <fs2> EQ 'S033'.
         lv_ex_flg = '1'.
         EXIT.
       ELSEIF <fs2> EQ 'S920' OR
               <fs1> EQ 'S920'.
         EXIT.
       ENDIF.
    ENDLOOP.
    ENDIF.
    ENDIF.
    CHECK lv_ex_flg NE '1'.

  • MFBF exit?

    Hello
    experts
    I have ba requirement that in tcode mfbf the user cannot post in previous day comparing with current date
    .If posting date is less than 3 days from current date posting wil not happen i have wriiten the code in the folowing exit XMRM0001 in FM  EXIT_SAPLBARM_001.
    But the problem happening that it is being restricted but when the correct date is given all the data from the screen is going.and no material ifs found.
    Please help.
    I have to deliver the project soon.

    BADi:RM_BFLUSH_GOODSMVT
    Method:MODIFY_GOODSMVT_BEFORE_DIALOG
    MODIFY_GOODSMVT_AFTER_DIALOG

  • MFBF Related

    I have 4 materials for which i am doing assembly backflush (131) but my stock is not getting updated i.e. on doing 131; qty of assembly is not getting increased but at the same time my components under it are getting consumed (261) and this is ultimately creating a variance???????? 
    Why is this so?? Please let me know the reason behind this...
    Also tell me the TCode which shows that whether we have done an assembly backflush or activity backflush or component backflush...If it exists; please tell...
    Moreover please tell me that when we do reversal for an assembly; does it reverses all activities and components or only the assembly???
    Answers shall be definitely rewarded
    Rgds

    Hi Vicky
      while carrying out MFBF have you ensured flagging "assembly Backflush"?
      check whether you are using reporting points ; if you do RP backflush then only GI and activity posting will take place and GR for assembly will not take place. only for final operation, GR will take place. so check while carrying out MFBF ensure "RP backflush is not flagged".
    check your control key assginment in Rate routing for Auto GR flagging.
    then check your REM profile assigned to the Assembly for MVT types and for GR at final reporting point flagging if you use RP.
    if all this are ok then GR should take place for sure.
    When you carry out the reversal, the full backflushing document (which acts as a bracket around all the individual documents) is flagged as reversed, along with the following data:
    The goods receipt is reversed and the accompanying material document and full backflushing document are indicated as cancelled.
    The goods issues for the components are reversed, that is, the component quantities are posted back.
    The activities are reversed.
    Depending on your settings in the repetitive manufacturing profile, the system proceeds as follows to cover the reversed quantities:
    The system either creates a planned order for the reversed quantity.
    Or, it activates a single-item planning run which creates a planned order that corresponds to the possibly changed planning situation.
    Or, the system does not create a planned order in which case the planner has to check the situation.
    The basic dates are determined for the newly created planned order.
    If you set the system to create an individual document for each backlog in the repetitive manufacturing profile, then the system deletes the corresponding individual documents and adjusts the quantity accordingly in the cumulative log document. Moreover, postprocessed backlog postings are reversed.
    The Logistics Information System is adjusted.
    In the separated backflush, the planned order is increased by the corresponding reversal quantity.
    In the separated backflush, the reversal of a goods receipt is no longer possible if the goods issue has already been carried out.
    Partial reversal with adjustment of individual components
    In some areas, for example, chemistry, it can make sense to backflush required quantities in advance, without naming specific quantities. The actual quantity used is only measured after production, using precise measuring equipment. The required quantity must be corrected afterwards.
    To do this, you can carry out a partial reversal with adjustment to individual components. In the initial screen for backflushing, choose Document-neutral reversal. The system automatically switches the movement type to the reversal movement type if you have made the corresponding settings in Customizing.
    hope this helps
    BR
    SK

  • Tcodes in PP module ?

    Hello experts ,
                       PLease  provide me some of the commonly used T codes
                      in the PP module .

    Hope you will find this informative:
    Capacity Planning     CM01     Cap. planning, work center load
         CM02     Capac. planning, work center orders
         CM03     Capac. planning, work center pool
         CM05     Capacity plan.:Work center overload
         CM07     Cap. planning: Variable access
         CM21     Capacity leveling SFC planning table
         CM22     Capacity leveling:SFC planning table
    Work Center     CR01     Create Work Center
         CR02     Change Work Center
         CR03     Display Work Center
         CR04     Test Work Center Formulas
         CR05     Work Center List
         CR06     Work Center Assignment to Cost Ctr
         CR07     Work Center Capacities
         CR08     Work Center Hierarchy
         CR60     Work center information system
    BOM     CS01     Create Material BOM
         CS02     Change Material BOM
         CS03     Display Material BOM
         CS05     Change Material BOM Group
         CS11     Display BOM Level by Level
         CS12     Multilevel BOM
         CS13     Summarized BOM
         CS14     BOM Comparison
         CS15     Single-Level Where-Used List
         CS80     Change Documents for Material BOM
         CS81     Change Documents for Standard BOM
    Inventory Activities     MM03     Material Display
         MB03     Display Material Document
         MB1A     Goods Withdrawal
         MB1B     Transfer Posting
         MB1C     Other Goods Receipts
         MB51     Material Doc. List
         MB59     Material Doc. List
         MMBE     Stock Overview
    MRP     MD01     MRP Run
         MD02     MRP - Single-item, Multi-level -
         md03     MRP-Individual Planning-Single Level
         MD04     Display Stock/Requirements Situation
         MD05     Individual Display Of MRP List
         MD06     Collective Display Of MRP List
         MD07     Current Material Overview
         MD09     Pegging
    Planned Orders     MD11     Create Planned Order
         MD12     Change Planned Order
         MD13     Display Planned Order
         MD16     Collective Display of Planned Orders
         MD21     Display Planning File Entry
         MD46     Eval. MRP lists of MRP controller
         MD4C     Multilevel Order Report
    Demand Management     MD61     Create Planned Indep. Requirements
         MD62     Change Planned Indep. Requirements
         MD63     Display Planned Indep. Requirements
         MD73     Display Total Indep. Requirements
         MD79     PP Demand Mngmt - XXL List Viewer
         MDLD     Print MRP List
    Quality Management     QA03     Display inspection lot
         QA13     Display usage decision
         QE03     Display characteristic results
         QF03     Display defect data
    Repetitive Manufacturing          
         MF52     Planning Table - Display
         MF41     Reverse Backflush Posting
         MF12     Display Document
         MF47     Post Processing of Backflush Document
         MF26     Display Reporting Point Quantity
         MF27     Update Stats for Planned Quantities
         MF41     Reverse Backflush (With ALV)
         MF42     Collective Backflush
         MF42N     New Collective Entry
         MF4R     Resetting Reporting Points
         MF50     Planning Table - Change
         MF51     Print Production Quantities (Production list for Rep. Manufacturing)
         MF52     Planning Table - Display
         MF53     Maintaining Variants-Production List
         MF57     Planning Table - By MRP Lists
         MF65     Stock Transfer for Reservation
         MF70     Aggregate Collective Backflush
         MFBF     Backflushing In Repetitive Mfg
    Routing     CA21     Create Rate Routing
         CA22     Change Rate Routing
         CA23     Display Rate Routing
         CA51     Print List
         CA80     Use of Work Center in Task Lists
    Master Recipe     C201     Create Master Recipe
         C202     Change Master Recipe
         C203     Display Master Recipe
         C223     Maintain Production Versions
         C251     Print Master Recipes
         C252     Print Production Versions
         C260     Recipe Development on Time Basis
         C261     Change Document Display Master Rec.
         C298     Delete Master Recipes
    Process Orders     CO06     Backorder Processing
         CO09     Availability Overview
         CO26     Order information system
         CO28     Choose indiv. object lists
         CO46     Order progress report
         COGI     Processing goods movemnts w. errors
         COID     Select Object Detail Lists in PP-PI
         COIO     Order Info System for PP-PI
         COPD     Print Process Order
         COPI     Print Process Order ShopFloor Papers
         COR1     Create Process Order
         COR2     Change Process Order
         COR3     Display Process Order
         COR7     Convert Planned Order to Proc. Order
         COR8     Coll.Conv.: Plnned Ord. to Proc.Ord.
         CORK     Process Order Confirmations (Total)
         CORS     Cancel Process Order Confirmation
         CORT     Display Process Order Confirmation
         COOIS     Production Order Information System
         COOISPI     Process Order Information System
         CO24     MissingPartsInfoSyst
         MB52     List of Warehouse Stocks on Hand
         MDUM     Convert Planned Orders into PReqs
         LX02     Stock list
         LX03     Bin Status Report
    Resource     CRC1     Create Resource
         CRC2     Change Resource
         CRC3     Display Resource
         MB21     Create Reservation
         MB22     Change Reservation
         MB23     Display Reservation
         MB24     Reservation List
         MB25     Reservation List
         MB56     Analyze batch where-used list
         MB57     Compile Batch Where-Used List
         MC74     Transfer Mat. to Demand Management
         MC75     Transfer PG to Demand Management
         MC78     Copy SOP Version
         MC80     Delete and activate versions
         MC81     Sales and Operations Planning
         MC82     Sales and Operations Planning
         MC83     Sales and Operations Planning
         MC84     Create Product Group
         MC85     Display Product Group
         MC86     Change Product Groups
         MD14     Individual Conversion of Plnned Ord.
         MD15     Collective Conversion Of Plnd Ordrs.
         MD47     Product Group Planning Evaluation
    Batch Management     MSC1N     Create Batch
         MSC2N     Change Batch
         MSC3     Display Batch
         MSC3N     Display Batch
         MSC4     Display Batch Changes
         ZMIS     Material Requisition Issue Slip
         ZMRP     Material Requirement Planning Report
         ZPPCOR2     Process Order Release - Batch Number
         ZQI002     TCod for Inspec. Resu.
         ZQI003     Report to see Quality Report(03)

  • Open and close posting period authorization control TCODE: S_ALR_87003642

    HI All,
    Is there any chance to control the user to open and close another company code posting period variant in TCODE: S_ALR_87003642.
    In our system we are using the same client for different countries. So user can able to change the other country company code posting periods.
    We would like to control either on the country (or) organizational unit(company code) (or) posting period variant so that user can only open/close  their country / company code posting periods.
    Our present authorization role for open and close posting period contain the auth.Obj. : S_TABU_DIS.
    Please share your knowledge if you come across this problem..
    Thanks in advance..

    Hey Sandhya,
    Congratz, this can be done using linbe item authorization with the object S_TABU_LIN.
    Field ORG_CRIT - Value 02
    Field ORG_FIeld1 - Value ZT001B
    We have successfully done it in our client.
    You need to contact your BASIS consultant for this.
    Thanks,
    Nitish

  • Closing Stock on Particular Date(MB5B Tcode)

    Hi Experts,
    I need closing stock as on some particular date. For e.g. closing stock as on 28.02.2014.
    In my requirement i have to use that closing stock value for further calculations in a new customized report.I can see closing stock value by using MB5B tcode.
    Please suggest some way to get closing stock as on some date so that i can use that in my Report.
    Can i directly call MB5B transaction in my Report and get closing stock value?
    Thanks & Regards,
    Pankaj

    Hello Pankaj,
    In your Customised Report use MKPF and MSEG table
    MKPF ----->  Material and date range as the input
    Then Pass Material document number from MKPF to MSEG table
    MSEG ----->  based on material document number from mkpf
    Create Temporary  variable
    values comes from the mseg where have credit and debit entries
    if debit entry "S" then subtract the values of the Mseg table from the temporary variable1
    if credit entry "H" then Add the values of the mseg table to the temporary variable2
    finally Add the temporary variable1 and temporary variable 2 and get the total stock.

  • Error while creating stock using tcode: MB1C

    Error while creating stock using tcode: MB1C
    The Error is: Check table T004F:entry G006 does not exist

    Hi ,
    Please check the FSV (field status variant) for your company code in OBY6 .
    then go to transaction code OB14 --> enter the FSV --> Check if field status group G006(Material account) is maintained there or not.
    if not please maintain it.
    Thanks & Regards
    Anshu

Maybe you are looking for