Adding an extra Field in JSP

The problem is like this.
I have created BC4J and JSPs which uses this BC4J. Now in the JSP i want to display a Non-Database Field (which is not in the table or field whose value has to be taken from another table). For eg: I have a ItemMaster table(Master) and AlternatItem Table(Detail). The ItemMaster Table consist of ItemCode,ItemName. AlternateItem has foreign key -ItemCode. Now in AlternateItem table i have altItemcode field which is to be displayed in the JSP(Master-detail).Along with this i want to display Item Name. This item name will come from the master table(item Master). So i have to have a non-database field called item name which will take the respective item name from the
Master table.
Now for this what can i do? Is it possible to create a new dummy field in BC4J component or view and somehow relate that to a query which will pick up the name from ItemMaster for the altitemcode typed(like in forms we may write :select ItemName from ItemMaster where itemCode = :altitemcode something like that).
null

Arun,
Is your JSP a master-detail form (i.e. a master-record on top with multiple detail records in a grid below), or does your JSP just contain the detail records and you want to use itemname instead of itemcode?
Depending on the answer, you could do this in a couple of different ways:
1. In the detail JSP, use an LOV for the itemcode field that shows the itemname, but returns the itemcode value. In the JSP Insert and Edit pages, use the following code before the render() method for the EditCurrentRecord bean:
RowEditor.useComboBox("Itemname","select itemcode,itemname from itemmaster","ITEMNAME","ITEMCODE");
2. Another way, if you just have a JSP for the detail, is to have a View Object that includes both the master and detail entities with a join in their where clause. Note that when you do this, one of the tables will be listed as a 'reference only' table. Make sure you set the ItemMaster table as the reference one since you just want to use that for the name column.
Option #1 is probably a better one if you want to allow updates/inserts since it allows users to choose from a set list of Item Names in a drop-down list format.
Laura
null

