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.

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

  • Create a new rule for printing form to use in time statement form

    Hello,
    we need to print an information on time statement form in dependence of a special substitution. Is there any possibility to create a new rule for printing form to use in time statement form? I can't find any information about this.
    Thanks for your help.
    Regards,
    Daniela

    Yes, I've tried this, but I get the error message:
    Form class TEDT can only be displayed with this editor.
    What am I doing wrong? Do I have to create a customer form class and assign a customer time statement form?
    Thanks for your information.
    Regards,
    Daniela

  • 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.

  • Dynamic Action on new row in Tabular Form

    Hi Guys,
    APEX version is 4.1
    I created a dynamic action on change of a select list, if changed then disable the related fields on the same row.
    This is working fine for all EXISTING rows on the tabular form.
    However, if I click on ADD ROW button, a new row is added to the page, but the change event on select list is
    not triggerred from the dynamic action.
    Is there any thoughts or workaround on this interesting problem?
    Thanks in advance,
    Frank

    I got it working by adding a onchange event which is triggering js function on the page.

  • Create a new class in pe51 form layout

    Hi experts,
                   I want to create a new form  layout in pe51 for payroll register. In standard form class maximum columns is 132 but i want
    more than 300 columns for payroll register. so its possible to to create new zform class in pe51. If its possible pls guide me.
    Thanks in advance.
    Thanks & Regards
    G.Vendhan

    Hi, I am working on the same thing and created a form in PE51 using Form class CKT0 which gives me 255 columns.  I am however having problems with finding some of the fields I need.
    Thanks.
    N

  • 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

  • How to stop insert of new row in tabular form if it's also being deleted

    Suppose you have a tabular form, and one of the fields is a not-null column. A user checks a button to "add additional row", which adds a new row to the form, defaulting that not-null column to null. Assume it's a name or something, so there is no reasonable non-null default value that can be entered here to keep it from being null.
    Now suppose the user makes a series of changes on the page, but then decides they don't want that row they just added, so they mark it for deletion, then click on "Delete Checked Rows". The not-null column was left blank.
    The page is constructed in such a way that the ApplyMRD process runs first, then the ApplyMRU process. (I do this so that the user doesn't lose all their updates if they want to delete a row. I've had a few people complain when they tried to combine both operations, and unexpectedly lost their updates when they hit delete instead of submit.)
    What happens? The page errors out because the ApplyMRU process is trying to insert a row with a null value in a not-null column. The ApplyMRD process ran fine, but because the row marked for deletion didn't exist in the database to begin with, it effectively did nothing. But ApplyMRU still tries to add the row, even though it was marked for deletion.
    Is there any way to prevent this scenario from happening, without requiring the user to Cancel instead of deleting the blank row, which would cause all other changes on the page to be lost? I'd also like to avoid losing the ApplyMRU process when the user clicks "Delete", since it's more effective to combine operations and this will address the UI complaints I'd received otherwise.
    (This is on ApEx 4.0, if it matters.)
    Thanks,
    Keith

    Thinking about this some more, doing the delete and update together may not be an easy thing to accomplish after all.
    Consider the above scenario, but the user puts a dummy value like "ignore-me" into the not-null text field, so the error doesn't come up with ApplyMRU is fired. But if ApplyMRD runs before ApplyMRU, it still doesn't do anything because there is no row in the database with the value "ignore-me". Then ApplyMRU runs and it adds that row, even though it was marked for deletion.
    So you probably need to always run ApplyMRU before ApplyMRD. But then you wind up inserting a row before you delete it, and that may have unintended side effects, if the user really never wanted to add it in the first place.
    Right now, the only workaround I can think of is to:
    1) put ApplyMRU before ApplyMRD
    2) add a pre-commit validation that checks to see if a row is blank AND checked, and if so, put a dummy value into the not-null field
    3) let that row get added and then deleted, and make sure there are no side effects from this (for example, there is an audit table that tracks updates to the base table -- I can add a trigger that does nothing if presented with this dummy value)
    Hopefully, though, there is an easier and more "built-in" way to achieve what I'm aiming for.

Maybe you are looking for