Transfer posting inside GR

Hi all,
My requirement is to do a Transfer posting for the POs which is of direct delivery while doing a GR.
To be clear, whenever a user goes and does a GR I am checking for the PO in my custom table and if it is marked as direct delivery then I have to do a Transfer posting(MIGO_TR / MB1B) for the corresponding material details.
The problem is I am using BADI MB_DOCUMENT_BADI to capture the PO number and do the TR process.
But it happens to be a dump as because in both GR and TR the same process is being followed and so the BADI will be called again when we do the TR without commiting the GR process.
So is there any way out?

1) Create One separate program  to do TR using BDC or BAPI.
2) In your BADI EXPORT PO Number to Memory Area.
    and then  call function Module.
call function 'JOB_SUBMIT'
  exporting
    authcknam               = sy-uname
    jobcount                = l_jobcount
    jobname                 = im_jobname
    report                  =  im_report (That is Program for TR)
    priparams               = im_pripar
  exceptions
    bad_priparams           = 1
    bad_xpgflags            = 2
    invalid_jobdata         = 3
    jobname_missing         = 4
    job_notex               = 5
    job_submit_failed       = 6
    lock_failed             = 7
    program_missing         = 8
    prog_abap_and_extpg_set = 9
    others                  = 10.
3) Now as your job submitted means your program schedule in background first call  WAIT statement  so your GR get time to commit  and then it will do TR through BDC or BAPI.

