Creating a new line in forms

Hi all,
I designed a form which displays employee information like empno,ename,job,sal.
I created a control item as "create newline" and lov is attached to this item,lov contains values as YES,No. If I select create newline value as YES then a new line is inserted immediately next to the first line and the data corresponding to that empno is automatically populated into the fields. i.e empno,ename,job fields.But "sal" field is displayed as empty and it is able to insert new sal by user.After entering data into sal field the entire row is stored into emp table.I created a when-create-record trigger in
"create newline" item,but it is not working.
Could anyone please give me an idea to do this.
Thanks in Advance.
Edited by: user9970067 on Mar 19, 2010 6:15 PM

Hi Francois,
I have developed one form which contains emp block.which is a database block.I have taken Empno,Ename,Job and sal as database items and i have created one control item[Create Line] under this block.And Created Lov for that control item(that lov contains YES or No Values).All these fields displayed on the Canvas.
when I press CTRL+F11 it will display emp details,now my requirement is Suppose For the first record i have selected Create Line as YES from LOV Under this record new line has to be created and Empno,Ename,Job values to be populated in the new line from the above line but sal field is displayed as blank and then we enter the salary and update the record in the database.
Note:Here I am displaying the fields in the tabular format.
I have written code in when-create-record trigger in block level as:
declare
     cursor c1 is select empno,ename,job,sal from emp where empno=:emp.empno;
begin
     if :emp.CREATE_LINE='YES' then
for i in c1
          loop     
                    create_record;
               fnd_message.debug('new line');
               :EMP.EMPNO:=i.empno;
               :EMP.ENAME:=i.ename;
               :EMP.JOB:=i.job;
          end loop;
          end if;
     end;
Could u please help me.
Thanks in advance.

