Adding new object type (field BKPF-AWKEY) for BAPI posting

Hi everyone,
I am posting to SAP GL using an input file to read the data and transfer it to BKPF and BSEG tables.
The problem is I have to use BAPI_ACC_DOCUMENT_POST, and it expects values for OBJ_KEY and OBJ_TYPE.. For now, OBJ_TYPE creates a problem, because if I use BKPF, it says it cannot post using this object type, as it is for SAP internal use only.
Does anyone know how to add a new object type for the customer namespace, which can be manually used for this kind of posting? I know that the new entry must be made in tables TTYP, TTYPT, and possibly TTYPV, for which the maintainence view exists: V_TTYPV.
How to add an entry here, or where can I find it in customizing?
All helpful answers will be awarded.
Thank you very much
Srdjan

perform fill_internal_tables.
if check_l = 'X'.
  call function 'BAPI_ACC_DOCUMENT_CHECK'
       destination dest
       exporting
            documentheader    = gd_documentheader
            customercpd       = gd_customercpd
            contractheader    = gd_fica_hd
       tables
            accountgl         = it_accountgl
            accountreceivable = it_accountreceivable
            accountpayable    = it_accountpayable
            accounttax        = it_accounttax
           currencyamount    = it_currencyamount
            criteria          = it_criteria
            valuefield        = it_valuefield
            extension1        = it_ext
            return            = it_return
            paymentcard       = it_paymentcard
            contractitem      = it_fica_it.
           extension2        = it_ext2
           realestate        = it_re.
  write: / 'Result of check lines:'.                        "#EC NOTEXT
  perform show_messages.
endif.
if check_a = 'X'.
  call function 'BAPI_ACC_DOCUMENT_CHECK'
    destination dest
    exporting
      documentheader    = gd_documentheader
      customercpd       = gd_customercpd
      contractheader    = gd_fica_hd
    tables
      accountgl         = it_accountgl
      accountreceivable = it_accountreceivable
      accountpayable    = it_accountpayable
      accounttax        = it_accounttax
      currencyamount    = it_currencyamount
      criteria          = it_criteria
      valuefield        = it_valuefield
      extension1        = it_ext
      return            = it_return
      paymentcard       = it_paymentcard
      contractitem      = it_fica_it.
     extension2        = it_ext2
     realestate        = it_re.
  write: / 'Result of check all:'.                          "#EC NOTEXT
  perform show_messages.
endif.
if post = 'X'.
  data: l_type like gd_documentheader-obj_type,
        l_key  like gd_documentheader-obj_key,
        l_sys  like gd_documentheader-obj_sys.
  if dest = space or
     dest = gd_documentheader-obj_sys.
   post synchron
    call function 'BAPI_ACC_DOCUMENT_POST'
      exporting
        documentheader    = gd_documentheader
        customercpd       = gd_customercpd
        contractheader    = gd_fica_hd
      importing
        obj_type          = l_type
        obj_key           = l_key
        obj_sys           = l_sys
      tables
        accountgl         = it_accountgl
        accountreceivable = it_accountreceivable
        accountpayable    = it_accountpayable
        accounttax        = it_accounttax
        currencyamount    = it_currencyamount
        criteria          = it_criteria
        valuefield        = it_valuefield
        extension1        = it_ext
        return            = it_return
        paymentcard       = it_paymentcard
        contractitem      = it_fica_it.
       extension2        = it_ext2
       realestate        = it_re.
    write: / 'Result of post:'.                             "#EC NOTEXT
    perform show_messages.
  else.
  create Idoc
    it_receivers-logsys = dest.
    append it_receivers.
    call function 'ALE_ACC_DOCUMENT_POST'
      exporting
        documentheader    = gd_documentheader
        customercpd       = gd_customercpd
        contractheader    = gd_fica_hd
      tables
        accountgl         = it_accountgl
        accountreceivable = it_accountreceivable
        accountpayable    = it_accountpayable
        accounttax        = it_accounttax
        currencyamount    = it_currencyamount
        criteria          = it_criteria
        valuefield        = it_valuefield
        extension1        = it_ext
        paymentcard       = it_paymentcard
        contractitem      = it_fica_it
       extension2        = it_ext2
       realestate        = it_re
        receivers         = it_receivers
      COMMUNICATION_DOCUMENTS =
      APPLICATION_OBJECTS     =
      exceptions
        error_creating_idocs    = 1
        others                  = 2  .
    if sy-subrc = 0.
      write: / 'IDoc created'.                              "#EC NOTEXT
    else.
      write: sy-msgid.
    endif.
  endif.
