Error in BAPI Coding

Hi Experts,
I am new to interfaces like bapi, I tried a program for BAPI_ACC_DOCUMENT_POST to update AR, when i trying to execute it is displayng as "PROBLEM OCCURED".
Here i am giving program code, so please see the program and reslove my eror.
<removed by moderator>
DATA: obj_type LIKE bapiache09-obj_type,
      obj_key LIKE bapiache09-obj_key,
      obj_sys LIKE bapiache09-obj_sys,
      documentheader LIKE bapiache09,
      accountgl LIKE bapiacgl09 OCCURS 0 WITH HEADER LINE,
      accountpayable LIKE bapiacar09 OCCURS 0 WITH HEADER LINE,
      accountreceivable LIKE bapiacar09 OCCURS 0 WITH HEADER LINE,
      currencyamount LIKE bapiaccr09 OCCURS 0 WITH HEADER LINE,
      return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
      extension1 LIKE bapiextc OCCURS 0 WITH HEADER LINE,
      t_edidd LIKE edidd OCCURS 0 WITH HEADER LINE,
      bapi_retn_info LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: error_flag.
documentheader-username = sy-uname.
documentheader-header_txt = 'Test BAPI'.
documentheader-comp_code = 'SERC'.
documentheader-doc_date = sy-datum.
documentheader-pstng_date = '10.09.2010'.
documentheader-doc_type = 'DR'.
CLEAR accountgl.
accountgl-itemno_acc = '1'.
accountgl-gl_account = '100100'.
accountgl-ref_key_1  = 'TEST'.
accountgl-comp_code = 'S150'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'DR'.
accountgl-customer = '2001'.
APPEND accountgl.
CLEAR accountgl.
CLEAR  accountreceivable.
accountreceivable-itemno_acc = '1'.
accountreceivable-customer = '2001'.
accountreceivable-gl_account = '100100'.
accountreceivable-comp_code = 'S150'.
APPEND accountreceivable.
CLEAR  accountreceivable.
APPEND currencyamount.
currencyamount-itemno_acc = '1'.
currencyamount-currency = 'INR'.
currencyamount-amt_doccur = '1000'.
APPEND currencyamount.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader          = documentheader
*   CUSTOMERCPD             =
*   CONTRACTHEADER          =
IMPORTING
   OBJ_TYPE                = obj_type
   OBJ_KEY                 = obj_key
   OBJ_SYS                 = obj_sys
  TABLES
   accountgl               = accountgl
   accountreceivable       = accountreceivable
*   ACCOUNTPAYABLE          =
*   ACCOUNTTAX              =
    currencyamount          = currencyamount
*   CRITERIA                =
*   VALUEFIELD              =
*   EXTENSION1              =
    return                  = return
*   PAYMENTCARD             =
*   CONTRACTITEM            =
*   EXTENSION2              =
*   REALESTATE              =
*   ACCOUNTWT               =
IF sy-subrc <> 0.
  WRITE 'Problem occured'.
ELSE.
  *LOOP AT return.*
    *IF NOT return IS INITIAL.*
      *CLEAR bapi_retn_info.*
      *MOVE-CORRESPONDING return TO bapi_retn_info.*
      *IF return-type = 'A' OR return-type = 'E'.*
        *error_flag = 'X'.*
      *ENDIF.*
      *APPEND bapi_retn_info.*
    *ENDIF.*
  *ENDLOOP.*   (in this block i find error)
IF error_flag = 'X'.
    WRITE 'Problem occured'.
    ROLLBACK WORK.
  ELSE.
   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
  ENDIF.
ENDIF.
Thanks in Advance,
gsreddy.
Edited by: Thomas Zloch on Jan 7, 2011 11:01 AM - please use code tags

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader          = documentheader
*   CUSTOMERCPD             =
*   CONTRACTHEADER          =
IMPORTING
   OBJ_TYPE                = obj_type
   OBJ_KEY                 = obj_key
   OBJ_SYS                 = obj_sys
  TABLES
   accountgl               = accountgl
   accountreceivable       = accountreceivable
*   ACCOUNTPAYABLE          =
*   ACCOUNTTAX              =
    currencyamount          = currencyamount
*   CRITERIA                =
*   VALUEFIELD              =
*   EXTENSION1              =
    return                  = return
*   PAYMENTCARD             =
*   CONTRACTITEM            =
*   EXTENSION2              =
*   REALESTATE              =
*   ACCOUNTWT               =
In the BAPI tables parameter "return" what are the messages you are seeing in debugging mode???

