Classification Data through BAPI or Badi

Hi All,
I need to access the class data in a custom development. Which function module ot BAdi i can use to get this information.
Thanks,
Rajesh.

Hi,
Use the Function Module
CLAF_CLASSIFICATION_OF_OBJECTS
inputs should be CLASS, CLASSTYPE, OJECT, OBJECT TABLE as MCH1.
Kindly ask me if you need any other details
Thanks & Regards,
Srinivas.D

Similar Messages

  • How to pass delivery date through BAPI while creating a sale order

    Dear frndz,
         I am using 'BAPI_SALESORDER_CREATEFROMDAT1'
    to create a sale order .
        I don't have any problem..
        But I have to pass schedule line delivery date through this bapi .
       I used REQ_DATE in structure BAPISCHDL.
       But I can' t get it.
       Through which parameter can i meet this..
       The sale order should be created line item wise along with my delivery date..
      Any suggestions...
    regards.
    siva

    Dear frnd,
        Danq for your response..I can't use DLV_DATE for this requirement..
        But I used REQ_DATE in the structure BAPISCHEDULE .
       I came to know that the problem i faced previously  was only
    internal data conversion.
        Now am able to pass my delivery date..
        so I am closing the thread..
    Regards.
    siva

  • Update 'installation date' through BAPI in contract.

    Hi,
        In contract 'VA42' I want to update Intallation date in contract data tab of every material.
    Is there any BAPI that updates it?
    Regards,
    Shashank

    Do u have searched for a BADI that is called before saving the doc? That can be used for manipulate data.

  • Update Reversal Date through BAPI

    Hi All,
    I am using BAPI_ACC_DOCUMENT_POST for posting.
    But when the document type is 'AC' I need to pass the
    reversal date (BKPF-STODT) also.
    I cannot find the parameter for this field in the BAPI.
    Can anyone suggest any other alternative. I do want to use a BDC.
    Regards,
    Rakesh

    Do u have searched for a BADI that is called before saving the doc? That can be used for manipulate data.

  • Transfer of Classes( Classification data) - through ALE

    Hi experts,
    I am trying to transfer Classes from a 3.1i system to a ECC 6.0 system through ALE distribution.
    Almost all the classes got transferred but in a few of the classes, the status of the idoc remains at 64 - waiting to be processed.
    When I scheduled the processing of these idocs in background mode they result in a dump.
    Dump:
    The exception, which is assigned to class 'CX_SY_ARITHMETIC_OVERFLOW', was not
      caught in
    procedure "MAINTAIN_ALLO_VALUES_VIA_API" "(FORM)", nor was it propagated by a
      RAISING clause.
    This dump is happening because sy-index value is crossing 2147483647 ( which is the max allowed value).
    I could not find any relevant notes for it. Does anyone know what is causing this issue and how to correct it.
    FYI - There are around 3000 values attached to a characteristic which is attached to the class.
    Thanks and Regards,
    Karthik

    Hi Karthrik,
    Did you never get answer on this topic or did you make a request to SAP in the meanwhile? I got same dump and I am looking for solution, too.
    Br
    Markku

  • Need Material Classification data function module

    Hi all,
    i have requirement to fetch material classification data through function module.
    is there any point to know releted function modules of classification data of material data.
    Thanks in advance,
    Bhaskar

    Hi,
    In KLAH you get the list of Classifications linked to a Material. Give OBJEK = MATNR.
    By giving CLINT in KLAH you find the corresponding CLASS.
    in BAPI:
    BAPI_OBJCL_GETDETAIL
    pass following values:
    OBJECTKEY = KSSK-OBJEK       
    OBJECTTABLE  = 'MARA'    
    CLASSNUM  = KLAH-CLASS       
    CLASSTYPE  = KLAH-KLART     
    KEYDATE  = sy-datum        
    UNVALUATED_CHARS  
    LANGUAGE  = sy-langu
    the output would be in
    ALLOCVALUESNUM
    ALLOCVALUESCHAR
    ALLOCVALUESCURR
    based on the type of characteristic.
    Best Regards, Murugesh AS

  • Material Master Update through BAPI - Follow up material not updated

    Hi Experts,
    I am updating the material master through a custom transaction using the BAPI  'BAPI_MATERIAL_SAVEDATA'. Rest of the fields are updating correctly except for discontinuation ind., effective out date & follow-up material.
    When I try to update it through MM02 it is working fine. However, when I pass the same data through BAPI it is throwing an error message that 'the material XXXXXX does not exist or is not activated'.
    Please advice.
    Thanks & Regards,
    Ashu Arora

    Some more fields need to be updated along with the discont. indicator. Now working fine.

  • Problem in uploading Bom through Bapi

    Hi
    i am uploading Bom data useing CSAP_MAT_BOM_CREATE bapi.
    the header data through bapi is going fine but
    i am not able to upload 2 line item...
    i  think i need to pass OBJECT_ID  & IDENTIFIER though CSDEP_DAT ,CSDEP_DESC,CSDEP_SORC Structure.
    can any body tell me from where i can get OBJECT_ID  & IDENTIFIER  ..as there no such fields in my file.
    Regards
    ABG.

    Just a little word about "Bapi" : this FM is not a BAPI (it's a special kind of API, only BAPI* FMs are/can be BAPIs). CSAP_MAT_BOM_CREATE is just an API (SAP says you can use this FM).
    Did you read the 100 threads about this FM, here are some of the threads for example:
    1) did you read the example in the function module documentation? YOUR QUESTION IS ANSWERED IN THAT DOC
    2) why don't you use BAPI_MATERIAL_BOM_GROUP_CREATE?
    3) read other threads

  • Transfer the Pur Order Info through BAPI's between SAP R/3 Systems Using XI

    How to Create a Purchase Order for the Vendor and transfer this data through BAPI's between SAP R/3 Systems Using "Exchange Infrastructure(XI)".
    Please kindly let me know the procedure for creating BAPI's and how to transfer this information between SAP R/3 systems. Please kindly mention the NAVIGATION for this scenario.

    Hi Revathi,
    If you want to do an IDOC to IDOC scenario, then the Points to be noted are:
    1. You don’t need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.
    2. You import the IDOC and use the same in your mapping.
    3. You do not need a sender IDOC adapter, and no sender agreement, but a receiver IDOC adapter and a receiver agreement is needed.
    IDOC -> File scenario ref:
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    File -> IDOC ->
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    (It concentrates on XSLT mapping but also gives an idea about the configuration part. Do go thru that, it might help you.)
    Apart from this if you need any info on how to configure your ALE, partnet profile,etc  drop me a mail, I have excellent tutors that can help you in the same.
    Regards,
    Bhavesh

  • BP - default and check classification data at CREATE/SAVE using BDT + BADI

    Hi,
    I do have several requirements around Business Partners and BDT.
    1. When a BP is created, I want to default certain fields depending on what BP role is maintained, specifically I am looking at fields on the classification tab (BDT application CRMD).
    --> I do not want to use transaction variants.
    --> I want to use the BDT or implement a BADI (which I don’t think does exist)
    2. When a BP is saved, I want to check whether certain fields have certain values – depending on the BP role.
    --> Field selection is not sufficient.
    --> I tried using the BDT calling own function modules at different events – without success. When I call function module CRM_BUPA_FRG0040_GET_DETAIL to get current classification data at DCHCK, structure ls_frg0040 is not updated yet.
    At a later event I can not stop the save.
    Is there a way to force an update of memory, so that function module CRM_BUPA_FRG0040_GET_DETAIL returns current values.
    --> I also tried BADI BUPA_FURTHER_CHECKS, but it is not called at all.
    Any help is highly appreciated.
    Can anyone send me the BDT cookbook at [email protected]?
    Thanks in advance,
    Juergen

    Hi Juergen,
    From the BADI stand-point (and assuming dialog usage).
    1/ You have:
    BUPA_INITIAL_SCREEN  "Initial Screen for BP creation"
    You should even be able to set a particular tab to which you want to navigate and then fill in the relevant fields, prior to having the screen completely painted.
    2/ You have badi's"
    A - PARTNER_UPDATE "Business Partner"
    and
    B - BUPA_GENERAL_UPDATE  "Business Partner General Data"
    when performing updates to the partner.
    Looking at the call stack (reading bottom-up) these BADIs are called a the points shown, both with the change-before-update method:
    --> B
    10 GENERAL_BADI_CALL
    9 BUP_BUPA_EVENT_DSAVE
    8 EVENT_DSAVE
    7 BDT_DATA_SAVE
    6 SAVE_GLOBAL_MEMORY
    5 SAVE_GLOBAL_MEMORY
    --> A
    4 COMMIT_MAINTENANCES
    3 TAKE_OVER_AND_SAVE
    2 TAKE_OVER_AND_SAVE_AND_RELOAD
    1 ON_SAVE
    Brad

  • BAPI to Update Material classification data

    Hi All,
      Is there a BAPI that can be used to update material classification data?
    Regards,
    Hari.

    Hi Hari,
    Please try this FM UPDATE_MATERIAL_CLASSIFICATION.
    Also check program standard SAP program RCCLBI03.
    Regards,
    Ferry Lianto

  • 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

  • Uploading TAX Classification data in material master

    Hi,
    I have to upload tax classification data in material master for countries DE,IT,FR,ES,CH and GB.
    I have used BAPI_MATERIAL_SAVEDATA and passing values to table TAXCLASSIFICATIONS.
    But bapi is uploading tax classification only for country DE.
    When I am creating through MM02 its getting updated.
    Can anybody tell me what is the problem ?

    Hi Ganga,
    Yes I am passing different countries to table .
    LOOP AT IT_STAX into WA_STAX.
           wa_taxclassifications-depcountry = wa_stax-aland.
            wa_taxclassifications-tax_type_1 = wa_tstl-tatyp.
            wa_taxclassifications-taxclass_1 = wa_stax-taxm1.
            wa_taxclassifications-tax_ind    = wa_stax-taxim.
            APPEND wa_taxclassifications TO it_taxclassifications.
    ENDLOOP.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata           = wa_headdata
          TABLES
            taxclassifications = it_taxclassifications
            returnmessages     = it_return[].

  • BAPI_DOCUMENT_CREATE2 - adding classification data

    Hello,
    I want to create document data with the named BAPI.
    Not that bad, I thought, implemented the BAPI in my program, provided the required data and then made my first tests.
    Result:
    - document created
    - no classification data added
    And the return message from the program part were the classification is added is....
    ID = CC / Number 164
    "Date is in the past".
    Thats lovely and I don´t understand whats wrong here!
    I provided the same data that I use when I create documents via transaction!
    Did anybody have similar experience and a solution for that, means an idea, what´s going wrong?
    What I found out is that in the called function module in API_DOCUMENT_MAINTAIN2 (perform save_classification_data -> CACL_OBJECT_ALLOCATION_MAINT) named CLAP_DDB_GET_CLASSIFICATION the value for the date is set empty and the function comes back with an exception 4!
    Any help is really appreciated!
    Regards
    Dirk
    Edited by: Dirk Meinhard on Oct 20, 2008 4:49 PM

    Answered on my own!
    Ok, this is for you:
    Why the hell is there a field for the change no. in the structure BAPI_CLASS_ALLOCATION (ECNUMBER)?
    If you use it, you will fail!
    Leave it empty and it runs!

  • Extractor to get Classification data from R3 (specifically AUSP table)

    Hello,
    I have a requirement to get classification data from R3 to BW.
    I have explored the following post
    Classification data extraction
    which discusses steps to get the datsource created using transaction CTBW
    However this approaches requires us to specifiy the *fixed list of characteristics required.
    So when new characteristic are added  we would again have to regenerate the datasource and update the data flow in BI. 
    We need to get the entire classification data to BI. In our case it is possible to get new characteristics added in R/3 periodically and which would need to come to BI seamlessly.
    Did anyone have a similar requirement in the past ? Are there any BADI, BTEs I could use?
    Thanks
    -Saif

    Hi Saif,
    datasources created with CTBW do extract one row for each classified object. Therefore CTBW generates an extract structure based on the set of characteristics which have been specified there. For extracting additional characteristics you will need to add them in CTBW and to generate the datasource again. There is no way to overcome this. So datasources created with CTBW cannot fulfill your demand.
    You will have to create your own datasource from scratch. This datasource will need to return one row for each found value to be flexible enough and to be able to work with one extract structure that doesn't need to be changed.
    In general the way how classifications are stored is quite complex and depends on settings in customizing of classification. So I would recommend to create a datasource based on your own function module. This could call BAPI_OBJCL_GETOBJECTS to find the classified objects and  BAPI_OBJCL_GETDETAIL to read the valuations. For more information see please documentation of these BAPIs. Additional information on BAPI_OBJCL_GETDETAIL you will find in SAP note 1083983.
    Best regards,
    Rolf

Maybe you are looking for

  • Deleting a Scheduled Event in iCal ?

    Okay, I scheduled a few things and, alas, life being what it is, I had to make some changes. However, I found I was unable to delete the initialed scheduled event--I finally resorted to just "cutting" it. Is this the only way to delete an event? <Edi

  • Issue while signing a jar using RSA certificate

    Hi, I am trying to sign a java applet using trusted certificate with the help of Java keytool and jarsigner of JRE1.6. For this I have followed the following steps: 1.Generated key pair in a keystore - keytool -genkeypair -keyalg RSA -alias eaikey -k

  • How do I change the checkmark color?

    My company is looking to utilize Adobe Standard XI in moving from a paper process to a digital process for our workpapers. Our industry standard is for the reviewer to use a "blue" checkmark when they are reviewing the work of the preparer and the wo

  • Video demo glitchy when recording

    I am recording a video demo of MS PowerPoint. Each clip is 1-2 minutes at the most. I only have PPT, CP, and Word open while I am doing the demo. As I am clicking around in PPT, my screen will sometimes flicker or another window will suddenly pop up

  • How to reduce the font size on my phone...do i do this from settings ?

    how do i reduce the font size on my phone...i cant remeber where i changed it..is it in settings ?