BAPI_OBJCL_CREATE

Hi Experts,
    Am creating an assignment as follows for WB66 transaction using this BAPI.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = '000000001'
objecttablenew = 'KNA1'
classnumnew = 'TEST_SITE_GROUP'
classtypenew = '030'
  The return table is giving the following return messages:
1.Assignment does not exist or is not valid on   -  I
2.Saving changes to assignments                     - S
3.Assignment created                                       -  S
After this I called'BAPI_TRANSACTION_COMMIT and checked the transaction WB66.
But WB66  shows the class has no assignments. Am I calling the right BAPI for creating an assignment for class.
Kinldy give your inputs.
Regards
Sridevi S

Hi,
Try this way.....
*       Getting the reference tables and values----------------
      call function 'BAPI_OBJCL_GETDETAIL'
        exporting
          objectkey        = w_objectkey          "Old customer Number
          objecttable      = 'KNA1'
           classnumnew = 'TEST_SITE_GROUP'
            classtypenew = '030'
        tables
          allocvaluesnum   = t_allocvaluesnum
          allocvalueschar  = t_allocvalueschar
          allocvaluescurr  = t_allocvaluescurr
          return           = t_lreturn.
*     Create with reference-----------------------
      call function 'BAPI_OBJCL_CREATE'
        exporting
          objectkeynew    = w_objectkeynew            "new Customer Number
          objecttablenew  = 'KNA1'
          classnumnew     = w_classnum
          classtypenew    = w_classtype
        tables
          allocvaluesnum  = t_allocvaluesnum
          allocvalueschar = t_allocvalueschar
          allocvaluescurr = t_allocvaluescurr
          return          = t_lreturn.
Prabhudas

