How to read two more tables in smartfroms
Hi experts,
I am working in smartforms, i am having sales order no, using this sales order i have get customer name.
I am not familar with smart forms.
How to put this logic in smartfroms .
already i am having vbeln.
using vbeln I have go to vbpa and get vbpa-kunnr
using kunnr I have go to kna1 and get kna1-name1
where I should define and how to define, (form interface or global defination)
where should write select stmt.
please advice.
Thanks,
Mahame.
Hi,
To start with you can test this on a single window eg Main window.
Under main window you can add a program line
ie Right click Create -> Flow logic -> Program line.
Now in this program line you can use a join query as per your condition.
Then create a loop under main window
ie Right click Create -> Flow logic -> Loop
In this mention the input and output parameters
Eg input para as v_matnr
output para as w_mara, t_mara.
Then create a text component under loop.
ie Right click Create -> Text
and in this you can display your fields
Note : you need to declare the input parameters in the form interface
and outparameters under global definition.
Hope this would hep you.
Regards,
Ranjith N
Similar Messages
-
How to read an internal table with more than one (2 or 3) key field(s).
how to read an internal table with more than one (2 or 3) key field(s). in ecc 6.0 version
hi ,
check this..
report.
tables: marc,mard.
data: begin of itab occurs 0,
matnr like marc-matnr,
werks like marc-werks,
pstat like marc-pstat,
end of itab.
data: begin of itab1 occurs 0,
matnr like mard-matnr,
werks like mard-werks,
lgort like mard-lgort,
end of itab1.
parameters:p_matnr like marc-matnr.
select matnr
werks
pstat
from marc
into table itab
where matnr = p_matnr.
sort itab by matnr werks.
select matnr
werks
lgort
from mard
into table itab1
for all entries in itab
where matnr = itab-matnr
and werks = itab-werks.
sort itab1 by matnr werks.
loop at itab.
read table itab1 with key matnr = itab-matnr
werks = itab-werks.
endloop.
regards,
venkat. -
How 2 read two files from 2 diff. directories, using single adapter
How 2 read two files from 2 diff. directories in same system, using single file adapter.
you can use advanced selection for source file
see
http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm -
How to join two internal table rows in alternative manner into one internal table?
How to join two internal table rows in alternative manner into one internal table?
two internal tables are suppose itab1 & itab2 & its data
Header 1
Header 2
Header 3
a
b
c
d
e
f
g
h
i
Header 1
Header 2
Header 3
1
2
3
4
5
6
7
8
9
INTO itab3 data
Header 1
Header 2
Header 3
a
b
c
1
2
3
d
e
f
4
5
6
g
h
i
7
8
9Hi Soubhik,
I have added two additional columns for each internal table.
Table_Count - It represents the Internal Table Number(ITAB1 -> 1, ITAB2 -> 2)
Row_Count - It represents the Row Count Number, increase the row count value 1 by one..
ITAB1:
Header 1
Header 2
Header 3
Table_Count
Row_Count
a
b
c
1
1
d
e
f
1
2
g
h
i
1
3
ITAB2:
Header 1
Header 2
Header 3
Table_Count
Row_Count
1
2
3
2
1
4
5
6
2
2
7
8
9
2
3
Create the Final Internal table as same as the ITAB1/ITAB2 structure.
"Data Declarations
DATA: IT_FINAL LIKE TABLE OF ITAB1. "Final Internal Table
FIELD-SYMBOLS: <FS_TAB1> TYPE TY_TAB1, "TAB1
<FS_TAB2> TYPE TY_TAB2. "TAB2
"Assign the values for the additional two column for ITAB1
LOOP AT ITAB1 ASSIGNING <FS_TAB1>.
<FS_TAB1>-TABLE_COUNT = 1. "Table value same for all row
<FS_TAB1>-ROW_COUNT = SY-TABIX. "Index value
ENDLOOP.
"Assign the values for the additional two column for ITAB2
LOOP AT ITAB2 ASSIGNING <FS_TAB2>.
<FS_TAB2>-TABLE_COUNT = 2. "Table value same for all row
<FS_TAB2>-ROW_COUNT = SY-TABIX. "Index value
ENDLOOP.
"Copy the First Internal Table 'ITAB1' to Final Table
IT_FINAL[] = ITAB1[].
"Copy the Second Internal Table 'ITAB2' to Final Table
APPEND IT
LOOP AT ITAB2 INTO WA_TAB2.
APPEND WA_TAB2 TO IT_FINAL.
ENDLOOP.
"Sort the Internal Table based on TABLE_COUNT & ROW_COUNT
SORT IT_FINAL BY ROW_COUNT TABLE_COUNT.
After sorting, check the output for IT_FINAL Table, you can find the required output as shown above.
Regards
Rajkumar Narasimman -
My macbook pro currently has 2gb memory how much will two more increase perfomance?
my macbook pro currently has 2gb memory how much will two more increase perfomance? (capacity is 4)
Here is the system specs can i get up to 8 on this machine?
Also I run Adobe cs5 and final cut if that makes any difference?
Model Name: MacBook Pro
Model Identifier: MacBookPro5,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache: 3 MB
Memory: 2 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MBP51.007E.B06
SMC Version (system): 1.41f2 -
How to read an APO table from excel in place using Visual Basic ?
We have enhanced some APO reports using layouts that use excel in place with custom visual basic (VB) code. For example, the VB code can append the data with additional columns that perform specific calculations and then proceed to create pivot table reports in excel..That is working fine.
The challenge is to see if that VB code could read specific APO tables (e.g. product master tables) to bring additional elements into excel and thus expand the report content. We know that additional fields can be added to the reports, but having the flexibility to read tables from VB could be more flexible.
Can that be done?. If so, would it be possible using exclusively the VB code attached to the layout, i.e. no ABAP?Hello Anselmo,
I am assuming you are doing this either using BeX analyzer or by reading the planning book using the RFC ActiveX component and a BAPI.
I think it's possible to retrieve the data from the product master table. Here are my thoughts on how can this be done:
1) You can create a generic datasource (transaction RSO2) for the product master table, connect that to a BW remotecube and use a BeX query to retrieve that values. You can then join the queries using VBA. Alternatively, you can build a muti-provider that connects your current InfoCube to the new RemoteCube and build a query from there. The multi-provider, in this case, joins the data (no more VBA).
2) If you have already loaded your product master data into master data carrying InfoObjects then you can try the same technique as #1 but this time there is no need to create the generic datasource. You can use the InfoObjects for your master data as the InfoProviders for your query.
3) You can try the ActiveX component from SAP which can connect to any emote enabled function in SAP system. SAP already provided some BAPIs (check transaction BAPI for a list) which might be able to provide the data. You can also create your own function modules (be sure to make it remote enabled) using ABAP. (transaction SE37).
Hope this helps -
How to read the TEXT TABLE (or) .CSV in HSQLDB Standalone using Java
Hi, I like to use the text tables in our application. And like to use the HSQL Database Engine as Standalone. I created the text tables, those are stored in the disk as ".CSV" files. But i am unable to read that text table (.CSV) when i relogin and gave the CSV file path as URL along with "jdbc:hsqldb:file". So can anybody give me the tips how use the text tables.
Regards,
VinayYou need to make a URLConnection to the page you want, and get the input stream from that page.
The contents of the input stream (use a reader to get them) will give you the raw HTML code. Use a parser to get the actual content. I dont know of a parser offhand, but you can search for one. -
How to read a databae table and current user name?
Hi All,
We need to add two radio buttons in a standard template.The RBs should be visible to some users and should not be visible to others.For this we need to read a database table in the template , compare the logged in user name with a field of the databse table.
Something like...
select single * from ZDBTAB into WA WHERE username = sy-uname.
IF SY-SUBRC = 0 .
Radio Button1
Radio Button2
ENDIF.
Please provide the exact ITS code for the same.
Regards,
AnubhavHi All,
We need to add two radio buttons in a standard template.The RBs should be visible to some users and should not be visible to others.For this we need to read a database table in the template , compare the logged in user name with a field of the databse table.
Something like...
select single * from ZDBTAB into WA WHERE username = sy-uname.
IF SY-SUBRC = 0 .
Radio Button1
Radio Button2
ENDIF.
Please provide the exact ITS code for the same.
Regards,
Anubhav -
How to Read data base table at runtime
Hi,
i have an internal table with two fields they are
tablename and field name.
itab has some entries.
like :
itab-table name itab-fieldname
kna1 kunnr
mara matnr
vbuk vbeln
tvak auart
i want to read these tables with field names.
like :
loop at itab
select singe * from <itab-tablename> into <jtab>
where <itab-fieldname > = <dyanmic value from prog>.
endloop.
Is it possible to read the db table in the above scenario.
Please try to give me the solution.
Thanks,
srikHi, try this example program.
report zrich_0002 .
data: begin of itab occurs 0,
tabname(20) type c,
fldname(20) type c,
end of itab.
data: ref_descr type ref to cl_abap_structdescr.
data: where_clause(100) type c occurs 0 with header line.
data: it_details type abap_compdescr_tab,
wa_details type abap_compdescr.
data: new_table type ref to data,
new_line type ref to data,
it_fldcat type lvc_t_fcat,
wa_it_fldcat type lvc_s_fcat.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
start-of-selection.
itab-tabname = 'T000'.
itab-fldname = 'MANDT'.
append itab.
itab-tabname = 'T001'.
itab-fldname = 'BUKRS'.
append itab.
loop at itab.
* Get the structure of the table.
refresh it_fldcat.
refresh where_clause.
ref_descr ?= cl_abap_typedescr=>describe_by_name( itab-tabname ).
it_details[] = ref_descr->components[].
loop at it_details into wa_details.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = wa_details-name .
wa_it_fldcat-datatype = wa_details-type_kind.
wa_it_fldcat-inttype = wa_details-type_kind.
wa_it_fldcat-intlen = wa_details-length.
wa_it_fldcat-decimals = wa_details-decimals.
append wa_it_fldcat to it_fldcat .
endloop.
if <dyn_table> is assigned.
refresh <dyn_table>.
unassign <dyn_table>.
endif.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
concatenate itab-fldname '<> ''' '''' into where_clause
separated by space.
append where_clause.
select * from (itab-tabname) into table <dyn_table>
where (where_clause).
endloop.
Regards,
Rich Heilman -
Dear All,
I will appreciate if somebody help me.
I want to read two files, one is temperature wich is updating every second, and the other is hysteresis energy which has specific rows and is constant.
I got a program in discussion forum which read a file as it is updating. I checked this program in my case and it works.
Then I added reading hysteresis energy file to the existing file. But while i am running the program, the hysteresis energy file is read with all rows.
But the aim is that everytime which temperature updates, I need to read just one row of the hysteresis energy file.
so, in this way in every second i have a new temperature data and one row of the other file.
I tried to used "for loop" inside the program, but it did not work, becuase reading temperature will be stopped untill for loop ends.
I attached the program.
Could somebody help me how to read just one row of hysteresis energy file everytime temperature updates?
Solved!
Go to Solution.
Attachments:
Readfiles.vi 23 KBI do not understand relationship between your two files.
You have another VI or app that is writing data to both files and when new temperature data added you wish just to read the new data and then read one new line of the hysteresis file?????
But is one is constant, why do you need to keep reading it?
Anyway…
The “Read From Spreadsheet File.vi” preformed an Open and a Close for each time it is called (if you will open the VI up and drill down and you will see). So that resets the file pointer back to the beginning and there for will read in the whole file from the first to the last each time if you do not set the start of read offset or number of rows.
Now the Read from Binary File does not reset the file pointer and leaves the file pointer just past the last byte read so it will start with any new bytes automaicly only giving you the new data.
I do not think you need to do the math with the Previous EOF=0 and the File size to get what I think you are trying to do.
Plus use shift reg for the Data string instead of local var
Set the mechinacl action of the stop botton to Latched
So you do not need to init the two controls
Also, I do not get the End of file encountered error (4) from the Read from Binary file if I attempt to read past. It just returns and empty string.
Omar
Attachments:
Readfiles.vi 22 KB -
How to compare two PLSQL tables dynamically.
Hi,
Can you any body help for the following scenario,
I have two PLSQLtables with same structure ,Each PLSQL table contains more than 100 columns.
Now I want to compare content of the two PLSQL tables column wise.
I Knew allready one method like below
FOR I IN 1..100
LOOP
IF PLSQL_1_TAB(I).ACCT_NO = PLSQL_2_TAB(I).ACCT_NO THEN
INSERT INTO …....
END IF;
END LOOP;
is there any method to compare two PLSQL tables dynamically
Edited by: RAVI KUMAR.T.V. on May 5, 2011 11:51 PMHi Saubhik,
Thanks for your reply..
See the below code..
DECLARE
CURSOR cur_emp IS
SELECT *
FROM emp
WHERE job = 'MANAGER';
TYPE typ1 IS TABLE OF emp%ROWTYPE INDEX BY BINARY_INTEGER;
v_pl_old typ1;
v_pl_new typ1;
BEGIN
OPEN cur_emp;
FETCH cur_emp INTO v_pl_old(1);
CLOSE cur_emp;
UPDATE emp SET comm = comm+1000 WHERE hiredate < '01-MAY-1981' AND job = 'MANAGER';
COMMIT;
OPEN cur_emp;
FETCH cur_emp INTO v_pl_new(1);
CLOSE cur_emp;
IF v_pl_old(1) = v_pl_new(1) THEN
DBMS_OUTPUT.PUT_LINE('Latest comm not yet Updated');
ELSE
DBMS_OUTPUT.PUT_LINE('Latest comm Updated');
END IF;
END;
When the above code is executed iam getting the following error :
ORA-06550: line 19, column 19: PLS-00306: wrong number or types of arguments in call to '='
ORA-06550: line 19, column 4: PL/SQL: Statement ignored
Here in the example I have taken the standard EMP table, but
actually, Iam having a bigger table with 90 columns of different datatypes,
in which some of the columns gets updated after some UPDATE statements executed based on some conditions.
Now, my requirement is to compare the values of each and every column in the table before and after the execution of the UPDATE statements,
and to insert the modified values only along with the primary key column value into in a new table of similar structure.
If I write the code (to compare the values of each and every column in the table, and if the value is modified then insert that value along with the primary key value into a different talbe) then as the table is having many columns (90), the code becomes lengthy..
Is there any alternative method which does the same with shorter code.
Can you please give me an idea/sol. to meet my requirement.
Thanks..
Edited by: RAVI KUMAR.T.V. on May 9, 2011 2:43 AM -
How to read two counters and writing AO at the same time with 6024?
I use Labview to read two quadrature encoder outputs and I use the two
counters
of 6024E for this. I can read the encoders continuously. I also want to
send an
analog output with a period of 30 miliseconds
while the reading of encoders is continuouing at the background. How can I
do
this. I searched the NI discussion forums and found that my device have
only 1 DMA channel. Is it possible to overcome the problem using
interrupt??(set device information.vi) Is there any example code about this
problem?
Thanks a lot.."Hi Ress,
I think you might have asked this question twice by mistake. Following is the link to the one that was answered:
http://exchange.ni.com/servlet/Redirect?id=12017430 .
Thanks!
Serges Lemo
Application Engineer
National Instruments -
How to read data from table GLFUNCA quickly?
Hello everybody!
Recently,my colleague has programmed a report about reading data from table GLFUNCA,and its speed is very slowly and exceeded limited time sometimes .
Excuse me?
how to use INDEX and VIEW TO accelerate it?
pls supply my helpful solutions.
Thanks!
Best wishes!Hi,
Please check your SELECT statement to find out what are the columns being used in the WHERE clause. Then go to SE11 and find out if there are indexes on those columns.
If Indexes don't exist then you can create indexes on those columns, which might improve the performance.
However, there might be other areas also, where the performance can be improved. Do a run time analysis / trace and figure which part of the program is taking maximum time.
Regards,
Ravi
Note : Please mark the helpful answers -
How to Read the internal table for the data download from the spool
HI all,
I have one issue regarding the spool ,we are getting the correct output as per requirement of user but when we send the same to the user in pdf format they did notget the same.
they are telling that the due date is missing from the pdf.
Please advice me how to track the internal table for the spool data converted intopdf in a readable format.
the FM used for the above task is :
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
Please reply if any one worked on the same.
Thanks in advance.
Gaurav,Hi Wang,
Please let me know how you solved your question.
Points will be rewarded.
Thanks,
Arun. -
How to read two text files using the Read from spreadsheet.vi and then plot it
I need to read two text files using the read from spreadsheet function and then plot these files over time.
The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
I really appreciate any help..thanks
Attachments:
RMS.txt 1 KB
FREQUENCY.txt 1 KBFrom NI Example Finder:
Write to Text File.vi
Read from Text File.vi
Jean-Marc
LV2009 and LV2013
Free PDF Report with iTextSharp
Maybe you are looking for
-
HT1386 My new iPhone 5S will no longer sync to my iTunes library on my computer.
When I first bought my iPhone 5S a couple monhts ago, my music libraray came over just fine from my old Iphone. And I was able to sync to my computer iTunes libraray for updates (new songs and playlists, etc,) a couple times. But now, sync don't work
-
Older iPod and Viewsonic Monitor with dock
Hello All, I just bought the 22" Viewsonic LCD monitor with iPod dock on it. I have an older 40gig iPod. (almost 4 years old) The doc sync's with my iPod and iTunes just fine, BUT it does not charge. I originally thought that it was an issue with the
-
What is the correct syntax to have the report log into different databases?
Hi, My current Oracle Reports are called against several databases, depending on region. I pass 'userid=reports/new1@tsoc' as one of teh parameters to access the 'tsoc' db. I just as well call 'userid=reports/new1@penang'. This syntax does not appear
-
How do I change opening settings?
Somehow my settings got changed so that now, instead of opening a pdf page from a weblink, I have no choice but to save it as a hard copy on my desktop (or in a folder), THEN open it from my computer. I never had to do this before & I want to change
-
Display Message Beside related UI Field
Hi, I have the situation like, If the user didn't fill the mandatory field then i am showing the error message saying"fill --- Mandatory field" in the message area. But Customer wants to show the message just beside the UI Field or like point to th