Similar Messages

  • Error in account coding allocation Message no. SE508 in creation of SES

    Hello guys, merry christmas.
    We are creating a Service Entry Sheet (SES) from the transaction ML81N in reference to a Purchase Order. After selecting the service position 1 through the button Serv. Selection system gives the following message error: u201CError in account coding llocation - Message no. SE508u201D
    The error happened last December 2008 and March 2009 and opened an OSS note, SAP have answered that there is an inconsistency in the table ESKL, for it sent me a program that detects the inconsistency in the table and whitens the "LOEKZ" generated by the inconsistency and the program corrects the inconsistency.
    Were checked SAP OSS notes: 666314, 611563,  1087090 and  809317 and all are referring to that error occurs when the user exit has activated EXIT_SAPLMLSK_001, but not our case since we do not have activated.
    I have OSS and open many messages like can not see the inconsistency of the table. I even made the same steps of the users and do not generate the error. We are seeing the error is random. These are the steps involving the process:
    1. Go to ML81N
    2. PO = 470000XXXX, item 1.
    3. Posting XX.XX.2009
    4. Push the botom Serv. Selection
    5. Select line 1
    6. Push botom Services
    Appers the error "Error in account coding allocation"
    Error Message Number: SE508
    Transaction: ML81N
    Tables: EKPO, ESLL, ESKL
    I wonder if anyone has had this error on your system.
    Our SAP version is 4.7 Enteprise ext. 200 Win / Ora.
    I appreciate any help I can guide
    Desirée C.
    Happy New Year 2010 !

    Please read the FUNCTIONALITY written by SAP on EXIT_SAPLMLSK_001,especially one marked in BOLD letter,By applying the NOTES corrections ,definately if it's EXIT is not active it will not impact your existing system,if it's active it may rectify the error you are getting
    FU EXIT_SAPLMLSK_001
    Text
    Set Account Assignment in Service Line
    Functionality
    The function module EXIT_SAPLMLSK_001 allows you to predefine the account assignment distribution in new service lines that are created. Beforehand, you must specify the account assignments and the percentages or quantities allocated to each account assignment in table T_ESKN. The function module is invoked in all purchasing documents with account assignment.
    Parameters
    I_ESLL
    T_ESKN
    Exceptions
    Function Group
    XMLU
    Edited by: veer koraddi on Feb 24, 2010 8:36 AM

  • Error during BAPI while uploading Material data through MM01

    Hi all,
    i am facing one problem when uploading Material data thorough BAPI in MM01.i am attaching the code below and the error given.
    but in the debugger all the value is being stored.
    REPORT  ZFINISHED_MAT.
    Data: Begin of legacy_data occurs 0,
         MATNR LIKE MARA-MATNR,
         MBRSH LIKE MARA-MBRSH,            "Industry Sector
         MTART LIKE MARA-MTART,            "Matl Type
         WERKS LIKE MARD-WERKS,            "Plant
         LGORT LIKE MARD-LGORT,            "Storage location
         VKORG LIKE MVKE-VKORG,
         VTWEG LIKE MVKE-VTWEG,
         MAKTX LIKE MAKT-MAKTX,             "Matl Desc.
         MEINS LIKE MARA-MEINS,             "Base UOM
         MATKL LIKE MARA-MATKL,             "Matl.Grp
    *     BISMT LIKE MARA-BISMT,
         SPART LIKE MARA-SPART,             "Division
    *     BRGEW LIKE MARA-BRGEW,             "Gross weight
         GROES LIKE MARA-GROES,
         FERTH LIKE MARA-FERTH,
         ZEINR LIKE MARA-ZEINR,
         TAXKM1 LIKE MLAN-TAXM1,
         TAXKM2 LIKE MLAN-TAXM2,
         TAXKM3 LIKE MLAN-TAXM3,
         TAXKM4 LIKE MLAN-TAXM4,
         KTGRM LIKE MVKE-KTGRM,
    *     GEWEI LIKE MARA-GEWEI,             "Weight unit
    *     NTGEW LIKE MARA-NTGEW,             "Net weight
    *     KLART LIKE RMCLF-KLART,
         MTVFP LIKE MARC-MTVFP,             "Availibility Check
    *     XGCHP LIKE MARA-XGCHP,
         XCHPF LIKE MARA-XCHPF,             "Batch Management
         TRAGR LIKE MARA-TRAGR,
         LADGR TYPE MARC-LADGR,
         VPRSV LIKE MBEW-VPRSV,            "Price Control
         VERPR LIKE MBEW-VERPR,
    *     SPRAS LIKE MAKT-SPRAS,
      END OF LEGACY_DATA.
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- BAPI structures
    DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control Information
    BAPI_MAKT LIKE BAPI_MAKT, " Material Description
    BAPI_MARA1 LIKE BAPI_MARA, " Client Data
    BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
    BAPI_MARD1 LIKE BAPI_MARD,
    BAPI_MARDX1 LIKE BAPI_MARDX, " Checkbox Structure for BAPI_MARD
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MVKE1 LIKE BAPI_MVKE,
    BAPI_MVKEX1 LIKE BAPI_MVKEX, " Checkbox Structure for BAPI_MVKE
    BAPI_MLAN1 LIKE BAPI_MLAN,
    BAPI_MLANX1 LIKE bapi_mlan1, " Checkbox Structure for BAPI_MLAN
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_RETURN LIKE BAPIRET2. " Return Parameter
    *              $PARAMETERS DECLARATION$
    SELECTION-SCREEN BEGIN OF BLOCK B11
                              WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_FILE LIKE RLGRAP-FILENAME. " DEFAULT 'C:\TEST1.XLS'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN END OF BLOCK B11 .
    *              $DATA DECLARATION$
    *DATA : BDC_DATA LIKE STANDARD TABLE OF BDCDATA WITH HEADER LINE.
    DATA : IT_EXCEL TYPE STANDARD TABLE OF  ALSMEX_TABLINE INITIAL SIZE 0 WITH HEADER LINE,
            IT_EXCEL_DUMMY TYPE ALSMEX_TABLINE.
    DATA : MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : L_MSTRING(480).
    DATA :L_SUBRC LIKE SY-SUBRC.
    DATA: V_FILE TYPE STRING.
    *              $AT-SELECTON SCREEN DECLARATION$
    AT SELECTION-SCREEN ON P_FILE.
      IF P_FILE IS INITIAL.
        MESSAGE E398(00) WITH 'FILE NAME NEEDS TO BE SPECIFIED'.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
    *   DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = 'P_FILE'
       IMPORTING
         FILE_NAME           = P_FILE
    start-of-selection.
    perform data_fetch_to_xls.
    perform insertion.
    *&      Form  data_fetch_to_xls
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM data_fetch_to_xls .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                = P_FILE
          I_BEGIN_COL             = 1
          I_BEGIN_ROW             = 2
          I_END_COL               = 25
          I_END_ROW               = 2
        TABLES
          INTERN                  = IT_EXCEL
        EXCEPTIONS
          INCONSISTENT_PARAMETERS = 1
          UPLOAD_OLE              = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        WRITE: /'ERROR UPLOADING XLS FILE FROM PRESENTATION SERVER !' ,
               /'RETURN CODE : ', SY-SUBRC.
      ELSE.
    *************NOW FILL DATA FROM EXCEL INTO FINAL LEGACY DATA ITAB----LEGACY_DATA***************
        IF NOT IT_EXCEL[] IS INITIAL.
          CLEAR LEGACY_DATA.
          REFRESH LEGACY_DATA[].
          LOOP AT IT_EXCEL.
            IT_EXCEL_DUMMY = IT_EXCEL.
            AT NEW COL.
              CASE IT_EXCEL_DUMMY-COL.
                WHEN 1.
                  LEGACY_DATA-MATNR = IT_EXCEL_DUMMY-VALUE(18).
                WHEN 2.
                  LEGACY_DATA-MBRSH = IT_EXCEL_DUMMY-VALUE(1).
                WHEN 3.
                  LEGACY_DATA-MTART = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 4.
                  LEGACY_DATA-WERKS = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 5.
                  LEGACY_DATA-LGORT = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 6.
                  LEGACY_DATA-VKORG = IT_EXCEL_DUMMY-VALUE(4).
                 WHEN 7.
                  LEGACY_DATA-VTWEG = IT_EXCEL_DUMMY-VALUE(2).
                WHEN 8.
                  LEGACY_DATA-MAKTX = IT_EXCEL_DUMMY-VALUE(40).
                WHEN 9.
                  LEGACY_DATA-MEINS = IT_EXCEL_DUMMY-VALUE(3).
                WHEN 10.
                  LEGACY_DATA-MATKL = IT_EXCEL_DUMMY-VALUE(9).
                WHEN 11.
                  LEGACY_DATA-SPART = IT_EXCEL_DUMMY-VALUE(2).
                WHEN 12.
                  LEGACY_DATA-GROES = IT_EXCEL_DUMMY-VALUE(32).
                WHEN 13.
                  LEGACY_DATA-FERTH = IT_EXCEL_DUMMY-VALUE(18).
                WHEN 14.
                  LEGACY_DATA-ZEINR = IT_EXCEL_DUMMY-VALUE(22).
                 WHEN 15.
                  LEGACY_DATA-TAXKM1 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 16.
                  LEGACY_DATA-TAXKM2 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 17.
                  LEGACY_DATA-TAXKM3 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 18.
                  LEGACY_DATA-TAXKM4 = IT_EXCEL_DUMMY-VALUE(1).
                 WHEN 19.
                  LEGACY_DATA-KTGRM = IT_EXCEL_DUMMY-VALUE(2).
                WHEN 20.
                  LEGACY_DATA-MTVFP = IT_EXCEL_DUMMY-VALUE(2).
                 WHEN 21.
                  LEGACY_DATA-XCHPF = IT_EXCEL_DUMMY-VALUE(1).
                WHEN 22.
                  LEGACY_DATA-TRAGR = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 23.
                  LEGACY_DATA-LADGR = IT_EXCEL_DUMMY-VALUE(4).
                WHEN 24.
                  LEGACY_DATA-VPRSV = IT_EXCEL_DUMMY-VALUE(1).
                WHEN 25.
                  LEGACY_DATA-VERPR = IT_EXCEL_DUMMY-VALUE(14).
                  APPEND LEGACY_DATA.
                  CLEAR LEGACY_DATA.
              ENDCASE.
            ENDAT.
            AT END OF ROW.
            ENDAT.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " data_fetch_to_xls
    *&      Form  insertion
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM insertion .
    LOOP AT legacy_data.
    * Header
    BAPI_HEAD-MATERIAL = legacy_data-MATNR.
    BAPI_HEAD-IND_SECTOR = legacy_data-MBRSH.
    BAPI_HEAD-MATL_TYPE = legacy_data-MTART.
    BAPI_HEAD-BASIC_VIEW = 'X'.
    BAPI_HEAD-SALES_VIEW = 'X'.
    BAPI_HEAD-STORAGE_VIEW = 'X'.
    *BAPI_HEAD-PURCHASE_VIEW = 'X'.
    BAPI_HEAD-ACCOUNT_VIEW = 'X'.
    * Material Description
    REFRESH IT_MAKT.
    *IT_MAKT-LANGU = legacy_data-SPRAS.
    IT_MAKT-MATL_DESC = legacy_data-MAKTX.
    APPEND IT_MAKT.
    BAPI_MARD1-PLANT = legacy_data-WERKS.
    BAPI_MARD1-STGE_LOC = legacy_data-LGORT.
    BAPI_MARDX1-PLANT = legacy_data-WERKS.
    BAPI_MARDX1-STGE_LOC = legacy_data-LGORT.
    ** Client Data - Basic
    BAPI_MARA1-MATL_GROUP = legacy_data-MATKL.
    *bapi_mara1-OLD_MAT_NO = legacy_data-bismt.
    BAPI_MARA1-BASE_UOM = legacy_data-MEINS.
    BAPI_MARA1-PROD_MEMO = LEGACY_DATA-FERTH.
    BAPI_MARA1-SIZE_DIM = LEGACY_DATA-GROES.
    BAPI_MARA1-DOCUMENT = LEGACY_DATA-ZEINR.
    BAPI_MARA1-BATCH_MGMT = LEGACY_DATA-XCHPF.
    *BAPI_MARA1-UNIT_OF_WT = legacy_data-GEWEI.
    BAPI_MARA1-TRANS_GRP = legacy_data-TRAGR.
    BAPI_MARA1-DIVISION = legacy_data-SPART.
    BAPI_MARAX-MATL_GROUP = 'X'.
    *BAPI_MARAX-OLD_MAT_NO = 'X'.
    BAPI_MARAX-BASE_UOM = 'X'.
    BAPI_MARAX-PROD_MEMO = 'X'.
    BAPI_MARAX-SIZE_DIM = 'X'.
    BAPI_MARAX-DOCUMENT = 'X'.
    BAPI_MARAX-BATCH_MGMT = 'X'.
    *BAPI_MARAX-UNIT_OF_WT = 'X'.
    BAPI_MARAX-TRANS_GRP = 'X'.
    BAPI_MARAX-DIVISION = 'X'.
    *SALES
    BAPI_MVKE1-SALES_ORG = legacy_data-VKORG.
    BAPI_MVKE1-DISTR_CHAN = legacy_data-VTWEG.
    *BAPI_MVKE1-DELYG_PLNT = legacy_data-DWERK.
    BAPI_MVKE1-ACCT_ASSGT = legacy_data-KTGRM.
    BAPI_MVKEX1-SALES_ORG = legacy_data-VKORG.
    BAPI_MVKEX1-DISTR_CHAN = legacy_data-VTWEG.
    *BAPI_MVKEX1-DELYG_PLNT = 'X'.
    BAPI_MVKEX1-ACCT_ASSGT = 'X'.
    ** Plant - Purchasing
    BAPI_MARC1-PLANT = legacy_data-WERKS.
    BAPI_MARC1-LOADINGGRP = legacy_data-LADGR.
    BAPI_MARC1-AVAILCHECK = legacy_data-MTVFP.
    *BAPI_MARC1-MRP_GROUP =  legacy_data-disgr.
    BAPI_MARCX-PLANT = legacy_data-WERKS.
    BAPI_MARCX-LOADINGGRP = 'X'.
    BAPI_MARCX-AVAILCHECK = 'X'.
    *BAPI_MARCX-MRP_GROUP =  'X'.
    * Accounting
    BAPI_MBEW1-VAL_AREA = legacy_data-WERKS.
    BAPI_MBEW1-PRICE_CTRL = legacy_data-VPRSV.
    BAPI_MBEW1-STD_PRICE =  legacy_data-VERPR.
    *BAPI_MBEW1-VAL_CLASS =  legacy_data-BKLAS.
    *BAPI_MBEW1-STD_PRICE = legacy_data-STPRS.
    *BAPI_MBEW1-PRICE_UNIT = legacy_data-PEINH.
    BAPI_MBEWX-VAL_AREA = legacy_data-WERKS.
    BAPI_MBEWX-PRICE_CTRL = 'X'.
    BAPI_MBEWX-STD_PRICE =  'X'.
    *BAPI_MBEWX-VAL_CLASS =  'X'.
    * TAX JURISDICTION CODE
    BAPI_MLAN1-TAXCLASS_1 = LEGACY_DATA-TAXKM1.
    BAPI_MLAN1-TAXCLASS_2 = LEGACY_DATA-TAXKM2.
    BAPI_MLAN1-TAXCLASS_3 = LEGACY_DATA-TAXKM3.
    BAPI_MLAN1-TAXCLASS_4 = LEGACY_DATA-TAXKM4.
    BAPI_MLAN1-TAXCLASS_1 = 'X'.
    BAPI_MLAN1-TAXCLASS_2 = 'X'.
    BAPI_MLAN1-TAXCLASS_3 = 'X'.
    BAPI_MLAN1-TAXCLASS_4 = 'X'.
    *--- BAPI to create material
    call function 'BAPI_MATERIAL_SAVEDATA'
    exporting
    HEADDATA = BAPI_HEAD
    CLIENTDATA = BAPI_MARA1
    CLIENTDATAX = BAPI_MARAX
    *PLANTDATA = BAPI_MARC1
    *PLANTDATAX = BAPI_MARCX
    * FORECASTPARAMETERS =
    * FORECASTPARAMETERSX =
    * PLANNINGDATA =
    * PLANNINGDATAX =
    * STORAGELOCATIONDATA =
    * STORAGELOCATIONDATAX =
    VALUATIONDATA = BAPI_MBEW1
    VALUATIONDATAX = BAPI_MBEWX
    * WAREHOUSENUMBERDATA =
    * WAREHOUSENUMBERDATAX =
    * SALESDATA = BAPI_MVKE1
    * SALESDATAX = BAPI_MVKEX
    * STORAGETYPEDATA =
    * STORAGETYPEDATAX =
    IMPORTING
    RETURN = BAPI_RETURN
    TABLES
    MATERIALDESCRIPTION = IT_MAKT
    * UNITSOFMEASURE =
    * UNITSOFMEASUREX =
    * INTERNATIONALARTNOS =
    * MATERIALLONGTEXT =
    * TAXCLASSIFICATIONS =
    * RETURNMESSAGES =
    * PRTDATA =
    * PRTDATAX =
    * EXTENSIONIN =
    * EXTENSIONINX =
    IF BAPI_RETURN-TYPE = 'E'.
    WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,legacy_data-maTNR.
    ELSEIF BAPI_RETURN-TYPE = 'S'.
    WRITE: 'Successfully created material' ,legacy_data-maTNR.
    ENDIF.
    ENDLOOP.
    ENDFORM.                    " insertion
    The error: The field MARC-MTVFP/BAPI_MARC-AVAILCHECK is defined as a required field; it does not contain an entr
    suggestion will be vry helpful,
    Kind Regards,
    Edited by: Prasenjit Sengupta on Nov 16, 2009 9:11 AM

    Hi Prasenjit,
    Did you get any solution for this as I am getting same error from BAPI to update MRP controller in MARC table.
    Regards,
    Suruchi

  • Error in account coding allocation

    Hello All,
    We are in R3 4.70.
    I am trying to create a SES for line item 2 and the system prompts an error as per the subject bar.
    For the same account assignment and G/L account details however I could post the line item1.
    The only difference in the line items looks as the Order Nos being different PM orders .
    Can any body give clue as to what needs to be corrected pls?
    Regards,
    Nagarajan
    Error in account coding allocation

    hi frnd...
    kindly check the acct.***, of the service line item
    Goto ME23 ->> Put your PO No ->> Goto Item Overview (press F5) ->> Select the main line item and goto Services ->> Select respective service line and check the acct. ***. (pop up will come) ->> click on yeelo coloured arrow. (press F5) ->>  here check column "D" - Acct. ***. deletion flag and "A" - acct. ***. block.
    One of them must be set. Reset the same and try to SES.
    I am confident this will resolve your issue.
    Kindly confirm the same.
    njoy SAP...
    njoy Lyf...
    REgards,
    Amit P hiran

  • Error in account coding allocation - ML81n

    Dear All,
    I am going to create entry sheet from PO service.
    1st. Open tcode ML81n and choose PO and item.
    2nd. click create entry sheet
    3rd. input no reference
    4th. click button service selection
    5th. after that it will be appear error message ' Error In Account Coding Allocation '
    What should i do, please advice...
    Cheers,
    Nies

    Hi,
    While posting the thread if possible, mention the error message number.
    I think there is missing of configuration in MM account determination
    OBYC. Discuss further with your MM or FI team.
    Regards,

  • Error in account coding

    While trying to do service entry, its giving a strange error like below:
    'Error in account coding allocation'
    Anyone come across this type error before?
    I have checked the G/L account, in PO. Evrything is fine.
    This PO comes from the work order.
    After selecting the line item in service entry , this error is coming.
    Please advice.

    Hi PS
    I am also facing the same for a few service entery sheets. please suggest if find solution for the same
    Regards,
    Pawan

  • Error in account coding allocation - Service Entry

    Hi,
    While doing service entry I am facing a error called error in account coding allocation.  Please can any one suggest me how to go about it.
    Thanks & Regards
    kiran

    Hi,
    this is an inconsistency issue, there is no permanent solution for the error message SE508 so far.
    The error is ussued due to the fact that the loekz is set at accounting level (in table ESKL) but not at service  (in table ESLL) for the affected services. Please check the following: get the PACKNO from table EKPO for the PO, put this packno into the packno field in SE16 for ESLL, please search for the subpackno, copy out the subpacknos, go into ESLL again and put this subpacknos into the packno field and please check the DEL field in ESLL. Please check after  that in ESKL with the same subpacknos (put them into the packno field at selection) the LOEKZ field. If there is a discrepancy in deletion fields between ESLL and ESKL for the same packno, the system processes the error message SE508.
    SAP support can provide you with a Z*-correction report to solve this issue. Please open a ticket for the problem.
    Regards,
    Edit

  • How can we find error in BAPI Creation?

    Can any one help out in How to findout Errors in BAPI Creation and Usage?

    HI,
    you can findout error by declaring BAPI RETURN type structure .
    for ex:"
    DATA : return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
          EXPORTING
            sales_header_in     = header
            sales_header_inx    = headerx
          IMPORTING
            salesdocument_ex    = v_vbeln
          TABLES
            return              = return
            sales_items_in      = item
            sales_items_inx     = itemx
            sales_partners      = partner
            sales_conditions_in = i_conditions.
        LOOP AT return WHERE type = 'E' OR type = 'A'.
          EXIT.
        ENDLOOP.
    if helpful reward points.

  • Handling errors in BAPI

    Hi frnds i m unable to know the answer for the q?
    How do u handle errors in BAPI.
    i.e i m using standard BAPI po creation if some errors occurs then how to handle those errors
    how can we know the errors.
    plz reply me back frnds...
    thnks...

    Hi Sanjay,
       Call BAPI like this :
      data: it_retrun typa table of bapireturn.
    CALL FUNCTION 'BAPI_PO_CREATE'
      EXPORTING
        po_header                        =
      PO_HEADER_ADD_DATA               =
      HEADER_ADD_DATA_RELEVANT         =
      PO_ADDRESS                       =
      SKIP_ITEMS_WITH_ERROR            = 'X'
      ITEM_ADD_DATA_RELEVANT           =
      HEADER_TECH_FIELDS               =
    IMPORTING
      PURCHASEORDER                    =
      tables
        po_items                         =
      PO_ITEM_ADD_DATA                 =
        po_item_schedules                =
      PO_ITEM_ACCOUNT_ASSIGNMENT       =
      PO_ITEM_TEXT                     =
       RETURN                           = it_return
      PO_LIMITS                        =
      PO_CONTRACT_LIMITS               =
      PO_SERVICES                      =
      PO_SRV_ACCASS_VALUES             =
      PO_SERVICES_TEXT                 =
      PO_BUSINESS_PARTNER              =
      EXTENSIONIN                      =
      POADDRDELIVERY                   =
    IT_RETURN will contains all message returned from BAPI. For error message you can read IT_RETURN table where type = 'E'.
    Thanks
    Swagatika

  • BAPI coding for CATSDB TABLE i.e Timesheet DB

    BAPI coding for CATSDB TABLE i.e Timesheet DB
    Points will be rewarded,
    Thank you,
    Jagrut BharatKumar Shukla

    Hi Srikhar
    use these bapis
    BAPI_BPCONTACT_CHANGE BAPI
    BAPI_BPCONTACT_CREATEFROMDATA BAPI .... BAPI_CUSTOMERCONTRACT_CHANGE
    BAPI_CTRACCONTRACTACCOUNT_CH1
    reward points to all helpful answers
    kiran.M

  • Catching error in BAPI

    Hi experts,
    I am new to BAPI.
    Can anyone tell me " How to catch error in BAPI ".
    Thanks,
    Shipra

    Hi,
    In the BAPI return internal table you have to check for the Error or ABort message types..
    Ex..
    Check for error or abort messages
    LOOP AT T_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    IF SY-SUBRC = 0.
      WRITE: / 'Exception occured'.
    ELSE.
       WRITE: / 'Update is successful'.
    ENDIF.
    Thanks
    Naren

  • HT4623 I can't restore my new iPhone4. The process runs however a error message appears coding 3014? Help

    I can't restore my new iphone4. Help. An error msg appears coding 3014

    Errors 3000-3999 (3004, 3013, 3014, 3018, 3164, 3194, and so on): Error codes in the 3000 range generally mean that iTunes cannot contact the update server (gs.apple.com) on ports 80 or 443.
    Update to the latest version of iTunes.
    Verify the computer's date and time are accurate.
    Check that your security or firewall software is not interfering with ports 80 or 443, or with the server gs.apple.com.
    Follow Troubleshooting security software. Often, uninstalling third-party security software will resolve these errors.
    An entry in your hosts file may be redirecting requests to gs.apple.com (see "Unable to contact the iOS software update server gs.apple.com" above).
    Internet proxy settings can cause this issue. If you are using a proxy, try without using one.
    Test restoring while connected to a known-good network.

  • Error in BAPI

    Hello ,
    While using the BAPI 'BAPI_MATERIAL_SAVEDATA', to extend material from one plant to another my code is throwing an error 'Currency initial v,current amount 6,000.0000 in MOVING_PR was transferred without a currency'
    Enter a material number'
    I have incorporated mbew-peinh, even then its throwing the same error.
    I snd copy of my code.
    report  zmm_r018 .
    *& Prog to copy n create the existing material using bapi .
    tables: t001l, "Storage Locations
            mara,  "General Material Data
            makt,  "Material Descriptions
            mbew,  "Material Valuation
            marc,  "Plant Data for Material
            mltx.  "Purchase Order Descriptions
    **parameters : new_mat like mara-matnr,
                desc like makt-maktx,
    *data:         ref_mat like mara-matnr.
    *data: xmara type mara.
    **data: wamatnr like mara-matnr.
    data: potext type string."Purchase Order Desc
    data : ihead_data type bapimathead,
           iclient_data type bapi_mara,                    "Client Data
           iclient_datax type bapi_marax,
          imakt like bapi_makt,                           "Mat Description
           iplant_data    like bapi_marc,                  "Plant View
           iplant_datax   like bapi_marcx,
           iltxt type table of bapi_mltx with header line, "Pur Order Text
           istoragelocationdata type bapi_mard,            "Storage Location
           istoragelocationdatax type bapi_mardx,
           iaccounting_data  like bapi_mbew,               "Accounting View
           iaccounting_datax  like bapi_mbewx,
           bapiret like bapiret2,
           returnm type table of bapi_matreturn2 with header line.
    **Internal Table to hold the records in the text file
    types:begin of it,
    matnr(18),  " Material number
    mbrsh(1),   " Industry sector
    mtart(4),   " Material type
    werks(4),   " Plant
    lgort_d(4),  "Storage Location
    maktx(40),  " Material description
    meins(3),   " Base unit of measure
    matkl(9) ,  " Material group
    bismt(18),  " Old Material number
    spart(2),   " Division
    gewei(3),   " Weight Unit
    text1(30),  " Purchasr Order Text
    text2(30),
    text3(30),
    text4(30),
    text5(30),
    text6(30),
    dzeinr(22), " Document
    ekgrp(3),   " Purchasing group
    ekwsl(4),   " Purchase Value Key
    webaz(3),   " Goods receipt processing time in days
    dismm(2),   " MRP Type
    minbe(13),  "Reorder point
    dispo(3),   " MRP Controller
    disls(2),   "Lot size (materials planning)
    mabst(13),  "Maximum stock level
    plifz(3),   " Planned delivery time in days
    webaz1(3),  " Goods receipt processing time in days
    fhori(3),   "Scheduling Margin Key for Floats
    eisbe(13),  "Safety stock
    mtvfp(2),   "Checking Group for Availability Check
    lgpbe(10),  "Storage Bin
    qmatauth(6),"Material Authorization Group for Activities in QM
    qmpur(1),   " QM in Procurement is Active
    qsspur(8),  "Control Key for Quality Management in Procurement
    bklas(4),   " Valuation Class
    bwtty_d(1), "Valuation Category
    vprsv(1),   " Price control indicator
    verpr_bapi(23), "Moving average price/periodic unit price
    peinh(5),     "Price Unit
    end of it.
    data: it_data type table of it,
          wa_data like line  of it_data.
    *Decalraing flag
    data: v_flag value ''.
    *DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.
    data: bapi_head like bapimathead,
          bapi_clientdata like bapi_mara,
          bapi_clientdatax like bapi_marax,
          bapi_plantdata like bapi_marc,
          bapi_plantdatax like  bapi_marcx,
          bapi_storagelocationdata like bapi_mard,
          bapi_storagelocationdatax like bapi_mardx,
          bapi_salesdata like bapi_mvke,
          bapi_salesdatax like bapi_mvkex,
          bapi_makt like bapi_makt,
          bapi_return like bapiret2.
    *INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    data: begin of it_makt occurs 0.
    include structure bapi_makt.
    data end of it_makt.
    data:begin of it_ret occurs 0.
    include structure bapiret2.
    data end of it_ret.
    *INTERNAL TABLE TO HOLD HEADER DATA
    data: it_excel type alsmex_tabline occurs 0 with header line.
    *SELECTION-SCREEN ELEMENTS
    selection-screen begin of block b1 with frame title text-001.
    parameter: fname type rlgrap-filename  default 'c:\supplies.xls'.
    parameters: p_begcol type i default '1' no-display,
                p_begrow type i default '2' no-display,
                p_endcol type i default '200' no-display,
                p_endrow type i default '2500' no-display.
    *perform f_get_data.
    selection-screen end of block b1.
    *DECLARATION OF EXCELAL TABLE
    at selection-screen on value-request for fname.
    perform f_get_file using fname.
    start-of-selection.
    perform f_xls_itab using fname
                       changing it_excel.
    perform f_move_data.
    perform f_get_data.
    perform f_call_bapi.
    *&      Form  F_GET_FILE
          text
         -->P_FNAME  text
         <--P_SY_SUBRC  text
    form f_get_file  using    p_fname like fname.
    call function 'KD_GET_FILENAME_ON_F4'
    exporting
       program_name        = syst-repid
       dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
      STATIC              = ' '
      MASK                = ' '
      changing
        file_name           = p_fname
    EXCEPTIONS
      MASK_TOO_LONG       = 1
      OTHERS              = 2
    if sy-subrc <>  0.
    message e006(zhnc).
    endif.
    endform.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text
         -->P_FNAME  text
         <--P_IT_EXCEL  text
    form f_xls_itab  using    p_fname
                     changing p_it_excel.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      exporting
        filename                      = 'c:\supplies.xls'
        i_begin_col                   = p_begcol
        i_begin_row                   = p_begrow
        i_end_col                     = p_endcol
        i_end_row                     = p_endrow
      tables
        intern                        = it_excel
    exceptions
       inconsistent_parameters       = 1
       upload_ole                    = 2
       others                        = 3.
    if sy-subrc <>  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endform.                    " F_XLS_ITAB
    *&      Form  F_MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    form f_move_data .
    data : lv_index type i.
    field-symbols <fs>.
    *--- Sorting the internal table
    sort it_excel by row col.
    clear it_excel.
    loop at it_excel.
    move it_excel-col to lv_index.
    *--- Assigning the each record to an internal table row
    assign component lv_index of structure wa_data to <fs>.
    *--- Asigning the field value to a field symbol
    move it_excel-value to <fs>.
    at end of row.
    append wa_data to it_data.
    clear wa_data.
    endat.
    endloop.
    endform.                    " F_MOVE_DATA
    form f_get_data .
    loop at it_data into wa_data.
    move-corresponding wa_data to ihead_data.
    Header
        ihead_data-material       = wa_data-matnr.
        ihead_data-ind_sector     = wa_data-mbrsh.
        ihead_data-matl_type      = wa_data-mtart.
        ihead_data-basic_view     = 'X'.
        ihead_data-purchase_view  = 'X'.
        ihead_data-mrp_view       = 'X'.
        ihead_data-storage_view   = 'X'.
        ihead_data-quality_view   = 'X'.
        ihead_data-account_view   = 'X'.
        move-corresponding wa_data to iclient_data.
    Material Description
        refresh it_makt.
        it_makt-langu              = 'EN'.
        it_makt-matl_desc          =  wa_data-maktx.
        append it_makt.
    Purchase Order Description
    clear:iltxt,iltxt[].
    concatenate wa_data-text1 wa_data-text2 wa_data-text3 wa_data-text4
    wa_data-text5 wa_data-text6 into potext
    separated by space.
    iltxt-applobject = 'MATERIAL'.
    iltxt-text_name  =  wa_data-matnr.
    iltxt-text_id    = 'BEST'.
    iltxt-langu      = sy-langu.
    iltxt-langu_iso  = 'EN'.
    iltxt-format_col = space.
    iltxt-text_line  = potext.
    append iltxt.
    Client Data - Basic
        iclient_data-matl_group     = wa_data-matkl.
        iclient_data-old_mat_no     = wa_data-bismt.
        iclient_data-base_uom       = wa_data-meins.
        iclient_data-document       = wa_data-dzeinr.
        iclient_data-unit_of_wt     = wa_data-gewei.
        iclient_data-division       = wa_data-spart.
        iclient_data-qm_procmnt     = wa_data-qmpur.
        iclient_data-pur_valkey     = wa_data-ekwsl.
        iclient_datax-matl_group    = 'X'.
        iclient_datax-old_mat_no    = 'X'.
        iclient_datax-base_uom      = 'X'.
        iclient_datax-po_unit       = 'X'.
        iclient_datax-document      = 'X'.
        iclient_datax-unit_of_wt    = 'X'.
        iclient_datax-division      = 'X'.
        iclient_datax-var_ord_un    = 'X'.
        iclient_data-pur_valkey    = 'X'.
    move-corresponding wa_data to iplant_data.
    Plant - Purchasing
        iplant_data-plant          = wa_data-werks.
        iplant_data-pur_group      = wa_data-ekgrp.
        iplant_data-gr_pr_time     = wa_data-webaz.
        iplant_datax-plant         = wa_data-werks.
        iplant_data-pur_group      = 'X'.
        iplant_datax-gr_pr_time     = 'X'.
    *MRP1 View
        iplant_data-mrp_type       = wa_data-dismm.
        iplant_data-reorder_pt     = wa_data-minbe.
        iplant_data-mrp_ctrler     = wa_data-dispo.
        iplant_data-lotsizekey     = wa_data-disls.
        iplant_data-max_stock      = wa_data-mabst .
        iplant_datax-mrp_type       = 'X'.
        iplant_datax-reorder_pt     = 'X'.
        iplant_datax-mrp_ctrler     = 'X'.
        iplant_datax-lotsizekey     = 'X'.
        iplant_datax-max_stock      = 'X'.
    *MRP2 View
        iplant_data-plnd_delry     = wa_data-plifz.
        iplant_data-sm_key         = wa_data-fhori.
        iplant_data-ctrl_key       = wa_data-qsspur.
        iplant_data-availcheck     = wa_data-mtvfp.
        iplant_datax-plnd_delry     = 'X'.
        iplant_datax-sm_key         = 'X'.
        iplant_data-ctrl_key        = 'X'.
        iplant_datax-availcheck     = 'X'.
    *MRP3 View
       iplant_data-safety_stk     = wa_data-eisbe.
       iplant_data-qm_authgrp     = wa_data-qmatauth.
       iplant_datax-safety_stk     = 'X'.
       iplant_data-qm_authgrp      = 'X'.
    move-corresponding wa_data to istoragelocationdata.
    Storage View
        istoragelocationdata-plant        = wa_data-werks.
        istoragelocationdata-stge_loc     = wa_data-lgort_d.
        istoragelocationdata-stge_bin     = wa_data-lgpbe.
        istoragelocationdatax-plant        = wa_data-werks.
        istoragelocationdatax-stge_loc     = wa_data-lgort_d.
        istoragelocationdatax-stge_bin     = 'X'.
    Accounting
        iaccounting_data-val_area   = wa_data-werks.
        iaccounting_data-price_ctrl = wa_data-vprsv.
        iaccounting_data-moving_pr  = wa_data-verpr_bapi.
        iaccounting_data-price_unit = wa_data-peinh.
        iaccounting_data-val_class  = wa_data-bklas.
        iaccounting_data-val_cat    = wa_data-bwtty_d.
        iaccounting_datax-val_area   = wa_data-werks.
        iaccounting_datax-price_ctrl = 'X'.
        iaccounting_datax-moving_pr  = 'X'.
        iaccounting_datax-price_unit = 'X'.
        iaccounting_datax-val_class  = 'X'.
        iaccounting_datax-val_cat    = 'X'.
    clear it_ret.
    refresh it_ret.
    perform f_call_bapi.
    read table it_ret with key type = 'S'.
    if sy-subrc eq 0.
    perform f_bapi_commit.
    write:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',
    wa_data-matnr.
    else.
    *message e000(zhnc) with 'ERROR IN CREATING THE MATERIAL'.
    *WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
    *PERFORM F_DOWNLOAD.
    endif.
    *ENDIF.
    endloop.
    endform.                    " F_GET_DATA
    *&      Form  F_CALL_BAPI
          text
    -->  p1        text
    <--  p2        text
    form f_call_bapi .
    call function 'BAPI_MATERIAL_SAVEDATA'
       exporting
         headdata                   = ihead_data
         clientdata                 = iclient_data
         clientdatax                = iclient_datax
         plantdata                  = iplant_data
         plantdatax                 = iplant_datax
       FORECASTPARAMETERS         =
       FORECASTPARAMETERSX        =
       PLANNINGDATA               =
       PLANNINGDATAX              =
        storagelocationdata        = istoragelocationdata
        storagelocationdatax       = istoragelocationdatax
         valuationdata              = iaccounting_data
         valuationdatax             = iaccounting_datax
       WAREHOUSENUMBERDATA        =
       WAREHOUSENUMBERDATAX       =
       SALESDATA                  =
       SALESDATAX                 =
       STORAGETYPEDATA             = istoragelocationdata
       STORAGETYPEDATAX            = istoragelocationdatax
       FLAG_ONLINE                = ' '
       FLAG_CAD_CALL              = ' '
       NO_DEQUEUE                 = ' '
       NO_ROLLBACK_WORK           = ' '
      importing
        return                     = it_ret
      tables
        materialdescription        = it_makt
       UNITSOFMEASURE             = it_uom
       UNITSOFMEASUREX            = it_uomx
      INTERNATIONALARTNOS        =
         materiallongtext          = iltxt
       TAXCLASSIFICATIONS        =
        returnmessages             = returnm.
       PRTDATA                   =
       PRTDATAX                  =
       EXTENSIONIN               =
       EXTENSIONINX              =
    append it_ret.
    write: it_ret-message .
    endform.                    " F_CALL_BAPI
    *&      Form  F_BAPI_COMMIT
          text
    -->  p1        text
    <--  p2        text
    form f_bapi_commit .
    call function 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT         =
    IMPORTING
      RETURN        =
    endform.                    " F_BAPI_COMMIT
    Plz suggest some solution.
    Best Regards,
    Ravi

    Hi,
    Insert Material number in the MAKT(Material Description table).
    Also, check if the material number is missing somewhere else...
    Regards,
    Kunjal

  • Error in BAPI while creating incoming invoice

    Hi Experts,
    Im creating incoming invoice by using the BAPI,  'BAPI_INCOMINGINVOICE_CREATE'.
    when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to solve this ASAP.Pls help me out with this error
    Im passing following parameters to BAPI:
    wa_header-invoice_ind = 'X'.
    wa_header-doc_date   =  sy-datum.   "Enter the document date
    wa_header-pstng_date = sy-datum .   "Enter the posting date
    * wa_header-ref_doc_no = '5000008590'.
    wa_header-comp_code = '1000'.
    *wa_header-gross_amount = '50.11'.  "Enter the gross amount(aft. tax) for the invoice
    *wa_header-calc_tax_ind = 'X'.
      wa_header-currency = 'INR'.
      wa_header-INV_TRAN = 'X'.
      wa_header-SIMULATION = 'X'.
    wa_item-invoice_doc_item = '000001'.
    wa_item-po_number = '3700000557'.    "Enter the PO number
    wa_item-po_item = '00010'.           "Enter the PO item number
    * wa_item-ref_doc = '5000008590'.      "Enter the GR number
    * wa_item-ref_doc_year = '2014'.       "Enter the GR fiscal year
    * wa_item-ref_doc_it = '0001'.         "Enter the GR item number
    * wa_item-tax_code = 'V0'.             "Enter the tax code applicable
    wa_item-item_amount = '50.60'.     "Enter the item amount
    * wa_item-quantity = '2380'.           "Enter the invoice quantity
    * wa_item-po_unit = 'EA'.              "Enter the UoM
    APPEND wa_item TO it_item.
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
       EXPORTING
         headerdata                = wa_header
    * *   ADDRESSDATA               =
      IMPORTING
        invoicedocnumber          = g_invno
        fiscalyear                = g_fyear
       TABLES
         itemdata                  = it_item
    * *   ACCOUNTINGDATA            =
    * *   GLACCOUNTDATA             =
    * *   MATERIALDATA              =
    * *   TAXDATA                   =
    * *   WITHTAXDATA               =
    * *   VENDORITEMSPLITDATA       =
         return                    = it_ret
    * *   EXTENSIONIN               =
    IF g_invno IS NOT INITIAL.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          = 'X'
    * *   IMPORTING
    * *     RETURN        =

    Thanks every one for your valuable solutions.
    Issue is Solved by unchecking the flag.
    wa_header-INV_TRAN = 'X'.
    Thanks & Regards,
    Ramjee.

  • Error in BAPI RETURN for Service Contract

    Hi,
      I get an error in the BAPI Return for the Uploading the Service Contracts by LSMW. The Error Message is E BS No status object is available for &.Also want to know can we upload multiple line of header text for a Contract by this BAPI. If so then how would I do this , as the BAPI structure BAPISDTEXT has textline upto 132 characters. And I am take only one file in LSMW where the header & details come alongwith text. Or could also tell me the file structure of for the data upload. The legacy system sends multiple text in the header for a Contract.For Eg.
    Header1 Detail1 Text1
    HEader1 Detail2 Text2
    Header1 Detail3 Text3
    So I would need this text1TEXT2text3 in the Header Text of the Contracts. Or do I need the change the file structure. Many thanks for your time and help.

    Thanks Nablan, I could do that for multiple header coming in file. But I have a question for you on BAdI ALM_ME_006_GOODSMVT. I have implemented this BAdI , and this BAdI is called by a function Module ALM_MEREP_006_CREATE. When I test this FM giving the Material , Orderid and Movement type entries, this BAdI is triggered when giving a breakpoint. I've given this code for changing the movement type to 961. Cause the stanadrd scenario does not maintain Movement type 961 in Mobile Asset Management. The Movement type 961 for unplanned Materials comes to SAP and changes to 261 as maiantained by TCOKO table. To bypass this & retain the movement type 961 in SAP I'm using this BAdI. Currently this is what I'm doing and am stuck in the method interface how do I call the method.
    method IF_EX_ALM_ME_006_GOODSMVT~CREATE .
    break-point.
    *DATA : i_ce_goodsmovement TYPE REFERENCE
              ALM_ME_CUSTOMER_ENHANCEMENT.
    DATA : lr_badi_goods_movement TYPE REF TO if_ex_alm_me_006_goodsmvt.
    DATA : ls_user_data TYPE ALM_ME_USER_DATA-USERID.
    *DATA : goods_movement TYPE ALM_ME_MATERIAL_MOVEMENT.
    CALL METHOD lr_badi_goods_movement->create
      EXPORTING
           ce_goodsmovement = ce_goodsmovement
      IMPORTING
           user_data        = ls_user_data
           custom_user_data = ls_ce_user_data
           goods_movement   = goods_movement
      changing
           return           = return[].
    CALL FUNCTION 'ALM_ME_COMMIT_OR_ROLLBACK'
           TABLES
                return = return.
    endmethod.
    Please help me to get the data in this method. How do I call this.

Maybe you are looking for

  • Question about message interface

    I developed a jdbc to file scenario, it works, but I'm confused. I designed a message interface for jdbc outbound, CustomerRow |--row      |--CUST_NO      |--...... I set Document Name = 'resultset' in jdbc sender adapter. I can see payload in SXMB_M

  • How to pass a Vector as a Query String to a URL

    is there a way to pass a vector as a query string in a URL in Java. If so how? thanks in advance

  • How to get a CORBA appclient authenticated by appserver7

    I read the docs and I read the forums. Dont get it at all must have missed something. When I run my client the login dialog pops up, but the server doesn't do anything about it(nothing shows in the server.log) I tried with the fileRealm and samle JDB

  • Cisco Anyconnect Secure mobility client 3.1.03103

    Hello everyone, we have a Cisco router 1841 and we have always used correctly the AnyConnect version-win-2.5.3055-pre-deploy-k9. Now, we have computers with windows 8 and we have to use the new version of AnyConnect (3.1.03103) because the 2.5 versio

  • Opening InDesign CS3 files in InDesign CS2

    I know that I can open a CS2 file in CS3 but is there any way to go backwards and open a CS3 file in CS2. Is there any certain file type that I can save as to make this work and have the file still editable or am I out of luck?