Field Name  of the field on the Selectiion Screen

Hi,
I am executing report program and we get a Selection Screen .The question is  can we catch the field names of the fields on the selection screen dynamically.
We can find the field name by pressing F1 and looking into the Technical Information of that perticular field.
But can we fetch the field name dynamically.
Any pointers/information in this regard will be highly helpful.
Thanks & regards,
Abhijeet

Hello Abhijeet,
Here's what I think you're looking for -
tables spfli.
parameters     : p_test   like spfli-carrid.
select-options : s_carrid for  spfli-connid.
DATA:
  descr_ref TYPE ref to cl_abap_elemdescr.
START-OF-SELECTION.
  descr_ref ?= cl_abap_typedescr=>describe_by_data( p_test ).
  WRITE: / 'Typename     :', descr_ref->absolute_name.
  WRITE: / 'Kind         :', descr_ref->type_kind.
  WRITE: / 'Length       :', descr_ref->length.
  WRITE: / 'Decimals     :', descr_ref->decimals.
  WRITE: / 'Output Length:', descr_ref->output_length.
  WRITE: / 'Help ID      :', descr_ref->help_id.
Kind------> data type (C , I , etc.,)
Help ID---> data element (usually).
There are other classes in ABAP of the form CLABAPDESCR which can provide you with other information. These classes all belong to what is called RTTI (Run Time Type Identification). However, these are available only from 46c. You can explore the other classes, as I think they would be very interesting and useful in the future.
Regards,
Anand Mandalika.

