BOM Cretion error with BAPI : BAPI_MATERIAL_BOM_GROUP_CREATE

Dear All,
Desc:
Here i am trying to create a BOM with differnet componants :
i am getting the below error while creating the BOM in varient alternative..
W BAPI1080             028
Error/warning when checking the structure of the BOM group with ID=BOMGROUP1
A BAPI1080             010
Variant/alternative 01 can only occur once with the function NEW
A BAPI1080             010
Variant/alternative 01 can only occur once with the function NEW
A BAPI1080             010
Variant/alternative 01 can only occur once with the function NEW
Please find the below code:
Code:
To get SC details
Get Plant details
SELECT  * FROM y27d_dc_marc
       INTO TABLE l_t_y27d_dc_marc
      WHERE instnr = '552'.                                 "instnr
IF sy-subrc = 0.
  SORT l_t_y27d_dc_marc BY werks.
ENDIF.
IF l_t_y27d_dc_marc IS NOT INITIAL.
Get all Regions
  SELECT  * FROM y27d_dc_dt_plant
         INTO TABLE l_t_y27d_dc_dt_plant
         FOR ALL ENTRIES IN l_t_y27d_dc_marc
         WHERE werks = l_t_y27d_dc_marc-werks.
ENDIF.
Read the SC Details
READ TABLE l_t_y27d_dc_dt_plant
           INTO l_r_y27d_dc_dt_plant
     WITH KEY werks_typ = g_c_sc.                           "SC
IF sy-subrc = 0.
Populate SC details
  g_f_sc_plant = l_r_y27d_dc_dt_plant-werks.
ENDIF.
Material BoM Group Header Data
l_r_bomgroup-bom_group_identification = 'BOMGROUP1'.
l_r_bomgroup-object_type              = 'BGR'.
l_r_bomgroup-object_id                = 'BOMGROUP1'.
l_r_bomgroup-bom_usage                = '1'. " YOU COULD CHANGE THE BOM USAGE TO YOUR needs
Plant assignment for the corresponding group
l_r_bomgroup-created_in_plant         = g_f_sc_plant.       "'0470'.
l_r_bomgroup-ltxt_lang                = sy-langu.
l_r_bomgroup-technical_type           = 'M'.                     "  bomgroup-technical_type           = wstzu-stlty.
l_r_bomgroup-bom_text                 = 'Test for BOM YSPR'.
APPEND l_r_bomgroup TO l_t_bomgroup.
CLEAR l_r_bomgroup.
DATA : l_f_var_alter TYPE stalt,
       l_f_var_alter_cnt TYPE stalt.
Get BOM Item details
SELECT * FROM y27d_dc_bom
         INTO TABLE l_t_bom_item
         WHERE instnr = '552'.
IF sy-subrc = 0.
DESCRIBE TABLE l_t_bom_item LINES l_f_var_alter.
Populate item data
  LOOP AT l_t_bom_item INTO l_r_bom_item.
Varient alternative for all the corresponding componants
    l_f_var_alter = sy-tabix.
Details of the items of the variants
    l_r_itemdata-bom_group_identification    = 'BOMGROUP1'.
    l_r_itemdata-object_type                 = 'ITM'.
    l_r_itemdata-object_id                   = l_r_bom_item-bcomponant. "'MDTRAW2011'
    l_r_itemdata-item_no                     = l_r_bom_item-bitemno."'0010'.
    l_r_itemdata-item_cat                    = l_r_bom_item-bitemcat.    "'L'.
    l_r_itemdata-component                   = l_r_bom_item-bcomponant. "'MDTRAW2011'.
    l_r_itemdata-comp_qty                    = l_r_bom_item-bquan."'2'.
    l_r_itemdata-valid_from_date             = sy-datum.
    APPEND l_r_itemdata TO l_t_itemdata.
    CLEAR l_r_itemdata.
Item componant assignment to a variant/alternative
    l_r_variants-bom_group_identification = 'BOMGROUP1'.
    l_r_variants-object_type              = 'BOM'.
    l_r_variants-object_id                = l_r_bom_item-bcomponant.  "'MDTRAW2011'.   "'BOM1'.
    l_r_variants-alternative_bom          = '01'.
    l_r_variants-bom_status               = '01'.
    l_r_variants-base_qty                 = '100'.
    l_r_variants-valid_from_date          = sy-datum.
    l_r_variants-function                 = 'NEW'.
    APPEND l_r_variants TO l_t_variants.
    CLEAR l_r_variants.