endif.
if rev_p = 'X' or rev_c = 'X'.
  data: rev like bapiacrev,
        rev_key like ref_key.
  rev_key       = ref_key.
  rev_key(1)    = 'R'.
  rev-obj_type  = gd_documentheader-obj_type.
  rev-obj_key   = rev_key.
  rev-obj_sys   = gd_documentheader-obj_sys.
  rev-obj_key_r = ref_key.
  if rev_c is initial.
    if dest = space or
       dest = gd_documentheader-obj_sys.
      call function 'BAPI_ACC_DOCUMENT_REV_POST'
        exporting
          reversal = rev
          bus_act  = gd_documentheader-bus_act
        tables
          return   = it_return.
    else.
      it_receivers-logsys = dest.
      append it_receivers.
      call function 'ALE_ACC_DOCUMENT_REV_POST'
        exporting
          reversal                      = rev
          busact                        = gd_documentheader-bus_act
        OBJ_TYPE                      = 'BUS6035'
        SERIAL_ID                     = '0'
        tables
          receivers                     = it_receivers
        COMMUNICATION_DOCUMENTS       =
        APPLICATION_OBJECTS           =
        exceptions
          error_creating_idocs          = 1
          others                        = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        write: / 'IDoc created'.                            "#EC NOTEXT
      endif.
    endif.
  else.
    call function 'BAPI_ACC_DOCUMENT_REV_CHECK'
      exporting
        reversal = rev
        bus_act  = gd_documentheader-bus_act
      tables
        return   = it_return.
  endif.
  write: / 'Result of Reversal Posting:'.                   "#EC NOTEXT
  perform show_messages.
endif.
commit work.
chk this
Give points if useful

