How to create numeric attribute using ABAP API

Hi experts
I'm trying to create a numeric attribute for a taxonomy table. In the how-to-examples there are only ways to create text attributes.
Those who have tried, please let me know the steps.
I have given below the code snippet which i tried to create numeric attribute. Please let me knw the missing link.
ls_num_attr_val-rating = 500.
    APPEND ls_num_attr_val TO ls_ext_attr_info-characteristics.
  ls_ext_attr_info-attr_info-attr_id-id = lv_attribute_id.
       APPEND ls_ext_attr_info TO lt_ext_attr_info.
    GET REFERENCE OF lt_ext_attr_info INTO lv_data.
    ls_namevalue-value = lv_data.
    ls_namevalue-code = 'ACCT'.
    APPEND ls_namevalue TO ls_parameter-name_value_pairs.
    lv_string = 'Customer 12'.
    GET REFERENCE OF lv_string INTO lv_data.
    ls_namevalue-value = lv_data.
    ls_namevalue-code = 'CUST_NAME'.
    APPEND ls_namevalue TO ls_parameter-name_value_pairs.
    CALL METHOD lr_api->mo_core_service->create
      EXPORTING
        iv_object_type_code = 'ACCT_TYPE'
        is_parameter        = ls_parameter
        iv_parent_id        = 0
      IMPORTING
        ev_new_internal_id  = lv_key.
Thanks
SwarnaDeepika
Edited by: SwarnaDeepika on Dec 19, 2009 4:38 PM

