Internal table transfer data to the other
Hi Guys,
I am trying to insert from one of my internal table itab1 to the other table itab2, the itab2 will have only one field with length of may be 1000 charachters, all the fields thats gonna go from itab1 to itab2 should be pipeline delimited. Please try to help me.
Thanks
Rajeev Gupta
Rajeev,
Have you gotten it to work yet?
Here is a slight change to review as well. This removes the hard-coding of DO 3 TIMES. Instead, it determines how many fields exist in TAB1 - and places that value into feld UU.
Then uu is used in the DO loop.
REPORT ZSEND .
field-symbols: <l_field> type any.
field-symbols: <ls_table> type any.
data: out_fld(1000).
data: begin of tab1 occurs 0,
f1(10),
f2(20),
f3(30),
end of tab1.
data: begin of tab2 occurs 0,
f1(1000),
end of tab2.
tab1-f1 = '1f1'.
tab1-f2 = '1f2'.
tab1-f3 = '1f3'.
append tab1.
tab1-f1 = '2f1'.
tab1-f2 = '2f2'.
tab1-f3 = '2f3'.
append tab1.
data: uu type i.
describe field tab1 type tab1 components uu. "determine # of fields
loop at Tab1.
clear out_fld.
do uu times. " uu = number of fields in a row of Tab1
assign component sy-index of structure Tab1 to <l_field>.
concatenate out_fld <l_field> into out_fld separated by '|'.
enddo.
append out_fld to Tab2.
endloop.
Similar Messages
-
Creation of internal table dynamically based on the Date Range entered
Hi SAPgurus,
I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
Right now my program is displaying the ALV like this.
Ex:
<b>CSR District 06/2006 07/2006 08/2006 totals</b>
Shiva New York 10.00
Shiva new york 30.00
Shiva new york 40.00
but it should display like this
<b>CSR District 06/2006 07/2006 08/2006 totals</b>
Shiva New York 10.00 30.00 40.00
80.00
Please help me in this scenario, how to acheive like this..
Thanks & Regards,
Sivaram KandulaHi Sivaram,
I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
Sivaram, can you please explain your code after this.
*<dyn_table>
*tab_item.
LOOP AT tab_item.
ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
* <dyn_wa> = tab_item-bztxt.
* <dyn_wa> = tab_item-total.
* APPEND <dyn_wa> TO <dyn_table>.
** <dyn_wa> = tab_item-total.
** ASSIGN tab_item-bezei TO <dyn_wa>.
* APPEND <dyn_table>.
ENDLOOP.
how you are puting the loop at tab_item. but tab_item is already commented.
can you send me the code after that.
i am sending some part of my code.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fCAT1
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <dyn_table>.
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
select vbeln
fkart
vkorg
vtweg
fkdat
spart
fksto
from vbrk
client specified
into table gt_vbrk
where mandt = sy-mandt
and fkart in ('ZF5','ZFR')
and vkorg = '1100'
and vtweg = '20'
and fkdat in s_fkdat
and spart = '06'
and fksto = ' '.
if gt_vbrk[] is not initial.
select vbeln
fkimg
prsdt
netwr
matnr
arktx
werks
mwsbp
from vbrp
client specified
into table gt_vbrp
for all entries in gt_vbrk
where vbeln = gt_vbrk-vbeln
and werks in s_werks
and matnr in s_matnr.
endif.
select mnr ltx spras from t247
into table it_t247
where spras = 'E'.
data: lv_month1 type vbrp-prsdt,
name1(3) type c,
s_month type string,
s_month1 type string,
s_month2 type string.
* lv_netwr1 type vbrp-netwr,
* lv_mwsbp1 type vbrp-mwsbp.
loop at gt_vbrp into gs_vbrp.
gs_final2-matnr = gs_vbrp-matnr.
gs_final2-arktx = gs_vbrp-arktx.
gs_final2-fkimg = gs_vbrp-fkimg.
lv_month1 = gs_vbrp-prsdt.
read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
if sy-subrc eq 0.
name1 = wa_t247-ltx.
endif.
concatenate name1
lv_month1(4) into s_month SEPARATED BY '_' .
CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
gs_final2-month = s_month.
lv_netwr1 = gs_vbrp-netwr.
lv_mwsbp1 = gs_vbrp-mwsbp.
gs_final2-MONTH_QTY = S_MONTH1.
GS_FINAL2-MONTH_VAL = S_MONTH2.
gs_final2-value = lv_netwr1 + lv_mwsbp1.
append gs_final2 to gt_final2.
clear: gs_final2. "lv_name2.
endloop.
if gt_final2[] is not initial.
sort gt_final2 by matnr month ascending .
loop at gt_final2 into gs_final2.
gs_final2_01 = gs_final2.
collect gs_final2_01 into gt_final2_01.
endloop.
endif.
ENDIF..
Regards
Ankur -
I managed to transfer the music from 1 pc to 1 other pc (it is played perfectly on the other PC (Windows 7- pc) by the newly downloaded and installed iTunes, version 10.6.1.7). But I didn’t fix the transfer of the meta data (for example the rating). Does anyone know how to use (or import) your old playlists, etc..(= meta data) on the other PC? So, short: how to migrate the meta data from one pc to an other pc?
It's a pity that it seems not to be possible to import on the new pc e.g. the ratings!!!
I don't want to start again with rating my (beautiful classical) music!
Thanks, from Amsterdam, NLDid you do the move via Home Sharing, astro?
If so, perhaps try the instructions from the following post:
Re: i transfered itunes to my pc playlists did not go -
I recently got the iPhone 4s, but my iPod has a lot of apps with a lot of data on them and don't want to start over. I already synced my iPhone from the computer that had all my apps from my iPod, how do i transfer the data over, the other apps did. But some reason the app Clash Of Clans did not. Thank you.
If I wiped my phone I wouldn't have the contacts on my phone to send to my self. I would need to take just the contacts from my back up. I would have to do this through iTunes and I don't see how I can just extract the contacts only from my back up. From what I can figure out it is all or nothing
-
I am migrating to a new iMac via TimeMachine back up. My iPhoto libraries are on an external drive. Both drives are backed up on Time Machine. I'd like to migrate only the old internal hard drive data to the new internal Drive and then just plug in iPhoto library drive to the new iMac. This would save having to transfer several hundred GBs of data. Will this work using Set Up Assistant?
Your user account on the new Mac must have a different UID than on the old one. See the pink box in Problems after using Migration Assistant for an explanation.
You'll need to change the permissions on the iPhoto library on the external HD. Do a Get Info on it, click the padlock at the bottom of the Sharing & Permissions section of the Info window and enter your Admin password.
Then click the plus sign, select the user account you want on the next screen, and click Select. Then change Read only to Read & Write for that user via the little arrows. Finally, click the "gear" icon and select Apply to enclosed items. That may take a few mintutes on a large library. -
How to pass internal table with data in ABAP OO
Hi experts ,
Here is the problem...
I create a screen 100 and use the internal table to get data from database, and then press the button on screen 100 , it will call screen 200.
I use ABAP OO code in screen 200, and i want to keep the internal table with data that i get from the sceen 100 parts, but it seems that it just supports to create a new internal table and get data from database in ABAP OO. That means i need to create a new table to save the data in internal table ? Or there is any other solution something like exporting or memory id ...
ps . the internal table in screen 100 is declared in global area, the beginning of the code.
Please give me some advice, thanks a lot!
Regards ,
ClaireI have already know how to do, here is my code:
METHODS fill_tree importing itab2 like itab1.
CALL METHOD: me->fill_tree exporting itab2 = itab1.
In METHOD fill_tree,
declare
data: itab3 TYPE STANDARD TABLE OF itab,
itab3[] = itab1[].
It is useful to me, thanks a lot. -
Can we create global internal table in data dictionary
help me
i want to know whether we can create global internal tables in data dictionaryHi Swathi,
The whole concept of internal table is to manipulate the data at runtime.
This replaces the concept of two dimentional array in other languages.
The power of internal tables is it gets lakhs of records at runtime. I mean it can accomodate lots of records at runtime.
So you can create a table type in DDIC and use it to declare your internal table.
Yes, You can create global internal tables for function modules.
By declaring the internal table in top include you can use this internal table all the function modules of that function group. So if one function module is filling the data another can use it as it is stored globally.
Hope this answers your curiosity.
Award points if useful else getback.
Aleem. -
What are dyanmic internal tables and what s the exact use of forall entries
what are dyanmic internal tables and what s the exact use of forall entries?
hi,
<u><b>dynamic internal table.</b></u>
http://searchsap.techtarget.com/tip/1,289483,sid21_gci912390,00.html
http://www.sap-img.com/ab030.htm
<u><b>
FOR ALL ENTRIES</b></u> is an effective way of doing away with using JOIN on two tables.
You can check the below code -
SELECT BUKRS BELNR GJAHR AUGDT
FROM BSEG
INTO TABLE I_BSEG
WHERE BUKRS = ....
SELECT BUKRS BELNR BLART BLDAT
FROM BKPF
INTO TABLE I_BKPF
FOR ALL ENTRIES IN I_BSEG
WHERE BUKRS = I_BSEG-BUKRS
AND BELNR = I_BSEG-BELNR
AND BLDAT IN SO_BLDAT.
*******************************8
look another example
what is the use of FOR ALL ENTRIES
1. INNER JOIN
DBTAB1 <----
> DBTAB2
It is used to JOIN two DATABASE tables
having some COMMON fields.
2. Whereas
For All Entries,
DBTAB1 <----
> ITAB1
is not at all related to two DATABASE tables.
It is related to INTERNAL table.
3. If we want to fetch data
from some DBTABLE1
but we want to fetch
for only some records
which are contained in some internal table,
then we use for alll entries.
1. simple example of for all entries.
2. NOTE THAT
In for all entries,
it is NOT necessary to use TWO DBTABLES.
(as against JOIN)
3. use this program (just copy paste)
it will fetch data
from T001
FOR ONLY TWO COMPANIES (as mentioned in itab)
4
REPORT abc.
DATA : BEGIN OF itab OCCURS 0,
bukrs LIKE t001-bukrs,
END OF itab.
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
itab-bukrs = '1000'.
APPEND itab.
itab-bukrs = '1100'.
APPEND itab.
SELECT * FROM t001
INTO TABLE t001
FOR ALL ENTRIES IN itab
WHERE bukrs = itab-bukrs.
LOOP AT t001.
WRITE :/ t001-bukrs.
ENDLOOP.
Hope this helps!
Regards,
Anver -
How can i compare 2 internal table's data which have same structure ?
hi friends,
i want to know how to compare 2 internal table's data which have same structureDATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA: ITAB LIKE TABLE OF LINE,
JTAB LIKE TABLE OF LINE.
DO 3 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
APPEND LINE TO ITAB.
ENDDO.
MOVE ITAB TO JTAB.
LINE-COL1 = 10. LINE-COL2 = 20.
APPEND LINE TO ITAB.
IF ITAB GT JTAB.
WRITE / 'ITAB GT JTAB'.
ENDIF.
APPEND LINE TO JTAB.
IF ITAB EQ JTAB.
WRITE / 'ITAB EQ JTAB'.
ENDIF.
LINE-COL1 = 30. LINE-COL2 = 80.
APPEND LINE TO ITAB.
IF JTAB LE ITAB.
WRITE / 'JTAB LE ITAB'.
ENDIF.
LINE-COL1 = 50. LINE-COL2 = 60.
APPEND LINE TO JTAB.
IF ITAB NE JTAB.
WRITE / 'ITAB NE JTAB'.
ENDIF.
IF ITAB LT JTAB.
WRITE / 'ITAB LT JTAB'.
ENDIF.
The output is:
ITAB GT JTAB
ITAB EQ JTAB
JTAB LE ITAB
ITAB NE JTAB
ITAB LT JTAB
This example creates two standard tables, ITAB and JTAB. ITAB is filled with 3 lines and copied to JTAB. Then, another line is appended to ITAB and the first logical expression tests whether ITAB is greater than JTAB. After appending the same line to JTAB, the second logical expression tests whether both tables are equal. Then, another line is appended to ITAB and the third logical expressions tests whether JTAB is less than or equal to ITAB. Next, another line is appended to JTAB. Its contents are unequal to the contents of the last line of ITAB. The next logical expressions test whether ITAB is not equal to JTAB. The first table field whose contents are different in ITAB and JTAB is COL1 in the last line of the table: 30 in ITAB and 50 in JTAB. Therefore, in the last logical expression, ITAB is less than JTAB.
regards,
srinivas
<b>*reward for useful answers*</b> -
With in the internal table can I READ the same internal table for a record?
With in the internal table can I READ the same internal table?
For Suppose
LOOP AT itab.
can I do as below
READ TABLE itab with key bukrs = itab-bukrs
belnr = itab-belnr.
*and I have to compare
IF itab-shkzg = itab-shkzg_ia.
ENDIF.
ENDLOOP.Hi,
Yes..But use work area to differentiate..
EX.
DATA: WA LIKE ITAB.
DATA: WA_READ LIKE ITAB.
LOOP AT itab <b>INTO WA</b>.
can I do as below
READ TABLE itab <b>INTO WA_READ</b>
with key bukrs = itab-bukrs
belnr = itab-belnr.
*and I have to compare
IF <b>WA</b>-shkzg = <b>WA_READ</b>-shkzg_ia.
ENDIF.
ENDLOOP.
Please reward for helpful answers.
Thanks,
Naren -
In Icloud on my imac I can't see my "numbers" icon which i need to select "tick" to transfer data to my other devices via icloud. any ideas why it's not showing up?
You have to do it app wise, which means that the icon won't show up in settings, but you will be able to move files from your local drive to iCloud via the Numbers app (move... > choose the iCloud option).
It requires that you set up the same iCloud account on all your devices and that you have the latest version of Numbers on all your devices as well. -
How to download a table of data to the FPGA
I m using an PCI7813R FPGA board and I'm trying to download a table of data into the FPGA. How can I do this as fast as possible and so I can easily index each data row in the fpga. The length of the table can be variable from run to run. A block of memory where in I could write from the host would be the best solution I think, but I don't think this is possible.
Does anyone have some ideas about doing this?Hi esrgb,
As you probably noticed, it's not possible to use a table in LabVIEW FPGA. Therefore you will have to go through an array. Keep the following in mind however when using an array:
http://digital.ni.com/public.nsf/websearch/80C9808E454DCBC286257093005B9EB6?OpenDocument
Now unlike you think, there is a block of memory available on the FPGA itself which you can address straight from your FPGA code, for examples see:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=BE211EB859136066E034080020E74861&p_node=201268&p_source=External
There is also a tutorial available which discusses the use of clusters and array in general in LV FPGA.
http://zone.ni.com/devzone/conceptd.nsf/webmain/2bf2813a4beb80c38625700b007da74a
Kind Regards,
Wouter Van Hoof
National Instruments -
The serial port seems to be working, and labview seems to be sending the data, but the problem is in which format does it send the data, because in hyperterminal i just input the string "JDX" and it sends it to my device, with labview it sends something but my device does not recognize it.
nobuto wrote:
> I want to transfer data through the serial port in the same coding
> that hyperterminal uses. How can i do it?
>
> The serial port seems to be working, and labview seems to be sending
> the data, but the problem is in which format does it send the data,
> because in hyperterminal i just input the string "JDX" and it sends it
> to my device, with labview it sends something but my device does not
> recognize it.
Hyperterminal adds the carriage return/line feed to the string which is
generated by the return key to send out the current line. LabVIEW simply
sends out what you tell it, so try to set the string to "Show \ Display"
format and add a \r or \n or \r\n to the command you want to send out.
Assumes of course that you set the right baudr
ate/bits/parity etc in
LabVIEW with the VISA property node, when opening the serial port.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How to populate TableView data on the other screen TextField
Hi guru’s
I am having problem in populating data from a table in one screen to a Text Field in the other screen. I have two classes FirstClass containing a textbox and a button. On pressing a button a second window is opened containing a Table of values. As the user double clicks a row the value of the second column of the row should be inserted into the textbox of the FirstClass. Code of both the classes is attached. Thanking you in anticipation.
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class FirstClass extends Application {
public static void main(String[] args) {
launch(args);
@Override
public void start(final Stage primaryStage) {
primaryStage.setTitle("First Class");
GridPane gridpane = new GridPane();
gridpane.setPadding(new Insets(5));
gridpane.setHgap(5);
gridpane.setVgap(5);
final TextField userNameFld = new TextField();
gridpane.add(userNameFld, 1, 1);
Button btn = new Button();
btn.setText("Show Table");
gridpane.add(btn, 1, 3);
btn.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
String a = TableClass.showDialog(primaryStage, true, "Table Window" );
userNameFld.setText(a);
StackPane root = new StackPane();
Scene scene =new Scene(root, 300, 250);
root.getChildren().addAll(gridpane);
primaryStage.setScene(scene);
primaryStage.show();
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.StackPane;
import javafx.stage.Modality;
import javafx.stage.Stage;
public class TableClass extends Stage {
private static TableClass dialog;
private static String value = "";
public static class Person {
private final SimpleStringProperty firstName;
private final SimpleStringProperty lastName;
private Person(String fName, String lName) {
this.firstName = new SimpleStringProperty(fName);
this.lastName = new SimpleStringProperty(lName);
public String getFirstName() {
return firstName.get();
public void setFirstName(String fName) {
firstName.set(fName);
public String getLastName() {
return lastName.get();
public void setLastName(String fName) {
lastName.set(fName);
private TableView<Person> table = new TableView<Person>();
private final ObservableList<Person> data =
FXCollections.observableArrayList(
new Person("JACK", "BROWN"),
new Person("JOHN", "VIANNEYS"),
new Person("MICHAEL", "NELSON"),
new Person("WILLIAM", " CAREY")
public TableClass(Stage owner, boolean modality, String title) {
super();
initOwner(owner);
Modality m = modality ? Modality.APPLICATION_MODAL : Modality.NONE;
initModality(m);
setOpacity(1);
setTitle(title);
StackPane root = new StackPane();
Scene scene = new Scene(root, 750, 750);
setScene(scene);
GridPane gridpane = new GridPane();
gridpane.setPadding(new Insets(5));
gridpane.setHgap(5);
gridpane.setVgap(5);
TableColumn firstNameCol = new TableColumn("First Name");
firstNameCol.setMinWidth(100);
firstNameCol.setCellValueFactory(
new PropertyValueFactory<Person,String>("firstName")
TableColumn lastNameCol = new TableColumn("Last Name");
lastNameCol.setMinWidth(200);
lastNameCol.setCellValueFactory(
new PropertyValueFactory<Person,String>("lastName")
table.setItems(data);
table.getColumns().addAll(firstNameCol, lastNameCol);
table.setOnMouseClicked(new EventHandler<MouseEvent>() {
public void handle(MouseEvent me) {
if (me.getClickCount() >= 2) {
String srr = table.getItems().get(table.getSelectionModel().getSelectedIndex()).getLastName();
value = srr;
dialog.hide();
gridpane.add(table, 1, 5,1,20 );
root.getChildren().add(gridpane);
public static String showDialog(Stage stg, Boolean a , String title){
dialog = new TableClass( stg,a, title);
dialog.show();
return value;
}Cross posted
http://www.coderanch.com/t/582014/JavaFX/java/populate-TableView-data-other-screen
http://stackoverflow.com/questions/10734649/how-to-populate-tableview-data-on-the-other-screen-textfield-in-javafx-2-0
Moderator advice: Please read the announcement(s) at the top of the forum listings and the FAQ linked from every page. They are there for a purpose.
Then edit your post and format the code correctly.
db -
Passing internal table from one program to other without using IMPORT
Hi Experts,
I need to pass an internal table from one program to other. However i cannot use IMPORT/EXPORT due to some reason. Any idea how this can be done?
Warm regards,
Harshad.hi,
for passing itab from one program to another u can use
IN FIRST PROGRAM WRITE ,
perform pass_data(SECOND_PROGRAM_NAME) using ITAB.
in both the program declare itab with same structure.
if u want to do some changes in that itab and if u want it back in first program then write as
perform pass_data(SECOND_PROGRAM_NAME) using ITAB changing itab.
Maybe you are looking for
-
Problem register a system with sconadm
Hello guys, I'm trying to register a Solaris 10 6/06 u2 system using sconadm, but it fails: ryna# cat /tmp/RegistrationProfile.properties | grep -v ^# | grep -v '^$' userName=__deather password=XXXXXXX hostName= subscriptionKey= proxyHostName= proxyP
-
I have try to deploy my ADF application project to Jboss application server 4.2.2 and 5.0.1 and I have the same problem, when i add jboss in jdevelopper and i want to deploy my project to jboss this message will appear : Presentation not available: J
-
Wide-Area Bonjour / Dynamic Global Hostname
Hello everyone I have a very specific problem, My AEBS is not sending UPDATE requests to my own DNS server when my DSL IP address changes over time. I have my own DNS server and run a dynamic zone with TSIG aututhentication. If I configure the "Dynam
-
Connected to Airport Extreme but not internet
Yesterday after returning from work, all of a sudden I couldn't get any internet access through my airport extreme. I could connect to it and play music through "airtunes". I looked at the settings of the airport BS and everything looked the way it s
-
Hi, I've had problems on my mac, it's 10.6 Snow Leopard, the whole system was running slow. So I inserted the Mac OX S Disc Installer and had to Repair Disk as it detected a corrupt error on the hard drive - But in the left hand panel it says I have