Similar Messages

  • Column Headings in the report and adding an extra field to the report

    Hi All.
    I had an issue like i need to put column headings for a report and I want to add an extra field to the report.
    The problem here is that the report was actually cloned from a Query.At the time of cloning,they forgot to add the column headings.
    Now we need to add the column headings for the same.How can we proceed for this and where we need to add our code?
    How to add an extra field  to the existing report?
    Any pointers will be very much helpful.
    Regards,
    SSR.

    Hi,
    you can get this done in 2 ways:
    1 - Change the query to add another column and the re-generate the report
    2 - If changing query is not possible, you can change the report it self for adding extra field. If you look at the code, it will be more like normal ABAP code. you can easily modify it (If you are ABAPer) for your additional requirements.
    thnx,
    ags.
    Edited by: Agasti Kale on Jun 12, 2008 6:26 PM

  • Adding an extra field in customer statement report

    Dear all,
    We are on SAP B1 2007 PL42. How can we add an extra field eg a UDF on a customer statement in PLD? The system's customer statement have all fields as "free Text".
    Kind Regards,
    Asif

    Hi,
    I have created a free text field in PLD- named Field_101. I have also created a database field from the OINV table and referenced to the UDF "U_FileNo" named Field_102.  On field_101 I have linked to Field_102 but on previewing the report the field is empty/blank.
    Thanks
    Asif

  • FAGLB03 Report.-Adding an extra field under the Free/Dynamic Selection

    Hi ,
    I have got a requirement to add field named 'XREF3' (BSEG) under the Free Selection in FAGLB03 Report.  I did a research but could not find any exits . Can this requirement be met by configuration Or any other Solution?

    Hi,
    Below links may bay helpful
    http://forums.sdn.sap.com/thread.jspa?threadID=2038688
    http://forums.sdn.sap.com/thread.jspa?threadID=2082493
    Regards
    Aromal R

  • Adding a new field to a DB table

    Hi,
    I am working on 4.6C.
    The requirement is to add an extra field to a database table which already has data in it...
    Will this effect the system in any way...if I add a field with the data in the table.
    What precuations do i have to take before adding an extra field to a DB table.
    I was wondering what will happen when i need to transfer the TR.. Basically the data is there in Production and Quality and not in development... so it will not be a problem in development...
    I mean changing the structure of the table with data in it ... Is it Ok...
    Thanks & regards

    Hi Sam,
    you can add a new field to any database table if even
    if contains data in production, only thing to do is u just
    have create an append structure to that table and in that
    append structure just create the new field.
    NOTE : Naming Conventions as follows:
    For Append Structure e.g :
    In se11 enter Table Name and select change button.
    now select GOTO option in the menu bar and select APPEND STRUCTURE option.
    now the screen shows u an default name for ur append structure, so dont change the name
    just hit enter button and
    now enter the your new field name with two Z's infront of the field.
    e.g if ur field name is MATNR then enter ZZMATNR as ur field in the append structure.
    and now save and activate and also adjust in the DATABASE UTILITY.
    thanks & regards,
    CH Vamsi Bharath

  • Error while adding content type fields in the EditForm.aspx for an customlist item.

    This is office 365. I have content type which is attached to custom list.
    Added new site column "CustomerAction" which was added to Content type, now when I added this field in the EDITForm.aspx using the SharePoint designer, this form is called when the custom list item is being edited.
    But when I added this extra field to EDITFORM.aspx it is giving error,. the standard correlationid error.
    Can anyone suggest, what could be problem !
    Thanks
    Labhesh
    Labhesh Shrimali

    Hi Labhesh,
    When we add the site column to the content type, there is an option to update the all
    content types which inheriting from this type.
    If we set this to Yes, then the site column will be added to the list where the content type or its child content type has been used and this column will be added to the EDITFORM.aspx too.
    So we don’t need to re-add this site column to EDITFORM.aspx.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Creation of extra field in customer master.

    Hi All,
    I have a requirement where i need to create one extra field.
    We intend to capture taluka for each distributor. This will give us micro level detail. We can start analyzing sale at taluka level.Therefore we believe this additional field will be important.
    Kindly provide your valuable solutions to achieve this.Thanks in advance.
    Thanks,
    Pavan.

    Hi Pavan,
    Rather adding an Extra Field(if your requirement "Taluka" is only for information or statical purpose) you can go with charecterstics and classification.
    In my Client Business, the requirement was to add the " Sales Group's" mobile number and Email id in customer master, so that they can a have report where they easily findout the phone number and mail id for the each sales group. so i have acheived this through Charecterstics.
    Screenshot for your Reference:
    This would be also an option.
    Regards
    Kamal

  • Adding Extra field in KSB1

    Hi all,
            I need to add one extra field in output of  the Report, Please tell me the procedure to add extra
    field in the ALV output.
    Regards
    Suprith

    Hi,
    Create the structure CI_RKPOS and include the field you want to display in this structure .....
    use the userexit COOMEP01 CO-OM: Information system -> line item reports
    EXIT_SAPLKAEP_001 in this function module ......write the logic to fill that field value....
    and pass the value to  CS_RECORD structure ....
    your added field will be visible in the structure  CS_RECORD....
    Thanks,
    Shailaja Ainala.

  • Form Validation using Javascript error when adding extra fields

    Hi,
    I have a form (with a few fields which require validation) which works just fine.  I have added extra fields to the form and require them to validate too.  My problem is that they are not showing via the behaviours/validation box and I can't figure out how to sort it!  They are contained within the form element.  I have tried to delate the original validation and start again but to no avail.
    Please can someone help me?
    Code below.
    Many thanks
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    //-->
    <form action="contact_us.asp" method="post" name="contact" target="_parent" class="contentText" id="contact">
          <table width="100%" border="0" cellspacing="5" cellpadding="0">
            <tr>
              <td width="54%" class="subHeader">Full Name* </td>
              <td width="46%" class="subHeader"><input name="FullName" type="text" id="FullName" /></td>
            </tr>
            <tr>
              <td class="subHeader">Company Name </td>
              <td class="subHeader"><input name="CompanyName" type="text" id="CompanyName" /></td>
            </tr>
            <tr>
              <td class="subHeader">Address</td>
              <td class="subHeader"><input name="Address1" type="text" id="Address1" /></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Address2" type="text" id="Address2" /></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Address3" type="text" id="Address3" /></td>
            </tr>
            <tr>
              <td class="subHeader">Postcode</td>
              <td class="subHeader"><input name="Postcode" type="text" id="Postcode" /></td>
            </tr>
            <tr>
              <td class="subHeader">Telephone Number* </td>
              <td class="subHeader"><input name="Telephone" type="text" id="Telephone" /></td>
            </tr>
            <tr>
              <td class="subHeader">Mobile Number </td>
              <td class="subHeader"><input name="Mobile" type="text" id="Mobile" /></td>
            </tr>
            <tr>
              <td height="25" class="subHeader">Email Address* </td>
              <td class="subHeader"><input name="Email" type="text" id="Email" /></td>
            </tr>
            <tr>
              <td height="30" class="subHeader">Status*</td>
              <td class="subHeader"><select name="StatusClass" id="StatusClass">
                <option selected="selected">Please Choose</option>
                <option>Architect</option>
                <option>Interior Designer</option>
                <option>Private Client</option>
                <option>Student</option>
                <option>Trade Enquiry</option>
              </select>          </td>
            </tr>
            <tr>
              <td height="23" class="subHeader">Project*</td>
              <td class="subHeader"><select name="Project" size="1" id="Project">
                <option selected="selected">Please Choose</option>
                <option>Planning Stages</option>
                <option>New Build</option>
                <option>Refurbishment</option>
                <option>Barn Conversion</option>
                <option>No project - information only</option>
              </select>          </td>
            </tr>
            <tr>
              <td height="37" class="subHeader">How did you hear about us?*</td>
              <td class="subHeader"><select name="CameFrom" size="1" id="CameFrom">
                <option selected="selected">Please Choose</option>
                <option>Web Search</option>
                <option>Grand Designs</option>
                <option>Living Etc</option>
                <option>Home Building &amp; Renovation</option>
                <option>Architect</option>
                <option>Friend/Family</option>
                <option>Magazine/Editorial</option>
                <option>Newspaper Article</option>
                <option>Trade Show/Exhibition</option>
                <option>Other</option>
              </select></td>
            </tr>
            <tr>
              <td height="24" class="subHeader">Brochure Request </td>
              <td class="subHeader"><input name="Brochure" type="checkbox" id="Brochure" value="checkbox" /></td>
            </tr>
            <tr>
              <td class="subHeader">Message</td>
              <td class="subHeader"><span class="style4">
                <textarea name="Message" id="Message"></textarea>
              </span></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Submit" type="submit" value="Submit" /></td>
            </tr>
            <tr>
              <td colspan="2" class="subHeader"><em>* Required fields</em></td>
            </tr>
          </table>
          </form>

    whoops..... forgot to post this line of code which was a bit further down the page...
    "MM_validateForm('name','','R','number','','RisNum');return document.MM_returnValue">

  • Populate the extra fields added to the DS

    I want to populate extract structure for Transaction data .
    using CMOD For field BLART coming from Table COVP
    In CMOD What code do you write to populate the extra fields added to the DS
    thanks

    using DS :   0CO_OM_WBS_6
    which uses delta
    thanks

  • Adding Extra Field in INFOSET

    Hi,
    I am working on infoset which is reteriving the data through Logical Database and trying to add the field for the field description.
    It has to display the data through data element but it is not doing so .
    Actually, i had created a query which shows the data about the changes made in the Material.I am able to display all the data but not the text that shows the description of what has been made .
    Here's the code:-
    TABLES: CDPOS.
    DATA: E_DD04V LIKE DD04V OCCURS 0 WITH HEADER LINE.
    DATA: E_DD03L LIKE DD03L OCCURS 0 WITH HEADER LINE.
    DATA: P_DDTEXT LIKE DD04V-DDTEXT.
    IF CDPOS-FNAME <> 'KEY'.
        CALL FUNCTION 'GET_FIELDNAME_TEXT_1'
          EXPORTING
           I_AS4LOCAL                = 'A'
           I_AS4VERS                 = '0000'
           I_FIELDNAME               = CDPOS-FNAME
           I_TABNAME                 = CDPOS-TABNAME
          TABLES
           E_DD03L                   = E_DD03L
           E_DD04V                   = E_DD04V
         EXCEPTIONS
         ERROR_IN_PARAMETERS       = 1
         NOT_FOUND                 = 2
         OTHERS                    = 3
      ENDIF.
      IF SY-SUBRC <> 0.
         CLEAR E_DD04V-DDTEXT.
    *      ELSE.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      IF CDPOS-FNAME = 'KEY'.
        P_DDTEXT = 'New Entry Made'.
      ELSE.
        P_DDTEXT = E_DD04V-DDTEXT.
      ENDIF.
    Please provide me guidelines to solve this problem.
    Edited by: ricx .s on Jul 15, 2009 11:37 AM

    Hi,
    Currently i am doing the following:-
    I had created a Logical Data Base where i had made the logic for the Changes Made To Material. I am fetching the data from the following tables:-
    MARA,MAKT,CDHDR AND CDPOS.
    As i am checking the LDB it is working fine as i had verified the data and i follow the whole procdeure to make Query and then generated it,it is working fine. But when i try to add the extra field (which shows the description what change has been made,it give errors for it).
    Please provide me guidelines to solve this problem.

  • Adding an extra screen field in CJ88

    Hi,
    The FICO consultant wants to know whether we can add an extra screen field in CJ88.He wants to add the posting year.Currently there is facility to add posting period and the posting year will be same as the fiscal.He wants to change the posting year.Due to this he wants to add an extra screen field - posting year so that the user can change it during reversal.
    If yes then how it is bo done.
    If not, is it possible to copy the entire CJ88 code and make zprogram and ztcode and add this extra field.
    Please let me know your suggestion.
    Thanks,
    Rajani

    HI,
    Perhaps you can try with USEREXIT_CHECK_VBAP in report MV45AFZB.
    Other possibilty is the BADI BADI_SD_SALES_ITEM, where the method ITEM_CHECK.
    Perhaps the most powerful is userexit_save_document in report MV45AFZZ, but it works when you save the document. Here you can compare XVBAP (with the new item will have the field UPDKZ = 'I') with YVBAP (you can compare the line items of both internal tables). Finally, you can use the status of deliveried and billed of XVBUP, YVBUP, XVBUK, YVBUK to do the final checks.
    Perhaps you can fix warning messages in the first exits (in dialog) and in the saving event set the error message.
    Set the break point and check the data in these structures, and think in the right algorithm.
    I hope this helps you
    Regards,
    Eduardo

  • Adding extra Field to a Infoset Query

    Hi Experts,
      I need to add an extra field to a SAP Query(infoset). SInce the code uses a dynamic program call, how do I add my code . Can I have some example code used to add extra field to a SAP Query

    Hi Mithun and gurus,
    My code is working now for these 3 new additional fields. The thing is it works if these fields were selected solo. but if all of these 3 or 2 of it simultaneously, an error occurs.
    Error when generating the report (see long text)
    Message no. AQ_AD_HOC221
    Diagnosis
    The report cannot be generated because the internal description is invalid or incomplete, or because the selection screen is too large.
    Regenerate the assigned InfoSet, and read the log. If the InfoSet is OK, make sure that at least one field is given as output.
    If you used the 'Refresh' icon to start the query, use the 'Output' menu option to execute the query. This gives you a full screen display of the data.
    If an output was generated, the query cannot work with actual data in the construction view. In this case, always use the 'Output' function to execute the query.
    Procedure
    If the selection screen is too large, you need to reduce the number of your selections.
    Make sure that the assigned InfoSet is correct. The name of the assigned InfoSet is stored in the menu option 'Extras -> Template Information'.
    Output at least one field. Otherwise you will not be able to save or generate reports.
    If you do not have this problem, execute the query using the 'Output' function.
    Otherwise, there is an error in the InfoSet Query.
    >>>I checked and the code seems fine at least. I think there must be something I need to configure. I tried the SEQUENCE for Codes but nothing happens..
    I hope you could helop me with these..Thanks a lot!!!

  • Adding extra fields to the SOA composite from OIM

    Hi All
    I want to to add extra fields to the input XML file to custom SOA approval composite.
    Where I suppose to control the parameter going from the OIM request to the SOA composite ?
    Thanks
    Edited by: 599647 on Jan 27, 2012 9:28 AM

    http://bbagaria.blogspot.com/2011/08/how-to-extend-payload-from-oim-to-soa.html
    -Bikash

  • Query : Addition of extra fields in the User Registration page of portal.

    Hi All,
    I have a query, about adding extra fields in the new user registration page of portal.
    If you can suggest the required source files in details,inorder to incorporate two more fields.
    Say, AGE and COMPANY,with the existing fields in the same page.
    Along with this,can you please send the details of retrieving those information from backend and the backend functionalities associated with the SUBMIT button on the registration page.
    Regards,
    Sudeep

    Hi,
    Your query is divided into two parts.
    The first part is adding new fields into existing form. This feature comes under Branding of portal. Plz use the link below understanding the same and related help :
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm
    The second part is retrieving the values from backend.Here it will be the UME database. You need to develop a logon.par file and replace the same in your portal.
    Happy Customizing.
    Sukanta Rudra

Maybe you are looking for

  • Burning DVD's in Premiere Elements

    Is it possible, or necessary to make DVD's in different formats eg .wmv in Premiere Elements?

  • Using 10.5.6 for old stuff

    Anyone out there who may have the answer to this. I have a new iMac, and am wondering two things. First, is there such a thing as Apple BASIC ? Secondly, some of the stuff I do requires me to write batch files for the DOS in windows. Is this possible

  • CD rom is down...

    I am having a "Unable to find driver for this platform: PowerMAC3.5" message and I need to use the CD rom to install and it does not work. Any takers? Please, please!

  • Logic midi notes not audible with pedal half way down

    I'm using a roland rd700sx keyboard with a roland dp-8 damper pedal connected to a powerbook. recording midi works but when I have the damper pedal half way down the notes are there in logic but aren't audbile. Any tips on getting this working would

  • Tomahawk tree problem

    I am using the tomahawk tree. and I am using tiles. When I click the node, the page gets displayed, but When I see the url, I always see the last page url. How do I fix this ? thanks