Similar Messages

  • Create a new line in the xml-header structure.

    Hi,
    Can any one tell me how to create a new line in the xml-header structure.
    I am doing a IDOC-XI-HTTP scenario.
    Actually my mapping create this file:
    <b><?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1"> </b>
    The result must look like this.
    <b><?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1"> </b>
    Thanks and Regards,
    Eren

    Hi,
    thanks for you quick answer.
    I found a xsl script.
    It works fine.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="yes"/>
       <xsl:template match="*">
          <xsl:param name="depth">0</xsl:param>
          <!-- New line with indenting. -->
          <xsl:if test="$depth > 0">
             <xsl:text>    </xsl:text>
          </xsl:if>
          <xsl:text>&#xA;</xsl:text>
          <xsl:element name="{name(.)}">
             <xsl:for-each select="@*">
                <xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
             </xsl:for-each>
             <xsl:apply-templates>
                <xsl:with-param name="depth" select="$depth + 1"/>
             </xsl:apply-templates>
          </xsl:element>
       </xsl:template>
    </xsl:stylesheet>
    Best regards
    Eren

  • Create a new line in the smartforms

    Hi Guys,
    Please let me know to create a new line in the smartforms.
    I tried creating a window with the height length is 0 cms.
    It is allowing to create a line.

    Hi,
    First I need to include the LOGO and next line I need to make a line.
    What do you mean by 'making a line '?
    Is it an empty line?
    If it is just a blank line, while creating the text below the logo just give one line space and then type in your text.
    Regards,
    Shailaja

  • How to create a new line in label in Xcode

    How to create a new line in label. for example I have two buttons & one label. when i press first button, l want to change the label text to "Hello World". then when I press the second button, on the same label I need to display"Good Bye" on the next line in xcode 5?
    I want to display the lablel like below:
    Hello World
    Good Bye

    I am using Xcode to develop an app for iOS.
    I tried using multi-line label & belwo is my code.
    - (IBAction)change:(UIButton *)sender {
        self.Screen.text = @"\nHello World";
    - (IBAction)newChange:(UIButton *)sender {
          self.Screen.text = @"\nGood bye";
    everytime when i pressed the button, it replacing the whold lable text instead of adding the second line.

  • Creating a new line in PLSQL

    I am trying to create a new line by returning a variable from a function by coding the following which worked for the last version of HTML_DB and understood that after my variable named vlname I wanted a new line
    msg := 'NAME: ' || vlname ||'<br><br>';
    When passing back the value of msg now in Application express. This exact code I repeat worked for the last version of HTML_DB.
    I don't know why but the new version thinks it's literal
    and is displaying the name and then actually prints <br><br>.
    Does anyone have a ny suggestions ?
    Thanks
    Aron

    I just did the following:
    Created this function:
    create function br_test
    return varchar2
    is
    begin
      return '&lt;br>qwerty&lt;br>qwerty&lt;br>';
    end;Created a blank page with a html region. I then created an an item of type Display as Text (does not save state). Item Source type = PL/SQL expression or function and Source value or expression = br_test.
    When I run this qwerty is shown twice on seperate lines. What is different in you case?
    Regards Pete

  • How to create a new line item automatically in CRMD_ORDER

    Hi,
    While creating a sales order in CRMD_ORDER, after user enters a line item say 'xxxx' and press 'Enter', we need to create a new line item say 'yyyy' dynamically.  Any ways of how to achieve this functionality?
    thanks in advance,
    amar.s

    Hi Amar
    You can use structured products:
    Step1:COMM_PR01
    Open Product xxxx > Relationships > Tab Component > Select Relationship type = STRSET Set > Assing product yyyy
    Step2: IMG > CRM > Transactions > Define Item Categories
    Open you item category and in Structure scope field select option A Single-Level Explosion of structured products
    Step3: IMG >  CRM > Transactions > Define Item Category Determination
    create new entry
    Transaction type =
    Item   category group = Category group of xxxx product
    main item cat = item cat of xxxx product
    item cat =  item cat of yyyy product
    now when you enter product xxxx , product yyyy will be automatically added
    Hope it helps
    Rupesh

  • How do i create a new line item (say 20) in reference to line item 10

    Hi all,
    I am trying to map a scenario where i want to create a new line item with reference to an existing line item. Where do i get this option in SD, and how could i go about it?
    Thanks & Regards
    Ravi

    > In ECC6 if u go to VA01 and enter the SP and SH,
    > Press Propose Item Icon, then one window will pop-up
    > asking for Sale Document Number, enter the Number and
    > select- selection list, there  u will get all the
    > line item of the Sale Doc. Select and copy Material
    Hi i am on SAP 4.7. How could be the same handled here?

  • Text file - carriage return, creating a new line

    anyone know how to create a new line in a text file, something which is the text file equivelent of a BR (html) tag.

    in windows it's "\r\n"
    in linux/unix/bsd it's "\n"
    but the best way to do it is
    //this will return the newline character for whatever
    //platform your program is running on
    System.getProperty("line.separator");

  • Create a new line item in sales order

    Hi,
    I have to create a new line item in a sales order. The scenario is that if we donot find the desired quantity from a plant. Then we have to go ahead and pick the remaining quantity from another plant and automatically create a new line item.The new plant is picked from a custom table so u need not worry about it.
    According to me I will have to use the BAPI for it but one constraint is that while creating a sales order the order number assignment is not done until saved. So what can be done in the case if its a new document.
    Kindly let me know if there is any appropriate user exit or if someone has worked on a similar requirement.
    thanks
    Varun

    Hi,
    Thanks for your response. I have tried to use these exits already but the problem dat comes here is dat when we try to use the BAPI we donot have any sales document created in the first instance(i.e. while creating an order) so the BAPI returns error and when i tried to populate the itabs in the program directly the new values just wont get processed.
    I think like: in case its a new document and we face this scenario I can just terminate the document creation and create a new document using the BAPI with proper plant assignments.But i am doubtful about the stability of this process.
    Kindly comment.
    Thanks
    Varun

  • Creating a new line in tabular form

    Hi all,
    I designed a form which displays employee information like empno,ename,job,sal.
    I created a control item as "create newline" and lov is attached to this item,lov contains values as YES,No. If I select create newline value as YES then a new line is inserted immediately next to the first line and the data corresponding to that empno is automatically populated into the fields. i.e empno,ename,job fields.But "sal" field is displayed as empty and it is able to insert new sal by user.After entering data into sal field the entire row is stored into emp table.I created a when-create-record trigger in
    "create newline" item,but it is not working.
    Could anyone please give me an idea to do this.
    Thanks in Advance.

    Hi Francois,
    I have developed one form which contains emp block.which is a database block.I have taken Empno,Ename,Job and sal as database items and i have created one control item[Create Line] under this block.And Created Lov for that control item(that lov contains YES or No Values).All these fields displayed on the Canvas.
    when I press CTRL+F11 it will display emp details,now my requirement is Suppose For the first record i have selected Create Line as YES from LOV Under this record new line has to be created and Empno,Ename,Job values to be populated in the new line from the above line but sal field is displayed as blank and then we enter the salary and update the record in the database.
    Note:Here I am displaying the fields in the tabular format.
    I have written code in when-create-record trigger in block level as:
    declare
         cursor c1 is select empno,ename,job,sal from emp where empno=:emp.empno;
    begin
         if :emp.CREATE_LINE='YES' then
    for i in c1
              loop     
                        create_record;
                   fnd_message.debug('new line');
                   :EMP.EMPNO:=i.empno;
                   :EMP.ENAME:=i.ename;
                   :EMP.JOB:=i.job;
              end loop;
              end if;
         end;
    Could u please help me.
    Thanks in advance.

  • How can I create a new mail custom form shortcut ?

    Hello everyone !
    It's been three hard day of searching for such a simple question:
    How can I add a button to Outlook's ribbon that select a new pre-define form to send ?
    I already have the button but I miss an instruction like that:
    Create new mail with the form located here
    Thank you in advance for helping :D
    (And sorry if there is a mistake, English is not my native language)

    Hello Dark,
    private void CreateMailItem()
    Outlook.MailItem mailItem = (Outlook.MailItem)
    this.Application.CreateItem(Outlook.OlItemType.olMailItem);
    mailItem.Subject = "This is the subject";
    mailItem.To = "[email protected]";
    mailItem.Body = "This is the message.";
    mailItem.Importance = Outlook.OlImportance.olImportanceLow;
    mailItem.Display(false);
    Outlook forms are associated with items based on the message class values. To get a specific inspector window displayed you need to create an Outlook with the associated message class.
    VSTO provides two different ways for customizing the Fluent UI:
    1. Using the ribbon designer: Walkthrough: Creating a Custom Tab by Using the Ribbon Designer .
    2. A raw XML markup: Walkthrough: Creating a Custom Tab by Using Ribbon XML

  • Problem with a primary key when creating a new record in Forms

    My table has a field - MDD_KEY - that is a primary key. It is updated from a sequence with a before-insert database trigger. I know this works properly as the primary key was accurately populated when I inserted 1433 records.
    In Forms 6, I have a form based on that table. I have set the mdd_key as a hidden field because I assume it will be entered by the before-insert trigger. However, when I enter data into the table, and then try to save it, I get a FRM-40202: Field must be entered. - followed by - FRM-40222: Disabled item MDD_KEY failed validation.
    If I set DATA Required to no, when I try to save I get an FRM-40600: Record has already been inserted - but no such record exists in the database. I know this record is unique and does NOT exist because I deliberately made it up.
    In the property palatte, the attributes of the field are:
    DATA Data Type Number
    Required Yes
    DATABASE Database Item Yes
    Primary Key Yes
    Query Only No
    Query Allowed Yes
    Query Length 0
    Insert Allowed Yes
    Update Allowed Yes
    Update Only if Null No
    Lock Record No
    I assume that my problem is that with a new record, the form wants to see the MDD_KEY populated before it saves - but that isn't going to happen until the before insert trigger fires in the database. I assume I have to populate that field within forms, but how do I do that without messing up the database trigger/sequence? I will have to load more data directly into the database - so I need the database trigger in place.
    I have not used primary keys before so I am more than a little bit confused about how and when it should be populated when a new record is created in Forms.
    Any help would be appreciated as I cannot enter new data into my form (works well with existing data).
    Thanks
    Glenn

    hi
    if u have any problem using seq then try that statemetn ur block level in ur form
    PRE-INSERT trigger
    select nvl(max(nvl(srno,0)),0)+1 into :srno from tablename;
    Rizwan

  • Creating a new line for a row layout

    Hi
    i am building a web service based OA page...
    For this i have a created a VO with transient variables which holds the values from webservice.
    Now i have a row layout region where i key in some values which are required to call webservice..
    using this values webservice is called..and object is returned from webservice ,from which vo transient attributes get the values..
    now my requirement is i need to create one more line to key in more rows...at any point of time user can create a new row to query a different item ....or existing item..
    The queried results can be seen in the underlying table region which holds the VO attributes discussed above..
    Please help in this...how to achieve above mentioned functionality...
    If u need more clarifications please write to me...

    If you can provide a screenshot of your page then it will be helpful to understand the problem.
    Cheers
    Ganesh

  • Create Custom New/Edit/Disp Forms

    I'm trying to modify the new/edit/display on a SharePoint calendar.
    I created a new calendar called test and was able to create new forms for each of these actions and then set each of the new forms to be the default form - the only change I made was to remove the option for an all day event.
    This was successful on my test calendar. I then began to do exactly the same action on the real calendar which has been in use for a while. On attempting to create a new form for either of the new/edit/disp action, in SPD2010 I click on the "New Item
    Form", fill in the details on the dialog box and click OK to confirm the creation of a new form. On clicking OK I receive the error message "Could not save the list changes to the server". This is before I get the opportunity to actually alter
    the forms.
    I can confirm I am connected to the server.
    Could anybody tell me what might be going wrong?
    Could it be permissions such as other people viewing the calendar or editing items in the calendar? I was hoping to make this change without preventing people's access to the calendars.
    Regards,
    Ben

    Hi Ben,
    According to your description, my understanding is that you got an error when you created a new form for a calendar.
    Whether you use AAM for the site. If yes, please open the site without the alternative URL in SharePoint 2010 Designer.
    Please close SharePoint 2010 Designer, and clear the Recycle Bin on the site, then clear the web data cache on your machine, the path is:
    C:\Users\UserName\AppData\Local\Microsoft\WebsiteCache
    After the above, please open SharePoint 2010 Designer, and create a new form for the calendar again.
    Here are some similar posts for you to take a look at:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/ae946f73-3126-41ad-833b-25e4cc2b7723/sharepoint-designer-error-could-not-save-the-list-changes-to-the-server?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/98a582da-e9e7-4753-b2db-637ceb8ce3f6/sharepoint-could-not-save-the-list-changes-to-the-server?forum=sharepointcustomizationprevious
    http://social.msdn.microsoft.com/Forums/en-US/eba4cd7e-498a-465f-adea-decae44d7a8c/error-creating-a-new-form-in-sharepoint-2010-designer-could-not-save-the-list-changes-to-the?forum=sharepointcustomizationprevious
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Return key not creating a new line when using the horizontal text tool

    Going through the adobe after effects 'classroom in a book' examples - when writing a line of single line using the horizontal text tool pressing return does not create the next line underneath, the cursor stays on the same line?
    Anybody out there had this problem?

    Hi Bill
    Thanks for replying!
    My OS is windows 7. I think it is the first time I have needed to put more than one line of text in an after effects layer. I am new to CS5.5 - after effects and I'm going through an adobe tutorial  'classroom in a book' series book.
    I thought about using a paragraph text box as you suggest but could not find the function in the tools menu.
    I have since tried clearing the cache out and restoring default layout but with no joy.
    I have used the return key for multiple line text in premier pro and it works perfectly ok.
    Cheers,
    Alan

Maybe you are looking for

  • Is it poosible to avoid REP-0099 report is aborted upon user request

    Hi friends, is there any possibility to get rid of the above said message box, when user decides to not to run the report after actuallyhe called the report using RUN_PRODUCT built-in. some time the users do like this, and when they close the report

  • White lines on Screen... What's wrong with my iPod nano?

    Hello there! My iPod nano 4th generation has two white lines close to the bottom of the screen. I have reset the iPod but it doesn't remove them. Has anyone of you experienced this problem? Thanks!!! Appreciate it a lot!

  • Inconsistent Actions With "Dim Screen Brightness" Key (F1)

    On the MacBook Pro, the F1 key is automatically mapped to dim the screen brightness. However, sometimes when I press this key, the screen shuts off (or at least goes to the lowest brightness setting) and other times it just goes down a single brightn

  • JDEV 11.1.1.5 - Compile Java EE 6 in Jdev

    Hi: I'm building a JPA/EJB 3.0 + MyFaces Trinidad application. The tools Im using are: Jdev 11.1.1.5, Glassfish open source 3.1.1 and Oracle XE 10g. I want to use some methods defined by Java EE6 API, specifically the HttpServletRequest.login method

  • Moving and

    I bought some music files and downloaded them to the default location on my C: drive.  I then copied and pasted them to my network L: drive.  iTunes is not picking them up in either the Home Sharing or Music file listing.  Why?  How should I have don