Problem in BAPI GOODSMVT CREATE OIL

Dear Abapers,
I have developed an ZFunction Module for to do posting 102 Movt type.An ABAP Dump is encountered when doing the negative subsequent adjustment via the Z function module. The dump only happens when BAPI_GOODSMVT_CREATE_OIL is called
After get into several functions and subroutines When I debug the BAPI_GOODSMVT_CREATE_OIL.Finally I got the error encountered place which is from select query on the line no: 204 in the function "OIB2_HPM_MAT_CHECK_COMPLETE"
         IF i_mseg-bpmng NE i_ms2int-adqntp.
          we skip this error mess in case an invoice had already
          been posted where the quantity is greater than the
          goods issue qty.
            data: ls_ekbe type ekbe.
            select single * from ekbe
                            into ls_ekbe
                            where ebeln = i_mseg-ebeln
                            and   ebelp = i_mseg-ebelp
                            and   vgabe = '2'
                            and   bewtp = 'Q'.
            if not sy-subrc is initial.
       MESSAGE a359 WITH i_mseg-matnr i_mseg-werks i_mseg-zeile 'BPMNG'
                                            RAISING bpmng_not_found.
            endif.
          ENDIF.
        ENDIF.
Let me know,if you need more details for the same

Thanks Aditya
How to check the materail  quantity?    is you are talking about Input material quantity ?
I guess there is some problem in additional quantity field(ADQNTP)  in table MSE02 .Because dump is encountered after checking the below "IF" condition
*IF i_mseg-bpmng NE i_ms2int-adqntp.*
I m very new to this MM area thats why i can't perdict the usage of additional quantity things(ADQNTP).
I wish to tell you some more information.This ABAP is encountered for certain materials that too for some scenarios.
Is anything we need to takecare in master tables or some other tables ?
Please help me !!!