Similar Messages

  • This field name is not known. on the server

    I have an issue using RPT file to generate a report using my .NET web app on the server, locally the report is generated fine, but on the server it's giving me the error "The field name is not known":
    [COMException (0x80041019): This field name is not known.
    Details: errorKind
    Error in File FormListAddons {74708A80-A1B6-494F-A141-C83C61F45047}.rpt:
    Error in formula Object_Visibility:
    '{visa_clients.addon1} = ""'
    This field name is not known.
    Details: errorKind]
      CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) +0
      CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +362
    [FormulaException: This field name is not known.
    Details: errorKind
    Error in File FormListAddons {74708A80-A1B6-494F-A141-C83C61F45047}.rpt:
    Error in formula Object_Visibility:
    '{visa_clients.addon1} = ""'
    This field name is not known.
    The line mentioned above causing the error, is a script on crystal report to suppress the field if this condition is met:
    {visa_clients.addon1} = ""
    My PC is running Crystal Report version 11, however the Crystal Report runtime on the server running the version 10.5.1.0
    Both locally and on the server, i'm using the same datasource. Even locally i'm connecting the database on the Server.
    I would appreciate your help.

    It seems i'm posting in the wrong forum, please guide where can I post this question, to find someone who could have experience with Visual Studio and Crystal Report.
    I have 3 RPT files on my project, 2 generated successfully, only one is failing, because i'm using a script on the RPT file to suppress a field if the value is null or empty.
    So the statement of Crystal Report version 11.x not working with SQL Server 2012 is totally out of the subject.
    here is my code, for someone who knows how to read it:
    CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    System.IO.DirectoryInfo TemplatesPath = new System.IO.DirectoryInfo(System.Web.Hosting.HostingEnvironment.MapPath("~/rptTemplates"));
    string templateFile = TemplatesPath + "/" + "FormListAddons.rpt";
    rpt.Load(templateFile);
    var table = dbmgr.listClients(in_group_id);
    rpt.SetDataSource(table);
    System.IO.DirectoryInfo FilePath = new System.IO.DirectoryInfo(System.Web.Hosting.HostingEnvironment.MapPath("~/UserGeneratedReports"));
    string FileName = "FormList_" + in_group_id.ToString() + ".pdf";
    if (System.IO.File.Exists(FilePath + "/" + FileName))
    System.IO.File.Delete(FilePath + "/" + FileName);
    rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, FilePath + "/" + FileName);
    rpt.Dispose();
    rpt.Close();

  • How to extract field name, length, descrip & field type out of repository

    How can I  extract field name, length, descrip & field type out of repository?  Or is it possible?

    Hi Victor,
    To get any info about any field you should know the code of that field that we specify in console while  creating field.
    Using this code you will get property whatever you defined in consloe.
    RepositorySchemaEx repositoryschema= MetadataManager.getInstance().getRepositorySchema(usrCtx);
    where usrctx is usersession context that you create to access yr repository
    FieldProperties fProp = repositoryschema.getField(tableName,fieldCode);
    where tablename is tablecode in which field belong
    field code is code of field that you define in console for that field
    if you check with frop then it will show  the general properties like type etc.
    suppose yr field of type text field then you can acces all properties that is coomon as well that is respective to text type field.
    FixedWidthTextFieldProperties textField = ( FixedWidthTextFieldProperties) fProp
    if you have other field type then that use thta properties . you will get in java api docs on help.sap.com whatever the properties MDM supporting.
    Hope ot helps  you get the solution
    thanks,
    sudhanshu

  • Can you make an enter event in topmostsubform that gets the field name of any field thats entered

    Looking for some help.
    I have a modified Enter Event I'm trying to use. What my expected results are: When you click on a field on the PDF, it would open up a certain webpage or file depending on what field is entered. I currently have:
    if (xfa.host.name == "Acrobat") {
              app.launchURL("www.cnn5.com" + "/" + event.target.documentFileName + "&" + this.name, true);
    else {
              xfa.host.gotoURL("www.cnn5.com");
    In this example, i'm using a bogus address obviously. "event.target.documentFileName" gives me the PDF name which is what I want, but I need to scrub off the ".pdf" at the end of it. I know I can use this in every field that I want it in, but I'm looking to see if I can get this code in just the topmostsubform only due to having hundreds of forms I might be using this form and to save time.
    When this is used in the topmostsubform, it gives me the URL: "www.cnn5.com/PDFname.pdf&TopmostSubform" no matter what field i click into. Is there something i can change this.name to? Any help would be greatly appreciated.
    Also, i'll need to have this event to be able to use multiple times, because currently in the topmostsubform, it only activates on the first field that I enter and doesn't activate on fields after that. Suggestions please? Thank you

    Hi,
    Are you using event propagation?  If you are try
      xfa.event.target.name
    Otherwise have a look at this  http://blogs.adobe.com/formfeed/2009/03/xfa_30_event_propagation.html
    Regards
    Bruce

  • Is there a way to rename multiple form field names with a "b" at the end?

    I have a two page form, both are identical.  I need to rename all the field names on page 2 with a "b" at the end of the file name so they dont conflict with that of the first page.  Is there any fast way of doing this without renaming each individual one at at time?  I have a LOT to do!

    It's not possible with JavaScript. The name property of a field is read-only.
    I would suggest making a template from the first page and then spawn a new page from it.
    If you do it from a script make sure you set the bRename property to true and the form fields will be automatically renamed, but you can't specify the name, it will be in following pattern:
    P<Page Number>.<Template Name>.<Original Field Name>

  • Displaying Field Names in a list on the next page

    In my BIP template I have a table that lists field names and underneath I have a for-each statement that lists values.
    Is there anyway that I can list the field names on the next page when the number of records start to run onto the next page?
    Thanks
    Steve

    Select the field names row, right click -> table properties and check the 'Repeat as header row at the top of each page'

  • Dynamic field names in ALV (referencing to the month)

    Hi,
    I have 12 fields in my ALV, named Monthly Sales 1, Monthly Sales 2 and so on until Monthly Sales 12.
    Monthly Sales 12 corresponds to the current month and Monthly Sales 1 is the current month minus 11 months (in terms of the month.)
    So the user has requested that instead of Monthly Sales 12, it should display M 06/2007 as the field name.
    Or Monthly Sales 11 should display M 05/2007 and so on.
    How can this be done?
    Please help.
    Points will be awarded and all responses will be greatly appreciated.
    Thanks,
    John

    Hi,
    I have done some coding for this which is as follows:
    TYPE-POOLS : abap, slis.
    DATA : BEGIN OF itab OCCURS 0,
            month1 TYPE char2,
            month2 TYPE char2,
            month3 TYPE char2,
            month4 TYPE char2,
            month5 TYPE char2,
            month6 TYPE char2,
            month7 TYPE char2,
            month8 TYPE char2,
            month9 TYPE char2,
            month10 TYPE char2,
            month11 TYPE char2,
            month12 TYPE char2,
            month13 TYPE char2,
           END OF itab.
    DATA wa LIKE LINE OF itab.
    DATA : it_fieldcat     TYPE     slis_t_fieldcat_alv WITH HEADER LINE.
    DATA : is_layout     TYPE     slis_layout_alv.
    DATA : len TYPE i VALUE 0,
            text TYPE string,
            date TYPE sy-datum,
            index TYPE numc3.
    DATA : ref_table_des TYPE REF TO cl_abap_structdescr.
    DATA : l_t_fields TYPE abap_compdescr_tab.
    DATA : fs_fields  TYPE abap_compdescr.
    *To get the fields of internal table
    ref_table_des ?=
            cl_abap_typedescr=>describe_by_data( wa ).
    APPEND LINES OF ref_table_des->components TO l_t_fields.
    DESCRIBE TABLE l_t_fields LINES len.
    DO len TIMES.
      index = sy-index - 1.
      CLEAR date.
      READ TABLE l_t_fields INTO fs_fields INDEX sy-index.
      CALL FUNCTION 'CCM_GO_BACK_MONTHS'
        EXPORTING
          currdate   = sy-datum
          backmonths = index
        IMPORTING
          newdate    = date.
      CONCATENATE date4(2) date0(4) INTO text SEPARATED BY '/'.
      it_fieldcat-fieldname = fs_fields-name.
      it_fieldcat-tabname = 'ITAB'.
      it_fieldcat-seltext_l = text.
      APPEND it_fieldcat.
    ENDDO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        it_fieldcat   = it_fieldcat[]
      TABLES
        t_outtab      = itab[]
      EXCEPTIONS
        program_error = 1
        OTHERS        = 2.
    I feel this is bit generic.
    Copy & execute this program.
    Reward if its useful.
    Regards,
    Sail

  • Inserting Field Names as Header while downloading the file

    Hi,
    I am downloading one file using CALL METHOD cl_gui_frontend_services=>gui_download and wanted to add field names as header while downloading.I have the filed names in one internal table and have written the code as follows:
       LOOP AT gt_import INTO gw_import.
          gw_fldname-field_name = gw_import-field_name.
          APPEND gw_fldname TO gt_fldname.
        ENDLOOP.
    Here gt_fldname has the field names.
          l_descr_ref ?= cl_abap_typedescr=>describe_by_data( gt_fldname ).
          CLEAR : l_counter.
          LOOP AT l_descr_ref->components[] ASSIGNING <lfs_comp_wa>.
            l_counter = l_counter + 1.
            ASSIGN COMPONENT sy-index OF STRUCTURE gt_fldname TO <lfs_comp>.
            IF sy-subrc = 0.
              <lfs_comp> = <lfs_comp_wa>-name.
            ENDIF.
          ENDLOOP.
       CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = pdir1
            filetype                = text-038
            append                  = ''
            write_field_separator   = 'X'
          CHANGING
            data_tab                = <lfs_comp>
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
            unknown_error           = 6
            header_not_allowed      = 7
            separator_not_allowed   = 8
            filesize_not_allowed    = 9
            header_too_long         = 10
            dp_error_create         = 11
            dp_error_send           = 12
            dp_error_write          = 13
            unknown_dp_error        = 14
            access_denied           = 15
            dp_out_of_memory        = 16
            disk_full               = 17
            dp_timeout              = 18
            file_not_found          = 19
            dataprovider_exception  = 20
            control_flush_error     = 21
            not_supported_by_gui    = 22
            error_no_gui            = 23
            OTHERS                  = 24.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = pdir1
            filetype                = text-038
            append                  = 'X'
            write_field_separator   = 'X'
          CHANGING
            data_tab                = <gfs_table1>
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
            unknown_error           = 6
            header_not_allowed      = 7
            separator_not_allowed   = 8
            filesize_not_allowed    = 9
            header_too_long         = 10
            dp_error_create         = 11
            dp_error_send           = 12
            dp_error_write          = 13
            unknown_dp_error        = 14
            access_denied           = 15
            dp_out_of_memory        = 16
            disk_full               = 17
            dp_timeout              = 18
            file_not_found          = 19
            dataprovider_exception  = 20
            control_flush_error     = 21
            not_supported_by_gui    = 22
            error_no_gui            = 23
            OTHERS                  = 24.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
    But it goes to dump at       l_descr_ref ?= cl_abap_typedescr=>describe_by_data( gt_fldname ) where I am trying to make the filed names horizontal.
    Can anyone help on this?

    The issue has been resolved after writting:
          l_ref_table ?= cl_abap_tabledescr=>describe_by_data( gt_fldname ).
          l_descr_ref ?= l_ref_table->get_table_line_type( ).
    Thanks.

  • Field name retrieval from field symbols after assigning to field in a struc

    We have an internal table of about 100 columns. First 7 of them have key values and other fields are data fields. Out of remaining 93 fields, any 2 to 3 fields have data stored in it in each record. Using field symbols in a loop (93 fixed iterations), we are identifying which fields has a data in it. Once we identify the field, how do we retrieve the name of the field / column of the table. We are performing further processing based on name of the field.
    Any ideas how to get the name of the column assigned to field symbols?
    sample raw code piece is as below:
    clear n.
    Do 93 times.
      n = n + 1.
      assign component n of structure itab to <fs>.
      if not <fs> is initial.
       Get name of the field in cfname.
        perform process_record using cfname.
      endif.
    enddo.
    Thanks.
    Regards.

    Hi,
    Try this..use the function module GET_COMPONENT_LIST to get the fields of the internal table and store it in an internal table ITAB_COMP..
    Then use READ TABLE ITAB_COMP INDEX sy-index..
    You can get the field name from the work area..
    Thanks,
    Naren

  • How to view field name for a field in Oracle form?

    I was told you can do this but I forgot how.
    If you want to build a report, but don't know what the field name is in Oracle, you can open up the Oracle form and find the screen with that field name and do a trick that tells you the Oracle field name. Any help?

    Try this....
    REPORT ZZDYNAMIC_FIELD.
    DATA: BEGIN OF it1 OCCURS 0,
    printer(10) TYPE c,
    paper1(20) TYPE c,
    paper2(20) TYPE c,
    paper3(20) TYPE c,
    END OF it1.
    DATA: descr_ref TYPE REF TO cl_abap_tabledescr,
          i         TYPE i.
    FIELD-SYMBOLS:
      <key_comp_wa> TYPE abap_keydescr,
      <field>       TYPE ANY.
    it1-printer = 'MUC123'.
    it1-paper1 = 'KBLOGO'.
    it1-paper2 = 'BLANK'.
    it1-paper3 = 'DINA5'.
    APPEND it1.
    it1-printer = 'MUC123'.
    it1-paper3 = 'KBLOGO'.
    it1-paper2 = 'BLANK'.
    it1-paper1 = 'DINA5'.
    APPEND it1.
    TRY.
        descr_ref ?= cl_abap_typedescr=>describe_by_data( it1[] ).
      CATCH cx_root.
    ENDTRY.
    LOOP AT it1.
      i = 0.
      WHILE 1 = 1.
        i = i + 1.
        ASSIGN COMPONENT i OF STRUCTURE it1 TO <field>.
        if <field> is not assigned.
          EXIT.
        endif..
        IF <field> IS ASSIGNED AND <field> EQ 'KBLOGO'.
          READ TABLE descr_ref->key INDEX i ASSIGNING <key_comp_wa>.
          WRITE <key_comp_wa>-name.
          exit.
        ENDIF.
      ENDWHILE.

  • Field name referenced by field symbol

    Hi,
    I would like to get the field name referenced by a field symbol at rutime. In the code below, besides the type and length of the field, I also would like to get the field names 'AA', 'BB' and 'CC' .
    Can you please tell me how I can get this information?
    DATA: BEGIN OF g_test,
           aa(10)    TYPE c,
           bb        TYPE i,
           cc(20)    TYPE c,
         END OF g_test.
    DATA: l_type(20),
          l_len   TYPE i.
    FIELD-SYMBOLS <fs>.
    START-OF-SELECTION.
      DO 3 TIMES.
        ASSIGN COMPONENT sy-index OF STRUCTURE g_test TO <fs>.
        DESCRIBE FIELD <fs> TYPE l_type OUTPUT-LENGTH l_len.
        WRITE: /5 sy-index, l_type, l_len.
    Would like output as:
       1  AA    C 10   instead of  1    C 10
       2  BB    I 11    instead of  2   I 11
       3  CC    C 20   instead of  3    C  20
      ENDDO.
    Regards,
    Rao A

    Hi,
    Using your sample structure you can do it using such a code:
    DATA: BEGIN OF G_TEST,
            AA(10) TYPE C,
            BB     TYPE I,
            CC(20) TYPE C,
          END OF G_TEST.
    TYPE-POOLS: ABAP.
    DATA: COMP TYPE LINE OF ABAP_COMPDESCR_TAB.
    DATA: STRUCT_REF TYPE REF TO CL_ABAP_STRUCTDESCR.
      STRUCT_REF ?= CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_DATA( G_TEST ).
      LOOP AT STRUCT_REF->COMPONENTS INTO COMP.
        WRITE:/ COMP-NAME, COMP-TYPE_KIND, COMP-LENGTH, COMP-DECIMALS.
      ENDLOOP.
    Krzys

  • Output Technical Field Names in the SAP query Output

    Hi Experts,
    I am new to SAP Query/ABAP Query or Quick Viewer. Just would like to know if there is a way whereby I can print the technical field names as opposed to the English field headers. For example I want to print BUKRS in the place of CoCode.
    I have a vague feeling this could be possible through custom coding in SQ02 but have no idea which code section to choose.Any inputs greatly appreciated.
    thanks in advance,

    Hi Sreegopalan,
    Open your infoset in SQ02, by default in the left hand side you'll be having the tables that you have selected, double click the field name which you want change the long text, it will open a attributes window below your field group. Change the header data text as you wish.
    Please find the query documentation in the below link.
    [http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf]
    Regards,
    Nandha

  • Table name and field name of the structure field

    Hi Gurus
    I am having a screen where i enter a value in a field and that field is a structure field, I would like to know in which table and what field is this value storing?
    Can anyone help me out in finding the field name? and what is the procedure to find?
    Thanks in advance

    Hi Satya,
    In the field data section (technical information), you can double click on the field name then the system will take you to SE11 (Data Dictionary). From here, you can check whether the field is available in tranparent table or structure.
    In general, as naren mentioned sales order header data stored in table VBAK and line item in table VBAP, VBEP, etc.
    For request delivery date, it stores in table VBAK-VDATU.
    Regards,
    Ferry Lianto
    Please close this thread if your problem solved and mark for all helpful answer.

  • A cmr-field and a cmp-field on the bean are using the same name. The names

    Hi:
    I am using weblogic 8.1 and MyEclipse 5.1.1. I am deploying my ear application through MyEclipse 5.1.1 as an ear file.
    When I ran the following EJB QL:
    SELECT OBJECT(p) FROM Product p.category = ?1
    I get the following error:
    n relation Category-Product, a cmr-field and a cmp-field on the bean are using the same name. The names of cmr and cmp fields must be unique.
    It is basically complaining that I have a field
    <cmr-field>
                             <cmr-field-name>category</cmr-field-name>
                        </cmr-field>
    in my ejb-jar.xml and also the same category in the
    <cmp-field><field-name>category</field-name></cmp-field>
    field. The problem is that if I changed the value of the cmr-field, I have to add a get and set in my productLocal.java and when you do that you have to do the same in the ejb-jar.xml.
    Here is my ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>CategoryEJB</ejb-name>
    <local-home>com.CategoryHomeLocal</local-home>
    <local>com.CategoryLocal</local>
    <ejb-class>com.CategoryBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Category</abstract-schema-name>
         <cmp-field><field-name>categoryId</field-name></cmp-field>
    <cmp-field><field-name>categoryName</field-name></cmp-field>
    <cmp-field><field-name>picture</field-name></cmp-field>
    <cmp-field><field-name>pictureWidth</field-name></cmp-field>
    <cmp-field><field-name>pictureHeight</field-name></cmp-field>
    <cmp-field><field-name>labelOn</field-name></cmp-field>
         <cmp-field><field-name>labelOff</field-name></cmp-field>
         <cmp-field><field-name>button</field-name></cmp-field>
    <primkey-field>categoryId</primkey-field>
    <security-identity><use-caller-identity/></security-identity>
              <query>
                   <query-method>
                        <method-name>findCategory</method-name>
                        <method-params></method-params>
                   </query-method>
                   <ejb-ql>
                        SELECT OBJECT(c) FROM Category c
                   </ejb-ql>
              </query>
         </entity>
         <entity>
    <ejb-name>ProductEJB</ejb-name>
    <local-home>com.ProductHomeLocal</local-home>
    <local>com.ProductLocal</local>
    <ejb-class>com.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Product</abstract-schema-name>
         <cmp-field><field-name>productId</field-name></cmp-field>
    <cmp-field><field-name>brandName</field-name></cmp-field>
    <cmp-field><field-name>productDescription</field-name></cmp-field>
    <cmp-field><field-name>purchasePrice</field-name></cmp-field>
    <cmp-field><field-name>category</field-name></cmp-field>
    <primkey-field>productId</primkey-field>
    <security-identity><use-caller-identity/></security-identity>
              <query>
                   <query-method>
                        <method-name>findProduct</method-name>
                        <method-params>
                        <method-param>com.CategoryLocal</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        SELECT OBJECT(p) FROM Product p.category = ?1
                   </ejb-ql>
              </query>
         </entity>
    </enterprise-beans>
    <relationships>
                   <ejb-relation>
                   <ejb-relation-name>Category-Product</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>
                             Category-has-many-Product-numbers
                        </ejb-relationship-role-name>
                        <multiplicity>one</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CategoryEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>productNumbers</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>
                             Product-belongs-to-Category
                        </ejb-relationship-role-name>
                        <multiplicity>many</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>ProductEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>category</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    </relationships>
    <assembly-descriptor>
    <security-role>
    <role-name>Employees</role-name>
    </security-role>
    <method-permission>
    <role-name>Employees</role-name>
    <method>
    <ejb-name>CategoryEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    <container-transaction>
    <method>
    <ejb-name>CategoryEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>ProductEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>     
    Here is my weblogic-cmp-rdbms-jar.xml:
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
         <ejb-name>CategoryEJB</ejb-name>
    <data-source-name>ShoeStore</data-source-name>
         <table-map>
              <table-name>category</table-name>
              <field-map>
              <cmp-field>categoryId</cmp-field>
              <dbms-column>categoryID</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>categoryName</cmp-field>
              <dbms-column>categoryName</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>picture</cmp-field>
              <dbms-column>Picture</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>pictureWidth</cmp-field>
              <dbms-column>PictureWidth</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>pictureHeight</cmp-field>
              <dbms-column>PictureHeight</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>labelOn</cmp-field>
              <dbms-column>LabelOn</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>labelOff</cmp-field>
              <dbms-column>LabelOff</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>button</cmp-field>
              <dbms-column>Button</dbms-column>
              </field-map>
    </table-map>
    <automatic-key-generation>
    <generator-type>SQL_SERVER</generator-type>
    </automatic-key-generation>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-bean>
         <ejb-name>ProductEJB</ejb-name>
    <data-source-name>ShoeStore</data-source-name>
         <table-map>
              <table-name>PRODUCT</table-name>
              <field-map>
              <cmp-field>productId</cmp-field>
              <dbms-column>productId</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>brandName</cmp-field>
              <dbms-column>brandName</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>productDescription</cmp-field>
              <dbms-column>productDescription</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>purchasePrice</cmp-field>
              <dbms-column>purchasePrice</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>category</cmp-field>
              <dbms-column>categoryId</dbms-column>
              </field-map>
    </table-map>
         <!-- Automatically generate the value of ID in the database on inserts using sequence table -->
    <automatic-key-generation>
    <generator-type>SQL_SERVER</generator-type>
    </automatic-key-generation>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-relation>
         <relation-name>Category-Product</relation-name>
    <weblogic-relationship-role>
    <relationship-role-name>Product-belongs-to-Category</relationship-role-name>
              <relationship-role-map>
    <column-map>
    <foreign-key-column>categoryId</foreign-key-column>
    <key-column>categoryID</key-column>
    </column-map>
              </relationship-role-map>
    </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    </weblogic-rdbms-jar>
    Here is my productLocal.java:
    package com;
    import javax.ejb.CreateException;
    import javax.naming.NamingException;
    import java.util.Date;
    import java.util.Vector;
    import java.util.Collection;
    public interface ProductLocal extends javax.ejb.EJBLocalObject
         public Integer getProductId();
         public void setProductId(Integer productId);
         public String getBrandName();
         public void setBrandName(String brandName);
         public String getProductDescription();
         public void setProductDescription(String productDescription);
         public Double getPurchasePrice();
         public void setPurchasePrice(Double purchasePrice);
    public CategoryLocal getCategory();
         public void setCategory(CategoryLocal category);
    Here is my ProductBean.java:
    package com;
    import javax.naming.InitialContext;
    import javax.ejb.EntityContext;
    import javax.ejb.CreateException;
    import javax.naming.NamingException;
    import java.util.Date;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.Vector;
    import java.lang.Integer;
    public abstract class ProductBean implements javax.ejb.EntityBean
         public Integer ejbCreate(Integer id)
              this.setProductId(id);
              return null;
         public void ejbPostCreate(Integer id)
         //public abstract Integer getCategoryId();
    //     public abstract void setCategoryId(Integer categoryId);
         public abstract CategoryLocal getCategory();
         public abstract void setCategory(CategoryLocal category);
         public abstract Integer getProductId();
         public abstract void setProductId(Integer productId);
         public abstract String getBrandName();
         public abstract void setBrandName(String brandName);
         public abstract String getProductDescription();
         public abstract void setProductDescription(String productDescription);
         public abstract Double getPurchasePrice();
         public abstract void setPurchasePrice(Double purchasePrice);
         public void setEntityContext(EntityContext ec)
              System.out.println("ProductBean setEntityContext");
         public void unsetEntityContext()
              System.out.println("ProductBean unsetEntityContext");
         public void ejbLoad()
              System.out.println("ProductBean ejbLoad");
         public void ejbStore()
              System.out.println("ProductBean ejbStore");
         public void ejbActivate()
              System.out.println("ProductBean ejbActivate");
         public void ejbPassivate()
              System.out.println("ProductBean ejbPassivate");
         public void ejbRemove()
              System.out.println("ProductBean ejbRemove");
    What do I needed to do to fix this problem.
    Any hint or help would be greatly appreciated!!!
    Yours,
    Frustrated

    cmr field which is "category" in ur mapping , u can't use as cmp field in abstract schema mapping. just remove category from cmp field . and every thing is fine

  • E-recruiting: Requisition management - Possible to change the field names??

    Hi to all e-recruiting experts,
    Need some assistance pertaining to the requisition management portion in e-recruiting.
    We have showed the standard SAP E-recruiting requisition bsp pages to our client and they have requested changes to the field names as they feel that the standard names are not intuitive enough.
    For instance,
    The field - "Hierarchy Level" - They have requested to change to "Job Grade"
    and the field "Functional Area"  to "Type of Work".
    Is there any way that i can change the name of the field through configurations?
    I understand that in a infotype, we can change the field name through translation. But can we change it in BSP? I was told to explore on how to configure via OTR.
    Can anyone share on the steps involved?
    Many thanks in advance.

    Well quite easy,
    create a context for an otr text (E-Recruiting are in package PAOC_RCF_UI). You will find that in SOTR_EDIT.
    Activate this context with implementing BADI BTFR_CONTEXT.
    After doing this, adjust context in SOTR_EDIT with Go To -> Context -> Adjust.
    Eventually refresh otr buffer with Transaction /$otr
    For one text there can be more than one OTR Text in backend, so you might change more than one.
    Regards

  • External table ddl contains owbunuseX in the field list

    Hi, we defined a external table in design center OWB11.1, and we defined columns like 'field1, field2... field50', but when it was generated, we found owbunused0, owbunuse1...in the field list of access parameters. why the field name is not same as the column name in the external table? Thanks.

    Hi Gary
    Ok, now I see. For an external table right click on it within designer tree and hit the Synchronize option, you will then get a dialog for synchronizing and when you regenerate you should be good to go.
    Like other objects External Table may be bound to another object, the File (in this case). So you can synchronize the external table if you change the file (in the same way with mapping, when you change a table you can synchronize the table in and out of the mapping).
    Cheers
    David

Maybe you are looking for

  • Error while updating lookup table through PSI

    Hi, I am trying to update a lookuptable through PSI using following code :  $lookupTableGuid = $svcPSProxy.ReadLookupTables($EPMTYString, 0 , 1033).LookupTables | where {$_.LT_NAME -eq $Lookuptablename} $lookuptable = $svcPSProxy.ReadLookupTablesbyUi

  • Ipad accidentally disabled, but I know my password.

    I have an Ipad mini which is connected to a bluetooth keyboard. I accidentally left the keyboard on and now my IPad is disabled and displaying "connect to itunes". So I tried to connect however it said it could not connect because there is a passcode

  • Search not returning all results

    I'm having a problem with searching a RAID volume on an G5 Xserve running 10.5.7. It doesn't seem to be returning search results correctly. I've tested it by making folders and searching for them over the course of several days, but haven't been able

  • PHOTOSHOP ELEMENTS 12 EDITOR NOT WORKING

    THE EDITOR HAS SUDDENLY STOPPED WORKING ON MY ELEMENTS 12.    ALL I KEEP GETTING IS " PHOTOSHOP EDITOR HAS STOPPED WORKING, WINDOWS WILL CLOSE THE PROGRAM AND INFORM YOU IF IT FINDS A SOLUTION ".      WE ALL KNOW THAT WINDOWS NEVER FINDS A. SOLUTION

  • Mail signatures in mountain lion

    My mail signatures are not working in Mountain Lion. Whenever I send a new mail, the signatures I set up under that account are not showing up. The ony choices I have is 'none' or 'edit signatyres'. I can got to edit signatures and then copy paste th