BAPI_GOODSMVT_CREATE with 311Q

Hello !
I try to make a post from a project to another project (Like MIGO), but I have a short problem by using this BAPI with the movementtype 311 Q.
After I run the report and made a post, i got a document number. (Subrc = 0)
When I get a short view into the document I will see that I have done a post from a project to the SAME project. :-?
I fill out the following fields :
  MOVE gs_material-matnr TO gs_goodsmvt_item-material.(000000000100016779)
  MOVE gs_material-werks TO gs_goodsmvt_item-plant.(2035)
  MOVE gs_material-lgort TO gs_goodsmvt_item-stge_loc.(0100)
  MOVE gs_material-move_type TO gs_goodsmvt_item-move_type.(311)
  MOVE gs_material-sobkz TO gs_goodsmvt_item-spec_stock.(Q)
  MOVE gs_material-entry_qnt TO gs_goodsmvt_item-entry_qnt.(15)
  MOVE gs_material-network TO gs_goodsmvt_item-network.(empty)
  MOVE gs_material-charg to gs_goodsmvt_item-batch.(empty)
  MOVE gs_material-charg to gs_goodsmvt_item-move_batch.(empty)
  MOVE gs_material-stck_type to gs_goodsmvt_item-stck_type.(empty)
  MOVE sy-datum TO gs_goodsmvt_header-pstng_date.(16092008)
  MOVE sy-datum TO gs_goodsmvt_header-doc_date.(16092008)
  MOVE gs_material-move_stloc TO gs_goodsmvt_item-move_stloc.(0100)
  MOVE '04' TO gs_goodsmvt_code-gm_code.(04)
  MOVE gs_material-pspnr TO gs_goodsmvt_item-wbs_elem.(P229999910100000)
  MOVE gs_material-move_pspnr TO gs_goodsmvt_item-val_wbs_elem. (P100000110100000)
  MOVE gs_material-costcenter TO gs_goodsmvt_item-costcenter.(empty)
It would be fine if somebody can help me or give me a solution for this result.
Thanx
Michael

Hi,
yes I pass the data for the plant, but I forget to write the next two lines here.
  MOVE gs_material-matnr TO gs_goodsmvt_item-move_mat.
  MOVE gs_material-werks TO gs_goodsmvt_item-move_plant.
Sorry for that.
The other thing want I saw was :
If I dont fill the field gs_goodsmvt_item-val_wbs_elem with an wbs-element, he will post the 311Q with the wbs from gs_goodsmvt_item-wbs_elem here.
But if I filled the field gs_goodsmvt_item-val_wbs_elem, the Bapi will ignore the field gs_goodsmvt_item-wbs_elem.
But for the movementype 311Q I need both wbs-elements (from wbs / to wbs).
Is it possible that anyone can give me the fields which I must fill for the movementtype 311 with specstock Q ??
Thnx
Michael
Edited by: Michael Gerken on Sep 16, 2008 1:20 PM