Hello Ashok,
[here|https://help.sap.com/javadocs/MDM/current/com/sap/mdm/examples/CreateField.html] is the Java API of the needed command.
There is also an example of how to create a field. You can use the class by replacing the strings for the server, repository, table, etc. to your needs.
If you want to create more than one field, simply use a loop, like the for-loop, while-loop, etc.
Hope this helps.
Best regards
Dominik

Similar Messages

  • HOW TO creat  BAR CHART using ABAP Programming

    DEAR ALL,
    I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
    Regards,
    VJ

    On earlier versions, you can do something like this.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

  • How to create RMA lines using OE_ORDER_PUB API

    Hi All,
    We are trying to create RMA lines using OE_ORDER_PUB API but every time API creating <b>Standard Order Line</b> line type in application.
    My program is creating order header as a <b>Return Order</b>, i am passing corrent line type ids (1028 - RMA Shipment, 1027 - RMA Receipt) but oracle API is creating Standard Order Lines (ID 1001).
    Can any one tell me about that?
    Thanks
    Ravi
    null

    Check the defaulting rules setup. Defaulting rule will derive the line type based on the order type and shippable flag etc.
    Also check the line flows assigned to the order type in transaction types window.
    Thanks / Bhaskar Akkala

  • How to Create an XML using Abap Objects

    Hi there,
    who has an example how to create an XML Document from an internal table using abap objects
    e.g. Class CL_XML_DOCUMENT_BASE ?
    any feedback is welcome.
    thanks
    Johann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • How to create Downpayment Invoice using DI API in SAP B1 2005 version?

    Hi there,
    I appreciate anyone that can suggest me how to create a down payment invoice using DI API in SAP B1 2005 version? What is the object that we need to use? I can't find any object to achieve this
    Many Thanks,
    Harianto Ng

    the object is SAPbobsCOM.BoObjectTypes.oDownPayments, but if i remember correctly this object wasnt exposed in DI for 2004 and maybe for 2005 too.

  • How to create a wizard using abap

    Hi,
    I have to create wizard in standard VA02 transaction.  Once the user creates a sales order, he should be able to click on a tab . Wwhen he clicks the tab , the wizard should run and display some results.
    What is the best approach for this requirement?
    regards,
    shan

    Hi,
    Try to find the user exits or badi's. I think u can search for Screen exits..The following are the user exits and badi's for VA02.
    Transaction Code - VA02              Change Sales Order                                                                               
    Enhancement/ Business Add-in            Description                                                                               
    Enhancement                                                                               
    V60F0001                                SD Billing plan (customer enhancement) diff. to billing plan   
    V46H0001                                SD Customer functions for resource-related billing             
    V45W0001                               SD Service Management: Forward Contract Data to Item           
    V45S0004                                Effectivity type in sales order                                
    V45S0003                                MRP-relevance for incomplete configuration                     
    V45S0001                                Update sales document from configuration                       
    V45P0001                                SD customer function for cross-company code sales              
    V45L0001                                SD component supplier processing (customer enhancements)       
    V45E0002                                Data transfer in procurement elements (PRreq., assembly)       
    V45E0001                                Update the purchase order from the sales order                 
    V45A0004                                Copy packing proposal                                          
    V45A0003                                Collector for customer function modulpool MV45A                
    V45A0002                                Predefine sold-to party in sales document                      
    V45A0001                                Determine alternative materials for product selection          
    SDTRM001                               Reschedule schedule lines without a new ATP check                                                                               
    Business Add-in                                                                               
    BADI_SD_SCH_GETWAGFZ          Scheduling Agreement: Read WAGFZ from S073                     
    BADI_SD_V46H0001                        SD Customer functions for resource-related billing                                                                               
    No.of Exits:         15                                                                               
    No.of BADis:          2                                                                               
    Try to find a suitable one and check it..
    regards,
    chaithanya.

  • How to Create Symbolic link using pure Java code?

    Hi,
    I would appreciate if someone can tell me how to create symbolic link using JAVA API. I have looked into many forums but couldn't get a better answer.

    Java is likely not the tool to use here, as symlinks are not present in Windows while "pure" Java attempts to be platform independent. You could use Runtime.exec to execute the ln -s command
    http://forum.java.sun.com/thread.jspa?threadID=664475&messageID=3892685
    Good Luck
    Lee

  • How to read records from Relationship table using ABAP API's

    Hi All,
    I need to retrieve the records from Relationship table. In Java API's I came to know there is an option to retrieve this. I could not find anything in ABAP API's. Is there any option in ABAP API's to do this.
    Please Suggest.
    Thank You,
    Gajendra.

    Hi Gajendra,
    You can mainly read records from MDM (in a DDIC structure) using ABAP API's using the following function modules/methods:
    1. RETRIEVE: This is used to generically retrieve records from tables. Attributes and Values can also be retrieved.
    2. RETRIEVE SIMPLE: Retrieve records from MDM in a simple way.( simple data types).
    3. RETRIEVE CHECKOUT: Retrieves all checked out ID's.
    4. RETRIEVE ATTRIBUTES: Retrieves attribute(s) from a Taxanomy table.
    You will find all these methods in the following interface
    Interface : IF_MDM_CORE_SERVICES
    Hope it helps.
    *Please reward points if found useful.
    Thanks and Regards
    Nitin Jain

  • How to create Authorization policy using OIM 11g API

    Hi,
    Could you please let me know how to create Authorization policy using OIM 11g API.
    Thanks

    Constructing A Policy Programmatically
    http://docs.oracle.com/cd/E27559_01/dev.1112/e27154/cons_policy_prog.htm#CHDHACBF
    api ref for PolicyStore
    http://docs.oracle.com/cd/E21764_01/apirefs.1111/e22649/oracle/security/jps/service/policystore/PolicyStore.html#createApplicationPolicy_java_lang_String_
    something like below code to start with
    try {
    JpsContextFactory ctxFact;
    ctxFact = JpsContextFactory.getContextFactory();
    JpsContext ctx;
    ctx = ctxFact.getContext();
    PolicyStore ps = ctx.getServiceInstance(PolicyStore.class);
    if (ps == null) {
    // if no policy store instance configured in jps-config.xml
    System.out.println("no policy store instance configured");
    return;
    ApplicationPolicy ap = ps.createApplicationPolicy("Trading", "Trading
    Application","Trading Application.");
    } catch (JpsException e) {
    }

  • Updating value of for taxonomy attributes via ABAP API

    Hi ,
    We have table Product hierarchy repository in that we have Products table and ProductHierarchy table which is of type taxonomy .
    The product hierarchy is assigned to each product as lookup taxonomy field.
    Can anyone please let me know how we can update the values assgined to the attribute throght ABAP API.
    Example we have the attribute called color which assigned to Product Hierarchy 'A' and this product hierarchy 'A' is attached to Material '111' and the attribute color will have value 'Blue' for material '111' now I want to update the value of color to 'Red' . How we can achieve this via the MDM ABAP API.
    Regards,
    Amar Kamat

    If your question is how to change the value of an attribute for a specific product this is the solution:
    Use IF_MDM_CORE_SERVICES->RETRIEVE( ) to retrieve the product record so that you have a populated structure of type MDM_PARAMETER. In this structure you will find the entry relating to the taxonomy field. The VALUE attribute of this line entry will be a reference to type MDM_TAXONOMY_ENTRY.
    At this point you will want to take the TAXONOMY_ENTRY_ID and TAXONOMY_TABLE_CODE of this structure to retrieve the attributes. Using IF_MDM_CORE_SERVICE->RETRIEVE_ATTRIBUTES( ) and the attributes mentioned before you will get the results into a table of line type MDM_ATTRIBUTE_INFORMATION_SL.
    Select the appropriate line from the result table based on the attribute name (ATTR_NAME). In the record of type MDM_ATTRIBUTE_INFORMATION_SL you will now want to select the appropriate line from the table found in field ATTR_FEATURE_DOMAIN. Find the appropriate attribute (in this case color) by VALUE_NAME and copy the VALUE_ID (type MDM_UNIQUE_ID).
    Now back to where we left off in the original record (MDM_PARAMETER), loop through the table found at field TAXONOMY_ATTRIBUTES of the MDM_TAXONOMY_ENTRY looking in ATTR_INFO for the correct ATTR_NAME. When the correct entry is found, update the ATTR_FEATURE_DOMAIN with the new VALUE_ID and viola, you've got a mdm record ready to be updated.
    Simply call IF_MDM_CORE_SERVICE-UPDATE( ) with the modified record and you've updated your attribute assignment.
    In short:
    Navigate to the MDM_TAXONOMY_ENTRY of the product record
    Retrieve the attributes from the corresponding taxonomy table and navigate to the unique ID of the desired attribute
    Navigate to the attribute within the record's MDM_TAXONOMY_ENTRY and update the VALUE_ID with the new unique ID
    Update the product record
    Regards,
    Brian Dennett

  • How to create an attribute dimension in Essbase Studio?

    I cannot figure out how to create an attribute dimension using Essbase Studio. The online help states that I need to "Find the Attribute settings grouping in the center" of the member properties dialog box. I suspect that I'm having a problem figuring this out because I don't have the attribute dimension properly defined in the relational data source or in the mini-schema. I've tried creating a table with no key relationship to the other tables and with no logical joins defined, but that doesn't seem to help. Any ideas?

    so in the 11.1.1 version you would click on the member name in the hierarchy you added to the Essbase model and in the center pane of the general tab should be the attributes settings section.
    If I had a dimension called stores wth two groupings unser it region and store_type, I would click on store_type and add the attribute info

  • How to create a attribute for a table

    I am created a table with four columns.
    How to create a attribute for each column.........

    Hi Cranjith Kumar,
    First Create a node for ur table.In that give your table name in the dictionary structure then select option add attributes from the structure that will display the fields there u can select the fields then automatically attributes for ur table will be created in the context.
    Reward points if useful.
    Edited by: srilalitha yerramsetti on Jun 18, 2008 3:23 PM

  • How to create a Attribute "Type standard table OF" to a OSS NOTE

    Dear experts,
    I need to add new attributes in a standard class as per one OSS note. I took access key to add new attributes. I have a question.
    class name: CL_J_1BEFD
    Attribute: MT_GROUP_C350
    Level: Instance
    Visibility: Private
    Type STANDARD TABLE OF mty_result
    How do i add the instance attribute because i do not want to give the typing and associated type, instead i have to declare data: MT_GROUP_C350 type standard table of mty_result in class builder private section code.
    if you look at the pushbutton between Associated type and Description, for all instance attributes there's a green color lining below the arrow. I want my attribute also to be exactly same.
    Though i have access key, in private section the display<->Change button is disabled.
    Please suggest me how do i add code in private section of a standard class. i have required access key to change the class.
    Thanks,
    Alysson

    Hi Friend...
    Thanks, but the question is...
    When I went to transaction se24 or se80, I chose the class CL_J_1BEFD and second I swap to "CHANGE MODE".. after that the pushbutton is blocked... I can create the Attribute  mt_group_c800 in the Class (using TYPE or LIKE option), but i can't change the code in the private session even using the assistant to modify it.
    When I acess the Button "Detail View" the option "Direct Type Entry" is just unavaliable too, no matter what i do!
    I coudn't find a way to create the Attibute like the note Describes (SAPNOTE NUMBER 1575772 - in the attachment of the note)
    The changes are contained in the attachment
    Follows the instructions retrieved from the file:
    Add the following Attributes on the Class CL_J_1BEFD Private section
    data:
    mt_group_c800 TYPE STANDARD TABLE OF mty_result .
    data:
    mt_group_c850 TYPE STANDARD TABLE OF mty_result .
    data:
    mt_group_c860 TYPE STANDARD TABLE OF mty_result .
    data:
    mt_group_c890 TYPE STANDARD TABLE OF mty_result .
    How can i make a way to creat this attributes using  "TYPE STANDARD TABLE OF " Option?

  • How to create an Attribute set

    Hi Everyone,
    i am learning OAF....right now going through PPR.I was referring the sample tutorials where i came across attribute sets in the PPR Example, which i believe were created as per requirement.So not able to proceed further till i get some clue abt how to create an attribute set as per my requirement.Tried to refer dev guide but not able to grab the concept
    Can anyone tell me where exactly do i need attribute sets(i am only aware that it is used to provide the look n feel to the browser) and how to go abt creating one.
    Thanks
    Amrita

    Thanks for replying
    i'd like u to see the PartialPageExample in sampleLibrary project..There is a function being called in the CO from SampleBrowserAM which is
    public void handleSupplierSelectionEvent()
    OADBTransaction txn = getOADBTransaction();
    String detailTableText = null;
    // Find the selected radio button so we can mark the current row.
    OAViewObject vo = (OAViewObject)findViewObject("SuppliersVO1");
    // Get the first filtered row.
    Row masterRow = vo.getFirstFilteredRow ("SelectFlag", "Y");
    if (masterRow != null)
    vo.setCurrentRow(masterRow);
    String supplierName = (String)masterRow.getAttribute("Name");
    MessageToken[] tokens = { new MessageToken("SUPPLIER_NAME", supplierName)};
    detailTableText =
    txn.getMessage("AK", "FWK_TBX_SITES_FOR_SUPPLIER", tokens); }
    else
    // If there are no selected rows, display a default generic message.
    detailTableText =
    txn.getMessage("AK", "FWK_TBX_SUPPLIER_SITES", null);
    // Now set the text message on the DETAIL_TABLE_TEXT attribute in
    // the application properties VO.
    SampleBrowserPVOImpl appPropsVo = getSampleBrowserPVO1();
    Row appPropsRow = appPropsVo.getCurrentRow();
    if (appPropsRow != null)
    appPropsRow.setAttribute("DetailTableText", detailTableText);
    } // end handleSupplierSelectionEvent()
    i am not able to understand the text in bold in the code above.how do i refer to it, where is it stored, what is it doing , and it is maybe specific to the supplier table coz i cannot use it for my custom table...can u pls explain

  • How to create function module in abap for VirtualProvider in bi

    how to create function module in abap for VirtualProvider in bi ???????????????
    can any one help me with simple example ?????????????????
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

Maybe you are looking for

  • How do I sync my iPhone and its contents to my new MacBook Pro?

    Hi all. I've just bought my first MacBook Pro and I'm very happy with it. I'm just trying to set up iTunes with my iPhone which I've had over a year. The problem is that iTunes isn't detecting all of the apps currently on my iPhone; only the recent p

  • MacBook Pro "13 2010 several problems with functionality.

    I've had my computer for about a year now and I've been having many problems since about 3 months after I upgraded to Mavericks. The machine would completely freeze, glitch, make crackling sounds that would persist until I forcefully shut the machine

  • How to find the codepage in system

    hi team i have an activity of unicode migration. my current system is 4.7 Non unicode IDES. I hve to do a combined upgrade and unicode migration to do from 4.7 IDES to NW 2004 IDES. I have read few notes and guides where it says the process varries w

  • What fundamental components differ between G3s?

    I have access to three G3 beiges and I'm trying to cobble together the best parts from each to make one my primary machine, the next best for my secondary, and then the third best for a spare machine. I know that G3s came with different ROM versions

  • How many documents can go in a folder in iCloud (Pages)?

    Just wondering if there is a limit to how many documents can go inside a folder in iCloud (Pages). I'm using Pages on my Mac and want to move all my Google Docs into Pages but I'm worried I'm going to hit an Apple ceiling. If it's unlimited, that'd b