Making into single table
Hi,
I have two file path at selection screen where I upload one field names file and one record file for the fields uploaded.
I have an internal table with fields id, pid, structure_name, pk_field(parent key), fk_field(foreign key),fields(table type-the file field names that uploaded in my selection screen),data(this is also a table and has the record file that I have uploaded at selection screen).My internal table looks as follows:
ID PID structure_name pk_field fk_field fields data
1 header abcd t_fields1 t_rec1
2 1 item gfh abcd t_fields2 t_rec2
Now my requirement is to flatten the data into single table with the following fields based on the parent key(pk) and foreign key(fk) relation.Can anyone suggest how to do it.
structure_name
field_name
pk
fk
value
Edited by: Ginger on Jul 27, 2009 1:53 AM
One more thing which I don't get. Does DYN_TABLE holds values 1,2,3 as 3 records?
1) value 1
2) value 2
3) value 3
or
this is just one record with different fields, but you only want to copy those F1, F2, F3 fields for which values are like 1, 2, 3, to new table?
I think you mean the second, so this would be what you need
data: it_fcat type lvc_f_cat with header line.
"first creat field catalog based on fields names
loop at fields.
it_fcat-fieldname = fields-name.
"give field type, either excplicitly or via DDIC reference
it_fcat-INTTYPE = ...
it_fcat-INTLEN = ...
append it_fcat.
endloop.
now create new dynamic table
field-symbols <new_tab> type any table.
data: new_table type ref to data.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = is_fcat
IMPORTING
ep_table = new_table.
assign new_table->* to <new_tab>.
Last thing you need is to move values from DYN_TAB to corresponding NEW_TAB
data: wa_dyn_tab type ref to data,
wa_new_tab type ref to data.
field-symbols <dyn_tab> type any table,
<wa_dyn> type any,
<wa_new> type any.
assign dyn_tab->* to <dyn_tab>.
"create work areas for both tables
create data: wa_dyn_tab like line of <tab>,
wa_new_tab like line of <new_tab>.
assign: wa_dyn_tab->* to <wa_dyn>,
wa_new_tab->* to <wa_new>.
"now copy content from DYN_TAB to NEW_TAB using <wa_dyn> and <wa_new>.
loop at <dyn_tab> into <wa_dyn>.
move-corresponding <wa_dyn> to <wa_new>.
append <wa_new> to <new_tab>. "now <new_tab> contains only corresponding values from <dyn_tab> based on FIELDS table
endloop.
Hope this is what you need
Regards
Marcin
Similar Messages
-
How to get the data from multiple tabes into single table
hi all,
here i am having 10 data base tables,how to get the data into a single table.
regards,
subba reddyhi,
non XI/PI related
Regards,
Michal Krawczyk -
Total XML structure into single table field
Hello All,
I want to send total XML structure(including Tags and Data) into single field in a Table.
Ex: <MaterialDetails>
<MaterialNumber>00111</MaterialNumber>
<MaterialQuantity>200</MaterialQuantity>
</MaterialDetails>
Plz Can anyone tell me How to do this indetail?
Thanks
SanGenerate this entire string in a UDF and assign it to the respective element.
VJ -
Oracle 10g performance degrades while concurrent inserts into a table
Hello Team,
I am trying to insert into single table via multiple threads, Some of these threads perform reasonably well but some will take really longer time, As the time goes on performance drastically degrades (even down by 500 to 600 times). With AWR report i see that there quite huge number of buffer gets there. I am not sure how can i reduce those. If i ran on a single thread this operation is consistent.
I tried quite a few options like
1. Increasing SGA Memory
2. Moving redo logs to another disk drive.
3. Trying it on a empty table
4. Trying it on a table which has huge data (4 Million rows)
5. I have even tried partitioning the table with HASH algoritm
Note: Each thread i am pupming equal amount of data (let say 25K rows).
Can any body suggest me a clue what could be the culprit here.
Thanks in Advance
Satish Kumar Ballepuuser11150696 wrote:
Can you please guide me how do i do that, I am not aware of how to generate explain plan for that query.Since you have the trace file already (and I don't mean the tkprof output), you could do the following:
Read the trace file to find the statement you're interested id - the line above it will be a +"PARSING"+ line, and will include a reference to the statement hash_value look like +'hv=3838377475845'+.
Use the hash_value to query v$sql to get the sql_id and child_number;
Use the sql_id and child number in a call to dbms_xplan.display_cursor:
PARSING IN CURSOR #7 len=68 dep=0 uid=55 oct=3 lid=55 tim=448839952404 *hv=3413100263* ad='2f6ede48'
select ... etc. (the statement I want the plan for)
SQL> select sql_id , child_number from v$sql where hash_value = *3413100263*;
SQL_ID CHILD_NUMBER
053tyaz5qzjr7 0
SQL> select * from table(dbms_xplan.display_cursor(*'053tyaz5qzjr7'*,*0*));
PLAN_TABLE_OUTPUT
SQL_ID 053tyaz5qzjr7, child number 0
select /*+ use_concat */ small_vc from t1 where n1 = 1 or n2 = 2
Plan hash value: 82564388
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | | | 4 |
| 1 | CONCATENATION | | | | |
| 2 | TABLE ACCESS BY INDEX ROWID| T1 | 10 | 190 | 2 |
|* 3 | INDEX RANGE SCAN | T1_N2 | 10 | | 1 |
|* 4 | TABLE ACCESS BY INDEX ROWID| T1 | 10 | 190 | 2 |
|* 5 | INDEX RANGE SCAN | T1_N1 | 10 | | 1 |
Predicate Information (identified by operation id):
3 - access("N2"=2)
4 - filter(LNNVL("N2"=2))
5 - access("N1"=1)
Note
- cpu costing is off (consider enabling it)Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"For every expert there is an equal and opposite expert."
Arthur C. Clarke
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format. -
Urgent : Making heirarchy report by fetching data froma single table
Hi,
I am making a report in which i hae to display the data like this:-
If there is a material and it contains batch and that batch furhter conatins sub-batches of it.
The problem is dat all the data which is to be displayed is from the table CHVW and i am not able to display the data in hierarchy by fetching it from a single table.
plzz guide me how to do dis as it is really urgent and points will be deinftely rewarded.
help me out.
reagrds,
ric.s
Edited by: ric .s on Apr 30, 2008 10:31 AMHi,
Check the sample Report.
REPORT z_alv_hierseq_list.
Program with FM REUSE_ALV_HIERSEQ_LIST_DISPLAY *
TYPE-POOLS: slis. " ALV Global types
CONSTANTS :
c_x VALUE 'X',
c_gt_vbap TYPE slis_tabname VALUE 'GT_VBAP',
c_gt_vbak TYPE slis_tabname VALUE 'GT_VBAK'.
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(02) TYPE n DEFAULT '10' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_2 FOR FIELD p_expand. "#EC NEEDED
PARAMETERS p_expand AS CHECKBOX DEFAULT c_x.
SELECTION-SCREEN END OF LINE.
TYPES :
1st Table
BEGIN OF ty_vbak,
vbeln TYPE vbak-vbeln, " Sales document
kunnr TYPE vbak-kunnr, " Sold-to party
netwr TYPE vbak-netwr, " Net Value of the Sales Order
erdat TYPE vbak-erdat, " Creation date
waerk TYPE vbak-waerk, " SD document currency
expand TYPE xfeld,
END OF ty_vbak,
2nd Table
BEGIN OF ty_vbap,
vbeln TYPE vbap-vbeln, " Sales document
posnr TYPE vbap-posnr, " Sales document
matnr TYPE vbap-matnr, " Material number
arktx TYPE vbap-arktx, " Material description
netwr TYPE vbap-netwr, " Net Value of the Sales Order
waerk TYPE vbap-waerk, " SD document currency
END OF ty_vbap.
DATA :
1st Table
gt_vbak TYPE TABLE OF ty_vbak,
2nd Table
gt_vbap TYPE TABLE OF ty_vbap.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
v_2 = 'With ''EXPAND'' field'.
START-OF-SELECTION.
Read Sales Document: Header Data
SELECT vbeln kunnr netwr waerk erdat
FROM vbak
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
IF gt_vbak[] IS NOT INITIAL.
Read Sales Document: Item Data
SELECT vbeln posnr matnr arktx netwr waerk
FROM vbap
INTO CORRESPONDING FIELDS OF TABLE gt_vbap
FOR ALL ENTRIES IN gt_vbak
WHERE vbeln = gt_vbak-vbeln.
ENDIF.
END-OF-SELECTION.
PERFORM f_display.
Form F_DISPLAY
FORM f_display.
Macro definition
DEFINE m_fieldcat.
ls_fieldcat-tabname = &1.
ls_fieldcat-fieldname = &2.
ls_fieldcat-ref_tabname = &3.
ls_fieldcat-cfieldname = &4. " Field with currency unit
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
ls_sort-tabname = &1.
ls_sort-fieldname = &2.
ls_sort-up = c_x.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA:
ls_layout TYPE slis_layout_alv,
ls_keyinfo TYPE slis_keyinfo_alv,
ls_sort TYPE slis_sortinfo_alv,
lt_sort TYPE slis_t_sortinfo_alv," Sort table
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv." Field catalog
ls_layout-group_change_edit = c_x.
ls_layout-colwidth_optimize = c_x.
ls_layout-zebra = c_x.
ls_layout-detail_popup = c_x.
ls_layout-get_selinfos = c_x.
IF p_expand = c_x.
ls_layout-expand_fieldname = 'EXPAND'.
ENDIF.
Build field catalog and sort table
m_fieldcat c_gt_vbak 'VBELN' 'VBAK' ''.
m_fieldcat c_gt_vbak 'KUNNR' 'VBAK' ''.
m_fieldcat c_gt_vbak 'NETWR' 'VBAK' 'WAERK'.
m_fieldcat c_gt_vbak 'WAERK' 'VBAK' ''.
m_fieldcat c_gt_vbak 'ERDAT' 'VBAK' ''.
m_fieldcat c_gt_vbap 'POSNR' 'VBAP' ''.
m_fieldcat c_gt_vbap 'MATNR' 'VBAP' ''.
m_fieldcat c_gt_vbap 'ARKTX' 'VBAP' ''.
m_fieldcat c_gt_vbap 'NETWR' 'VBAP' 'WAERK'.
m_fieldcat c_gt_vbap 'WAERK' 'VBAP' ''.
m_sort c_gt_vbak 'KUNNR'.
m_sort c_gt_vbap 'NETWR'.
ls_keyinfo-header01 = 'VBELN'.
ls_keyinfo-item01 = 'VBELN'.
ls_keyinfo-item02 = 'POSNR'.
Dipslay Hierarchical list
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_sort = lt_sort
i_tabname_header = c_gt_vbak
i_tabname_item = c_gt_vbap
is_keyinfo = ls_keyinfo
i_save = 'A'
TABLES
t_outtab_header = gt_vbak
t_outtab_item = gt_vbap
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " F_LIST_DISPLAY
Form USER_COMMAND *
FORM user_command USING i_ucomm TYPE sy-ucomm
is_selfield TYPE slis_selfield. "#EC CALLED
DATA ls_vbak TYPE ty_vbak.
CASE i_ucomm.
WHEN '&IC1'. " Pick
CASE is_selfield-tabname.
WHEN c_gt_vbap.
WHEN c_gt_vbak.
READ TABLE gt_vbak INDEX is_selfield-tabindex INTO ls_vbak.
IF sy-subrc EQ 0.
Sales order number
SET PARAMETER ID 'AUN' FIELD ls_vbak-vbeln.
Display Sales Order
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDCASE.
ENDFORM. " USER_COMMAND
END OF PROGRAM Z_ALV_HIERSEQ_LIST ******************
Regards,
Raj. -
How to use Power Query to load data from a single source into multiple tables
Hi all,
I have a requirement to load my data into three different data models using Power Query. Is that possible?
My source is a SharePoint survey list, with similar questions like:
1) Course lecturer - John Doe
1a) The course was useful (rate 1 to 5)
1b) The lecturer displayed good knowledge of topic (rate 1 to 5)
2) Course Lecturer - Mary Brown
2a) The course was useful (rate 1 to 5)
2b) The lecturer displayed good knowledge of topic (rate 1 to 5)
I would like to split the data into separate data models (one for John Doe; another for Mary Brown), so that I can compare the different lecturers. Other than running separate surveys for each of them, I thought of using Power Query to transform the data.
Is it possible?
Thanks.
Regards
GMYes, this is possible.
Start with a single query that returns you the data for all lecturers.
Right-click on the "all lecturers" query in the queries pane, and choose Reference, once for each lecturer. This will create a query for each lecturer.
Open the query for each lecturer and filter the data so that only that lecturer's results are visible.
Click "Close & Load To..." for each lecturer's query to load the data into the data model. This will create a data model table for each lecturer.
If your question is more about how to transform such a survey list into a table that can be easily filtered, please provide an example of how the list shows up in Power Query.
Ehren -
Insert multiple records into a table(Oracle 9i) from a single PHP statement
How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
From what all I've found, the statement below would work if I were using MySQL:
insert into scen
(indx,share,expire,pitch,curve,surface,call)
values
(81202, 28, 171, .27, 0, 0, 'C' ),
(81204, 28, 501, .25, 0, 0, 'C' ),
(81203, 17, 35, .222, 0, 0, 'C' ),
(81202, 28, 171, .27, 2, 0, 'C' ),
(81204, 28, 501, .20, 0, 1, 'C' ),
(81203, 28, 135, .22, 1, 0, 'C' )
The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
Thank you,
WillYou could look at the INSERT ALL statement found in the documentation here:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
HTH. -
Want to combine the data different coloumn of table into single coloumn.
HI All ,
Requirement : I want to create an application which will display diffrent coloumn(data) of a table into single coloumn in web-dynpro abap .
For ex:
Table : employee
coloumn : PERSON , PAYMENT , STATUS , SUBMISSION .
RETURN = PAYMENT + STATUS + SUBMISSION
(return coloumn will contain the data of other coloumn )
Thanks in advance .
RahulIn your context, create a node 'Employee'. It should have the attributes person, payment, status, submission, return. Let return be of type string. I assume you have a ztable or some ddic structure employee, which does not have the return field.
You code will be on these lines - change it to your requirements anyway. Place the code in a method depending on your requirement of when the data should be displayed.
data: node_emp type ref to if_wd_context_node,
itab_emp type table of employee,
wa_emp type employee,
itab_node_emp type if_main=>elements_employee,
wa_node_emp type if_main=>element_employee.
node_emp = wd_context->get_child_node( name = 'EMPLOYEE' ).
<i>* Get data from your API here into itab_emp *</i>
loop at itab_emp into wa_emp.
move-corresponding wa_emp to wa_node_emp.
concatenate wa_emp-payment wa_emp-status wa_emp-submission separated by space into wa_node_emp-return.
append wa_node_emp to itab_node_emp.
endloop.
node_emp->bind_elements( itab_node_emp ).
Here, before the loop, you need to fetch the data into itab_emp using your APIs. Since you have said you want to display the data of multiple columns as is, I have just concatenated them.
In your view layout, have a table and bind the data source to be the context node Employee.
<b>The data types of itab_node_emp, wa_node_emp will differ based on your view name and node name. Use the code wizard to generate your code according to your design time.</b>
Hope this helps.
Regards,
Nithya -
How to combine large number of key-value pair tables into a single table?
I have 250+ key-value pair tables with the following characteristics
1) keys are unique within a table but may or may not be unique across tables
2) each table has about 2 million rows
What is the best way to create a single table with all the unique key-values from all these tables? The following two queries work till about 150+ tables
with
t1 as ( select 1 as key, 'a1' as val from dual union all
select 2 as key, 'a1' as val from dual union all
select 3 as key, 'a2' as val from dual )
, t2 as ( select 2 as key, 'b1' as val from dual union all
select 3 as key, 'b2' as val from dual union all
select 4 as key, 'b3' as val from dual )
, t3 as ( select 1 as key, 'c1' as val from dual union all
select 3 as key, 'c1' as val from dual union all
select 5 as key, 'c2' as val from dual )
select coalesce(t1.key, t2.key, t3.key) as key
, max(t1.val) as val1
, max(t2.val) as val2
, max(t3.val) as val3
from t1
full join t2 on ( t1.key = t2.key )
full join t3 on ( t2.key = t3.key )
group by coalesce(t1.key, t2.key, t3.key)
with
master as ( select rownum as key from dual connect by level <= 5 )
, t1 as ( select 1 as key, 'a1' as val from dual union all
select 2 as key, 'a1' as val from dual union all
select 3 as key, 'a2' as val from dual )
, t2 as ( select 2 as key, 'b1' as val from dual union all
select 3 as key, 'b2' as val from dual union all
select 4 as key, 'b3' as val from dual )
, t3 as ( select 1 as key, 'c1' as val from dual union all
select 3 as key, 'c1' as val from dual union all
select 5 as key, 'c2' as val from dual )
select m.key as key
, t1.val as val1
, t2.val as val2
, t3.val as val3
from master m
left join t1 on ( t1.key = m.key )
left join t2 on ( t2.key = m.key )
left join t3 on ( t3.key = m.key )
/A couple of questions, then a possible solution.
Why on earth do you have 250+ key-value pair tables?
Why on earth do you want to consolodate them into one table with one row per key?
You could do a pivot of all of the tables, without joining. something like:
with
t1 as ( select 1 as key, 'a1' as val from dual union all
select 2 as key, 'a1' as val from dual union all
select 3 as key, 'a2' as val from dual )
, t2 as ( select 2 as key, 'b1' as val from dual union all
select 3 as key, 'b2' as val from dual union all
select 4 as key, 'b3' as val from dual )
, t3 as ( select 1 as key, 'c1' as val from dual union all
select 3 as key, 'c1' as val from dual union all
select 5 as key, 'c2' as val from dual )
select key, max(t1val), max(t2val), max(t3val)
FROM (select key, val t1val, null t2val, null t3val
from t1
union all
select key, null, val, null
from t2
union all
select key, null, null, val
from t3)
group by keyIf you can do this in a single query, unioning all 250+ tables, then you do not need to worry about chaining or migration. It might be necessary to do it in a couple of passes, depending on the resources available on your server. If so, I would be inclined to create the table first, with a larger than normal percent free, then do the first set as a straight insert, and the remaining pass or passes as a merge.
Another alternative might be to use the approach above, but limit the range of keys in each pass. So pass one would have a predicate like where key between 1 and 10 in each branch of the union, pass 2 would have key between 11 and 20 etc. That way everything would be straight inserts.
Having said all that, I go back to my second question above, why on earth do you want/need to do this? What is the business requirement you are trying to solve. There might be a much better way to meet the requirement.
John -
How to display appcmd /config xml data into a single table
Hi,
I extracted my IIS sites using appcmd
appcmd /site /config /xml > c:\temp\iisconfig.xml
afterwhich I would like to grab the data from this xml and export into excel file
[xml]$iisconfig = get-content c:\temp\iisconfig.xml
I would like to get the Site Name, Bindings, Physical Directory Path and AppPool from this xml file and output to a excel file
#Physical Path Directory
$iisPhysicalPath = $iisconfig.appcmd.site.site.application.VirtualDirectory.PhysicalPath
#Application Pool
$iisAppPool = $iisconfig.appcmd.site.site.application.applicationPool
#Site Details (Site Name, Binding)
$iisSite = $iisconfig.appcmd.site
It doesn't have a single command to output into a table. How do I combine all these code and display in a single table?
JeronTry it like this:
$sites=[xml](c:\windows\system32\inetsrv\appcmd.exe list site /xml)
$sites.appcmd.site
\_(ツ)_/ -
How to convert select-options table into single field internal table
Hi,
My requirement is to convert select-options table into single internal table which has one field.
e.g. select-options: s_matnr for mara-matnr.
select-options table can have options 'BT',"EQ", "NE", "GE", "GT", "LE", "LT", "CP" etc. select-options table
have Sign:I ,Option:BT, Low: 1, High.10.The new internal table records should be 1,2,3,4,5,6,7,8,9,10.
Please suggest any function module available for this scenario in SAP.
Thanks,
Somi.
Edited by: somi reddy satti on Sep 15, 2009 3:18 PMHi Sowmya,
Here is the answer if I understand well of your question.
Data: begin of gt_mon OCCURS 0,
mon(2) TYPE n,
end of gt_mon.
Data: begin of gt_year OCCURS 0,
year(4) TYPE n,
end of gt_year.
Select-options: s_period FOR ptdw_pws_db-kmonth NO-EXTENSION
DEFAULT sy-datum(6)
TO sy-datum(6).
For example according to above statement period is 201110 is 201201.
Period field does n't exists in SAP for selection. If your selection is on date based on period which is given on the selection-screen then you need to convert the period to date by concatenating ( or using FM to convert )01 at the end of each period . You need to declare one range table for date to select the data from table.
loop at s_period.
gr_date-sign = s_period-sign.
gr_date-option = s_period-option.
COncatenate s_period-low
'01'
into gr_date-high.
COncatenate s_period-high
'01'
into gr_date-low
append gr_date.
ENDloop.
Thanks,
Satheesh -
Export single table in maxdb 7.4 and import table into maxdb 7.7
Hello Guru
Need your help as follows
how to export single table from 32 Bit MAXDB 7.4 and import same table into another MAXDB 7.7 X64 bit.
Thanks and Regards
A P RaoHello,
the Database Studio Loader features are only available for MaxDB version > 7.5.
Please have a look at the Loader documentation "Export table" and "Import table" command.
http://maxdb.sap.com/doc/7_7/14/a08027b665485f8e09eca0c336171d/content.htm
http://maxdb.sap.com/doc/7_7/24/ff7c8db8ae46f69a5ed3ec7e4c4db6/content.htm
Best Regards
Wolfgang -
To populate values into single field in an internal table
Hi Friends,
How we need to populate values into single field in an internal table.
E.g itab consits of single field ( name)
i need to assign values to this field name .like
peter,
john,
abrahm,
daneyal
Pls tell me i how i need to code for this
Thanks ,
ParnithHi,
Please look at the below code :
DATA : BEGIN OF itab OCCURS 0 ,
name(20) TYPE c,
END OF itab.
START-OF-SELECTION.
itab-name = 'Peter'.
APPEND itab.
CLEAR itab.
itab-name = 'John'.
APPEND itab.
CLEAR itab.
itab-name = 'Abrahm'.
APPEND itab.
CLEAR itab.
itab-name = 'Daneyal'.
APPEND itab.
CLEAR itab.
LOOP AT itab.
WRITE : / itab.
ENDLOOP.
Thanks,
Sriram Ponna. -
Numbers: Copy/Paste from multiple tables into 1 single Table?
I would appreciate some guidance in creating a copy/paste script from multiple numbers tables into a different single table within the same numbers document.
The columns in the source table are in different positions to the destination table.
So for example, i would want to copy…
Sheet 1, Table 1 Cell A3 copy to Sheet 2 Table Z Cell B2
Sheet 1, Table 1 Cell B3 copy to Sheet 2 Table Z Cell C2
Sheet 1, Table 1 Cell C3 copy to Sheet 2 Table Z Cell E2
Sheet 1, Table 1 Cell D3 copy to Sheet 2 Table Z Cell F2
Sheet 1, Table 1 Cell E3 copy to Sheet 2 Table Z Cell G2
Sheet 1, Table 1 Cell G3 copy to Sheet 2 Table Z Cell I2
Sheet 1, Table 1 Cell J3 copy to Sheet 2 Table Z Cell H2
and repeat the copy/paste on subsequent rows of each table until there is an empty row in Sheet 1 Table 1 (or if this is difficult, say set the repeat to a max of 30 rows).
The script would then need to move on to Sheet 1 Table 2, and do the same copying to Sheet 2 Table Z (from where the previous copy/paste finished in Table Z).
Repeat process would finalise with Sheet 1 Table 6.
The Paste part would need to be pasting values, as the cells in the source tables do contain some formulas.
At the moment this is all done manually and does take some to to undertake.
If anyone can help, i would be very grateful.
Thanks,
ColinInterceptor,
are you trying to aggregate data from severl tables into a single table? If so you whould be able to do this without a script. The function indirect() will allow you to construct the proper formula, which you may fill over (in the same row) to the appropriate cells, then fill down.
Here is a small example:
There are three data tables ("Table 1", "Table 2", and "Table 3"). And a summary "Table Z"
In table Z make the first row a header (as shown):
Use column A to enter the Sheet name and colomn B to enter the table name.
In row 1 (the header), enter the cells you want to get
in cell C2 type (or copy and paste from here) the formula:
=INDIRECT($A2&"::"&$B2&"::"&C$1)
now select cell C2, copy now select cell C2 thru H2, paste
now select the cells C2 thu H2, hover the corsor over the bottom edge of the selection, and drag the yellow cirlc down as needed to fill the formula down.
Update the sheet and table names as needed for each row -
Add Internal Table Multiple Lines into Single Line
Hi Gurus,
Before post this thread, i hav searched SDN but i could not find the exact solution.
I hav an internal table, i want to add the records of this internal table into single line (string variable), separated by tab operator.
can any one give me suggestions to solve this?
Thanks
MeherHi,
Program should be some thing like below:
REPORT ZTEST36.
*-- test program to concatenate internal table to string.
DATA:STRING TYPE STRING.
TYPES:BEGIN OF TY_ITAB,
WEEK(15),
END OF TY_ITAB.
DATA:GT_ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'SUNDAY'.
APPEND GT_ITAB.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'MONDAY'.
APPEND GT_ITAB.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'TUESDAY'.
APPEND GT_ITAB.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'WEDNESDAY'.
APPEND GT_ITAB.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'THURSDAY'.
APPEND GT_ITAB.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'FRIDAY'.
APPEND GT_ITAB.
CLEAR GT_ITAB.
GT_ITAB-WEEK = 'SATURDAY'.
APPEND GT_ITAB.
CLEAR:GT_ITAB, STRING.
LOOP AT GT_ITAB.
CONCATENATE STRING '/' GT_ITAB INTO STRING.
ENDLOOP.
WRITE: / STRING.
Regards
Ramesh.
Moderator message - Ramesh - please use code tags
Edited by: Rob Burbank on Jul 3, 2009 12:26 PM
Maybe you are looking for
-
Is there any way to change more than one picture at a time in Adobe CS2 from Tiff to .jpg
I have a folder of Tiff pictures that I would like to change to .jpg so that I can download them to one DVD rather than the huge amount of space Tiff pictures take. and the number of DVD's that I would have to use. Thx.
-
Can you change the view of album covers when playing music on Apple TV?
I love the coverflow view when playing tracks on my mac. Its what I always wanted to be able to see the album cover as large as the screen while the song plays. However on Apple Tv its "not quite" the same! I feel that the text is too big (taking up
-
HTTP_EXCEPTION:HTTP 302 Moved Temporarily (RFC to SOAP)
Hi gurus Iam facing a problem with a message which is failed at Call SOAP Receiver Adapter. The error is as follows: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingExce
-
Dear Expert, Please help me out in following Report Requirement. Our Management required to develop report which shows Customer Outstanding based on credit periods given to Customer. As the number of credit days varies customer wise. Customer credit
-
How do I use triggers within a package?