Similar Messages

  • New Object Types for Object Links

    Need to create new Object type to object link Product hierarchy from ECC to RPM Item. Field is PRDHA.
    Do we need to create new structure to have the Key linking PRDHA.
    Any suggestions?

    Hi,
    For this, you need to create Key, Proxy class and search field.
    Logically if you use same Proxy class and key as that of PO then the system will search for PO number rather than PR.
    I hope you are clear now.
    Take help of an ABAPer
    Niranjan
    Let me know if it helps !!!

  • Adding new object TAB to DMS

    Hi, all
    I want add new new tab as my new object type. which is not available in standard set ie screens  class CV130 TC 'SE80'
    the new object requirment as per customer
    1] Routing
    2] Inspection Lot
    3] Plan Maintanence
    4] Clibration
    Give procedure how to customize these new objects, which r not available as std screens for dms object links.
    rgds
    Ben

    Hi Benaka,
    In standard SAP system you can link DIR to various other SAP Objects for that, in customization setting choose :
    Cross-application component->Document management->Control Data->Maintain Key fields.
    Following steps to be followed as per IMG activity documentation(click & follow the step).
    Regards,
    Seema Pilankar
    If it useful reward me the points.

  • Schema of a new Object Type: message pass the BIU without validation

    Hi,
    i've defined a new Object Type for send messages to Web Service. I've created the schema files and i've uploaded there in repository with the "Import" function of GUI. After, i've defined the XML file for the "Execute" function of the B1i GUI.
    After the load of files, in the repository the files are in correct position.
    In my BIU the definition of sender and receiver system type is correct, and also the definition of SenderMainObjectTypeID and ReceiverObjectTypeID. The message from B1 pass through the IPO chain without problems and the message is received by teh Web Service.
    If modify the file XSL into the BIU, a message with less elements than a schema pass without problem.
    If delete the schema from repository, the message pass without validation.
    I would know because the schema is bypassed...
    Thans

    Ok,
    solved with introduction of validation point in a customized IPO using a branch / unbranch atoms.
    Bye.

  • PDR Steps to create new object types

    We set a demo instance of the PDR tool here and it all works well.. I would now like to add purchase info records as an object that can be sequenced with all other master data like materials, material boms, variant class and ecms in a config folder. I know that new function modules would need be created but was wondering there was a document with steps expaining the entire procedure for doing this or if any other company has yet tried this with the tool.. It allows for the creation of new objects for the packet but would like to have some sort of guideline to follow if possible.

    Hello Mr Thorne,
    I knew there are some SAP Consultants that know how to implement a new object type. And there is a project together with the german army that expands the PDR with several object types.
    But you have to pay attention. The PDR consists of two main parts . The FOX - Frame work of Explosion and the UPS - Uniform Packaging Service.
    Creating a new Object type that can be "shipped" has to be in the UPS - BUT - if you are using the transaction CRWBD that new object type will not be found if you are exploding a baseline. That is the task of the FOX.
    And to add a new Object type into the FOX would be harder than add it into the UPS.
    I think the Consulting solution, uses a FOX exit to add that object into the UPS after the FOX-Run.
    I you need further information please contact SAP consulting (PLM).

  • New object type, subtype, relationships

    HI all,
    I'm trying to create 2 new object types (job group and job discipline), and the relationships between it, but I'm getting some problems with that.
    time constraint of infotype 1001 for the new relationships are wrong... and in the relationship between types i'm getting "relationship xxx is not possible between 8A and 8B - my new object types).
    Can someone help in this thread?

    hi.
    i already do that...
    http://img14.imageshack.us/img14/249/48633078.jpg
    http://img269.imageshack.us/img269/8433/13735493.jpg
    something is not right...
    maybe you can do a small step by step indication

  • New object type creation...in MASS transaction..

    Hi,
    I want to create new object type for Maintainace plan mass mainainace how to do it....can anybody tell me..??
    In standard MASS transaction i am not getting object type for Maintainace plan
    Regards,
    San Rao..

    hi
    O1CL-->select Table you asscosiate with class type( If it it not exists the click on New Item)
    ->Lets consider that it is MARA>double click on Plant->click on object types>click on New Item--->click on Object
    Similerly maintain class status,Org Area etc
    You can also check the existing class for Example...this will help you.
    Regards
    Sujit

  • Organizational structure : create a new object type

    Hi all,
    i need to create a new object type in Organizational Management, anyone have documentation, link or some helps to this subject.
    Thanks,
    Cheers

    Small correction
    Personnel ManagementOrganizational Management-Basic settings-Data Model Enhancement--Maintain Object Types
    T-code OOOT
    Edited by: Sikindar on Jul 30, 2008 3:57 PM

  • Object type RSDS not supported in BAPI source system

    Hi
    We have a problem when trying to create Data Source in NW2004s with 3rd party tool 'Ascential Datastage' as source system.The error message is "DataSource XXX (DS-DEV): Object type RSDS not supported in BAPI source system".
    Is there any note or patch avaialable to be implemented to resolve this problem.Our support package is 07.
    Regards
    D.Ellora
    Message was edited by:
            Ellora Dobbala

    Hi Ellora,
    The latest BI release in SAP NetWeaver 7.0 (2004s) includes a new type of DataSource for which staging BAPI has not yet been aligned.
    Third party ETL tool vendors can therefore only implement their load processes using the original type of DataSource from BW 3.x. This DataSource is still provided in the new release without any changes. Upgrading to NetWeaver 7.0 (2004s) BI (BI 7.0) does not therefore endanger existing implementations based on BW 3.x and NetWeaver 2004 (BW 3.5).
    It is also possible to migrate third party ETL implementations based on BW 3.x into the new data-flow concept of a NetWeaver 7.0 (2004s) BI environment using new DataSources, transformations (also new), and data transfer processes (DTP) (also new). This is possible because the system provides an emulated view for BW 3.x DataSources, which makes it possible to combine them with NetWeaver 7.0 (2004s) transformations and DTPs for regular batch load processing (this does not include direct access and real-time data acquisition (RDA)).
    This allows the benefits of the new data loading concept to be made available in such third party ETL-based loading scenarios.
    Regards,
    Anil

  • Object type  not visible in transaction bapi

    hi all.
    I'm very new to Bapi,and recently I created a custom object type 'ZTEST' which was inherit from oject 'BUS1001'(material),then I add some custom method(BAPI) to 'ZTEST'.After I released all the object type 'ZTEST', I go to BAPI Explorer(t-code : BAPI), there I found my object 'ZTEST' exist in Alphabetical list but not in hierarchical list.
    How can I add my object type to the hierarchical list?
    thanks in advance

    Hi Bhokal,
              I suggest you put the question under ABAP General or similar category as this is not directly related to CRM 7.0 - in order to get faster response to the question.
      I hope it helps.
    Thanks,
    Rohit

  • Create object type from multiple tables for select statement

    Hi there,
    I have 3 tables as given below and I wish to create an object type to group selected columns as 'attribute' from multiple tables. 
    I need to create 2 input parameters to pass in - 'attribute' and 'attribute value'  in PL/SQL and these 2 parameters will be
    passing in with 'column name' and 'column value'.  e.g. 'configuration' - the column name, 'eval' - the column value.
    Then, the PL/SQL will execute the select statement with the column and column value provided to output the record. 
    Pls advise and thank you.
    table ccitemnumber
    name                           null     type                                                                                                   
    ccitemnumber                   not null varchar2(20)                                                                                                                                                                                    
    configuration                           varchar2(20)
    item_type                               varchar2(30)
    table productmodel
    productmodelnumber             not null varchar2(6)                                                                                            
    description                             varchar2(60)  
    accesstimems                            number                                                                                                 
    numberofheads                           varchar2(2)
    generation                              varchar2(10)
    numberofdiscs                           varchar2(2)
    factoryapplication                      varchar2(150)
    table topmodel
    stmodelnumber                  not null varchar2(30)                                                                                           
    productfamily                           varchar2(60
    formfactor                              varchar2(10)                                                                                           
    modelheight                             varchar2(10)                                                                                           
    formattedcapacity                       number                                                                                                 
    formattedcapacity_uom                   varchar2(20)
    object type in database
    configuration                           varchar2(20)
    item_type                               varchar2(30)
    numberofheads                           varchar2(2)
    generation                              varchar2(10)
    numberofdiscs                           varchar2(2)
    factoryapplication                      varchar2(150)
    modelheight                             varchar2(10)
    formattedcapacity                       number                                                                                                 
    formattedcapac

    user12043838 wrote:
    Reason to do this as these fields are required to be grouped together as they are created in different tables. They are treated as 'attribute' (consists of many columns) of the part number. So, the PL/SQL is requested to design in a way able for user to pass in the column name and column value or part number, then the select statement should be able to query for the records. Another reason is a new column can be added easily without keep modifying those effected programs. Reuseable too.This basically equates to ... hard to code, hard to maintain, and poor performance.
    Are you really sure you want to do this? This isn't going to be easy-street as you seem to think it is, but it's a one way street to a poorly performing system with security vulnerabilities (google SQL Injection).
    I would highly recommend you reconsider your design decision here.

  • Sales Order creation of adding new condition type to Item

    Hi Expert,
    The sales order has been created and need to add new condition type (Z601) to the first item(10). While adding the condition I am getting warning message like
    "Item 000030 exists already; the entry will be ignored".
    Where item 030 will be the last item.
    I have cheked but it's a standard report SAPFV45P, we can't modify. Please let me know can we set any field in the sales order so that we wont be getting this message.
    Regards,
    Mahesh

    Hello,
             If you would like to add the Condition Type automatically for a specific Item based on some condition (Lets say, Item Category), then you can code a Pricing Routine in VOFM Transaction and it will be automatically assigned.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to add new Object Type In Mass

    Hi Expert,
    We have to required change Payment term of Customer (ZTERM) in scheduled Agreement,
    we have gone through Mass, but presently no object type available to change in scheduled Agreement, So can we add the new object in Mass? & How? Please help.
    Regards
    BK GAIKWAD

    Hi,
    Presently no standard object type avaialble for Sch. agr.(Sales)
    Go for BDC for updation of your field (try with LSMW also)
    Thanks
    Chidambaram

  • Adding new object names in Incompleteness Procedure

    Hi All.
    This is with regard to the Incompleteness Procedure.
    Our requirement is to make a certain field in the transaction(requested end date) from Service Ticket mandatory. The system should give a warning/error message upon not finding this entry. I used the ICP to set up the fields for other requirements I have like, priority, description etc, for which the incompleteness works just fine.
    But to set it for the date i mentioned above, I am not able to find a relevant object type for choosing the field name.
    Is there a possibility to add object types to the list which appears upon using F4?
    is there a possibility to know the object type/name that a particluar FIELD NAME belongs to from somewhere?
    Kindly throw some light.
    Regards,
    Ashwin

    else if(option.equals("item")){
                    System.out.println("ItemPressed");
                    String itemIdStr=request.getParameter("id");
                   int itemId=Integer.parseInt(itemIdStr);
                   ItemCollection list=new ItemCollection();
                    list=(ItemCollection)session.getAttribute("Item");
                    Item item=new Item();
                    Item itS=new Item();
                    System.out.println("getItem()");
                    itS=item.getItem(itemId);
                    System.out.println(itS.getItemName());
                    System.out.println("session");
                    list.addItem(itS);
                    session.setAttribute("Item",list);     
                    System.out.println("addedToSession");
               }Maybe it's too early in the morning here, but it looks to me like you have all of your variables declared in your execution path....
    ... if that is the case, then uh... ya, they are going to be reinitalized each pass and only have at most the last item in them from your work.

  • Infosource -adding new objects

    I enhanced the datasource 2lis_02_itm with some objects using abap code. I created the objects in BW and replicated the datasource. I added those objects to the info source.
    Now , I am not able to assign these objects in the info source, I do not see these objects in the list.
    Thanks

    Yes I activated the cube after adding the fields.Here's what I did exactly:
    1. Wrote the abap code for 5 key figures and marked them as "selection" in the datasource.
    2. Deleted the data source assignment (I had assigned it earlier)
    3. replicated the datasource
    4. Reassigned the datasource
    5. Added the kf's to the comm structure
    6. I see them in the transfer structure but unassigned
    7. I assigned these objects in the transfer structure manually
    8. activated the info source
    9. added the kf's to the cube
    10. activated the cube
    11. I do not see them in the update rules!!!!
    Thanks

Maybe you are looking for