Populating values of one table to other in dynamic tables

Hi Experts ,
An issues here.
<lt_data> is a table with different field lenghts.
<itab> is a table of different field lenghts.
Here how do i need to excatly put the records of each field into corresponding fileds of itab.
the two tables are not compatible.
eg:
in table <lt_data>
field1 --> length 6char
field2 ---> lenght 2  char
field 3 ---> length 2 char.
in table <itab>
field1 --> is of length 10 char.
so the 3 field values of <lt_data> is sitting in only 1 field of <itab>
<itab> is a dynamic table created throuth create internal table method.
<lt_data> is populated from select query.
both are field symobls having type table reference.
The following is the piece of code.
  LOOP AT <lt_data> ASSIGNING <itab_wa>.
    ASSIGN COMPONENT sy-index OF STRUCTURE <itab_wa> TO <itab_wa1>.
    w_data-text = <itab_wa1>.
    APPEND w_data TO <itab>.
  ENDLOOP.
Help is appreciated

Hi Vadnalav,
is it correct that you want to combine the contents of the 3 source table fields in one field of the target table?
FIELD-SYMBOLS:
  <table_source>            TYPE STANDARD TABLE,
  <table_destination>       TYPE STANDARD TABLE,
  <table_line_source>       TYPE any,
  <table_line_destination>  TYPE any,
  <field_source>            TYPE any,
  <field_destination>       TYPE any.
LOOP AT <table_source> ASSIGNING <table_line_source>.
  APPEND INITIAL LINE TO <table_destination> ASSIGNING <table_line_destination>.
  ASSIGN COMPONENT 1 OF STRUCTURE <table_line_destination> TO <field_destination>.
  DO 3 TIMES.
    ASSIGN COMPONENT sy-index OF STRUCTURE <table_line_source> TO <field_source>.
    CONCATENATE <field_destination> <field_source> INTO <field_destination>.
  ENDDO.
ENDLOOP.
Please modify according to your needs.
Regards,
Clemens

