BAPI for Goods Issue

Hi gurus,
I am working on an interface where I need to do <b>goods Issue</b> and for this I have written the following code, but my return statement is returning this error" <b>Goods movement not possible with mvmt type 201</b>"
data: begin of it_input_file occurs 0,
        matnr(18),
        werks(4),
        uoe_qty(13), 
        amount(13),
        st_loc(4),
        batch(10),
        account(10),
        uoe_uom(3),  
     end of it_input_file.
  v_semfile = p_ifname.
  refresh it_input_file.
  call function 'WS_UPLOAD'
    EXPORTING
      filename                = v_semfile
      filetype                = 'DAT'
    TABLES
      data_tab                = it_input_file
    EXCEPTIONS
      conversion_error        = 1
      file_open_error         = 2
      file_read_error         = 3
      invalid_type            = 4
      no_batch                = 5
      unknown_error           = 6
      invalid_table_width     = 7
      gui_refuse_filetransfer = 8
      customer_error          = 9
      others                  = 10.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  move: syst-datum to v_doc_date,
        syst-datum to v_pos_date.
  loop at it_input_file.
    move: v_doc_date          to GOODSMVT_HEADER-DOC_DATE,
          v_pos_date          to GOODSMVT_HEADER-pstng_date,
          syst-uname          to GOODSMVT_HEADER-pr_uname.
    move: '05' to GOODSMVT_CODE-GM_CODE.
    move: it_input_file-matnr    to GOODSMVT_ITEM-material,
          it_input_file-werks    to GOODSMVT_ITEM-plant,
          it_input_file-st_loc   to GOODSMVT_ITEM-stge_loc,
          it_input_file-batch    to GOODSMVT_ITEM-batch,
          it_input_file-uoe_qty  to GOODSMVT_ITEM-entry_qnt,
          it_input_file-uoe_uom  to GOODSMVT_ITEM-entry_uom,
          it_input_file-amount    to GOODSMVT_ITEM-AMOUNT_LC,
          ' '                     to GOODSMVT_ITEM-MVT_IND,
          'X'                     to GOODSMVT_ITEM-NO_MORE_GR,    
      move: c_mov_type2             to GOODSMVT_ITEM-move_type,
    append goodsmvt_item.
    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
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        IMPORTING
          RETURN = return2.
Message was edited by:
        Rajeev  Gupta
Message was edited by:
        Rajeev  Gupta

There is a check with table: t158b
    SELECT SINGLE * FROM T158B WHERE TCODE = <tcode>
                               AND   BWART = <movement type>.
When this is failing the following error message is raised.