Similar Messages

  • Error:While creation of Classification view using-'BAPI_OBJCL_CREATE'

    Hi all,
    I am using function module -
    CALL FUNCTION 'BAPI_OBJCL_CREATE'
      EXPORTING
        OBJECTKEYNEW            = OBJECTKEYNEW1
        OBJECTTABLENEW          = 'MARA'
        CLASSNUMNEW             = CLASSNUMNEW1
        CLASSTYPENEW            = CLASSTYPENEW1
      STATUS                  = '1'
      STANDARDCLASS           =
      CHANGENUMBER            =
      KEYDATE                 = SY-DATUM
      NO_DEFAULT_VALUES       = ' '
    IMPORTING
      CLASSIF_STATUS          =
      TABLES
      ALLOCVALUESNUM          =
        ALLOCVALUESCHAR         = ALLOCVALUESCHAR1
      ALLOCVALUESCURR         =
        RETURN                  = RETURN1
    for creation of classification of material.But it gives me afollowin errors -
    1)Assignment does not exist or is not valid on
    2)Table   not supported for class type
    3)Assignment was not created
    in return table.
    Thanks.

    Hi,
      Please follow the below steps.
    Creating the Classification View using the Function module 'BAPI_OBJCL_CREATE'.
    Check the Class Type and Class Number which you are passing.
    Generally it will be Class type - 001 (Material Class) and Number will be ENGINEERING.
    It depends.
    But, what you can do is, Check material which has classification data filled.
    And just use the same class Type and Class Number Details.
    Try this way.It should work.
    To know the Available Class Types refer to table TCLA.
    Please let me know, if you want further help.
    Thanks & Regards,
    Vamsi.

  • Problem in BAPI_OBJCL_CHANGE / BAPI_OBJCL_CREATE FM

    Hi,
    My requirement is to Create a  Batch Recod by using BAPI_BATCH_CREATE and BAPI_OBJCL_CREATE to create data for classification if an entry doesnot exist in MCHA table.
    If the entry exits in MCHA i need to change the classification for which i am using BAPI_OBJCL_CHANGE.
    Now as per my understanding and by going through various forums the conclusion that i got is, there should an entry in INOB table which is created by BAPI_GOODSMVT_CREATE.
    I tried creating a classification record directly by MSC2N and it worked.
    Since i am uploading the Master data for MCHA table, it should not mandatory to do the goods movement.
    Please let me know how can we create or change the classification of a batch without doing Goods movement.
    Thanks
    Harpreet

    Niraj,
    I need small information on BAPI_OBJCL_CHANGE, i am trying to update characterstics of material. With the following params
    OBJECTKEY                       00000000272000100150250000000063
    OBJECTTABLE                     MCHA
    CLASSNUM                        Z_RM_022
    CLASSTYPE                       022
    I am passing only ALLOCVALUESCHARNEW table.
    CHARACT                        VALUE_CHAR
    Z_BATCH_NI                     21,0000000
    But this is not getting saved, i check in the T-code MSC2n.
    Can you please provide me some info about the params i am passing.
    Thanks in Advance.
    Venkat.

  • Problem with BAPI_OBJCL_CREATE

    Hello,
    I try to create material caracteristics with bapi BAPI_OBJCL_CREATE. I don't know why it doesn't work, it tells me that the class is not found.
    CALL FUNCTION 'BAPI_OBJCL_CREATE'
              EXPORTING
                objectkeynew            = w_object_key
                objecttablenew          = w_object_table
                classnumnew             = w_class_num
                classtypenew            = w_class_type
              TABLES
                allocvaluesnum          = t_alloc_values_num
                allocvalueschar         = t_alloc_values_char
                allocvaluescurr         = t_alloc_values_curr
                return                  = t_return.
    W_object_key is my material
    w_object_table = 'MARA'
    w_class_num is rhe class (0000000873)
    w_class_type = '001'
    Please help me...
    Edited by: Louis-Arnaud Bouquin on Jan 24, 2008 4:21 PM

    hi Swathi,
    As u r telling , u r passsing quality Notification Number + line item to BAPI1003_KEY-OBJECT i.e.,,, object key
    Can i know what parameter are u passing for OBJECTTABLENEW, i mean table name .
    just a hint : u have to pass either QMEL or QMFE
    after bapi_objcl_create , use transaction commit bapi.
    try & let me know
    Thanks,
    Manjunath MS
    "Reward Points if it is useful"

  • How to use BAPI_OBJCL_CREATE / BAPI_OBJCL_CHANGE

    After deleting the assignment of class in im12 transaction ( Change inv. prog. positions), I executed the BAPI, BAPI_OBJCL_CREATE. It shows error, 'Assignment already exists and is valid'. whereas assignment does not exist.
    Similarly, there is a problem with BAPI_OBJCL_CHANGE.
    When an assignment is already created, I used BAPI_OBJCL_GETDATA and accordingly entered values directly in BAPI_OBJCL_CHANGE. But it gives the error ' Characterstic not found or is not valid'. I have checked the data types of the variables passed and I did not find any mismatch.
    These errors are shown even if the BAPIs are executed directly from SE37. Please suggest what the problem might be.

    Hi all !
            I have found the solution for this problem, I found that I was trying to use the wrong functions for my case, so, to solve my needs here, I will use BAPI_OBJCL_CREATE to set the classification data for Functional Locations and Equipments, and I can use BAPI_OBJCL_GETCLASSES to list all classes assigned for a Technical Object, and BAPI_OBJCL_GETDETAIL to get all characteristics assigned to a Technical Object for a specific class.
            Thank you all for your attention !
            Wilson

  • BAPI_OBJCL_CREATE returns error in ECC and not in 4.7 system.

    Hi all,
    In a custom program, BAPI_OBJCL_CREATE has been used. the program is working fine in SAP 4.7 system.
    After the upgradation to ECC, the BAPI_OBJCL_CREATE  is returning error.
    But, when we debug in ECC, it is not returning error and results are fine ! So it is not possible to trace the error. If values are passed manually to execute only the BAPI, it does not return error.
    If we execute the custom program without debugging, it is returning error.
    It is surprising issue and unable to fix.
    Could anybody know the probably solution/ reason for this in ECC.Please help me.
    I have tried to search for this problem for OSS notes, but could not find any.

    Hi,
    The BAPI is returning message of type "E".
    Based on this, custom program is rasing user defined error message.
    When we debug, no error is returned and transaction is successful. So could not find the error in detail.
    Even if we try to run the BAPI using SE37, returns success message.
    code is as follows.
      CALL FUNCTION 'BAPI_OBJCL_CREATE'
        EXPORTING
          objectkeynew            = gv_objectkeynew            "value is 1000409757
          objecttablenew          = c_iflot                              "value is IFLOT
          classnumnew             = c_carac                        "value is CARAC_PCE_DISCO
          classtypenew            = c_003                          "value is 003
          TABLES
          return                  = gt_return.            .
      LOOP AT gt_return WHERE type CA 'AE'.             "means error / abort
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        PERFORM f004_write_message_log USING c_error    174   c_class      '' '' '' ''      gv_concat_e.
        MOVE : c_flag TO gv_error.
        RETURN.
      ENDIF.

  • Classification change not stored in change number using BAPI_OBJCL_CREATE

    Hello SAP Guru's,
    When using BAPI_OBJCL_CREATE to create classifications and using a change nr in parameters, the object is not recorded in the change nr.
    When you use the transaction CA01, object is well created in change number.
    We use the BAPI in a program and we need the object saved in change nr.
    So if I read table AEOI, I won't find any entry under the change nr. It is the issue.
    Why isn't it recorded?
    Thanks in advance for your help.
    Regards,
    Rudy

    Hello,
    Please try to create a class first for a material-plant-batch as required by you manually.
    After this step, check the key (Field:OBJEK) in table KSSK for the above manually created classification. Pick the OBJEK from the table KSSK and pass the key in the same pattern as that of the value from table KSSK.
    for example in case of Document classification,
    for Doc DRW-1234567890-00-000,
    we have the key (OBJEK) as: <b>DRW1234567890               00000</b>
    Hope this helps.
    Best Regards, Murugesh AS

  • BAPI_OBJCL_CREATE parameter passing

    Dear Friends,
                         Iam using the BAPI,  BAPI_OBJCL_CREATE for the transaction CL20N ( Assign objects to classes ). But in BAPI, Iam unable to find out what to be passed to the export parameter " objectkeynew ". I have searched in sdn but did not found.
    Please do the needful.
    Thanks and Best regards,
    Murali Krishna. T

    Hi Albert,
    I was referring to the code lines in function module CACL_OBJECT_VALIDATION_MAINT after the commet line
    * set date
    In complete I've ment this code lines:
    * set date
      clear rumpf_mat.
      if change_no is initial.
        aenr-datuv = sy-datum.
      else.
        call function 'CLEF_EFFECTIVITY_USED'
             exporting
                  i_aennr          = change_no
                  i_classtype      = class_type
             importing
                  e_effe_aennr     = g_effectivity_used
             exceptions
                  klart_not_active = 1
                  others           = 2.
        if g_effectivity_used is initial.
          select single datuv from aenr into aenr-datuv
                              where aennr eq change_no.
          if syst-subrc > 0.
            syst-subrc = 19.
            perform LOG_OBJECT using 'E' CLASS_TYPE               "  1302674
                                         OBJECT_TYPE OBJEKT.      "  1302674
            perform error_upd using syst-subrc change_no
                                    class_type class.
            perform end_of_api using 'E'.
          endif.
        else.
          aenr-datuv = i_datuv.
        endif.
      endif.
    Here you can see three different ways how field AENR-DATUV is filled.
    Regards,
    Klaus

  • BAPI_OBJCL_CREATE inconsistent classification data error

    I am using BAPI_OBJCL_CREATE to create a new classification for batch. Prior to this I am using BAPI_OBJCL_DELETE to delete the old classification data. But everytime I try to open the batch using MSC3N, I always get a termination error stating inconsistent classification data. Does any one know of a way around this?

    Hi all !
            I have found the solution for this problem, I found that I was trying to use the wrong functions for my case, so, to solve my needs here, I will use BAPI_OBJCL_CREATE to set the classification data for Functional Locations and Equipments, and I can use BAPI_OBJCL_GETCLASSES to list all classes assigned for a Technical Object, and BAPI_OBJCL_GETDETAIL to get all characteristics assigned to a Technical Object for a specific class.
            Thank you all for your attention !
            Wilson

  • Creation of Classification View in Material Master

    Hi,
    I need to create Classification View for a Material. The user would provide the data in the file, example
    Material Number MATNR
    Class type TCLA-KLART
    Class Type description TCLAT-ARTXT
    Class Group TCLG-KLAGR
    Class Group Description TCLGT-KTEXT
    Class M_CLASB-CLASS
    Class Description M_CLASB-CSCHG
    Status RMCLF-STATU
    Std class RMCLF-STDCL
    Characteristics Group TCMG-ATKLA
    Characteristics Group Description TCMGT-ATKLT
    Characteristics RCTAV-ATNAM
    Characteristics Description CABNT-ATBEZ
    I read in the posts there is BAPI_OBJCL_CREATE. But I am not able to Map the above fields to pass to this BAPI.
    Can someone please suggest me how to do this..
    Thanks and Regards,
      Vanessa

    Hi,
      Thanks for the suggestion. But i want to do this through a program. There is a selection screen with 6 radio buttons based o view to be created and an input field for the filename.
    Could you provide me any BAPI to do the same.
    Thanks and Regards,
      Vanessa

  • Issue:Creation of Extended iDOC data entries in receiving system.

    Hi all,
    I have extended standard IDOC MATMAS05 for classification view.I am receiving the data successfully on recewing side.And i  have done coading in user exit to store data in database  table inside
    IDOC_INPUT_MATMAS01- function module.
    When i execute the BD10 from sending sytem and view the idoc at receiving end from WE05 i can see the idoc but when i try to see the material i cant see the classification(extended) view in mm03.Rest of the views are created .When i execute the idoc from WE19 ,Classification(extended) view gets created.
    Please guide me so that the CLASSIFICATION view get automatically created in receiving system without using WE19.
    Thanks.

    Yes i used this function module-
    CALL FUNCTION 'BAPI_OBJCL_CREATE'
                  EXPORTING
                    objectkeynew            = objectkeynew1
                    objecttablenew          = 'MARA'
                    classnumnew             = wa_classnumnew1
                    classtypenew            = z1sklart-klart              "classtypenew1
                    status                  = '1'
      STANDARDCLASS           =
      CHANGENUMBER            =
                    keydate                 = sy-datum
      NO_DEFAULT_VALUES       = ' '
    IMPORTING
      CLASSIF_STATUS          =
                  TABLES
      ALLOCVALUESNUM          =
                    allocvalueschar         = allocvalueschar2[]
      ALLOCVALUESCURR         =
                    return                  = return1
    *WAIT UP TO 1 SECONDS.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                 EXPORTING
                   wait          = 'X'
    IMPORTING
      RETURN        =
    Please explain me how to maintain the Views Status at MARA general info segment level.

  • Batch characteristic validation

    Hi,
    I have process inbound idocs, where I have to create batch numbers for materials if they do not exist and correspondingly batch characteristics too.
    I used functions BAPI_BATCH_CREATE , BAPI_OBJCL_CREATE and for the existing characteristic values BAPI_OBJCL_CHANGE.
    While testing I am able to create new batches for materials. But where do I check ( in terms of tables) whether characteristics are created or updated. I am trying tables CABN and CAWN but i dont see my data.
    If there is a mistake, kindly tell me what I have to rectify. Thanks

    I hope you have done a COMMIT work after using the BAPI. if not then you will not see the batch information in SAP.
    After the BAPI is called you must call BAPI_TRANSACTION_COMMIT to write the changes to the database.
    If you are doing testing and not using a COMMIT then the system will only simulate the creation of the business object.
    Hope this helps
    Cheers
    VJ
    Mark helpful answers if this helps..

  • BAPI to update a single characteristic in IE02

    Hi,
          I am trying to update a single characteristic in IE02.I am able to do that with the BAPI "BAPI_OBJCL_CHANGE",but this BAPI is updating only 1 characteristic and is initializing all the remaining characteristcs.
          Any pointers on this is highly appreciable.
    Navin

    Hi,
    the documentation of the bapi says:
    Caution
    This BAPI only changes the parameters of an existing assignment (or creates a whole new assignment), but it does not delete the assignment to a class and replace it with an assignment to another class. If you want to reassign an object, the old assignments must be read with BAPI_OBJCL_GETCLASSES and deleted with BAPI_OBJCL_DELETE, then the new assignments must be created with BAPI_OBJCL_CREATE.
    The information transferred by this BAPI replaces all old information. An empty field means "delete entry!", not "no change".
    This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
    You can only use this BAPI for objects that are not classes!
    This BAPI only processes assigned values for classification - not for configuration
    so i guess you have to pass all information you do not want to lose.
    i´ve  found this as well:
    http://www.sapfans.com/forums/viewtopic.php?t=125320
    Best regards.
    Edited by: Pablo Casamayor on Jan 2, 2009 7:08 PM

  • Error while creation of Accounting view in background

    Hi Experts,
    I am creating the Materials using the Function MATERIAL_MAINTAIN_DARK in my program.
    I am passing the pstat as appropriate for the views to be created.
    Now, my problem comes When i am creating a Plant view and dont require an Accounting view.
    Even if I dont pass the PSTAT for the Accounting view, it gives me an exit message saying 'MBEW-BKLAS is defined as a required field.'.
    Please help me solve the issue.
    Any helpful answer will surely be rewarded.
    Thanks in Advance.
    Regards,
    Himanshu

    Hi,
      Please follow the below steps.
    Creating the Classification View using the Function module 'BAPI_OBJCL_CREATE'.
    Check the Class Type and Class Number which you are passing.
    Generally it will be Class type - 001 (Material Class) and Number will be ENGINEERING.
    It depends.
    But, what you can do is, Check material which has classification data filled.
    And just use the same class Type and Class Number Details.
    Try this way.It should work.
    To know the Available Class Types refer to table TCLA.
    Please let me know, if you want further help.
    Thanks & Regards,
    Vamsi.

  • MB_CREATE_GOODS_MOVEMENT Bapi

    I am using MB_CREATE_GOODS_MOVEMENT for certain receipt movement. In case of new batch, I want to enter material characteristic also. Say example Original Source Plant. In this BAPI is it possible ? Or Other BAPI to be used ? If yes, what is the BAPI name ?
    Thanks.

    You can create the characteristic for a charge with BAPI_OBJCL_CREATE, and change with BAPI_OBJCL_CHANGE...
    Regards,