Item componant assignment to linked items
Linking items to the corresponding variants
    l_r_itemlink_to_var-bom_group_identification = 'BOMGROUP1'.
    l_r_itemlink_to_var-sub_object_type          = 'ITM'.
    l_r_itemlink_to_var-sub_object_id            = l_r_bom_item-bcomponant.       "'MDTRAW2011'.       "componant linked with varient
    l_r_itemlink_to_var-super_object_type        = 'BOM'.
    l_r_itemlink_to_var-super_object_id          = l_r_bom_item-bcomponant.       "'MDTRAW2011'.       "componant linked with varient
    l_r_itemlink_to_var-valid_from_date          = sy-datum.
    l_r_itemlink_to_var-function                 = 'NEW'.
    APPEND l_r_itemlink_to_var TO l_t_itemlink_to_var.
    CLEAR l_r_itemlink_to_var.
  ENDLOOP.
ENDIF.
Get the Header details
SELECT SINGLE * FROM y27d_dc_mara
                INTO l_r_bom_head_mara
                WHERE instnr = '552'.               "instnr
IF sy-subrc = 0.
Populate header data
  l_r_bom_head-bom_group_identification = 'BOMGROUP1'.
  l_r_bom_head-material                 = l_r_bom_head_mara-matnr.  "'MDT01022011'.
  l_r_bom_head-plant                    = g_f_sc_plant.     "'0470'.
  l_r_bom_head-bom_usage                = '1'.              "'5'.
  l_r_bom_head-alternative_bom          = '01'.
  APPEND l_r_bom_head TO l_t_bom_head.
  CLEAR l_r_bom_head.
ENDIF.
Create BOM
CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
  EXPORTING
    all_error         = 'X'
  TABLES
    bomgroup          = l_t_bomgroup          "BOM group
    variants          = l_t_variants          "Varients
    items             = l_t_itemdata          "Item details
    materialrelations = l_t_bom_head          "Header details
    itemassignments   = l_t_itemlink_to_var   "Item lineked to Varient
    return            = l_t_return.
LOOP AT l_t_return INTO l_r_return WHERE type CA 'AEX'.
  l_f_error = 'X'.
ENDLOOP.
IF l_f_error = space.
    Processing successful --> Commit work on PDM system
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ELSE.
    Error in processing --> Rollback work on PDM system
  CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
LOOP AT l_t_return INTO l_r_return.
  WRITE:/ l_r_return-type, l_r_return-id, l_r_return-number,
          l_r_return-message.
ENDLOOP.
could you please help me to come out of this problem.

Hi,
Did you try creating manually through CS01 with the same data? There could be a customization setting to restrict like this.
Thanks,
Vinod.