Similar Messages

  • Can retrieve value from one table, but not the other (exception thrown)

    Hi
    I hope some friendly soul can help me out here. I have a local Access database file. I am able to get a value from all tables except for one, which throws this error: "System.NullReferenceException:
    Object reference has not been specified to an object".
    The rather simple lines of code when working is this:
    Dim email As Object
    value = MyDataSet.Tables("Table")(0)(1).ToString
    Msgbox(email)
    However, when simply changing from "Table" to "AnotherTable", the exception is thrown. I
    have seriously no idea why. I've made sure the datatypes are the same and that the values are not NULL.
    What gives?

    Hello,
    Going with your last reply, you should be accessing data via the strong typed classes that get generated.
    Example using Microsoft Northwind database accessing the customers table in a MS-Access database. Note the check for Rows, we could even go farther if we are questioning issue with the data via try-catch statements writing errors to the IDE Output window.
    I would highly recommend never referencing rows without first checking if there are rows and secondly never reference columns by ordinal index, always use the column name. One example with ordinal positioning, suppose someone did SomeDataTable.Columns("SomeColName").SetOrdinal(3)
    and you expect the ordinal position to be 1 ? things will crash-n-burn. Food for thought :-)
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.CustomersTableAdapter.Fill(Me.MainDataSet.Customers)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If MainDataSet.Customers.Rows IsNot Nothing Then
    Dim FirstCompanyName As String = MainDataSet.Customers.FirstOrDefault.CompanyName
    MessageBox.Show(FirstCompanyName)
    Else
    MessageBox.Show("No rows in customer table")
    End If
    End Sub
    End Class
    In this case we get the first record from below in Button1 Click
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Populating more than one table and more than one field

    I need some suggestions and this forum has always been a great source of good advice.
    I have a web form at the following location: http://www.webdevpractice.com/genoptix/CE/register.php
    Here's what the web form needs to do:
    Send a confirmation email listing seminars the visitor checked on the form.
    Create a similar message on a confirmation page.
    Populate 2 two tables.
    Items 1 and 2 are working fine.
    The advice I need is on how to populate two tables in the database.
    There are three tables:
    ACCOUNTS
    account_id
    first_name
    last_name
    medtech_id
    job_title
    npi
    company
    city
    state
    email
    phone
    contact
    ATTENDANCE
    attendance_id
    account_id
    seminar_id
    SEMINARS
    seminar_id
    seminar
    speaker_first_name
    speaker_last_name
    date
    The web form contains data that need to go into the ACCOUNTS table and the ATTENDANCE table. The challenge is getting the account_id and seminar_id into the ATTENDANCE table. If all the information was inserted properly, I could write a query that revealed who was taking what seminar.
    Inserting data into the ACCOUNTS table is not a problem. I will create another form to insert information into the SEMINARS so that should not be a problem. But inserting the account_id and the seminar_id is what I am wondering about. Also, can more than one record be inserted in a table? If an user checks more that one seminar, each seminar (seminar_id) would need to be inserted in the ATTENDANCE table as separate records along with the account_id. I'm thinking I may have to do this manually. Also, the values for each seminar are their dates and titles. I used these as values to send the confirmations.
    I'm just looking for advice at this point. Is this doable?

    Bregent,
    The table I am wondering about is the ATTENDANCE table. There are two fields in addition to the primary key: account_id and seminar_id. The field I am concern with is the seminar_id which comes from a group of checkboxs on the form. So, one form could create several records. For example, presently there are three seminars that are offered. If the visitor selects all three seminars, that would create three records in the SEMINARS table. So, it might look like this:
    attendance_id     account_id     seminar_id
         1                    1                    1
         2                    1                    2
         3                    1                    3
    My PHP skills are basic. I've done other forms and use PHP in other ways. But I have never had to populate several rows in one table with an array of checkboxes nor have I be able to find an example of this.
    So the advice I am seeking (and perhaps this is premature) is this:
    Can one field from a table populate more than one record?
    Should I set up checkboxs as a group or individually with a different name?
    I am also considering setting up my tables differently so there is a table from each seminar--that may solve my problem.

  • Insert values to one table based on a value inserted into another table

    Hi,
    I've got a form based off a report which creates a new project. I've added an additional process to this form to insert four new values into another table as soon as the new project is created and the PK for that project is generated. This was working last week (of course!) and now seems to not work at all. It's complaining that the PK I was getting from my first insert was null. Here is one the the statements in my process I'm trying to run:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    The complaint I get that it's getting null where :P45_PROJECT_SEQ should be.
    Thoughts?
    Thanks,
    Jon

    Hi Andy,
    Thanks for the tip. Those two values didn't match and I updated them so they do and I'm still getting a "cannot insert NULL..." error.
    When I turn on debug I see that I'm getting the PK and I see the value. Here's my debug output:
    0.24: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select PROJECT_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P45_PROJECT_SEQ := get_pk; end;
    0.25: ...Session State: Saved Item "P45_PROJECT_SEQ" New Value="252"
    0.25: ...Process "Process Row of PROJECT": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:PROJECT:P45_PROJECT_SEQ:PROJECT_SEQ|IUD
    0.26: ...Session State: Save "P45_PROJECT_SEQ" - saving same value: "252"
    0.26: ...Process "reset page": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 45
    0.27: Nulling cache for application "120" page: 45
    0.27: ...Process "Add Week Groups": PLSQL (AFTER_SUBMIT) insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER); insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY') +
    0.28: Encountered unhandled exception in process type PLSQL
    0.28: Show ERROR page...
    0.28: Performing rollback...
    I notice that when it runs my process "Add Week Groups" it's not displaying all of the SQL. But the SQL is fine, it's right here:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    Hmmm....what about the "reset page" action in the last of the 0.26 lines?
    Thanks,
    Jon

  • Populating values on a table view

    Hi,
    Following is the xml webservice response:
    <?xml version='1.0' encoding='utf-8'?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <ns:getAvailableResourcesResponse xmlns:ns="http://webservices.iphoneapps.com" xmlns:ax21="http://vo.iphoneapps.com/xsd">
    <ns:return>JOHN</ns:return>
    <ns:return>KATE</ns:return>
    <ns:return>JOLIE</ns:return>
    <ns:return>DOLSON</ns:return>
    </ns:getAvailableResourcesResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    From the above xml I am trying to parse <ns:return>tags i am getting the output values as "JOHNKATEJOLIEDOLSON" but the I am unable to seperate those values and populate those values in the table view, one after the other.
    Following is the code that i used for parsing:
    -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qName
    attributes: (NSDictionary *)attributeDict
    if([ elementName isEqualToString:@"ns:return" ])
    NSLog(@"ns:return");
    if (!soapResults)
    soapResults=[[NSMutableString alloc]init];
    NSLog(@"%d", soapResults);
    elementFound=YES;
    -(void)parser:(NSXMLParser *) parser foundCharacters:(NSString *)string
    if (elementFound)
    //[arrayResources addObject:string];
    [soapResults appendString: string];
    NSLog(@"%@", soapResults);
    [self release];
    -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
    if( [ elementName isEqualToString:@"ns:return" ])
    elementFound=FALSE;
    Can anyone please suggest me how to parse the xml statement and populate the values in the table view with sample example.
    Regards
    SRI.
    Message was edited by: ksri

    Only you can solve the issue by learning about namespaces. You are comparing element names against fully-qualified names. Then you are logging what you think you have received. Change your NSLog statements to log what is really being parsed instead of a literal. That should prove enlightening.

  • How to retrieve value of one column to other in Apex using Javascript

    Hi all,
    Can any one help me in solving this problem.
    How to send a value from one column to another column using javascript in Apex. I heard that we can use onChange().
    My requirement is,
    I have a column(Varchar2) in form where i need to enter a value and the data need to be sent to another column(Number) when i press apply changes.
    ex: if i enter a value say 1/3 or 1/4 or 1/3*1/6
    the result should be entered in the other column.
    Message was edited by:
    Raman

    Try something like
    html_GetElement('P1_ITEM2').value = eval(html_GetElement('P1_ITEM1').value);

  • Copy value from one ctype to other  ctype

    Hi Experts,
    I am creating a sales order with reference to a contract. I want to copy the rate (KBETR) of condition type ZXXX from contract to condition type ZYYY in sale order. But I am not able to copy it through copy control.
    Can anyone help me?????????
    Regards,
    Kuldeep Dahiya

    Hi Kuldeep Dahiya,
    Copy control only copies one document to other document with same condition types, for your requirement you need to write a routine.
    Instead why not copy ZXXX to ZXXx only in contract and order.This is a standard functionality-if you want to copy ZXXX to ZYYY then you require development in the form of a routine.
    I hope i have understood your query clearly.
    regards,
    US

  • Populating values to internal table created dynamically

    Hi,
    I am creating an internal table(it1) dynamically and assigned it to a field symbol. now i want to upload values
    which are present in a field of another internal table being populated from a Funct Module.Could you tell me
    how to assign those values across the fields of field symbol?
    loop at itab_char.
    LS_ALV_CAT-FIELDNAME = itab_char-charact.
    append LS_ALV_CAT to I_ALV_CAT.
    endloop.
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
      EXPORTING
        IT_FIELDCATALOG = I_ALV_CAT
      IMPORTING
        EP_TABLE        = D_REF.
    ASSIGN D_REF->* TO <F_FS>.
    (Above my int tab is generated and now stored in <f_FS>)
    loop at itab into w_lifnr.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
      EXPORTING
       CLASS                      = p_cname
       CLASSTYPE                  = w_ctype
       OBJECT                     = w_lifnr
      TABLES
        T_CLASS                    = t_class
        T_OBJECTDATA               = t_objectdata
    w-lifnr is vendor number. and here we are populating t_objectdata with that vendor related datas. now i want to pass t_objectdata-ausp1 values for each vendor across the fields in <F_FS>.
    FIELD-SYMBOLS : <F_FS> TYPE TABLE.
    Please refer me the solution to this problem.
    Thanks

    Check below code and try to add in ur code....
        IF NOT it_bom_expl[] IS INITIAL.
    The material number data varies from run to run. For this purpose
    the data is been used to build dynamic internal table which stores the
    material number data along the x-axis
          PERFORM build_matnr_table.
    The material numbers data which is stored in the temp internal table
    is been assigned to the dynamic internal table created along the
    x-axis for the materials
          PERFORM assign_matnr_val_fields.
    The component data which is stored in the internal table needs to be
    moved to the dynamic internal table
          PERFORM move_bom_data_to_matnr_table.
    *&      Form  build_matnr_table
    Using the material number data the dynamic internal tables are been
    built which holds the material number data along x-axis. Here the
    first 3 columns are always constant which are Components-List,
    Description, Count. From 4th column it depends on number of materials
    FORM build_matnr_table .
      DATA: l_val(3) TYPE n,
            lf_mat(18) TYPE c.
    Moving the Components-List details to the internal table 1st column
    which will be used for creation of dynamic internal table
      CLEAR gf_xfc.
      gf_xfc-fieldname = text-t03.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 18.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ifc.
      APPEND gf_xfc TO gf_ipc.
      CLEAR gf_xfc.
    Moving the Description details to the internal table 2nd column
    which will be used for creation of dynamic internal table
      gf_xfc-fieldname = text-t04.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 40.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ipc.
      CLEAR gf_xfc.
    Moving the Count details to the internal table 3rd column which will
    be used for creation of dynamic internal table
      gf_xfc-fieldname = text-t05.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 5.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ifc.
      APPEND gf_xfc TO gf_ipc.
    Moving the Material numbers are moved to the internal table from 4th
    column onwards till all the material numbers are moved to the columns
    which will be used for creation of dynamic internal table. Here
    columns will be reffered to as Material001 ..... Materialxxn
      LOOP AT it_mat.
        CLEAR gf_xfc.
        l_val = l_val + 1.
        CONCATENATE text-t06 l_val INTO lf_mat.
        gf_xfc-fieldname = lf_mat.
        gf_xfc-datatype = c_val_c.
        gf_xfc-inttype = c_val_c.
        gf_xfc-intlen = 18.
        gf_xfc-decimals = 0.
        APPEND gf_xfc TO gf_ifc.
        APPEND gf_xfc TO gf_ipc.
      ENDLOOP.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ifc
        IMPORTING
          ep_table        = gf_table.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table->* TO <fs_dyn_table>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line LIKE LINE OF <fs_dyn_table>.
      ASSIGN gf_line->* TO <fs_dyn_wa>.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ipc
        IMPORTING
          ep_table        = gf_table1.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table1->* TO <fs_dyn_table1>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line1 LIKE LINE OF <fs_dyn_table1>.
      ASSIGN gf_line1->* TO <fs_dyn_wa1>.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ifc
        IMPORTING
          ep_table        = gf_table2.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table2->* TO <fs_dyn_table2>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line2 LIKE LINE OF <fs_dyn_table2>.
      ASSIGN gf_line2->* TO <fs_dyn_wa2>.
    ENDFORM.                    " build_matnr_table
    *&      Form  assign_matnr_val_fields
    The material numbers data stored in the temp internal table needs to
    be assigned to the dynamic internal table along x-axis as the first
    record. The temp internal table is been looped and using the field
    symbol concept the data is moved to the dynamic internal table
    FORM assign_matnr_val_fields .
      DATA: l_cnt(3) TYPE n,
            l_nam(12),
            g_total(3) TYPE n.
      DESCRIBE TABLE it_mat LINES g_total.
      CLEAR l_cnt.
    Looping the temp internal table and concatenating material as
    material001 and the same is been checked against the dynamic
    internal table and the material number value is moved to the
    internal table. Finally, the data is been appened as first record.
      LOOP AT it_mat.
        l_nam = c_mat.
        l_cnt = l_cnt + 1.
        CONCATENATE l_nam l_cnt INTO l_nam.
    Material which is in form Materialxxn is been assigned to the field
    symbol which is checked against the field of dynamic internal table
    and the value of the Material Number is been passed to the dynamic
    internal table field value.
    After all materials are been assigned the record is been appended
    to the dynamic internal table.
        ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_field>.
        <fs_field> = it_mat-matnr.
        IF l_cnt = g_total.
          INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
        ENDIF.
      ENDLOOP.
    Looping the temp internal table and concatenating material as
    material001 and the same is been checked against the dynamic
    internal table and the material number value is moved to the
    internal table. Finally, the data is been appened as first record.
    This is been used for downloading of data to excel sheet as it
    contains additional field which is Description field.
      CLEAR l_cnt.
      LOOP AT it_mat.
        l_nam = c_mat.
        l_cnt = l_cnt + 1.
        CONCATENATE l_nam l_cnt INTO l_nam.
    Material which is in form Materialxxn is been assigned to the field
    symbol which is checked against the field of dynamic internal table
    and the value of the Material Number is been passed to the dynamic
    internal table field value.
    After all materials are been assigned the record is been appended
    to the dynamic internal table.
        ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa1> TO <fs_field>.
        <fs_field> = it_mat-matnr.
        IF l_cnt = g_total.
          INSERT <fs_dyn_wa1> INTO TABLE <fs_dyn_table1>.
        ENDIF.
      ENDLOOP.
    The contents of one internal table is passed on to other internal
    table for use while moving the component data for count purposes.
      <fs_dyn_table2>[] = <fs_dyn_table>[].
    ENDFORM.                    " assign_matnr_val_fields
    *&      Form  move_bom_data_to_matnr_table
    The component data is been appended to the dynamic internal table
    The component is checked against a material and if exists the corresp-
    onding level is been appended to the record
    The total count is derived as the in how many materials the component
    exists
    FORM move_bom_data_to_matnr_table .
      DATA: l_cnt(2) TYPE n,
            l_cnt1(3) TYPE n,
            l_nam(12),
            l_con(18) TYPE c,
            l_con1(18) TYPE c,
            lf_mat TYPE matnr.
      SORT it_bom_expl BY bom_comp bom_mat level.
      CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
      LOOP AT it_bom_expl INTO gf_it_bom_expl.
        CLEAR: l_cnt1.
        AT NEW bom_comp.
          CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
          it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
          <fs_check>.
          <fs_check> = gf_it_bom_expl-bom_comp.
        ENDAT.
        AT NEW bom_mat.
          CLEAR l_con.
        ENDAT.
        lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
        LOOP AT it_mat_temp.
          l_nam = c_mat.
          l_cnt1 = l_cnt1 + 1.
          CONCATENATE l_nam l_cnt1 INTO l_nam.
          LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
          ENDLOOP.
          IF <fs_xy> = lf_mat.
            CLEAR lf_mat.
            l_con1 = l_con.
          ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
          IF <fs_xy> = gf_it_bom_expl-bom_mat.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
            CLEAR l_con.
            MOVE gf_it_bom_expl-level TO l_con.
            CONCATENATE c_val_l l_con INTO l_con.
            CONDENSE l_con NO-GAPS.
            IF l_con1 NE space.
              CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
              CLEAR l_con1.
              l_cnt = l_cnt - 1.
            ENDIF.
            <fs_check> = l_con.
            l_cnt = l_cnt + 1.
          ENDIF.
        ENDLOOP.
        AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
          <fs_check> = l_cnt.
          INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
        ENDAT.
      ENDLOOP.
    Looping the component internal table. This is used for the additional
    Description field which is shown in the excel sheet
      LOOP AT it_bom_expl INTO gf_it_bom_expl.
        CLEAR: l_cnt1.
        AT NEW bom_comp.
          CLEAR: l_cnt, <fs_dyn_wa1>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
          it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa1> TO
          <fs_check>.
          <fs_check> = gf_it_bom_expl-bom_comp.
        ENDAT.
        AT NEW bom_mat.
          CLEAR l_con.
        ENDAT.
        lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
        LOOP AT it_mat_temp.
          l_nam = c_mat.
          l_cnt1 = l_cnt1 + 1.
          CONCATENATE l_nam l_cnt1 INTO l_nam.
          LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
          ENDLOOP.
          IF <fs_xy> = lf_mat.
            CLEAR lf_mat.
            l_con1 = l_con.
          ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
          IF <fs_xy> = gf_it_bom_expl-bom_mat.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa1> TO <fs_check>.
            CLEAR l_con.
            MOVE gf_it_bom_expl-level TO l_con.
            CONCATENATE c_val_l l_con INTO l_con.
            CONDENSE l_con NO-GAPS.
            IF l_con1 NE space.
              CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
              CLEAR l_con1.
              l_cnt = l_cnt - 1.
            ENDIF.
            <fs_check> = l_con.
            l_cnt = l_cnt + 1.
          ENDIF.
        ENDLOOP.
    The description is moved to the field symbol which is checked against
    the field of dynamic internal table and the count is been passed to
    the dynamic internal table field value.
        ASSIGN COMPONENT c_description OF STRUCTURE <fs_dyn_wa1> TO
        <fs_check>.
        <fs_check> = gf_it_bom_expl-ojtxp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
        AT END OF bom_comp.
          ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa1> TO <fs_check>.
          <fs_check> = l_cnt.
          INSERT <fs_dyn_wa1> INTO TABLE <fs_dyn_table1>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " move_bom_data_to_matnr_table

  • Require sum value of one table to be inserted into another table column

    Hi
    I have a table which contains a list of parts and their prices required for an assembly.
    I am trying to calculate the total from this part lists and put into the total price column for the assembly (another table column).
    My method was to calculate the total in a page process ( eg, once all parts in the assembly have been entered the page process calculates the total price (the sum of the part prices at that time) and puts the result (total) in the assembly total column)
    In the process I capture the total using either
    SELECT SUM(TOTAL_COST) Total INTO B from CC_REQ_BOM WHERE RID = :P5_RID;
    or
    SELECT SUM(TOTAL_COST) INTO B from CC_REQ_BOM WHERE RID = :P5_RID;
    Both the above sql statements are allowed ( one with alias and one without alais) by the page process but they dont seem to be working as no total is returned to the table when the page process is run.
    to insert the calculation(variable B) into the required table I have used
    INSERT INTO CC_REQ(TOTAL_COST)
    VALUES(B);
    I have used this method a few times with no problems for standard sql statements but this is the first time I have used it with the sum SQL function. For some reason it doesn't seem to like the SUM function even though the code below works in SQL Command window.
    SELECT SUM(TOTAL_COST) from CC_REQ_BOM WHERE RID = :P5_RID;
    Any help welcome.
    PGJ

    Hi
    In that case, I would do something like this then...
    CREATE TABLE crt_crates
    (ccr_id   INTEGER        CONSTRAINT ccr_pk PRIMARY KEY,
    ccr_name VARCHAR2(4000) CONSTRAINT ccr_nam_nn NOT NULL);
    CREATE TABLE crt_requests
    (cre_id        INTEGER        CONSTRAINT cre_pk PRIMARY KEY,
    cre_reference VARCHAR2(4000) CONSTRAINT cre_ref_nn NOT NULL,
    --I've skipped the requester as this would probably refernce a different table
    --I've skipped request details as it's not necessary for this example
    cre_ccr_id    INTEGER        CONSTRAINT cre_ccr_fk REFERENCES crt_crates);
    CREATE TABLE crt_materials
    (cma_id   INTEGER        CONSTRAINT cma_pk PRIMARY KEY,
    cma_name VARCHAR2(4000) CONSTRAINT cma_nam_nn NOT NULL,
    cma_cost NUMBER(12,2)   CONSTRAINT cma_cos_nn NOT NULL);
    CREATE TABLE crt_crate_bom
    (ccb_id       INTEGER CONSTRAINT ccb_pk PRIMARY KEY,
    ccb_ccr_id   INTEGER CONSTRAINT ccb_ccr_fk REFERENCES crt_crates,
    ccb_cma_id   INTEGER CONSTRAINT ccb_cma_fk REFERENCES crt_materials,
    ccb_quantity INTEGER DEFAULT 1 CONSTRAINT ccb_qua_nn NOT NULL);
    INSERT INTO crt_crates
    VALUES(1, 'Crate 1');
    INSERT INTO crt_requests
    VALUES(1,'Request 1',1);
    INSERT INTO crt_materials
    VALUES(1,'Material 1', 1000);
    INSERT INTO crt_materials
    VALUES(2,'Material 2', 500);
    INSERT INTO crt_crate_bom
    VALUES(1,1,1,5);
    INSERT INTO crt_crate_bom
    VALUES(2,1,2,3);
    COMMIT;
    --So crate cost totals would be...
    SELECT cre_reference              request,
           ccr_name                   crate,
           SUM(cma_cost*ccb_quantity) crate_cost
    FROM   crt_requests,
           crt_crates,
           crt_materials,
           crt_crate_bom
    WHERE  cre_ccr_id = ccr_id
    AND    ccb_ccr_id = ccr_id
    AND    ccb_cma_id = cma_id
    GROUP BY cre_reference,
             ccr_name;
    --And request cost totals would be...
    SELECT cre_reference              request,
           SUM(cma_cost*ccb_quantity) crate_cost
    FROM   crt_requests,
           crt_crates,
           crt_materials,
           crt_crate_bom
    WHERE  cre_ccr_id = ccr_id
    AND    ccb_ccr_id = ccr_id
    AND    ccb_cma_id = cma_id
    GROUP BY cre_reference; Do you see what I mean - you don't store the derived values as they could get out of sync with the component parts that make then up. You derive them from the underlying data instead.
    Hope this makes sense.
    Cheers
    Ben

  • How to take value from one table to another table?

    Hi,
    My requirement is,I have two tables those are Document and Transaction both having one common column "Docseriescode"
    in Document table already having different records with "Docseriescode".
    when i am going  to transaction table for adding records,  in "docseriescode" column automatically generate perticular Docseriescode
    eg:
    i have one "Cargo" record in Document Table with code CCN
    when i am going to Transactional table for inserting in this Docseriescode columns automatically get "CCN" code and get a drop down value
    anybody help me?

    Your use case is a simple master detail relation between two tables. If you don't have foreign keys in the db you can build the associations and links yourself in jdev. Doing this enables you to create  detail rows from a master row where the pk of the master is automatically set in the fk of the detail.
    Here you find more info http://docs.oracle.com/cd/E35521_01/web.111230/e16182/bcquerying.htm#ADFFD292 and Displaying Master-Detail Data - 11g Release 2 (11.1.2.3.0)
    and a sample Master Detail Insert/Delete Sample | JDev &amp;amp; ADF Goodies
    Timo
    Message was edited by: TimoHahn

  • Transfer of values from one recon to other recon account

    Guru's,
    I wanted to change the recon account of a vendor from 8050001 to 8050002.
    Few entries are already posted in the vendor with the recon 8050001. I know that FAGL101 can be used to transfer the values from 8050001 to 8050002.
    In the OBBW I did the configuration like this
    Reconciliation account : 8050001
    Adjustment Account : 9000014(Clearing account)
    Please advise me if I need to do any other settings in Config and also tell me the procedure to run that in FAGL101.
    Thanks in advance and points will defnitely be assigned.
    Deepak

    Hi,
    I dont think you can update members. However, you can definitely send transactional data from one application to another using the DESTINATION_APP statement.
    You have a good example available in BPC 320 on beforerange and afterrange.
    Lets say that there are 5 columns in the report after the EVDRE expansion is done. Then in the beforerange or afterrange, you can use EVRNG function with a range of 5 cells. Lets say that you define EVRNG(J1:N1). In these cells, you can use formulas like EVSUM etc, and these formulas will be taken by the rows in your EVDRE report. If you define afterrange, then you will have additional row at the bottom. If you define beforerange, then you will have additional row at the top.
    Hope this helps.

  • Insert the values form one table to another

    Hi.,
    I am using jdev11.1.5
    I had created a reaadonly VO using the follwing querry
    select distinct fp_bu,fp_year,fp_period, decode(gdh_status,'R','Yes','No') distribution,decode (aj_status ,'N','Yes','No') Recursion,
    decode(RSUPHD_STATUS,'P','Yes','No') Supplier,decode(RCDOC_STATUS,'P','Yes','No') Customer
    from gl_dist_hd,fin_periods,appl_journals,rec_suplr_doc_hd,rec_cust_doc_hd
    where fp_bu = gdh_bu(+) and
    gdh_bu = aj_bu(+) and
    aj_bu = RSUPHD_BU(+) and
    RSUPHD_BU = RCDOC_BU(+) and
    fp_year = gdh_year(+) and
    gdh_year = aj_year(+) and
    aj_year = RSUPHD_DOC_YEAR(+) and
    RSUPHD_DOC_YEAR = RCDOC_DOC_YEAR(+) and
    fp_period = gdh_period(+) and
    gdh_period = aj_period(+) and
    aj_period = RSUPHD_DOC_PERIOD(+) and
    RSUPHD_DOC_PERIOD = RCDOC_DOC_PERIOD(+)
    ORDER BY fp_period asci had created a button [post]
    when the user clicks the button it must insert the values of table CursorC1 into GlJrnlHd
    i had tried a querry in AMImpl
            ViewObjectImpl vo = this.getGlJrnlHd1();
            Row newRow = vo.createRow();
            ViewObjectImpl c1 = this.getCursorC1_1();
            Row cr1 = c1.getCurrentRow();
               newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));
           newRow.setAttribute("GjhPlant", cr1.getAttribute("GrhPlant"));
          newRow.setAttribute("GjhJrnlType", cr1.getAttribute("GrvlJrnlType"));
           newRow.setAttribute("GjhJrnlNo", cr1.getAttribute("GrvlJrnlNo"));
           newRow.setAttribute("GjhJrnlSfx", cr1.getAttribute("GrhJrnlSfx"));
           newRow.setAttribute("GjhJrnlDate", "Null");
           newRow.setAttribute("GjhYear", cr1.getAttribute("GrvlYear"));
           newRow.setAttribute("GjhPeriod", cr1.getAttribute("GrvlPeriod"));
           newRow.setAttribute("GjhDesc", cr1.getAttribute("GrhDesc"));
           newRow.setAttribute("GjhAppl", "GLM");
           newRow.setAttribute("GjhReversal", "N");
           newRow.setAttribute("GjhStatus","N");
           newRow.setAttribute("GjhCreBy", "NULL");
           newRow.setAttribute("GjhCreDate", "NULL");
           newRow.setAttribute("GjhUpdBy", "NULL");
           newRow.setAttribute("GjhUpdDate", "NULL");
           this.getTransaction().commit();i am getting null pointer exception at this line
    newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));could anyone please help me to resolve this error

    Hi,
    give a NPE check
    ViewObjectImpl vo = this.getGlJrnlHd1();
            Row newRow = vo.createRow();
            ViewObjectImpl c1 = this.getCursorC1_1();
            Row cr1 = c1.getCurrentRow();
            if (cr1 != null){
            newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));
           newRow.setAttribute("GjhPlant", cr1.getAttribute("GrhPlant"));
          newRow.setAttribute("GjhJrnlType", cr1.getAttribute("GrvlJrnlType"));
           newRow.setAttribute("GjhJrnlNo", cr1.getAttribute("GrvlJrnlNo"));
           newRow.setAttribute("GjhJrnlSfx", cr1.getAttribute("GrhJrnlSfx"));
           newRow.setAttribute("GjhJrnlDate", "Null");
           newRow.setAttribute("GjhYear", cr1.getAttribute("GrvlYear"));
           newRow.setAttribute("GjhPeriod", cr1.getAttribute("GrvlPeriod"));
           newRow.setAttribute("GjhDesc", cr1.getAttribute("GrhDesc"));
           newRow.setAttribute("GjhAppl", "GLM");
           newRow.setAttribute("GjhReversal", "N");
           newRow.setAttribute("GjhStatus","N");
           newRow.setAttribute("GjhCreBy", "NULL");
           newRow.setAttribute("GjhCreDate", "NULL");
           newRow.setAttribute("GjhUpdBy", "NULL");
           newRow.setAttribute("GjhUpdDate", "NULL");
           this.getTransaction().commit();
    }

  • How to pass values from one stage to other

    I have two stage (say primary and secondary).The primary stage creates the secondary stage. When the secondary is opened i can access all the members(say bitNo) of 1st stage and try to set some value. But in the 1st stage i find the value not being set. I think it's because 1st is executed before the 2nd. I used showAndWait() in 1st then show() on 2nd then it is throwing exception.
    So i want to use the values set by the 2nd stage in the 1st stage.
    How do i synchronize them ?
    Thanks .
    package test;
    import javafx.application.Application;
    import javafx.event.*;
    import javafx.scene.*;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.*;
    public class Test extends Application {
        private int bitNo;
        Stage primaryStage,secondaryStage;   
        TextField textField;   
        double x,y;
        public static void main(String[] args) { launch(args); }
        @Override
        public void start(final Stage primaryStage) {
            this.primaryStage=primaryStage;
            Group rt=new Group();
            Scene sc= new Scene(rt,300,300);
            Button button =new Button("Click Me");
            button.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent event) {
                    secondaryStage=new Stage(StageStyle.TRANSPARENT);
                    secondaryStage.initModality(Modality.WINDOW_MODAL);
                    secondaryStage.initOwner(primaryStage);    
                    showSecondaryWindow();
            rt.getChildren().add(button);          
            primaryStage.setScene(sc);
            primaryStage.show();
            //primaryStage.showAndWait();
            System.out.println("Bit no set= "+bitNo);      
    }//start
    public void showSecondaryWindow(){
         Pane root=new Pane();
         root.setStyle("-fx-background-color: rgb(0,50,70);");
         //root.setPrefSize(200,200);
         Scene scene=new Scene(root,200,300);
         Label label=new Label("Data");
         textField=new TextField();
         textField.setUserData("one");
         Button ok=new Button("Ok");
         ok.setDefaultButton(true);
         ok.setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent event) {
                System.out.println("New Stage Mouse Clicked");
                bitNo=Integer.parseInt(textField.getText());
                System.out.println("Bit no set by Secondary= "+bitNo);
                primaryStage.getScene().getRoot().setEffect(null);
                secondaryStage.close();
         Button cancel=ButtonBuilder.create().cancelButton(true).text("Cancel").build();
         cancel.setOnMouseClicked(new EventHandler<MouseEvent>() { 
             @Override
             public void handle(MouseEvent event) {
                 System.out.println("New Stage Mouse Clicked");
                 primaryStage.getScene().getRoot().setEffect(null);
                 secondaryStage.close();
         //VBox vBox =new VBox();
         //vBox.getChildren().addAll(label,textField,ok);
         HBox dataFileds=new HBox(10);
         dataFileds.getChildren().addAll(label,textField);
         HBox buttons=new HBox(10);
         buttons.getChildren().addAll(cancel,ok);
         root.getChildren().add(VBoxBuilder.create().children(dataFileds,buttons).spacing(10).build());
         //scene.getStylesheets().add(Test.class.getResource("Modal.css").toExternalForm());
         secondaryStage.setScene(scene);
         //final Node root = secondaryStage.getScene().getRoot();
         root.setOnMousePressed(new EventHandler<MouseEvent>() {
             @Override public void handle(MouseEvent mouseEvent) {
                 // record distance for the drag and drop operation.
                 x = secondaryStage.getX() - mouseEvent.getScreenX();
                 y = secondaryStage.getY() - mouseEvent.getScreenY();
         root.setOnMouseDragged(new EventHandler<MouseEvent>() {
             @Override public void handle(MouseEvent mouseEvent) {
                 secondaryStage.setX(mouseEvent.getScreenX() +x);
                 secondaryStage.setY(mouseEvent.getScreenY() +y);
         //primaryStage.getScene().getRoot().setEffect(new BoxBlur());
         secondaryStage.show();
    }//showSecondaryWindow
    }//class

    You can use showAndWait() on your secondary stage. Then execution is blocked and you'll see the change to your variable:
    package test ;
    import javafx.application.Application;
    import javafx.event.*;
    import javafx.scene.*;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.*;
    public class Test extends Application {
      private int bitNo;
      Stage primaryStage, secondaryStage;
      TextField textField;
      double x, y;
      public static void main(String[] args) {
        launch(args);
      @Override
      public void start(final Stage primaryStage) {
        this.primaryStage = primaryStage;
        Group rt = new Group();
        Scene sc = new Scene(rt, 300, 300);
        Button button = new Button("Click Me");
        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            secondaryStage = new Stage(StageStyle.TRANSPARENT);
            secondaryStage.initModality(Modality.WINDOW_MODAL);
            secondaryStage.initOwner(primaryStage);
            // This calls showAndWait(), so execution blocks until the window is closed
            showSecondaryWindow();
            // secondary window is now closed, value should be updated:
            System.out.println("Bit no now: " + bitNo);
        rt.getChildren().add(button);
        primaryStage.setScene(sc);
        primaryStage.show();
        // primaryStage.showAndWait();
        System.out.println("Bit no set= " + bitNo);
      }// start
      public void showSecondaryWindow() {
        Pane root = new Pane();
        root.setStyle("-fx-background-color: rgb(0,50,70);");
        // root.setPrefSize(200,200);
        Scene scene = new Scene(root, 200, 300);
        Label label = new Label("Data");
        textField = new TextField();
        textField.setUserData("one");
        Button ok = new Button("Ok");
        ok.setDefaultButton(true);
        ok.setOnMouseClicked(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            bitNo = Integer.parseInt(textField.getText());
            System.out.println("Bit no set by Secondary= " + bitNo);
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
        Button cancel = ButtonBuilder.create().cancelButton(true).text("Cancel")
            .build();
        cancel.setOnMouseClicked(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
        // VBox vBox =new VBox();
        // vBox.getChildren().addAll(label,textField,ok);
        HBox dataFileds = new HBox(10);
        dataFileds.getChildren().addAll(label, textField);
        HBox buttons = new HBox(10);
        buttons.getChildren().addAll(cancel, ok);
        root.getChildren().add(
            VBoxBuilder.create().children(dataFileds, buttons).spacing(10).build());
        // scene.getStylesheets().add(Test.class.getResource("Modal.css").toExternalForm());
        secondaryStage.setScene(scene);
        // final Node root = secondaryStage.getScene().getRoot();
        root.setOnMousePressed(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            // record distance for the drag and drop operation.
            x = secondaryStage.getX() - mouseEvent.getScreenX();
            y = secondaryStage.getY() - mouseEvent.getScreenY();
        root.setOnMouseDragged(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            secondaryStage.setX(mouseEvent.getScreenX() + x);
            secondaryStage.setY(mouseEvent.getScreenY() + y);
        // primaryStage.getScene().getRoot().setEffect(new BoxBlur());
        secondaryStage.showAndWait();
      }// showSecondaryWindow
    }// classYou can also use an IntegerProperty to hold the variable, and listen for changes on it:
    package test ;
    import javafx.application.Application;
    import javafx.beans.property.IntegerProperty;
    import javafx.beans.property.SimpleIntegerProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.*;
    import javafx.scene.*;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.*;
    public class Test extends Application {
      private IntegerProperty bitNo;
      Stage primaryStage, secondaryStage;
      TextField textField;
      double x, y;
      public static void main(String[] args) {
        launch(args);
      @Override
      public void start(final Stage primaryStage) {
        this.bitNo = new SimpleIntegerProperty();
        bitNo.addListener(new ChangeListener<Number>() {
          @Override
          public void changed(ObservableValue<? extends Number> observable,
              Number oldValue, Number newValue) {
            System.out.printf("bit no changed from %d to %d%n", oldValue, newValue);
        this.primaryStage = primaryStage;
        Group rt = new Group();
        Scene sc = new Scene(rt, 300, 300);
        Button button = new Button("Click Me");
        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            secondaryStage = new Stage(StageStyle.TRANSPARENT);
            secondaryStage.initModality(Modality.WINDOW_MODAL);
            secondaryStage.initOwner(primaryStage);
            showSecondaryWindow();
        rt.getChildren().add(button);
        primaryStage.setScene(sc);
        primaryStage.show();
        // primaryStage.showAndWait();
        System.out.println("Bit no set= " + bitNo.get());
      }// start
      public void showSecondaryWindow() {
        Pane root = new Pane();
        root.setStyle("-fx-background-color: rgb(0,50,70);");
        // root.setPrefSize(200,200);
        Scene scene = new Scene(root, 200, 300);
        Label label = new Label("Data");
        textField = new TextField();
        textField.setUserData("one");
        Button ok = new Button("Ok");
        ok.setDefaultButton(true);
        ok.setOnMouseClicked(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            bitNo.set(Integer.parseInt(textField.getText()));
            System.out.println("Bit no set by Secondary= " + bitNo);
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
        Button cancel = ButtonBuilder.create().cancelButton(true).text("Cancel")
            .build();
        cancel.setOnMouseClicked(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            System.out.println("New Stage Mouse Clicked");
            primaryStage.getScene().getRoot().setEffect(null);
            secondaryStage.close();
        // VBox vBox =new VBox();
        // vBox.getChildren().addAll(label,textField,ok);
        HBox dataFileds = new HBox(10);
        dataFileds.getChildren().addAll(label, textField);
        HBox buttons = new HBox(10);
        buttons.getChildren().addAll(cancel, ok);
        root.getChildren().add(
            VBoxBuilder.create().children(dataFileds, buttons).spacing(10).build());
        // scene.getStylesheets().add(Test.class.getResource("Modal.css").toExternalForm());
        secondaryStage.setScene(scene);
        // final Node root = secondaryStage.getScene().getRoot();
        root.setOnMousePressed(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            // record distance for the drag and drop operation.
            x = secondaryStage.getX() - mouseEvent.getScreenX();
            y = secondaryStage.getY() - mouseEvent.getScreenY();
        root.setOnMouseDragged(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent mouseEvent) {
            secondaryStage.setX(mouseEvent.getScreenX() + x);
            secondaryStage.setY(mouseEvent.getScreenY() + y);
        // primaryStage.getScene().getRoot().setEffect(new BoxBlur());
        secondaryStage.show();
      }// showSecondaryWindow
    }// class

  • How to set value from one view to other view's context node attr b4 save

    HI all,
    My requirement is as below:
    There are two views in component BP_CONT.
    BP_CONT/ContactDetails    IMPL class
    BP_CONT/SalesEmployee   SALESEMPLOYEE    STRUCT.SALESEMPLOYEE
    I want to set value from first view to second view's context node's attribute.
    i get Sales Employee BP number in ContactDetails view, from here i want to set that value in to STRUCT.SALESEMPLOYEE
    of second view in the same component.
    please send me code snippet for doing the same.
    Thanks in advance.
    seema

    Hi Seema
    You can access the fields from different views by either using custom controllers or by using component controllers, in your case you can access the Sales employee BP number from the Component controller.
    first access the component controller  as below in BP_CONT/SalesEmployee  (in do_prepare_output method) or in (specific setter method)
    lv_compcontroller type ref to CL_BP_CONT_BSPWDCOMPONENT_IMPL,
    lv_partner type ref to cl_crm_bol_entity,
    lv_role type string,
    lv_partner_no type string.
    lv_employee TYPE REF TO if_bol_bo_property_access,
    lv_compcontroller  = me->COMP_CONTROLLER.
    lv_partner ?= lv_compcontroller  ->typed_context->-partner->collection_wrapper->get_current( ).
    lv_role = lv_partner->get_property( iv_attr_name = 'BP_ROLE' )
    IF LV_ROLE = 'SALESEMPLOYEE'
      lv_partner_no ?= lv_current->get_property( iv_attr_name = 'BP_NUMBER' ).
    endif.
    now set the value
    lv_employee ?= me->typed_context->salesemployee->collection_wrapper->get_current( )
    CHECK lv_employee IS BOUND.
        lv_employee->set_property( iv_attr_name = 'SALESEMPLOYEE' iv_value =  lv_partner_no  )
    Thanks & Regards
    Raj

  • Getting the values from one transaction from other

    Hi,
    I have the following requirement:
    Whenever run from ZAP02 or ZAP07, ZAP20 should consider the plant selected in those transactions and retrieve the appropriate calendar in the Z table.
    if anyone knows, please help me.
    Thanks
    Shiva

    hi,
    try this.
    A simple example of ABAP memory is using the EXPORT/IMPORT statements.
    Here in this program, I get the data, export it to memory,
    clear out the internal table in my progam, then reimport the data into it and write out the data.
    You probably wounldn't do this in a normal program,
    but this is how you can pass data from program a to program b when A Submits program B.
    report zxy_0002 .
    data: it001 type table of t001 with header line.
    select * into table it001 from t001.
    export it001 = it001 to memory id 'ZXY_TEST'.
    clear it001. refresh it001.
    import it001 = it001 from memory id 'ZXY_TEST'.
    loop at it001.
      write:/ it001-bukrs, it001-butxt.
    endloop.
    rgds
    anver
    if hlped mark points

Maybe you are looking for

  • Check Box/ItemListener question

    Hello all, I'm trying to create a GUI for a program that I've been working on for some time. In the program, various sections can be run depending on what variables are present in the input file AND whether or not certain previous sections have been

  • CRM Survey on Web - Submit button not working.

    Hi Gurus, We have created a Survey in CRM_Survey_suite. The Problem is, when we send the survey with one Question (mail goes out with a link, user click on the link and link take them to our QA Server BSP Page), the submit button is working but when

  • Planning time fence- MRP

    Hi Guys: Can I use Planning time fence if i am using MRP type PD? what are the settings i need to maintain for planning time fence and how it defined generally , is it a function of leadtime? Thanks Kodali

  • Need Skype for an Interview

    Hello, I need Skype for an interview next week.  I have downloaded Skype and purchased a Skype number. I sent the number to the interviewer who told me that I needed a Skype ID. I haven't been able to locate a Skype ID for my account. Will the interv

  • Heeeellllp!! someone please

    i dont know if this is the right forum but oh well.. not even 10 mins ago a vertical light blue line showed up down the middle of my screen. does anyone know whats wrong.?