Maybe you are looking for

  • Background job not automatically poopulating Dependant Demand

    Hi Users, We've recently set up a POS & PA using the DP-BOM selection and characteristics, manually created PPM's and generated CVC's using the BOMS. All of this is set up fine in our SCM 7.0. The background job has created the forecasts for the oupt

  • How to work around dataflow order in front panel simulation?

    I'm on the steep part of the Labview learning curve.  The attached vi is my attempt to simulate the user interface of the product I'm working on.  I'm posting because every workaround I dream up to deal with Labview's dataflow architecture results in

  • PROBLEMS IN THE DOWNLOAD OF MY PHOTOSHOP EXTENDED CS6

    WHEN I HAVE FINISHED DOWNLOADING MY PHOTOSHOP CS6 EXTENDED CAME UP A WARNING: WHAT SHOULD I DO ARE THESE IMPORTANR FILES FOR THE PROPER FUNCTIONING OF MY SOFTWEARS ? Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For

  • Ftp files to local folder

    I had a web site created by a development group. Now I'd like to edit the site myself. I can use dreamweaver to connect to the site remotely on the web server - through an ftp:filename link. The tutorials indicate that it is better to edit the site l

  • ITunes - When launched comes up with error message - User at wits end

    Hi - When launched ITunes comes up with error message below "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience" - and then wants to send an error report off to Microsoft I have so far been through the bulletins a