Similar Messages

  • Error with BAPI:'BAPI _MATERIAL_SAVEDATA'.

    Hi Guys,
    I am getting error when creating extended views for newly created materials.I am taking a new material number with Function module :BAPI_MATERIAL_GETINTNUMBER, and it has been created new material with Basi view.When i try to create extended views for the same material,its giving the following error: Field MATNR has been transferred inconsistently or is blank.
    Thanks in advance.
    Regards,
    Reddy

    The BAPI 'BAPI_MATERIAL_GETINTNUMBER' should not be used to assign internal numbers to material types.
    Documentation for 'BAPI_MATERIAL_GETINTNUMBER' says:
    In future, this method will no longer be supported for the object type Material (BUS1001).
    For standard materials you should use 'BAPI_STDMATERIAL_GETINTNUMBER' & for retail materials you should be using 'BAPI_MATERIAL_GETINTNUMBERRET'.
    BR,
    Suhas

  • Error message after update while creatin equipment with BAPI

    Hi All,
    I'm creating equipment master record with BAPI 'BAPI_EQUI_CREATE'. After commit I receive the following error message in my inbox - 
    Update was terminated
    System ID....   ***
    Client.......   ***
    User.....   ***
    Transaction..   Z***
    Update key...   4AD49ADAF8E13020E10000000A701B19
    Generated....   15.10.2009, 16:44:33
    Completed....   15.10.2009, 16:44:33
    Error Info...   Error while determ. loc. crcy: exchange rate type date from to
    Who knows what's the reason and how can it be fixed.
    Thanks in advance,
    Kind Regards,
    Nikolai.
    Edited by: Nikolai Gurlenia on Oct 16, 2009 2:18 PM

    Hi ,
    Try to run the transaction and post the record manually and see how it behaves.
    Contact your functional consultant and check with them if they recently made some config changes
    Thanks
    Ramya

  • Post Goods Issue with BAPI with reference to BOM

    Hi All,
    I want to post Goods Issue with BAPI / FM with reference to BOM.
    The requirement is like to replicate what we can do with MB1A with reference to BOM with BAPI / FM.
    Please give ur suggestions.
    Thanks in advance.
    Chintan.

    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_forums_rm&query=kanban&adv=false&sortby=cm_rnd_rankvalue&sortmode=true&searchmode=similar&similardocsuri=/forumsrm/1_category/42_category/50_forum/34196_thread/322837_message

  • 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

  • Reg: Mandatory fields updation with BAPI

    Hi..
    We are working on BDC using BAPI. In this if flat files contians only 4 fields and the mandatory fields in the application are seven then system needs to through error message. But with BAPI the program is updating the database without throwing error eventhough all mandatory fileds are not filled up with data.. Where exactly we need to do modifications to get error message when mandatory fields are not filled up with input.
    Regards

    Hi Verendra
    Sometimes the function modules/BAPI's used by SAP do a direct update on the database tables. In such scnearios the entries are created in the system even though if the mandatory entries are not filled.
    If the number of mandatory fields are small, then before the BAPI call,  check if all the mandatory fields are filled or not;throw error in case of empty fields & bypass the BAPI call.
    In case the mandatory fields are too high, then in that case, please use BDC recording to update the data.
    Regards
    Chetan
    PS:Reward points if you find this helpful.

  • B2B-51566 Description: Parse stream error with RosettaNet 1.1

    Hi
    Need help with the following error message
    B2B-51566 Parse stream error
    We have a trading partner set up to use RosettaNet 1.1 protocol and we are getting 51566 error. We are NOT experiencing this error with a trading partner who is in RosettaNet 2.0
    we are currently patched up to 11.1.1.5
    One thing I notice is when i go to the message and open the packed message i get this "Cannot display Packed Message in binary format."
    Here is the payload
    XMessage-ID: <[email protected]d.e2open.com>
    MIME-Version: 1.0
    Content-Type: multipart/related;
         boundary="----=_Part_176_29725195.1331307008851";
         type="Application/x-RosettaNet"
    Content-Description: This is the RosettaNet Business Message
    Content-ID: "-15059242:135f6ea5e3c:-62b9"
    ------=_Part_176_29725195.1331307008851
    Content-Type: Application/xml; rnsubtype=preamble-header; name=Preamble
    Content-Transfer-Encoding: binary
    Content-Disposition: attachment; filename=Preamble
    Content-ID: <[email protected]>
    Content-Description: This is the Preamble Header part of the Business Message
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE Preamble SYSTEM "PreamblePartMessageGuideline.dtd">
    <Preamble>
    <DateTimeStamp>20120309T153008.852Z</DateTimeStamp>
    <GlobalAdministeringAuthorityCode>RosettaNet</GlobalAdministeringAuthorityCode>
    <GlobalUsageCode>Production</GlobalUsageCode>
    <VersionIdentifier>1.1</VersionIdentifier>
    </Preamble>
    ------=_Part_176_29725195.1331307008851
    Content-Type: Application/xml; rnsubtype=service-header; name=ServiceHeader
    Content-Transfer-Encoding: binary
    Content-Disposition: attachment; filename=ServiceHeader
    Content-ID: <[email protected]>
    Content-Description: This is the Service Header part of the Business Message
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ServiceHeader SYSTEM "ServiceHeaderPartMessageGuideline.dtd">
    <ServiceHeader>
    <ProcessControl>
    <ProcessIdentity>
    <description>
    <FreeFormText>NotNull</FreeFormText>
    </description>
    <GlobalProcessCode>Request Purchase Order</GlobalProcessCode>
    <GlobalProcessIndicatorCode>3A4</GlobalProcessIndicatorCode>
    <initiatingPartner>
    <GlobalBusinessIdentifier>007710825</GlobalBusinessIdentifier>
    </initiatingPartner>
    <InstanceIdentifier>PIPC0A85CB8135F814CB4200000EAFE56F0</InstanceIdentifier>
    <VersionIdentifier>V02.00</VersionIdentifier>
    </ProcessIdentity>
    <ServiceRoute>
    <fromService>
    <BusinessServiceDescription>
    <GlobalBusinessServiceCode>Seller Service</GlobalBusinessServiceCode>
    </BusinessServiceDescription>
    </fromService>
    <toService>
    <BusinessServiceDescription>
    <GlobalBusinessServiceCode>Buyer Service</GlobalBusinessServiceCode>
    </BusinessServiceDescription>
    </toService>
    </ServiceRoute>
    <TransactionControl>
    <AttemptCount>1</AttemptCount>
    <PartnerRoleRoute>
    <fromRole>
    <PartnerRoleDescription>
    <GlobalPartnerRoleClassificationCode>Seller</GlobalPartnerRoleClassificationCode>
    </PartnerRoleDescription>
    </fromRole>
    <toRole>
    <PartnerRoleDescription>
    <GlobalPartnerRoleClassificationCode>Buyer</GlobalPartnerRoleClassificationCode>
    </PartnerRoleDescription>
    </toRole>
    </PartnerRoleRoute>
    <TransactionIdentity>
    <GlobalTransactionCode>Request Purchase Order</GlobalTransactionCode>
    <InstanceIdentifier>TIC0A85CB8135F814CB4200000EAFE5700</InstanceIdentifier>
    </TransactionIdentity>
    <SignalControl>
    <inResponseTo>
    <ActionIdentity>
    <GlobalBusinessActionCode>Purchase Order Request Action</GlobalBusinessActionCode>
    <InstanceIdentifier>C0A85CB8135F814C33C00000EAFE5670</InstanceIdentifier>
    </ActionIdentity>
    </inResponseTo>
    <InstanceIdentifier>20120309T153008.882Z</InstanceIdentifier>
    <PartnerRoute>
    <fromPartner>
    <PartnerDescription>
    <BusinessDescription>
    <GlobalBusinessIdentifier>364132837</GlobalBusinessIdentifier>
    </BusinessDescription>
    <GlobalPartnerClassificationCode>null</GlobalPartnerClassificationCode>
    </PartnerDescription>
    </fromPartner>
    <toPartner>
    <PartnerDescription>
    <BusinessDescription>
    <GlobalBusinessIdentifier>007710825</GlobalBusinessIdentifier>
    </BusinessDescription>
    <GlobalPartnerClassificationCode>null</GlobalPartnerClassificationCode>
    </PartnerDescription>
    </toPartner>
    </PartnerRoute>
    <SignalIdentity>
    <GlobalBusinessSignalCode>Receipt Acknowledge</GlobalBusinessSignalCode>
    <VersionIdentifier>1.1</VersionIdentifier>
    </SignalIdentity>
    </SignalControl>
    </TransactionControl>
    </ProcessControl>
    </ServiceHeader>
    ------=_Part_176_29725195.1331307008851
    Content-Type: Application/xml; rnsubtype=service-content;
         name=ReceiptAcknowledgement
    Content-Transfer-Encoding: binary
    Content-Disposition: attachment; filename=ReceiptAcknowledgement
    Content-ID: <[email protected]>
    Content-Description: This is the Service Content part of the Business Message
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ReceiptAcknowledgement SYSTEM "ReceiptAcknowledgementMessageGuideline.dtd">
    <ReceiptAcknowledgement>
    <fromRole>
    <PartnerRoleDescription>
    <ContactInformation>
    <contactName>
    <FreeFormText>E2open Support</FreeFormText>
    </contactName>
    <EmailAddress>[email protected]</EmailAddress>
    <telephoneNumber>
    <CommunicationsNumber>650-381-6000</CommunicationsNumber>
    </telephoneNumber>
    </ContactInformation>
    <GlobalPartnerRoleClassificationCode>Seller</GlobalPartnerRoleClassificationCode>
    <PartnerDescription>
    <BusinessDescription>
    <GlobalBusinessIdentifier>364132837</GlobalBusinessIdentifier>
    <GlobalSupplyChainCode>Information Technology</GlobalSupplyChainCode>
    </BusinessDescription>
    <GlobalPartnerClassificationCode>null</GlobalPartnerClassificationCode>
    </PartnerDescription>
    </PartnerRoleDescription>
    </fromRole>
    <receivedDocumentDateTime>
    <DateTimeStamp>20120309T153008.907Z</DateTimeStamp>
    </receivedDocumentDateTime>
    <receivedDocumentIdentifier>
    <ProprietaryDocumentIdentifier>337719</ProprietaryDocumentIdentifier>
    </receivedDocumentIdentifier>
    <thisMessageDateTime>
    <DateTimeStamp>20120309T153008.904Z</DateTimeStamp>
    </thisMessageDateTime>
    <thisMessageIdentifier>
    <ProprietaryMessageIdentifier>20120309T153008.905Z</ProprietaryMessageIdentifier>
    </thisMessageIdentifier>
    <toRole>
    <PartnerRoleDescription>
    <GlobalPartnerRoleClassificationCode>Buyer</GlobalPartnerRoleClassificationCode>
    <PartnerDescription>
    <BusinessDescription>
    <GlobalBusinessIdentifier>007710825</GlobalBusinessIdentifier>
    <GlobalSupplyChainCode>Information Technology</GlobalSupplyChainCode>
    </BusinessDescription>
    <GlobalPartnerClassificationCode>null</GlobalPartnerClassificationCode>
    </PartnerDescription>
    </PartnerRoleDescription>
    </toRole>
    </ReceiptAcknowledgement>
    ------=_Part_176_29725195.1331307008851--

    I do have SR but hoping i can get quicker answer hereYou may always escalate the SR if you are not getting response timely. Anyways, give the reference of this thread in the SR and ask service engineer to file a bug.
    I will email you the wire messageI saw the wire message you mailed across. There are some junk characters in the starting of the payload and that's why parsing is failing. Most probably it is a BOM (Byte Order Mark). Ask your TP to send messages in UTF-8 encoding without BOM or any other junk character in the starting of the message. You may open the wire message payload you mailed across in notepad or textpad and you will able to see those junk characters in the starting of the payload.
    Regards,
    Anuj

  • Error in bapi BAPI_PR_CREATE while uploading

    HI Gurus,
            I have program for uploading PR with BAPI. BAPI_PR_CREATE.
    while uploading without account assignment category  it is working fine.
    while enter account assignment category  v need to enter sales order no and item no. that is mandatory field for account assignment category..
    if using program its showing error.
    No instance of object type Purchase Requisition has been created. External reference: # 1
    Enter sales order
    Sd document XXXXXXX is not in the database or has been archived.
    but  I tried to create manually it is working fine.
    I tried to upload with bapi directly with out z program.
    tht time also it showing error
    No instance of object type Purchase Requisition has been created. External reference: # 1
    Enter sales order
    If any one give solution
    it is very helpful for me.

    Hi
    Thnaks for the Reply,
    in normal scenario it ll upload base on header.
    if header change it ll generate automatically requisition no.  So in program v used AT END OF pr_type. 
    so if pr_type is diff it will work.
    in my case only one header it will not change. v hav only one pr type.
    it should generate based on Item.
    If item 10 it should generate new requisition No.
    my flat file is ,
    pr type -  material  - pur org - plant - storage loc  - qty -  traking no - ....  pr item
    xxx          abc           pqr        1000       xyz             100         11111               10
    xxx          abc           pqr        1000       xyz              200        11111                20        
    xxx          abc           pqr        1000       xyz              300       11111                 30
    xxx          abc           pqr        1000       xyz              400        11111                10
    xxx          abc           pqr        1000       xyz              500        11111                20
    here header is same.. if pr item 10 it should generate new requisition No, means it should commit before value 10.
    so before commit v hav to give the logic if item 10 it should generate for before value.
    hope u got my requirement.

  • Problem with bapi BAPI_BUS2054_CREATE_MULTI

    I am trying to create multiple wbs elements for a given definition
    using the bapi BAPI_BUS2054_CREATE_MULTI as per the documentation i have used BAPI_PS_INITIALIZATION
    first to initialize,then followed by BAPI_BUS2054_CREATE_MULTI  and ending with BAPI_PS_PRECOMMIT and BAPI_TRANSACTION_COMMIT
    it says the definition is o.k but its giving error with wbs element.
    that to enter all required fields.
    could any body please  tell what are all the required fields that i have to enter for it_wbs.

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

  • Error with Statement Rule: Reference is ambiguous

    Hello,
    Hopefully someone will be able to help me out with this inquiry. I have a configurator model where the BOM has been imported. Within this model, there are two BOM nodes of the same name (Item Number) but they are unique in the model by their effective dates. Basically, I have the following:
    Model
    __Feature1
    ____Option1 Eff_In: 1/1/2009 Eff_Out: 9/20/2011
    ____Option1 Eff_In: 12/21/2011 Eff_Out: 9/21/2090
    If I create say a CONTRIBUTE statement rule referencing node 'Option1', I get an error that reads "The reference Option1 is ambiguous". I understand that I am getting this error because Configurator cannot determine which instance of this Option1 I am referring to. Can anyone tell me how I can specify the specific node required? I would have expected that Configurator would always look at the structure effective dates, but it would appear not. I have looked at using full path or properties as part of my node reference, but the effective dates don't appear to be a standard system property that can be referenced (unless I missed something).
    Any help would be appreciated.
    Thanks,
    Paul Wentink

    From: Veerendra Singavarapu <veerendra.singavarapu@...>
    Sent: Sun Aug 15, 2010 12:50 am
    To: [email protected]
    RE: [configsig] ambiguity error
    Hi Lauree,
    As Carole rightly pointed out, this issue has been recently fixed in 11.5.10 branch. This happens only when the ECO change brings one or more item’s attribute changes. i.e. for instance an OC undergone an ECO change, with {min=0 and max=null} prior to ECO change and {min=0 and max=1} after ECO change can cause this issue.
    With regards,
    Veerendra S.
    ==========
    From: Lauree Swihart [mailto:lswihart@...]
    Sent: Friday, August 13, 2010 10:52 PM
    To: [email protected]
    Subject: RE: [configsig] ambiguity error
    Thanks a bunch Carole!
    ==========
    From: [email protected] [mailto:[email protected]] On Behalf Of Landgrebe, Carole
    Sent: Friday, August 13, 2010 1:21 PM
    To: [email protected]
    Subject: RE: [configsig] ambiguity error
    Hi Lauree-
    This is a known issue, and I had them create a fix for it in 11.5.10 when we were on 25-43A. Now the issue exists in 12 and I haven’t yet logged the TAR for that. We have exactly the same issue as we force all bom changes through ECOs, and even putting effectivity dates on the rules that match the effectivity dates of the BOM does not resolve the issue. Fix was produced off of TAR 7619362.994, looks like bug number was 8737252….not sure what release it was part of, we applied it as a manual fix, a jar file and an update to package body for cz_model_util_pvt.
    Holler if you need more info.
    Thanks!
    Carole
    ==========
    From: [email protected] [mailto:[email protected]] On Behalf Of Reinsch, Ted A (GE Energy)
    Sent: Friday, August 13, 2010 1:09 PM
    To: [email protected]
    Subject: RE: [configsig] ambiguity error
    Have you refreshed the model since this change?
    The only time I have received this error was if I was using the same component in more than 1 option class or option feature and it tells me that I need to further define the path to the object in the rule such as
    'ATO Model Name'.'Option Class 1'.'8003-518.8003-519.8003-502.029-4572-03' or
    'ATO Model Name'.'Option Class 2'.'8003-518.8003-519.8003-502.029-4572-03'
    ==========
    From: [email protected] [mailto:[email protected]] On Behalf Of Lauree Swihart
    Sent: Friday, August 13, 2010 10:45 AM
    To: [email protected]
    Subject: [configsig] ambiguity error
    I have a component that is currently in a logic rule. When this component is in a logic rule it works.
    This same component was changed out on an ECO, causing 2 records in the BOM. One with an end effective date and another with a begin effective date. When I convert my rule to a statement rule, I receive this error. I’ve received this error in the past and normally I thought I’d just changed the effectivity range associated with the rule and that resolved the issue. But, it’s not resolving the issue today.
    Is there any other way for me to resolve this without deleting the component in the bom that has been effectively end dated? I don’t want that route because that defeats the purpose of using an ECO and general foundation of why we use ECO’s for our healthcare products.
    The reference 8003-518.8003-519.8003-502.029-4572-03 is ambiguous.
    Thanks,
    Lauree Swihart

  • LSMW - Upload purchase contracts (ME31K) with BAPI

    I'm trying to upload some contracts from the legacy to SAP ECC 6.0 using LSMW.
    I've already worked with Direct Input and Batch Input record with LSMW but never with BAPI.
    I found business object BUS2014 / Message Type - PURCONTRACT_CREATE but I don't know how to continue the process. Could you give me some suggestions?
    Thanks in advance,
    Guiza

    Hi,
    I saw some examples but I'm still with the same problem. At step 4 Maintain Structure Relations I have this error: "No target structures could be found - Message no. /SAPDMC/LSMW_OBJ_030001".
    What could be?
    Step 1 - Business Object Method -
    BUS2014
    Method: Create
    Step 2 - I've create 2 structures
    Header and Item
    Step 3 - I associate the fields that I want to upload.
    I don't know but could the error be because the Idoc Inbound Processing?
    Thanks,
    Guiza

  • Communication error with the LOCAL_EXEC Function BAPI_PTMGREXTATTABS_CHECK

    Hello,
    We use timesheet (CATS) in a separate SAP system from the SAP system in which HR resides.
    I found out how the loosely coupled scenario with CATS works with a SAP HR system. We transfer the workschedule and absence data with report RPTIMEOVERVIEW_REPLICATE to the SAP system in which CATS is used. This data is then available in the PTIMEOV1 table to perform time checks in CATS. The distribution model for ALE takes care of the fact that the data is posted into table PTIMEOV1. With BD97 I set up that the BAPI: PTMGREXTATTABS.CHECK has RFCdestination for synchronous calls  = LOCAL_EXEC.
    When I want to record on an attendance code without clock times then the above works fine. The SAP system in which CATS resides looks into table PTIMEOV1. So far so good.
    However, when I want to record hours WITH clock times then I cannot save the data. The error message HRTIM00CATS667 shows up:
    "Communication error with the LOCAL_EXEC Function BAPI_PTMGREXTATTABS_CHECK is no t available  system"
    Diagnosis
    An error has occured during communication with the HR System. The HR data in the time sheet cannot be validated.
    From the error message description it seems that it wants to check the SAP HR system instead of looking for the check in the SAP system in which CATS resides.....
    When I change the value from LOCAL_EXEC to the system in which HR resides then the error disappears, but then it really checks into the SAP HR system (synchronous check with that SAP HR system) and that is not what the customer wants. The check should be local on the PTIMEOV1 table (in case the SAP HR system is down).
    I did not find any OSS notes on the topic....or other info on SDN.
    Can anyone help me out concerning this starnge error message, at least for me?
    Thanks very much in advance,
    Kind regards,
    Mirko

    "A point to add"
    I just noticed that following message is being continously receiving in the database alert_log:
    Sat Oct 9 16:04:52 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:05:32 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:06:30 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:07:10 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:09:35 2010
    Incremental checkpoint up to RBA [0x1d.1f9928.0], current log tail at RBA [0x1d.1f9a79.0]
    Sat Oct 9 16:11:52 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:29:40 2010
    Incremental checkpoint up to RBA [0x1d.1f9b87.0], current log tail at RBA [0x1d.1f9bf4.0]
    ~
    Please help.

  • Anything wrong with Bapi of FB60

    Hi friends ,
    i m developing a prog with bapi of FB60 it always fire the error no 014
    i.e.
    FI/CO interface: Line item entered several times 
    i am feeding the data which is given below in the BAPI .
    Please help me if anybody has worked on this BAPI
    w_item = w_item + 1 .
       t_headerdata-COMP_CODE  = 'BAI' .
       t_headerdata-PSTNG_DATE  = sy-datum.
       t_headerdata-BUS_ACT = 'RFBU' .
       t_headerdata-USERNAME = sy-uname .
       t_headerdata-HEADER_TXT = 'ABCsk123' .
       t_headerdata-COMP_CODE = 'BAI' .
       t_headerdata-DOC_DATE = sy-datum .
       t_headerdata-PSTNG_DATE = sy-datum .
       t_headerdata-FISC_YEAR = '2007' .
       t_headerdata-DOC_TYPE = 'KG' .
       t_headerdata-REF_DOC_NO = 'ABCsk123' .
      append t_headerdata .
    t_currency-itemno_acc = w_item  .
    t_currency-CURRENCY = 'IDR' .
    t_currency-AMT_DOCCUR = '1000' .
    t_currency-curr_type = '00'.
    append t_currency .
    t_accntgl-ITEMNO_ACC = w_item .
    t_accntgl-GL_ACCOUNT = '0000619999' .
    t_accntgl-COMP_CODE = 'BAI' .
    t_accntgl-BUS_AREA = 'JA01' .
    t_accntgl-PLANT = 'JA01'  .
    t_accntgl-doc_type     = 'KG' .
    t_accntgl-FISC_YEAR = '2007' .
    t_accntgl-PSTNG_DATE  = sy-datum.
    append t_accntgl .
    t_ACCOUNTPAYABLE-ITEMNO_ACC = w_item .
    t_ACCOUNTPAYABLE-VENDOR_NO = '0000108521' .
    append t_ACCOUNTPAYABLE.

    I don't know if this will help or not:
    w_item = w_item + 1 .
    t_headerdata-comp_code = 'BAI' .
    t_headerdata-pstng_date = sy-datum.
    t_headerdata-bus_act = 'RFBU' .
    t_headerdata-username = sy-uname .
    t_headerdata-header_txt = 'ABCsk123' .
    t_headerdata-comp_code = 'BAI' .
    t_headerdata-doc_date = sy-datum .
    t_headerdata-pstng_date = sy-datum .
    t_headerdata-fisc_year = '2007' .
    t_headerdata-doc_type = 'KG' .
    t_headerdata-ref_doc_no = 'ABCsk123' .
    APPEND t_headerdata .
    t_currency-itemno_acc = w_item .
    t_currency-currency = 'IDR' .
    t_currency-amt_doccur = '1000' .
    t_currency-curr_type = '00'.
    APPEND t_currency .
    t_accntgl-itemno_acc = w_item .
    t_accntgl-gl_account = '0000619999' .
    t_accntgl-comp_code = 'BAI' .
    t_accntgl-bus_area = 'JA01' .
    t_accntgl-plant = 'JA01' .
    t_accntgl-doc_type = 'KG' .
    t_accntgl-fisc_year = '2007' .
    t_accntgl-pstng_date = sy-datum.
    APPEND t_accntgl .
    w_item = w_item + 1 .           "<============
    t_accountpayable-itemno_acc = w_item .
    t_accountpayable-vendor_no = '0000108521' .
    APPEND t_accountpayable
    Rob

  • 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.

  • LSWM with BAPI

    Hi,
    I am trying to post a FI document via LSWM, BAPI.
    When I run Step 13-Start Idoc Generation, it displays the message error => No partner exists with the name ",type"
    Does anybody know what is the problem?
    LSMW - Step 1:
    Business Object : BUS6035
    Method: Post
    Message Type: ACC_DOCUMENT
    Basic type: ACC_DOCUMENT03
    In LSMW menu, Settings -> Idoc Inbound Processing, I copied information from another LSMW with BAPI
    File Port: TEST
    Partner type: LS
    Partner no.: E1R_200
    Thanks in advance.
    Janete

    Solved. Thanks Jürgen L.
    WE20 was already customized.
    I activate IDOC settings in LSMW transaction, I re-execute all steps.
    Janete

Maybe you are looking for

  • The document could not be saved.  Write error.

    I have a portfolio with a OneNote section embedded in the portfolio.  When I attempt to save the document, I get an error message stating, "The document could not be saved.  Write error."  The document is stored on a network drive.  Other users are a

  • Message Handling in BADI implementation

    Hi All, Initially I was trying to use an EXIT but was not able to do so because we were not getting the functionality properly. So i switched to BADI. I have implemented a standard BADI and its working fine. Now i want to display messages as required

  • Install Error in WS 2008 R2

    Attempting to install CF10 on Windows Server 2008 R2 Standard 64bit SP1. I've attempted twice and received an error near the end of the installation process both times: "ExecuteAppCmd.exe has stopped working." After dismissing the error, the installa

  • How do I transfer images and videos from Apple Configurator supervised device to a computer?

    It seems that I can't do it even on the Mac (10.7) that supervised them. The Image Capture utility doesn't see any content on the device.

  • Can't connect to get 2.2 update - Help please!

    I'm trying to sync my iPhone. I click "check for updates". My computer is connected to the internet. But I get the message "iTunes could no contact the iPhone software update server because you are not connected to the internet." However, I can acces