Similar Messages

  • BAPI for Goods Issue (MIGO) movement type 351 with reference to PO

    Hi,
    Is there an BAPI for Goods issue in MIGO with reference to PO movement type 351, i tried using "BAPI_GOODSMVT_CREATE", but there is no PO field in this, is there any other BAPI's available for the same?
    Thanks in Advance,
    Santosh

    for goods mvt type , the available is that itself . for 351 mvt type Po number is not required .
    if its a must , create a Z bapi with additional field  for PO and make it as reference .

  • Different GOGS GL account for goods issue

    Hello SAP export,
    The F&A department requests to generate different COGS GL account based on Customer Account Assignment Group when goods issue (or billing). Customer Account Assignment Group field name is KNVV-KTGRD. The solution is NOT possible at T-CODE OBYC (with GBB transaction (MM FI configuration for goods issue) because we are using the same materials. (All materials are with same valuation class in MATERIAL master).
    I had posted this question in SD forums but the export suggests me to post in FI forum.
    If you know any workable solution, please help.
    Great thanks in the advance!

    Hi,
    Check the link for how to have default a G/L account on a Purchase Order account assignment for an inventory item & how to post to a separate G/L account for  inventory item by having GR posting
    http://www.bluemarlinsys.com/ns/0603-03.asp
    OR
    you can have a thought of having different valuation grouping codes where you can have different G/L posting with respect to plant for same materiel
    valuation grouping code........valuation area
    0001......................................P001(plant-1)
    0002----
    P002(plant-2)
    Regards,
    Biju K

  • Smart form for Goods issue

    I am facing a problem with smartform. I am creating a smartform for good issue
    This is the smartform Z_SMB40_MMGI1_L and this is the print program Z_SMB40_M07DR
    For ME application i have assigned the output type wlb1 and the above said form in nace.
    I am picking the document number from mb51 based on the movement type 309
    in mb02 for each document i am trying to assigning the output type wlb1
    i was able to assign the output type for only one document number for rest it is showing warnings and also for few documents i am receiving error
    Express document "Update was terminated" received from author "xxxxx"
    how do i assign for all documents at a stretch (in which t code).
    in mb90 i am trying to view the form but it is throwing the error
    START_FORM is invalid, OPEN_FORM is missing,
    even though i have removed the script name.
    can u please help me out by providing the corresponding print program and smartform for above said scenario
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Dec 23, 2008 3:47 PM

    Hi,
    Go to Nace .The application for Goods Issues is
    ME - Inventory Management -> select and click on output types ->select wa03 output type and click on processing routines here you can find the form name and the driver program name.So while printing select wa03 as the output type.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards,
    Harini.S
    Edited by: Alvaro Tejada Galindo on Dec 23, 2008 3:46 PM

  • Adobe PDF for Goods Issue / Stock

    Hi All,
    I've been looking thru the list of available Adobe Forms in SFP, and there are a few for purchasing (MEDRUCK etc) and some for issuing and receipting. I haven't  been able to locate any around the inventory control area.
    It is easy to use adobe forms for Purchase Orders (assigned in Define Message Types for Purchase Order) however it is not clear in configuration where to assign an adobe form for receipts / issues and inventory.
    Has anyone had any luck using adobe forms for these functions or is everyone still using smartforms? Does SAP even support adobe forms for Goods Issues / receipt and pyhsical inventory documents?
    Kind Regards,

    Nomally,  PDF forms are supported for only External documents , since IM related documents are for the companys internal purpose i guess there isnt an option given for PDF forms for them . But there are standard programs which you can use to convert any Spool to PDF  SE38: RSTXPDFT4  .
    Or you can install PDF printer , and get any output in PDF format directly from SAP.
    Or you need your abaper to use OTF in the Print program to gte an outpurt in PDF.

  • Print out issue for Goods issue document

    Dear Friends,
    I am trying to take a print out for good issue document (Mov. 541)
    -     Necessary settings have been done in customizing of output details WA01 with print parameters Plant/storage location (also maintained same at config. level)
    -     MN21 master data maintained but every time I have to define output device by changing the document details in MB02
    -     When taking print out inMB90 system proposes no document found for processing
    Can anybody help in this regards
    SG

    If the output TYPE is configured, and created in MN21 but the output record is not automatically created for each document, you may be missing config in <B>Output Determination</B>.  (In MM02, you can select the output type from a drop-down and process without error)<BR><BR>Please check the following:<BR><BR>SPRO path: <I>Materials Management > Inventory Management and Physical Inventory > Output Determination > Maintain Output Determination Procedures.</I> <BR><BR>Your output type must be assigned to the procedure used by your document. If it is not here, it will not automatically propose the output record.

  • Print out for Goods Issue

    SAP Experts,
    Can anyone tell me about T.code for goods issue print out?
    Full scenario we need.
    thanks
    babu

    Hi,
    from MB90 select below options.
    Output Type -WA03      
    ransmission Medium-1 (Print)
    Sort order-01 (Material document/Item/Output type)        
    Processing mode - 1 ( and 2-for repeat Output)  
    Material Doc. Year -2011 (as per Document created date)
    Material Document - Goods Issue Number
    Execute the same and proceed for Document Print.
    Regards,
    Sandesh Sawant

  • Transaction variant for Goods Issue going back to MB1A transaction screen

    Hello,
    I have created a transaction variant ZMB1A for Goods issue.
    When the goods issue transaction completed by using ZMB1A system again going back to the initial screen of MB1A. (Since it is the base of MB1A)
    Here the issue is everytime user had to enter the ZMB1A transaction. (for example if the user wants to issue material for different plants).
    Please suggest any suitable method to avoid the above multiple t code execution.
    Regards
    Rifaie M

    Hi,
    In SHD0, do the complete processing of Transaction MB1A during creation of Transaction Variant "ZMB1A" till posting of the Material document.
    To create a new T-Code as ZMB1A, go to Transaction SE93 and here enter Transaction Code as ZMB1A and Click Create button. Now enter Short text of Transaction and select option "Transaction with Variant (Variant transaction)" and press enter.
    Here enter following;
    Transaction             MB1A
    Transaction variant     ZMB1A
    Activate "Cross-client"
    Select Professional User Transaction
    Activate SAP GUI for HTML
    Activate SAP GUI for Java
    Activate SAP GUI for Windows
    Now Click SAVE button.
    Now you can start using Transaction ZMB1A which will call Transaction Variant ZMB1A.

  • Different movement types for goods issue via outbound delivery

    Hi gurus,
    How can I use different movement types for goods issue via outbound delivery?
    Thanks&Best Regards,
    Burcu

    To use different schedule lines, we need different item types and different document types. Is that right?
    Is there a user exit in outbound delivery to post goods issue?
    Thanks...

  • Account Detrmination for Goods Issue against Order

    Dear All,
    We have a requirement where goods issued against reservation created through plant maintenance order should hit repairs & maintenance account instead of default account such as consumption stores and spares.
    Can any changes be made in configuration so that the default account can be changed either while saving plant maintenance order or can the default be overwritten when material is issued through MB1A against reservation.
    Useful answers will be rewarded with points
    Regards
    Milind Nair

    Dear
    Your knowldge iam adding the points
    In materail master check the Valuation class 4 digits (ex: 2010)
    is assigned in material master . The same material will be used in many places , this valaution class depends Production created by Fi.
    This same will have assigned in G/L at OBYC t code. Here we assign as automatic posting. The same G/l account has given as automatic posting in G/L t code FS00.
    In obyc has many process example for goods issue it will come as BSX. costing difference PRD.
    your materails type is ERSA these types may bes used many plcaes other than Pm . If clinet interests you can assign valuation class with seperate G/l account for PM
    All the G/L , costing docuemnts will appear while doing migo (mb1a) 261 movements as per your obyc seetings
    Tell requirements with FI/MM

  • Different movement types for Goods Issue for different Order Types

    Hello Experts,
    Can we maintain different movement types for Goods Issue for different Order Types at the time of automatic creation of reservations?
    Thanks and regards,
    Satyajit

    Satyajit,
    Folow the link given,
    Re: How to add new movement types when creating reservation?
    Hope this helps you.
    SmanS

  • Line item does not exists for Good issue

    Dear All,
    User have created a outbound delivery and perform Post good issue.No billing document has been created yet. Somehow lineitem does not exists in the delivery document however Material Document for Good issue exists with reference to Delivery Document. I tried to reverse the delivery document with reference . No error was occured but still no reversal was updated on Delivery document. I know it is not possible to delete line item without reversal of PGI but system is showing me the status as described
    Prompt response in this regard is highly appreciable
    Thank you,
    Nomi

    Solution has been identified, If goods has been issued then Returns Process wrt Sales Order  solved the problem for my rare process. Goods have been transfered to unristricted stock.
    Thank you all for your support
    Best Regards,
    NoMi

  • Extractor for goods issue

    Can anyone send me the name of the extractor for goods issue? Does it comes under SD? or MM fullfillment? 
    Thanjs
    Raj

    Hi RajMani,
    What exactly is your requirement?
    Check with your business or functional team for the source tables from where they want the report to be built.
    based on the source tables we can suggest you the exact data source you need for your requirement.
    Regards
    KP

  • BAPI for Goods Movment Creation

    Hi
        I created Goods Movment with bapi BAPI_GOODSMVT_CREATE. for MIGO transaction
        After that i need to change vendor at detaild data level in under Freight (MIGO transaction).
    or else is it posible to pass our own vendor to that particlar level at time of creation using BAPI_GOODSMVT_CREATE
    Regards,
    Hari

    Did you come to [Note 520813 - FAQ: BAPIs for goods movements|https://service.sap.com/sap/support/notes/520813] ?
    Regards,
    Raymond

  • Help required: Configure output for goods issue

    Dear All,
    My requirement is to trigger an output type for a goods issue only when the goods movement
    scenario involves cross company accounting. What is the TCode for doing the requirement setting
    for goods issue output.
    Thanks.

    Hi,
    Please check it out,is there any standard requirement is there for your scenario,if it is not there as ABAP people to write one requirement in VOFM and assign to this condition type.

Maybe you are looking for

  • Crash...crash...crash

    Crash, crash crash. Safari, Firefox, CS4, Finder pinwheels and apps crashing. Since installation of Snow Leopard my Macbook pro is more like a Macbook semi pro. Hanging pinwheel on mail too! To boot (yes this is a pun) this is the third Macbook the A

  • Can a Time Capsule hard drive store external memory besides backups (eg. HD Video, iTunes library, ETC.)

    I'm going to get a MacBook Pro soon, and I'm going to get the 256GB Flash Storage, but I will need extra memory, mostly because I edit a lot of HD video. I may store my iTunes library, but I'm not sure on that one (I currently have almost no songs, a

  • Posting goods receipt in migo getting the error

    hi when posting goods receipt in tc migo getting the error ' check table 169p: entry "cocode" does not exist". What does it mean? what is th e solution for this?

  • Unable to view pdf files sourced from websites

    Hi I have previously had no trouble viewing pdf files from various websites, however am now unable to.  It appears to be loading and then just comes up with a blank screen. I am able to view pdf files which have been emailed without problem. I have r

  • NO 3G SERVICE AFTER 2.1 UPDATE!

    Now, everytime I click on "enable 3G service" it says No Service on my screen. Has this happened to anyone else? Is this normal? And is there a way to fix it?! Thanks.