Similar Messages

  • BAPI_GOODSMVT_CREATE with a movement type of 262

    hi:
    when  I do a goods movement using BAPI_GOODSMVT_CREATE with a movement type of 262. If I supply the reservation number it creates the material document with a movement type of 261 ignoring the 262 . why ?

    Hi,
    Check if GM_CODE in the import parameters is set to "06" for the reversal movement type. If not, please set it to 06.
    Regards,
    Sachin .

  • Error in  BAPI_GOODSMVT_CREATE with movement type *261'  after posting

    Hi All,
    After sucessfull posting of  BAPI_GOODSMVT_CREATE  with movement type *261' .
    After posting ,while checking In mb51 document exists for it but checking in mmbe stock not reduced from resisticted stock.
    Can you kindly tell the import parameter to be filled to over come this error.
    Thank you.
    Thanks,
    AMS

    Hi Himanshu/ Tejaswini Khante / Madhu,
    Thank you all for your kind reply.
    @Himanshu....I have tried with LWA_ITEM-STCK_TYPE = BLANK, Still it didnt work.
    @Tejaswini Khante ...I checked the MMBE tcode, all the stocks are in 'Unrestricted use' only. The quality inspection, reserved fields are all blank. The materials are not Batch managed.
    @Madhu...Yes, i discussed with the Functional, yet to find a possible solution.
    Thanks & Regards
    Rajesh

  • BAPI_GOODSMVT_CREATE with Serial Number

    Dear Gurus,
    Scenario
    We have to transfer serialized Material from one plant to another via STO
    ST order --> Delivery --> PGI (with Serial Number) --> MIGO at recieving plant.
    For MIGO (101) movement we want to use BAPI_GOODSMVT_CREATE.
    Now we have tried many combinations for it.
    if we se GM_CODE = '01'. and Movement Indicator 'B' (for purchase orders) then it gives error "Maintain Serial number."
    So if we maintaine serial number in thetable it says that you "cannot assign this serial number to the material "(AS the serial no is attached to the material at the time of PGI).
    Now if we try to change the the movement Indicator to 'L' (for deliveries) we are getting the error "Update control of movement type is incorrect (entry 101 X X _ L) "
    We have maintianed all necessary fields otherwise it would not give he Maintain srial no error (we think). I know this is very technical. but if anyone has prior knowledge please Help
    Dany

    hI,
    I have on similar error and i made this .  
    header
       IT_HEADER-PSTNG_DATE = SY-DATUM.
       IT_HEADER-DOC_DATE   = SY-DATUM.
       IT_HEADER-PR_UNAME   = SY-UNAME.
       IT_HEADER-HEADER_TXT = W_NUMDOC .
       IT_HEADER-REF_DOC_NO = IT_INPUT-NUMFR.
    Tcod MB01
       IT_CODE-GM_CODE = '01'.
    Fill item
       IT_ITEM-MATERIAL   = IT_PEDNEC-MATNR.     "Material Code
       IT_ITEM-PLANT      = ZGSARMZ-WERKS.      
       IT_ITEM-MOVE_TYPE  = ZGSMOVMOT-TPMOV1.    "Mov. Type
    If necessary used table T156t
    the field  KZBEW  most be used in th internal table .
    IT_ITEM-MVT_IND
       IT_ITEM-MVT_IND    = 'B'.                    
       IT_ITEM-ENTRY_QNT  = ABS( IT_INPUT-QTDSEL ).
       IT_ITEM-ENTRY_UOM  = 'UN'.                 
       IT_ITEM-PO_NUMBER  = IT_INPUT-EBELN.         
       IT_ITEM-PO_ITEM    = IT_INPUT-EBELP.   
    IT_ITEM-STGE_LOC   = .           
    IT_ITEM-BATCH      = .           
    IT_ITEM-COSTCENTER = .          
    IT_ITEM-CUSTOMER   = .           
       APPEND IT_ITEM.
    Regards .
    pedro

  • BAPI_GOODSMVT_CREATE with multiple line items

    Hi  All,
              I'm trying to create a GR document for PO with multiple items.
    I'm creating this GR with BAPI_GOODSMVT_CREATE and passing multiple line items to this bapi. It generates one GR document but it does not process one of the line item in PO.
    Any help would be appreciated.
    Thanks & Regards,
    Prasad

    Hi Vinod,
            Actually there are two line items in the PO and manually when I try to create a GR for both line items,  it creates a GR but when I pass it thr' BAPI, it is generating a GR only for one Line item.
    Thanks,
    Prasad

  • How to Post BAPI_GOODSMVT_CREATE with profit segment?

    Kindly advise how we can post profit segment with BAPI_GOODSMVT_CREATE?
    Thank you.

    Thank you for your prompt reply
    Btw, In case which we are in userexit to create sales or material document, what is the best approach to get profit segment no?

  • BAPI_GOODSMVT_CREATE with movement type 105

    Dears,
        notice below case
        For one po and item, there are 5 GI with mov. type '103'  .
        1. 103  --   quantity: 1.
        2. 103  --   quantity: 1.
        3. 103  --   quantity: 1.
        4. 103  --   quantity: 1.
        5. 103  --   quantity: 1.
           now i want to use BAPI_GOODSMVT_CREATE to create GI with 105 mov. type. then i put one item with quantity 3 in the 'GOODSMVT_ITEM' , but it gives error ' exceeded by 2 quantity'  (Message ID: M7 - 022).
        so i want to know if i should put 3 items with quantity 1 independently in  'GOODSMVT_ITEM' , then it will create material document.
    BR.

    Hi,
    I have completed this task of my own.. Please check the below solution..
    You need to populate these fields .
    item-entry_qnt     = ls_ekbe_103-wesbs.
    item-ref_doc_yr    = ls_ekbe_103-lfgja.
    item-ref_doc       = ls_ekbe_103-belnr.
    item-ref_doc_it    = ls_ekbe_103-buzei.
    This will post 105 movement of purchase order taking against 103 material document as  reference document.
    Thanks,
    PrakashBabu

  • BAPI_GOODSMVT_CREATE with code 04 and special indicator E

    Hi Everybody
    My requirement is like when we create sales order and put Item category ZXLC local branch transfer and save the sale order..It creates purchase requisation and we pass supply plant there. It shold create document through MB1B. We are using BAPI  BAPI_GOODSMVT_CREATE for that but it is not creating document.
    We are passing code 04 goods movement code and special indicator  E.
    My problem is that where I have to call this BAPI. I mean user exit or enhancement and what are the parameter we should pass. Can any body send me the piece of code for that...

    1)
    Please remove BAPI_TRANSACTION_COMMITT from the user exit, it is a wrong way of using it.
    Generally it is a practice to not to use BAPI_TRANSACTION_COMMITT / Committ work in any user exits.  it will lead to database inconsistency.
    2) If you are using the material same as sales orders item , threre is a possibility that material gets locked out..
    3) Please consult your functional person to know what the special stock indicator is about?
    4) generally we need to pass sales order number with leading zeroes.. for ex: if order number is 1234 , you should pass it as  0000001234.
    Krishnan

  • BAPI_GOODSMVT_CREATE with GM = 03 and Mov. type 961

    Hello,
    I keep running in to the same error message when test-running the BAPI_GOODSMVT_CREATE bapi with GM 03 and mov. type 961.
    Although for my product MM03 says that I have 999 tones of stock for unrestricted use I keep getting the message:
    "Deficit of SL Unrestr. prev. 1 T: 900253 DE01 D1CD"
    can anyone understand the reason for this ?
    The application consultants have no problems posting the goods movement but I keep getting the same error message no matter what quantity I try to move.
    Grateful for any help on this matter !
    Best regards
    //Erik

    Hello again,
    After having changed the posting date I now have error message:
    "Fld selectn for mvt type 961 / accnt 412505 differs for network (019)"
    This is starting to feel like som form of customizing missing so my guess is the application cosnultants will have to look at this.
    Ideas still welcome though !

  • BAPI_GOODSMVT_CREATE With Movement Type 309

    Hi Experts,
    I'm tryng to use the FM BAPI_GOODSMVT_CREATE to enter transfer posting via MB1B.
    If I take all the quantity of material g_tc01_wa-matnr in MCHB-CLABS, and I can't get post the movement.
    However, if I take a quantity less than in MCHB-CLABS, the BAPI works perfectly. But my will is post a movement with entire quantity.
    I attached the SC below.
    If any tip is found, tell me <<removed by moderator>>.
        wa_header-pstng_date      = zpp_st_tc01-budat.
        wa_header-doc_date        = zpp_st_tc01-bldat.
        wa_header-pr_uname        = sy-uname.
        wa_header-ver_gr_gi_slip  = 2.
        wa_header-ver_gr_gi_slipx = 'X'.
        LOOP AT g_tc01_itab INTO g_tc01_wa.
          ti_item-material   = g_tc01_wa-matnr.
          ti_item-plant      = zpp_st_tc01-werks.
          ti_item-stge_loc   = g_tc01_wa-lgort.
          ti_item-batch      = g_tc01_wa-charg.
          ti_item-move_type  = zpp_st_tc01-bwart. "309
          ti_item-entry_qnt  = g_tc01_wa-erfmg.
          ti_item-entry_uom  = g_tc01_wa-erfme.
          ti_item-move_mat   = g_tc01_wa-matn2.
          ti_item-move_plant = zpp_st_tc01-werks.
          ti_item-move_stloc = zpp_st_tc01-umlgo.
          ti_item-move_batch = g_tc01_wa-charg.
          APPEND ti_item.
          CLEAR ti_item.
        ENDLOOP.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_header
            goodsmvt_code    = lv_tcode                "MB1B
          IMPORTING
            materialdocument = lv_matdoc
          TABLES
            goodsmvt_item    = ti_item
            return           = ti_return.
    Thanks in advance and best Regards
    JORGE R.
    Moderator Message: Moved to right forum. Removed ASAP words and added code tags. Please take care of these yourself in the future.
    Edited by: kishan P on Nov 12, 2010 9:31 AM

    Hi ,
    In your FM
    Import Parameter . --->
    goodsmvt_code = lv_tcode "MB1B
    Should be
    lv_tcode  = '01'. not the T code , Movement type will handle the Transaction internally .
    Please update the progress.
    Thx ,
    Dilum

  • BAPI  BAPI_GOODSMVT_CREATE  with IDOC MBGMCR

    We'll receive a MBGMCR Idoc  and we'll trigger it via WE20 to the BAPI_GOODSMVT_CREATE.
    It looks like it will work, the IDOC is processed with a positive return code  but we are looking how to post he BAPI_TRANSACTION_COMMIT through this technic ?
    Thanks for your help

    Hi Clemens,
    Thanks: you're right, the Document was saved, it works perfectly.
    I was looking for a document dated on Friday, the idoc was much older.... 
    After some rest during the week-end, it's easier.
    Roland

  • BAPI_GOODSMVT_CREATE with excise details

    Dear Friends
      I am developing program for the good receipt for the MIGO transaction. I am confused with the excise details. in general case when we do the migo.. if the PO has excise information for the material another screen pop -ups and receives the excise number and excise date but in BAPI_GOODSMVT_CREATE i dont receive any field for that.in the header table, could you tell me how i can pass this excise details with BAPI_GOODSMVT_CREATE it. any help will be appreciated.
    Regards
    naeem

    Hi,
    Check if GM_CODE in the import parameters is set to "06" for the reversal movement type. If not, please set it to 06.
    Regards,
    Sachin .

  • BAPI_GOODSMVT_CREATE with Custom Screens MPP

    Hi All,
    I am trying to create goods issue with respective goods reservation for production.Instead of using the standard code i am going for custom one.In standard after reservation it will copy all the line items by default so we are planning to got for custom.
    I created a custom mpp program and attached the bapi header and item structures to it.Here the selection for the initial screen is Production order number.
    In the same screen i am planning to create a table control in the it contains material,reservation no,movement type,quantity,uom.Here i am facing an issue.In this first column of each row i want to enter the material then it should pick data from resb which contain all these fields line item wise.I did but there is duplication's and data is not populating after press enter.
    Then after this i will move the header data and this table control data to bapi and need to collection the return messages from there.Please share some ideas on this.
    Regards,
    Madhu.

    Hi Madhu,
    I explain with one example. Please follow the steps.
    I have emp number as first column in my Tab control and remaining field values will come once give emp no and press ENTER.
    <li>Declare like this TOP include.
    types:
         BEGIN OF ty_p0001,
            pernr TYPE pa0001-pernr,
            endda TYPE pa0001-endda,
            begda TYPE pa0001-begda,
            bukrs TYPE pa0001-bukrs,
            werks TYPE pa0001-werks,
            persg TYPE pa0001-persg,
            persk TYPE pa0001-persk,
            vdsk1 TYPE pa0001-vdsk1,
          END OF ty_p0001.
    data:
          wa_p0001 type ty_p0001,
          it_p0001 type standard table of ty_p0001,
    <li>Code in the Flow logic for screen.
    *PROCESS BEFORE OUTPUT
    PROCESS BEFORE OUTPUT.
      MODULE get_data.
      LOOP AT   it_p0001
           INTO wa_p0001
           WITH CONTROL tabc
           CURSOR tabc-current_line.
        MODULE tabc_get_lines.
      ENDLOOP.
    *PROCESS AFTER INPUT.
    PROCESS AFTER INPUT.
      LOOP AT it_p0001.
        CHAIN.
          FIELD wa_p0001-pernr.
          FIELD wa_p0001-endda.
          FIELD wa_p0001-begda.
          FIELD wa_p0001-bukrs.
          FIELD wa_p0001-werks.
          FIELD wa_p0001-persg.
          FIELD wa_p0001-persk.
          FIELD wa_p0001-vdsk1.
          MODULE tabc_modify ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
      MODULE tabc_user_command.
    <li> We have to have the below MODULE tabc_modify inside LOOP to capture Table control changes .
    MODULE tabc_modify INPUT.
      MODIFY it_p0001
        FROM wa_p0001
        INDEX tabc-current_line.
      IF wa_p0001-pernr IS NOT INITIAL.
        wr_new_pernr-low   =  wa_p0001-pernr.
        wr_new_pernr-sign  =  'I'.
        wr_new_pernr-option =  'EQ'.
        APPEND wr_new_pernr TO tr_new_pernr.
        CLEAR wr_new_pernr.
      ENDIF.
    ENDMODULE.                    "TABC_MODIFY INPUT
    <li> Get the entered employee no into tr_pernr. You can see in the above code.
    DATA: tr_new_pernr TYPE RANGE OF pa0001-pernr,
          wr_new_pernr LIKE LINE OF tr_new_pernr.
    DATA: tr_old_pernr TYPE RANGE OF pa0001-pernr,
          wr_old_pernr LIKE LINE OF tr_old_pernr.
    <li> Once you get the entered employee number, Need to write code to get the remaining field values in the table control. Need to write in the PBO of the screen flow logic.
    MODULE get_data OUTPUT.
      IF tr_old_pernr IS INITIAL AND
         tr_new_pernr IS NOT INITIAL.
        tr_old_pernr = tr_new_pernr.
        SELECT *
          FROM pa0001
          INTO CORRESPONDING FIELDS OF TABLE it_p0001
          WHERE pernr IN tr_old_pernr.
      ENDIF.
      IF tr_old_pernr IS NOT INITIAL AND
         tr_new_pernr IS NOT INITIAL AND
         tr_old_pernr NE tr_new_pernr.
        tr_old_pernr = tr_new_pernr.
        SELECT *
          FROM pa0001
          INTO CORRESPONDING FIELDS OF TABLE it_p0001
          WHERE pernr IN tr_old_pernr.
      ENDIF.
      "clrear new values
      CLEAR: tr_new_pernr.
    ENDMODULE.                    "get_data
    I hope that it gives some clue to you. Let me know if you need further help.
    Regards,
    Venkat.O
    http://an-sap-consultant.blogspot.com/

  • BAPI_GOODSMVT_CREATE  with COPA

    Hi !
    I was using this BAPI to create Goods Movements, but i need to specify COPA data. Does anybody knows how can i do this ? or if there is any other BAPI to create goods movements with COPA information.
    Thx !

    dear friend,
    GOto transaction code BAPI and check in material management where you will get all the standard BAPI available. Take a help of ABAPers and ask them to run which you feel relevant for your need or else ask the ABAPers to add your requirement int he existing program.
    regards,
    Sudhir

  • BAPI_GOODSMVT_CREATE with EAN code

    hello APABERs,
    what is the best solution to read EAN code "using handheld scanner" and convert it to material number to use it in the
    Function module BAPI_GOODSMVT_CREATE.
    thanks in advance.

    Hi,
    Most of the organizations don't use EAN/UPC and material number combination.
    Though if you are using EAN/UPC then perhaps you can select material number from table MARA for EAN/UPC number (EAN11 field).
    And use it in BAPI_GOODSMVT_CREATE.
    Thanks,
    Zuber