Similar Messages

  • Create a subsequent Goods Movement for a transfer posting

    Hi Team,
    I have a scenario where the users will create a Good Movement document for transfer posting. The Stock of Material "A" is transferred to stock of Material "B" using the movement types 561 etc. Now the quantity is reduced from unrestricted stock of "A" and posted to "Stock in Transfer/Transit" of "B". The requirement is to create another Goods Movement document immediately after the above transfer posting is completed and use movement type 101 to post the same quantity to unrestricted of "B".
    I tried searching for use exits and could not find a relevant one "After Save" for goods movement online transaction. I found the MB_GOODS_MOVEMENT_UPDATE Badi but don't know how to create another goods movement document while in the update task. I'm concerned that if I call a BAPI or BDC inside the update task, it might conflict with the current transaction (transfer posting). Looking for your guidance.

    Hi Deepali,
    You can use the userexit ' ZXMCBU02 '  to write your own code. This user exit gets triggered for almost all the goods movement transaction.
    There is also a very similar BADI which you can use which gets triggered for every goods movement transaction.
    I would like to know the BADI feel free to let me know. I think the above user exit should server your purpose.
    Hope this is useful for you.
    Cheers
    VJ

  • Transfer Posting MB1B with MvT 311

    Dear experts,
    I have 1 issue. For example, to do transfer posting from Sloc '1201' to Sloc '10F1' and '10F1' is in WM. With movement '311' , a transfer requirement is automatically created, followed by a transfer order creation screen.
    I have automate all these process using 'BAPI_GOODSMVT_CREATE', 'L_TO_CREATE_TR' & 'L_TO_CONFIRM'. And it works fine.
    My question is, physically the user is actually do the stock placement first to the storage bin then only they create a transfer posting. At the point of stock placement, the end user do not know the storage location to move stock. If I automate this process to create TO first then only do transfer posting, is it a correct way? I want to use FM 'L_TO_CREATE_SINGLE' & 'L_TO_CONFIRM'. Please advise.
    Thank you.

    Hello Hasniza,
    Yes you could use this function modules:
    L_TO_CREATE_SINGLE                                                       
    Create a transfer order with one item                                                                               
    L_TO_CREATE_MOVE_SU                                                      
    Create a transfer order to move a storage unit                                                                               
    L_TO_CREATE_TR                                                           
    Create a transfer order for a transfer requirement                                                                               
    L_TO_CONFIRM                                                             
    Confirm a transfer order                                                
    Please check the following link:
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/c6/f83a294afa11d182b90000e829fbfe/frameset.htm
    You could do that by using the user exit EXIT_SAPLL03T_002 not directly via function module.
    Please also pay attention to the documentation of enhancement MWMTO002: 
    "... Therefore, you must never start a transfer order creation via a function module."                                                       
    But you call FM L_TO_CREATE_SINGLE inside of this exit.   
    I hope it helps you.
    Regards,
    Fábio Almeida
    MM Consultant

  • When Transfer Posting

    Hello!
    Hope someone will help me on this one!
    What is the price that transfer posting is using?
    MAP or standard price?
    thanks!

    hello nancy,
    What is VMI stock, again i am repeating the same MAP or STANDARD price will be considered via pricing control, usally RAW material will be considered as MAP and finished will be STANDARD price.
            I hope you are checking for RAW material which you have raised a PO and doing GR, during the GR MAP can differ according to the price of po.
    For example: you have a material A in the stock 1 quantity pice MAP as 10 USD, now you get from a vendor and price has gone up to 12 USD, when you do GR stock goes up and MAP will be 11 usd per peice i.e. ((110)(1*12)) / 2.
                  So transfer posting is nothing you move from one place to another place inside your company, so 411 is for storage location to another inside the plant so it will take 11 USD if you have done GR or 10 USD before GR. Hope you understand this else get from your MM consultant.
    regards,
    Prabhu
    Reward if it is helpful
    Edited by: prabhu jayaraman on Mar 10, 2008 8:08 AM

  • Transfer Posting for Line Items between Reconciliation Account

    HI,
    My customer want to transfer costing the line items between a old Reconciliation Account and a New Reconciliaton Account.
    For example, i have a Account Group Vendor with a old Reconciliation Account " Vendor CEE".
    This reconciliation account has the line items concern differents Vendors.
    Edit a new Account Group calling ( CEE) to replace a Old Account Group.
    After changing in Vendor Master data the Reconciliation account, we need to transfer posting the line items in the new account reconciliation
    In Sap system is there a report can do it? Can you help me?
    Regards

    Hi,
    Thank you for the answer.
    I did that, and exactly:
    - In Trx Obbw insert the reconciliation account and Adjustement account.
    - and execute the trx FAGLF101 in test but the sap system give me the following error:
      " Account determination for transaction A00 is missing for account 0205016001 ZM P001 "
       Message no. FR005
    Can you help me?
    Regards
    Edited by: Marika De Cesare on Oct 18, 2011 1:06 PM

  • Cost transfer posting within Training and event management

    Dear experts!
    Now, I'm getting some issues about transfer posting in Training and event management.
    - The first, I create business event.
    - Second, I posted cost of business event to CO.
    when I posted to CO, I only want to give cost of business event to one cost center. But the system require I have two cost center:
              + Sender cost center
              + Receive cost center.
    Really, I want to post cost of business event to Receive cost center.
    How do I have to do?
    Help me, Please!
    Best regards, Huy

    Hi huy daongoc ,
    you need to find out from the FICO guys. 
    If the sender cost center and the receiver cost center is same.  then give both records.  They will help you out.
    I think Sender cost center means the cost center under which the training is organised.
    Receiving cost center means the persons who are all receiving the training, those persons cost center.
    Regards
    Venu Gopal

  • Miss value FI Posting on Sales Order Transfer Posting movement Type 413 E

    Dear Expertise
                   I've a problem about sales order transfer posting. My both of Sales order (Source & Destination) are make to order and open with configurable material(KMAT). Both of sales order contain only one item on the same material no.
    Assume scenario material vastr
    Assume that material vastr is configurable material wait for sales order to fill characteristic and it was maintained standard price value = 1100
                    Sales order A  has plan cost  on material  VASTR  1000
                    Sales order B has plan cost material VASTR 980
    When we make a sales order transfer posting(Transfer from Sales Order A-> B) by transaction MIGO_TR by use movement type 413 E. It can post a transfer complete. But my problem is when I trace to FI-Document
                    It was post like this
                    Dr. Standard price                         1100
                    Cr. price for Sales order A(src.)  1000
                    Cr. Cost Variance                          +100
    I don't want it to offset with standarad price value. I want it to do like this
                    Dr. price for Sales order B(Des.)   980
                    Cr. price for Sales order A(src.)  1000
                    Dr. Cost Variance                           +20
    How can I configure it?   I trial to clear standard price by MR21, System can do it . But I don't want to clear it because it impact to other. I want to know. How can I configure system to take both of plan cost of sales order to offset each other please.
    Edited by: Gareth John on Aug 16, 2010 2:23 PM
    Edited by: Gareth John on Aug 16, 2010 2:42 PM
    Edited by: Gareth John on Aug 16, 2010 2:42 PM

    Hi,
    411- E- sales order to own stock
    412-E- Reversal of 411 E
    & 413-E-Sales order to sales order.
    Regards,
    Piyush

  • Transfer posting from one GL account to another

    Hi,
    For a GL account which is not open item managed, now have to check the "open item management".
    since it has the amount, so i can not do it.
    But i read the following help message.
    If you want to switch this function on retroactively for a certain account, you should create a new account with the correct setting and use this to make a transfer posting of existing items.
    so, after creating a new GL account with correct settings. How to Transfer the posting of the Existing items?
    Thanks in advance,
    Swetha

    Hi all,
    i posted a document in F-02 by debiting the new GL account and crediting the old account.
    now, the balance of the old account is Zero.
    but still can not save it by checking the " open item management" because it says as below.
    "Account balance = 0 but open items exist in the account
    The data contains error, you cannot save"
    so, by making zero also we can not change the that Chcek box.
    and another option you all suggested is transfer of the posting to new Gl account.
    since the old account is not open item managed, so i can not follow this option also.
    and one more, have to come across this kind of issue?
    then how did you solve it.
    Please share your finding.
    Regards,
    Swetha

  • Transfer posting (OASV) issue for the existing Intangible Assets

    Hi SAP Experts,
    In our system the APC and Acc. Dep. for ord. dep. has maintained the same G/L Account (A090) so due to this in Fin. Statement it shows the Net Book Value. Now, our client wants to migrate to IFRS, as per this it has to show like ( Intangible Assets - Acc. amortization - Acc. Impairment Loss).  Now, I have created new account i.e. 'Accumulated Amortization for Intangible Assets A/c and removed the old G/L A/c (the one which is same for both APC and Acc. Dep.). Now, the old G/L has the APC and Acc. Dep. values so I need to transfer the Acc. Dep. from old G/L to New G/L A/c by using OASV (Transfer posting).
    If I make the transfer posting like (the both G/L Accounts are Recon. A/cs)*
          Debit Old G/L A/c    - xx,xx,xxx
          Credit New G/L A/c - xx,xx,xxx
    Is it any impact on the values (Intangible Assets) Dep. Area wise? Since, APC and Acc. Dep. already posted to old A/c up to this point of time. Another doubt is, while posting the above entry shall I need to switch off (Reset) Recon. A/c for this Intangible Assets? OR without Reset Recon. A/c can I post this transfer posting? Is this correct procedure or other than this is there any other alternative?
    we have 9 Dep. Areas out of which 3 Dep. Areas have posting indicator as '1'. In that out of 3 Dep. Areas one Dep.  Area namely 'Impairment Loss' is there but there are no positings till now. After config. change it should allow ABIF tr. that we completed already.
    Could anyone explain why this 'Investment Support' Dep. Area (Impairment Loss) doesn't allow APC values by default?
    Thanks in advance.
    Best Regards,
    Sri.

    Hi Sri,
    Let me clarify your points individually.
    1) From system the prospective, it does not make any diff in functionality for a tangable asset or an intangable asset.
    2) Add the new GL account in the respective account dtermination as a balance sheet account for accum dep. (while adding, the GL account should be as recon account)
    3) Please switch off the recon account indicator in the both GL accounts with OAMK.
    For Ex: Lets say you have already posted APC  value 10000 Dr and Accum dep 2000 Cr to the old GL account, so the net book value will be 8000 Dr.
    In this case Please find out the total value of line items (2000 Cr as per the above example) for accum dep, that was already posted to the old GL account.
    4) Post a journal voucher through F-02 like
                                                      Old G/L A/c Dr - 2000
                                                                    New G/L A/c Cr - 2000
    So after passing this entry you will find account balance as 8000 Dr in old GL account and 2000 Cr in new GL account.
    5) after passing the above entry you need to switch on the recon account for both the GL accounts
    Hope this will help.
    Thanks,
    Srinu

  • Asset Transfer posting ABT1N

    hI,
    while working with transaction ABT1N Asset transfer posting from existing (comp code) asset to new (comp code) asset with
    Document, posting, asset value date -> this will be the same date 1.1.2011,
    system gives error message" You cannot post to asset in company code 'abcd' fiscal year 2011.
    After that
    I changed the Document, posting, asset value date -> this will be the same date 20.11.2011, system gives error message "
    Account 20900000 does not exist in company code 'abcd'.
    Please resolve the issue both the scenarios.
    Thanks,
    Sahara.

    please search.  the "account does not exist" error has been dealt with previously.

  • Transfer posting Quality to Quality within plant ..mov type 323...

    Hi All,
               I am not able to process Transfer posting Quality to Quality within plant with mov type 323 through MIGO transaction.
    Error : Change the inspection stock of material 936317 in QM only.(Change the inspection stock of material 936317 in QM only
    Message no. QA495
    Diagnosis
    You want to make a stock posting to/from the inspection stock. This is not allowed for material 936317 because the quality inspection control has been activated by QM.
    The following cases can occur:
    The inspection stock should be increased, although an inspection is not foreseen for the current goods movement
    The inspection stock should be released, although  you can only do this using the QM transactions.
    System response
    You cannot carry out the stock posting.
    Procedure
    Check both the QM inspection setup data and the movement type for material 936317 in the quality management view of the material master.
    Exception:
    If you post a return delivery to a vendor with reference to a purchase order, or cancel a goods receipt, the stock indicator from the order is proposed.
    Check and modify this proposal as required.
    The stock may have been transferred already and is therefore no longer in inspection stock.
    Kindly help me to resolve the issue.

    Hi,
    Please check the stock of  material 936317  in MMBE , One lot will be in Quality Inspection.
    Clear the lot to unrestricted lot
    try now you will be able to do  Transfer posting Quality to Quality within plant ..mov type 323
    G.Ganesh Kumar

  • BAPI_GOODSMVT_CREATE error - Duplicate Transfer Posting

    Hello,
    I'm using BAPI_GOODSMVT_CREATE for transfer posting with GM Code 04 and Movement Type 311.
    But the posted material document is incorrect. Instead of 2 lines only, the line items becomes 4.
    Could anyone please help me?
    Thanks in advance!

    Hi Gold Yap,
          I have done the Transfer posting by using BAPI_GOODSMVT_CREATE.
         Below i added my sample code. Please go through.
    Report XYZ.
    TABLES : mslb , mchb .
    DATA : BEGIN OF i_stock OCCURS 0 ,
           matnr LIKE mslb-matnr ,
           werks LIKE mslb-werks ,
           charg LIKE mslb-charg ,
           sobkz LIKE mslb-sobkz,
           lifnr LIKE mslb-lifnr ,
           lblab LIKE mslb-lblab ,
           END OF i_stock .
    DATA : BEGIN OF i_batch OCCURS 0 ,
           matnr LIKE mchb-matnr ,
           werks LIKE mchb-werks ,
           lgort LIKE mchb-lgort ,
           charg LIKE mchb-charg ,
           clabs LIKE mchb-clabs ,
           END OF i_batch .
    DATA: BEGIN OF it_mess OCCURS 10,
          charg LIKE mslb-charg ,
          lgort LIKE mchb-lgort,
          lifnr LIKE mslb-lifnr,
          err LIKE bapiret2-message,
          flag,
          END OF it_mess.
    DATA match.
    DATA :  header LIKE bapi2017_gm_head_01 . "OCCURS 0 WITH HEADER LINE .
    DATA :  code LIKE bapi2017_gm_code .  " OCCURS 0 WITH HEADER LINE .
    DATA :  item LIKE bapi2017_gm_item_create OCCURS 0 WITH HEADER LINE.
    DATA : i_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE .
    DATA : matdoc LIKE bapi2017_gm_head_ret .
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
    SELECT-OPTIONS : s_matnr FOR mslb-matnr .
    PARAMETERS : p_werks LIKE mslb-werks DEFAULT 'TPFB' .
    SELECTION-SCREEN END OF BLOCK b1 .
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN .
        IF screen-name = 'P_WERKS' .
          screen-input = '0' .
          MODIFY SCREEN .
          CLEAR screen .
        ENDIF.
      ENDLOOP .
    START-OF-SELECTION .
      CLEAR: i_stock[],i_stock.
      CLEAR: it_mess[],it_mess.
      CLEAR: i_batch[],i_batch.
      SELECT matnr werks charg sobkz lifnr  lblab
      FROM mslb INTO TABLE i_stock
      WHERE matnr IN s_matnr
        AND werks = p_werks.
      DELETE i_stock WHERE sobkz <> 'O'.
      DELETE i_stock WHERE lblab <= '0.000'.
      IF i_stock[] IS INITIAL .
        MESSAGE 'NO Data Available In MSLB Table' TYPE 'S' .
      ELSE.
        DELETE i_stock WHERE charg = 'COMMON' .
        IF i_stock[] IS INITIAL .
          MESSAGE 'Already Transfer Posting to Common Batch' TYPE 'S' .
        ENDIF.
      ENDIF .
      SELECT matnr werks lgort charg clabs
      FROM mchb
      INTO TABLE i_batch
      WHERE matnr IN s_matnr
        AND werks = p_werks .
      DELETE i_batch WHERE clabs <= '0.000'.
      IF i_batch[] IS INITIAL .
        MESSAGE 'NO Data Available In MCHB Table' TYPE 'S' .
      ELSE .
        DELETE i_batch WHERE charg = 'COMMON' .
        IF i_batch[] IS INITIAL .
          MESSAGE 'Already Transfer Posting to Common Batch' TYPE 'S' .
        ENDIF.
      ENDIF .
      CLEAR : header,code,matdoc  .
      header-pstng_date  = sy-datum.
      header-doc_date    = sy-datum.
      header-pr_uname    = sy-uname.
      header-header_txt  = 'Transfer Posting'.
      code-gm_code       = '04'.
      SORT i_batch BY matnr werks charg.
      LOOP AT i_batch.
        CLEAR: item[],item.
        item-material        = i_batch-matnr.
        item-plant           =  i_batch-werks.
        item-batch           = i_batch-charg.
        item-entry_qnt       =  i_batch-clabs .
        item-stge_loc        = i_batch-lgort .
        item-move_type       = '309'.
        item-move_batch = 'COMMON'.
        APPEND item .
        CLEAR item .
        match = 'X'.
        PERFORM bapi_run USING match.
      ENDLOOP.
      LOOP AT i_stock .
        CLEAR: item[],item.
        item-material        = i_stock-matnr.
        item-plant           =  i_stock-werks.
        item-batch           = i_stock-charg.
        item-vendor          =  i_stock-lifnr .
        item-entry_qnt       =  i_stock-lblab .
        item-move_type       = '309'.
        item-spec_stock      =  'O'.
        item-move_batch = 'COMMON'.
        APPEND item .
        CLEAR item .
        match = 'Y'.
        PERFORM bapi_run USING match.
      ENDLOOP.
      IF i_stock[] IS NOT INITIAL OR i_batch[] IS NOT INITIAL .
        IF it_mess[] IS INITIAL.
          MESSAGE 'Transfer Posted Successfully' TYPE 'S' .
        ELSE.
          SORT it_mess BY charg err.
          WRITE:/2 'Batch',11'Location',20'Vendor'.
          LOOP AT it_mess.
            AT NEW charg.
              SKIP.
            ENDAT.
            IF it_mess-flag = 'X'.
              WRITE: /2 it_mess-charg COLOR 6, it_mess-lgort COLOR 3
                     INTENSIFIED OFF,it_mess-lifnr COLOR 2 INTENSIFIED OFF.
            ENDIF.
            WRITE: /10 it_mess-err.
          ENDLOOP.
        ENDIF.
      ENDIF .
    *&      Form  bapi_run
          text
    -->  p1        text
    <--  p2        text
    FORM bapi_run USING match .
      CLEAR: i_return[],i_return.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header = header
          goodsmvt_code   = code
        TABLES
          goodsmvt_item   = item
          return          = i_return.
      IF i_return[] IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
      ELSEIF i_return[] IS NOT INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        LOOP AT i_return WHERE type = 'E'.
          it_mess-charg = i_stock-charg.
          IF match = 'X'.
            it_mess-lgort = i_batch-lgort.
          ELSEIF match = 'Y'.
            it_mess-lifnr = i_stock-lifnr.
          ENDIF.
          it_mess-err   = i_return-message.
          IF sy-tabix = 1.
            it_mess-flag = 'X'.
          ENDIF.
          APPEND it_mess.
          CLEAR  it_mess.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " bapi_run
    Regards,
    S.C.K

  • Getting serial number box while transfer post in MB1A but not while doing MIGO

    Hi Team
    I am getting serial number box while transfer post in MB1A.
    But getting below error under serial number tab while doing GR through MIGO of outbound delivery.
    Issuing plant and receiving plant, material, batch, qty are same in both cases.
    How can I get serial number box when doing GR? Does any customizing changes needed?
    Br, Kiran U

    Movement type is different for those two screen shots, also you are saying you are using MB1A, but you are using 301 movement type. Generally 301 movement type is not allowed from MB1A t-code.
    Please check these SAP notes if relevant for your case.
    856548 - MIGO: you cannot enter serial numbers
    856662 - T156Q: Missing entries

  • Transfer posting of subcontracting stock with mvt type 541 from project stk

    Hi,
    we run project MRP and the requirement is raised for subcontracting item also ,after converting the PR into PO when I try to transfer post material in MB1B using 541 ,system shows Error Purchase order does not contain any item even I have  material in my project stock,what may be the reason?
    Regards
    Kantha

    Hello Kantha,
    The components which you provide for a vendor are manged in a vendor-related special stock, O. This stock is updated at plant level, becuase material is actually not in your plant. If you want to provide stock to vendor the avialble stock types in subcontracting are from un restricted use and in quality inspection.
    When you provide componets to vendor via transfer posting this needs to go from only unrestricted use stock to the stock of material provide to vendor movement type is 541.
    So to execute the transfer posting for the stock of material provided to the vendor, you have to specify special indicator O, if not the transfer posting will not differ from normal transfer posting.
    Also T-code MBLB will help you in evaluating the stock of material provided. So you need to transfer the stock from project stock to unrestricted stock to carry out the transfer.
    Br,
    Tushar

  • While doing transfer posting  in  Tcode MIGO,with moment type 413e

    I am doing transfer posting with moment type 413 ,E
    changing the stock from one sale order to another sale order .
    and  the material is not related to planning .mrp type ND
    I am getting  warning messege
    "sale order (sobkz= ) is not  for this goods moment "
    Can any body help me  to remove this msg
    thanks in advance
    Srinivas

    when a cost center is created with KS01 transaction, then the user has to enter a validity period.
    So this cost center is just not valid for the given date.
    Check in KS03 and ask  the CO consultant to do the necessary actions

Maybe you are looking for