Similar Messages

  • How to reverse movement by BAPI GOODSMVT CREATE?

    Dear all,
        i want to use BAPI GOODSMVT CREATE  to do the revese for the movement , this is my 1st to use this BAPI ,  can anyone here can give me the  sample how to use this funtion to reverse the movement ... as i know is use the code for 06, for the value pass to this funtion total no have idea what value to pass in ... 
    Thanks
    Edited by: Juan Reyes on Sep 3, 2009 3:14 PM

    Hi Himanshu,
    I have to reverse the GR and I am using BAPI -> BAPI_GOODSMVT_CREATE and passing below information but I am getting error message as 'Goods movement not possible with mvmt type 102'. Could you pls tell me what would be the possible reasons to get this error.
    goodsmvt_header-PSTNG_DATE = 20110705
    goodsmvt_header-DOC_DATE = 20110705
    goodsmvt_code-GM_CODE = 06
    goodsmvt_item-PLANT = 1400
    goodsmvt_item-MOVE_TYPE = 102   <<< Reversal movement type
    goodsmvt_item-ENTRY_QNT = 02
    goodsmvt_item-ENTRY_UOM = SET
    goodsmvt_item-PO_NUMBER = W299999508
    goodsmvt_item-PO_ITEM = 0010
    goodsmvt_item-MVT_IND = B
    goodsmvt_item-XSTOB = ''.    << space to use reversal types
    Thanks in Advance
    Venkat

  • Problem using BAPI to create Service Confirmation in CRM

    Good afternoon all.
    I have raised this is CRM forum too, just thought it best to ask the broader ABAP community the question too.
    We are encountering a problem using a BAPI to create a transaction in CRM, specifically:
    I am trying to create a Service Confirmation (BUS2000117) in a CRM system using the BAPI BAPI_BUSPROCESSND_CREATEMULTI.
    The BAPI succeeds in creating the header of the transaction, but I cannot make the BAPI create any other data in the transaction such as partners or items.
    Just want to be sure that I am not being foolish...has anyone succeeded in using this BAPI to create an error-free Service Confirmation?
    Regards
    Nick

    I am going to pop this thread into General ABAP forum too.
    Nick

  • Problem with bapi to create purchase requisition

    I got a requirement that to upload details of procurement into Z table with a temporary PR. Could u please suggest the procedure or bapi to upload datainto Z table.
    Regards

    Hi all
    For above requirement i am suppose to develop a FM which upload the data from front end to DB. Forthat I am taking following steps is it ok or not suggest me.
    1.call function module bapi_pr_create
    2.fill local structure with bapi structure if PR number is created.
    3.update data into Z table
    Regards

  • BAPI for create IR and GR

    Hi All,
    I would like to use the BAPI to create the IR and GR.
    But i don't know which BAPI is use for create the IR and GR . Could you mind give any information about this?
    Regards,
    Luke

    Hi Luke,
    The function module "BAPI_GOODSMVT_CREATE " would perform the task.  Please refer to the following link.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    Regards.

  • BAPI to create PO and GR

    Hi,
    Can anybody send me some sample code to handle multiple files in application server. My requirement is to create an interface to create PO and GR from the file residing in Application server. Multiple files will be in application server. No selection screens are there. BAPI used are BAPI_PO_CREATE1 and BAPI_GOODSMVT_CREATE. And If anyone has already created this interface, please give me some idea of how to read multiple files and if possible send some sample code.
    Any help will be greatly appreciated.
    Regards,
    Naveen

    Hi Naveen,
        Go through this link.
    BAPI_PO_CREATE1
    Re: Proble in Creating Multiple Item PO using BAPI_PO_CREATE1
    BAPI_GOODSMVT_CREATE
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    http://www.4ap.de/abap/bapi_goodsmvt_create.php
    Reward Points For the Helpful.
    Regards,
    Harini.S

  • Is there a  BAPI to create IS-Oil (formula) MM Pricing condition records

    Hi,
    Is there a standard BAPI to create IS-Oil (formula) MM Pricing condition records, which would include the maintaining of the formula?
    Regards
    Kasi

    no BAPI exists

  • BAPI  to create IS-Oil (formula) MM Pricing condition records

    Hi,
    Is there a standard BAPI  to create IS-Oil (formula) MM Pricing condition records, which would include the maintaining of the formula?
    Regards
    Kasi

    no BAPI exists

  • Problem in Sales order create using BAPI with reference to quotation

    Hi,
    I am creating a sales order from Quotation using BAPI /AFS/BAPI_SALESORD_CREATEFDATA.
    The Sale order is getting created and the document flow is updated. When i check the status of quotation it is "OPEN".
    Ideally when a sale order is created in VA01 with reference to a quotation and if all items are added in the order from quotation, then the status of the quotation must be "Complete".
    When i use the BAPI, the status of the quotation is sill "Open". Has anyone faced this issue?
    Even if anyone has faced this issue with BAPI_SALESORDER_CREATEFROMDAT2, please let me know...
    Regards

    Hi RV,
    I am using BAPI  to create order reference to contracts. I am facing same issue. Its not updating document flow (vbfa-plmin field). After creating orders I am forcing to update plmin field in vbfa. This worked fine. But now status in reference document not updating properly. I saw your thread. It looks like similar issue. I saw your comments "Customization was not maintained properly for the Order types ". Please can you explain little bit more about your solution. It will helps us lot.
    Thanks,
    srini

  • Problem in Function while creating dependency not getting solved

    Hi All,
    I am not getting any solution even after debuging it many times,
    This is second time I am posting same problem , Please help me out if possible
    I am  working on a Program in which I have to create Class , local and global dependency -
    For class createion i am using
    BAPI_CLASS_CREATE
    For local dependency i m using
    CAMA_CLASS_MAINTAIN_DEP
    For Global dependency i am using
    CAMA_CLASS_ALLOCAT_GLOB_DEP
    Now my problem is that I am able to create Class and only 1 of the dependency either local or global whihever function I am calling first
    But while debugging program I am able to create Class as well as both dependencies successfully
    Please can any one tell while this is runing successfully only at the time of debugging
    Code -
    have used -
    CALL FUNCTION 'BAPI_CLASS_CREATE'
    EXPORTING
    CLASSNUMNEW = TCLASS-CLASS
    CLASSTYPENEW = TEXP1-KLART
    CLASSBASICDATA = CLASSBASICDATA
    CHANGENUMBER = SAENNR
    TABLES
    CLASSDESCRIPTIONS = CLASSDESCRIPTIONS
    CLASSLONGTEXTS = CLASSLONGTEXTS
    CLASSCHARACTERISTICS = CLASSCHARACTERISTICS
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'
    IMPORTING
    RETURN = TRET2.
    CALL FUNCTION 'CAMA_CLASS_ALLOCAT_GLOB_DEP'
    EXPORTING
    CHANGE_NO = SAENNR
    KEY_DATE = SY-DATUM
    TABLES
    CLASS_DEP_ASSIGN = T_GLBDEP
    EXCEPTIONS
    ERROR = 1
    WARNING = 2
    OTHERS = 3.
    CALL FUNCTION 'CAMA_CLASS_MAINTAIN_DEP'
    EXPORTING
    CLASS = TCLASS-CLASS
    CLASS_TYPE = SKLART
    DEPENDENCY_DATA = T_DEPDATA
    CHANGE_NO = SAENNR
    KEY_DATE = SY-DATUM
    TABLES
    SOURCE = TSOURCE
    EXCEPTIONS
    ERROR = 1
    WARNING = 2.
    I have no problem in creating Class using Bapi ,
    Problem I am facing here in creating Local and global dependency together which i am able to create in debugging mode only otherwise either Local or global whichever function i am using first
    Regards
    Preeti

    duplicate post locked
    Re: Problem in Function while creating dependency

  • Problem with BAPI_OUTB_DELIVERY_CREATE_SLS in creating deliveries

    Hi all,
    We are using the BAPI 'BAPI_OUTB_DELIVERY_CREATE_SLS' to create deliveries. The problem is we are unable to create same no. of deliveries as of VL10A.
    When we are using VL10A to create deliveries, for a particular order, we are able to create 2 deliveries for a single sales order. Where as with the above BAPI it is creating only one delivery for sales order.
    Could you please let me know what I should do inorder to make BAPI to create 2 deliveries like that of VL10A.
    Thanks,
    Aravind.

    Hi Aravind,
    I am having same problem. Can you pelase explain me how you solved your issue.
    Please help?
    thanks,
    Venkat.

  • BAPI to create Returns Lot (FP09)

    Hi to all,
    We want to create a Z program and use a BAPI to create return lots, is this possible? Have anyone done this?
    The problem is that the bank is reporting us two cases for lot payment orders
    1. success payment of order
    2. unsuccessfully payments on orders
    Both cases are mix in one big file.
    We are planning clear the ones successful ones with the bapi BAPI_CTRACPAYMINC_CREATE... and all the ones required to create and post lots. (similar to fp45)
    But we want to do something similar to FP09 for the unsuccessful ones with the Z program
    By doing this all can be done with one step.
    We can not find any BAPIs of FM which can be used to do this.
    Thanks
    Sergio

    FKK_LOT_KEY_CREATE           
    FKK_PAYMENTLOT_KEY_CREATE    
    FKK_PAYMENT_BATCH_ADD_CLARIF 
    FKK_PAYMENT_BATCH_ANALYZE_ITEM
    FKK_PAYMENT_BATCH_ARCH_IND_CRE
    FKK_PAYMENT_BATCH_CLARIFY_ITEM
    FKK_PAYMENT_BATCH_CLOSE      
    FKK_PAYMENT_BATCH_FIND_ARCH_PM
    FKK_PAYMENT_BATCH_FIND_PAYMENT
    FKK_PAYMENT_BATCH_GET_STATUS 
    FKK_PAYMENT_BATCH_LOCK_ITEM  
    FKK_PAYMENT_BATCH_NEW_FIKEY  
    FKK_PAYMENT_BATCH_POST       
    FKK_PAYMENT_BATCH_RELEASE    
    FKK_PAYMENT_BATCH_REVERSE_PYMT
    FKK_PAYMENT_BATCH_SHOW_DETAIL
    FKK_PAYMENT_BATCH_STATUS     
    FKK_PAYMENT_BATCH_STATUS_ADJST
    FKK_PAYMENT_BATCH_UNLOCK_ITEM
    FKK_SEARCH_PAYMENTS_IN_LOTS
    These are few FMs ...
    FKK_PAYMENT_BATCH_STATUS    can be used to get the status of the LOT
    Hope some of these will be helpful

  • Problem with BAPI BAPI_REQUISITION_CREATE

    Hello,
    I have problems with BAPI BAPI_REQUISITION_CREATE. I need to create Purchase requisition for services. If I use BAPI BAPI_REQUISITION_CREATE, Purchasing requisition is created, but field NETWR in table EBNK is 0. If I create purchasing requisition manualy using transaction ME51N, field NETWR in table EBNK is filled with correct price.
    Can you pls. help me, what do I wrong in calling BAPI_REQUISITION_CREATE?
    Thanks&regards,
    Jirka

    Not sure if you got your answer or went to OSS for a resolution. But, as I was searching OSS for my issue, I came across the following note:
    Note 1498435 - BAPI_REQUISITION_CREATE: EBKN-NETWR is not updated

  • . bapi to create customer

    Hi All,
    I am having problem finding a right bapi for create a customer.
    I am using "bapi_customer_createfromdata1" to create a customer. Problem is i couldn't find a structure to pass sales org. data as well as partner functions.
    Please help me. Feel free to ask me questions.
    Thanks,
    Diwakar.

    Hi,
    The way is using multiple BAPI's.
    bapi "bapi_customer_createfromdata1" is used to create customer with reference customer number and then send the information to bapi "sd_customer_maintain_all" for changing the the values.
    Still having problem passing parameters.
    When i am sending partner information(knvp) to "sd_customer_maintain_all", it is giving abap dump assertion_failed.
    I tried to debug the program but i couldn't find the error.
    values i passed to bapi sd_customer_maintain_all
    internal table of type <b>fknvp</b>.
    MANDT sy-mandt
    KUNNR st_knvp-kunnr
    VKORG st_knvp-vkorg
    VTWEG st_knvp-vtweg
    SPART st_knvp-spart
    PARVW st_knvp-parvw
    PARZA
    KUNN2 st_knvp-sp_kunnr
    LIFNR
    PERNR
    PARNR
    KNREF
    DEFPA
    Appended line by line to the table.
    Reward points if found helpful....
    Cheers,
    Venkoji Babu.

  • Bapi to create a condition record

    hi,
    is there any standard bapi for creating ,changing and deleting a pricing record using VK11,VK12.
    any other function module will solve the problem.

    Hi Ajith,
       You can use <b>IDOC approach</b> also for doing teh same solution. Yo get Create/Change/ Delete Option as per indicator passed:
    Refer Code below.
    *&      Form  map_idoc_structure
          Map E1KOMG, E1KONH, E1KONP segment fields
    FORM map_idoc_structure
                  USING fp_condition_table TYPE kotabnr
                        fp_rate            TYPE z_cs_cpp_rate
                        fp_condition_type  TYPE kschl
                        fp_rate_type       TYPE z_cs_file_type.
    *-- Local Data Declaration
      DATA: lw_e1komg TYPE e1komg, "Filter seg. with separated condition key
            lw_e1konh TYPE e1konh, "Data from condition header
            lw_e1konp TYPE e1konp, "Conditions Items
            lv_delete TYPE konp-loevm_ko. " Delete Indicator
    *-- IDoc data internal table
      DATA: i_idoc_data TYPE TABLE OF edidd
                        INITIAL SIZE 0
                        WITH HEADER LINE.
      CLEAR: lw_e1komg,
             lw_e1konh,
             lw_e1konp,
             lv_delete,
             v_segnum,
             w_e1komg,
             v_rate_type.
      REFRESH i_idoc_data.
      v_rate_type = fp_rate_type.
      PERFORM conversion_alpha_input
          USING w_crp_data-kunnr CHANGING w_crp_data-kunnr.
      PERFORM conversion_matn1_input
         USING w_crp_data-matnr CHANGING w_crp_data-matnr.
    E1KOMG: Filter segment with separated condition key
      i_idoc_data-segnam  = 'E1KOMG'.
      lw_e1komg-kvewe     =  c_usage_cond_tab.
      lw_e1komg-kotabnr   =  fp_condition_table.
      lw_e1komg-kappl     =  c_cond_type.
      lw_e1komg-kschl     =  fp_condition_type.
    CONCATENATE p_vkorg p_vtweg p_spart p_hienr p_matnr
      CONCATENATE w_crp_data-vkorg w_crp_data-vtweg
                  w_crp_data-kunnr w_crp_data-matnr
                  INTO lw_e1komg-vakey.
      lw_e1komg-vakey_long = lw_e1komg-vakey.
      lw_e1komg-vkorg      = w_crp_data-vkorg.
      lw_e1komg-vtweg      = w_crp_data-vtweg.
      lw_e1komg-spart      = w_crp_data-spart.
      lw_e1komg-kunnr      = w_crp_data-kunnr.
      lw_e1komg-matnr      = w_crp_data-matnr.
      i_idoc_data-sdata = lw_e1komg.
      APPEND i_idoc_data TO i_idoc_data.
    Segment E1KONH - condition header
      i_idoc_data-segnam  = 'E1KONH'.
      lw_e1konh-datab     = w_crp_data-datab.
      lw_e1konh-datbi     = w_crp_data-datbi.
      lw_e1konh-knuma_pi  = v_promotion.
      lw_e1konh-knuma_ag  = v_sales_deal.
      i_idoc_data-sdata = lw_e1konh.
      APPEND i_idoc_data TO i_idoc_data.
      IF fm_process_type EQ c_pt_dep.
        lv_delete = c_x.              " Deletion Indicator
      ENDIF.
    Segment E1KONP - condition items
      i_idoc_data-segnam = 'E1KONP'.
      lw_e1konp-kschl     = fp_condition_type.
      lw_e1konp-kbetr     = fp_rate.
      lw_e1konp-konwa     = w_crp_data-waers.
      lw_e1konp-kpein     = v_cond_pric.
      lw_e1konp-kmein     = v_cond_unit.
      lw_e1konp-knuma_pi  = v_promotion.
      lw_e1konp-knuma_ag  = v_sales_deal.
      lw_e1konp-loevm_ko  = lv_delete.
      i_idoc_data-sdata = lw_e1konp.
      APPEND i_idoc_data TO i_idoc_data.
    *-- Post Idoc for Creating Pricing Condition
      PERFORM post_idoc
             TABLES i_idoc_data.
    ENDFORM.                    " map_idoc_structure
    *&      Form  post_idoc TABLES i_idoc_data.
          Post Idoc for Creating Pricing Condition
    FORM post_idoc
              TABLES i_idoc_data STRUCTURE edidd.
    *-- Local data declaration
      DATA: lv_komg         LIKE komg,         " Condition Structures
            lv_subrc        LIKE sy-subrc,     " Sy-subrc
            lw_messages     TYPE rsuvm_msg,    " Message Description
            lw_idoc_status  TYPE bdidocstat.   " ALE IDoc status
      DATA: idoc_contrl                        " IDoc Control data
                LIKE edidc OCCURS 1 WITH HEADER LINE.
    *-- Initialize Internal Tables
      CLEAR:  t_konh,
              t_konp,
              t_konm,
              t_konw,
              i_idoc_status,
              t_kona.
      REFRESH: t_konh,
               t_konp,
               t_konm,
               t_konw,
               i_idoc_status,
               t_kona,
               i_messages.
    This code is taken from IDOC_INPUT_COND_A
      PERFORM fill_appl_structures(saplvkoi)
                      TABLES i_idoc_data
                             t_konh
                             t_konp
                             t_konm
                             t_konw
                             i_idoc_status
                             t_kona
                       USING lv_komg
                             lv_subrc
                             idoc_contrl-docnum
                             idoc_contrl-mestyp.
      IF lv_subrc = 0.
    This code is taken from IDOC_INPUT_COND_A
        PERFORM idoc_in_datenbank(saplvkoi)
                  TABLES idoc_contrl
                         t_konh
                         t_konp
                         t_konm
                         t_konw
                         i_idoc_status
                         t_kona
                  USING  lv_komg
                         lv_subrc
                         idoc_contrl-docnum.
        IF lv_subrc = 0.
          COMMIT WORK AND WAIT.
        Endif.
    Reward points if this Helps.
    Manish
    Message was edited by: Manish Kumar

Maybe you are looking for

  • How many usb drives to install windows 8.1

    Hi! I hope that someone can help answer my question. I need to install windows on my laptop.  It is an Air with 4gb ram and 256g drive from 2011. So, I tried to download windows to my mac but that didn't work.  The windows store only allows downloadi

  • Text inside box

    How to print text inside a box in sap script?   please let me know the process

  • Add new administrator to an existing OnPlus site

    Hello, I would like to add myself to an existing OnPlus site (device) as another administrator of the site. My colleague who already has access to the site, did the steps explained in  Adding and Managing Authorized Agents of the Document OnPlus Port

  • The use of  folder  option in Smartforms ?

    Hi , What is theuse of  folder  option in Smartforms ? Thanks in advance RK

  • LED constant red after opening SMS message

    Hi, i have the blackberry pearl 8100, i had a difficulty with this before bu after upgrading it would not flash the LED it would flash if not open but once open and sent it would stay red.. howcan i fix this?