Maybe you are looking for

  • Can any one help me read this panic report

    Ok first let me tell you the story how i got this mac. The ex owner decided to put it on his driveway for some reason and totally forgot he put it there when he came out of his driveway with his pick up truck and boom this mac actually looks like it

  • I can't start listener in the Control Painel/Admin Tools/ Services

    Windows XP - Home Edition (I know it´s not the better but came with my laptop) I installed the Oracle 10g and I don't know why I have 3 listener as services. Its services showed me different messages when I tried start it: 1. OracleOraDb10g_home1TNSL

  • Restore specific deleted iCal events from time machine

    Hi, I had put some events into iCal on my iPhone in early August.  My Calendar syncs with an exchange server.  The events were at first in all the calendars that were attached to the exchange account.  Now some of these events are gone or updates to

  • ViewObject fetch size with non-oracle flavor?

    Hi, I've been playing with fetch size / mode settings and I've noticed that SQL92 builder seems to ignore fetch size. When I run my page with fetch mode FETCH_AS_NEEDED and size of 1 and Oracle builder, i get a fetch for each row. When I switch to SQ

  • Installation problem Lightroom 4.3

    The installation of Lightroom 4.3 stops with an error message, reading "The older version of Adobe Lightroom 4.3 cannot be removed. Apply to your technical support group". This "older version" is probably a trial version, I had before, which I had to