Fetch data using structure with full working example
does any body tell me how to fetch data using structure with full working example
the structure name is RSTXT and the field is TXLINE
the data in the form of text is entered from the functional side using t-code ME52N
from there i have to fetch the data
in smartform or in report
using this code to get text from ME52N this is a structure still not getting output
DATA:BEGIN OF TA_ROW occurs 0,
TXZ01(1000) TYPE C,
END OF TA_ROW.
DATA:BEGIN OF IT_ROW OCCURS 0,
TXZ01(1000) TYPE C,
END OF IT_ROW.
DATA: thread LIKE thead.
DATA: headerid TYPE char24.
DATA: it_text LIKE tline OCCURS 0 WITH HEADER LINE.
data:wa_banfn like eban-banfn.
thread-tdid = 'B01'.
thread-tdname = headerid.
thread-tdobject = 'EBAN'.
select txz01 from eban into corresponding fields of table ta_row
where banfn = wa_banfn.
headerid = ' '.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = thread-tdid
language = sy-langu
name = thread-tdname
object = thread-tdobject
ARCHIVE_HANDLE
= 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
lines = it_text
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT it_text.
CLEAR ta_row.
BREAK-POINT.
FROM THIS POINT TEXT IS COMING
ta_row-txz01 = it_text-tdline.
APPEND ta_row TO it_row.
ENDLOOP.
Similar Messages
-
I've been given the unenviable task of troubleshooting and installing/distributing software written by a former co-worker. I've modified the LabVIEW code and built an .exe file. I've successfully installed the Labview .exe file on several computers, but it won't work on some others. What's more baffling is that I installed it successfully on one computer, uninstalled it, and tried reinstalling it with no success. In fact, it's a new error (Dr. Watson for Windows NT application error). It doesn't help that I have different versions of LabVIEW and Matlab on the target computers. Some have LabVIEW 5.1, some
have 5.0, and some don't have it at all. Some have Matlab 5.2, some have 5.3 (R11) and some have 6.0 (R12). It's also not clear to me where the Matlab m files should be located. I'm not sure if it's a LabVIEW Runtime Engine problem, or if it's a Matlab problem. I've also wondered how LabVIEW and Matlab talk to each other. When LabVIEW calls Matlab, it seems that Matlab is running in the background. In other words, clicking on the Matlab Command Window and typing "whos" or any other command/variable doesn't work.Jay del Rosario wrote:
>
> How do I troubleshoot installation/distribution of a LabVIEW .exe
> which processes data using Matlab when it works on some computers but
> not others?
Poke around zone.ni.com and
http://digital.natinst.com/public.nsf/$$Search/ .
Good luck, Mark -
How to fetch data from Mysql with SSL.
I am using jdk1.5 and mysql 5.0.
How to fetch data from Mysql with SSL
I am using url = jdbc:mysql://localhost/database?useSSL=true&requireSSL=true.
It shows error. how to fetchI have created certificate in mysql and checked in mysql.
mysql>\s
SSL: Cipher in use is DHE-RSA-AES256-SHA
but through ssl how to fetch data in java. -
I HAVE A STRUCTURE T023D AND FIELD IS WWGHA ,I WANT TO FETCH DATA CORRESPONDING TO THIS FIELD HOW I CAN DO IT PLEASE TELL ME.
SUGGEST IF I CAN USE FIELD-SYMBOL.
THANKS IN ADVANCE.Hi James,
Like you already know by now that your structure T023D does not hold any data.
If I undrestand correctly, you have identified this structure from a screen and now want to extract the data stored behind it.
You can do so using tables T023 and T023S. In case you need any field that you are not able to locate in these two tables, please do let me know.
You can write the query as
DATA: WA_WWGPA LIKE T023S-WWGPA.
SELECT SINGLE
B~WWGPA
INTO (WA_WWGPA)
FROM
T023 AS A INNER JOIN
T023S AS B ON A~MATKL = B~MATKL.
This is just an example, you may not use SINGLE or variable WA_WWGPA. Simply declare an internal table with the required fields and populate it in the same manner.
Data for WWGHA is defined in table T023S but don't let the field name confuse you. The field name in T023S is given as WWGPA. Take note of the Data Element from which it is being derived and the text of the field.
Hope this help,
Regards,
Madhur
NB: Please do award points if found helpful.
Message was edited by: Madhur Chopra -
How to fetch data where reference with two values
Hello Gurus,
How to fetch data from database table with two values for reference. like
SELECT < FIELDS>
FROM <DB>
INTO TABLE TAB2
FOR ALL ENTRIES IN
TAB1
WHERE
FIELD1 = TAB1-FIELD1 AND
FIELD1 = TAB1-FIELD2.Hi,
If you want to get data for both fields then Instead of AND use OR
SELECT < FIELDS>
FROM <DB>
INTO TABLE TAB2
FOR ALL ENTRIES IN
TAB1
WHERE
FIELD1 = TAB1-FIELD1 OR
FIELD1 = TAB1-FIELD2.
Or if you want that only common data for both fields should be fetched then create new internal table. Append data of both fields into that table. Sort new table and do delete adjust duplicate. Now use new internal table in your select query.
Let me know if this helps.
Regards,
Jigar Thakkar. -
How to fetch data using Substring & Instring
Hi ,
I have data like
a_76488b_2780c
a_76488b_2780c_
a_76488b_c2780
a_76488b_c2780
a_31487b_5542
a_76488b_2780
i want to fetch data like last 4 numeric digit only
2780
2780
2780
2780
5542
2780I don't know what you have against rexexp_replace, but this works if you want all the digits after the second underscore:
WITH t AS
(SELECT 'a_76488b_2780c' str FROM DUAL
UNION ALL
SELECT 'a_76488b_2780c_' FROM DUAL
UNION ALL
SELECT 'a_76488b_c2780' FROM DUAL
UNION ALL
SELECT 'a_76488b_c2780' FROM DUAL
UNION ALL
SELECT 'a_31487b_5542' FROM DUAL
UNION ALL
SELECT 'a_76488b_2780' FROM DUAL
SELECT replace(after_second_und
,replace(translate(after_second_und
,'0123456789'
,NULL
,NULL
) your_number
FROM (SELECT SUBSTR(str,instr(str,'_',1,2)+1) after_second_und
FROM t
YOUR_NUMBER
2780
2780
2780
2780
5542
2780 -
Data Federator not fetching data USING Netweaver BI Connector
Hi Gurus,
We have upgraded the BW system to use the Data federator.
callback ID that SAP NetWeaver BI uses to contact Data Federator has been configured as mentioned in guide.
we have already configured the CONNECTOR and we are able to test the connection in DF Designer and the connection is successful. i am able to see the list of fact tables and i am saving the data source and making it final and deployying my project .
i am using the jdbc connection and data federator strategy and the strategy is also creating the joins and classed automatically. when i export my universe and try to create the webintelligence report i am unable to see the data .even when i execute with one object and one keyfigure it is same .
even when i test my data source in designer to view the data using query tester tool it is also not able show the data it takes huge time and no data getting retrieved .
i would appreciate if you could help me with this issue
Regards and thanks
AbidHi,
Which version of Data Federator are you using ? Direct access to ECC table is not yet supported using Data Federator.
Jean-Pierre -
How to read azure storage data using JAVA with REST API
Hi,
We have a cloud service in our lab. We have enabled diagnostics
in cloud services. So WADPerformanceCounterTable was created in storage account. Now , We want to read the WADPerformanceTable using
JAVA with REST API. Is there any way to collect these details. please give me any
sample code to connect azure storage using table service REST API.
Thanks & Regards
RathideviHi,
Please have a look at this article:
https://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/, it demonstrate how to use table service Rest API, it also give us the code, hope this helps. Of course, the
MSDN article could also help us coding.
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Moving Large amount of data using IMPDP with network link
Hi Guru,
Here we are having a requirement to move 2TB of data from production to non-prod using Network_link parameter. What is the process to make it fast.
Previously we did it but it took 7 days for importing data and index .
Here i am having an idea can you please guide me is it good to make import faster .
Step 1) import only metadata .
Step 2) import only table data using table_exists_action=append or truncate.( Here indexes are allready created in step 1 and import will be fast as per my plan.)
Please help me the better way if we can.
Thanks & Regards,
Venkata Poorna Prasad.SYou might want to check these as well:
DataPump Import (IMPDP) Over NETWORK_LINK Is Sometimes Very Slow (Doc ID 1439691.1)
DataPump Import Via NETWORK_LINK Is Slow With CURSOR_SHARING=FORCE (Doc ID 421441.1)
Performance Problems When Transferring LOBs Using IMPDP With NETWORK_LINK (Doc ID 1488229.1) -
Change Customer master Address Data using Structure biadd2 in report rfbide00.?
hello
i want to change Customer Master Address Data using using RBIDE00 report program but when i execute the report it will accept input from batch file
but the same is not getting updated in customer master .
please help me to resolve this issue .
thanks & regard
laxmikant soniFound the answer from SDN - not possible unless using some BUS.
RFBIDE00 - Address data issue
Thread closed. -
How to transfer data using Lsmw with Recording...
hi,
Please let me know .How to use Lsmw to transfer data using recording.
Thanks,
Lawrence.Hi Lawrence,
please go thru this link for LSMW data transfer techniques in PM, MM and SD modules.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90d90895-68dd-2a10-f096-bf8cf2e2f65b
If u want to know in detail go thru this link
http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/frameset.htm
Hope this will be useful to u..
Thanks
Vijayasree -
Unable to fetch data using control-blocks
Hi,
I have created two non base table text items(from_date, to_date) and if values are not entered from front end i.e. null then hadrcoded in pre_query trigger to default values as from_date (system date-present month-last year) and to_date(system date-present month-present year).when i have pressed the fetch button without giving values to from_date and to_date,it is retrieving data in default period,which i ahave hardcoded in PRE_QUERY trigger.But even i enter values dynamically from front end and when ever i press fetch button ,it is retrieving data in default period instead giving data in specified duration what i have entered dynamically from front end. i.e. it is not accepting values what i have entered.
any one please help me.
oracle forms 10g version:10.1.2.0.2
Thanks and Regards
Ramhi,
Thanks for ur feedback.
here query is executed. My problem is,unable to fetch data in specified period,what i have entered dynamically.Even i entered dynamically,it is fetching data in default period(Which i have hardcoded in PRE_QUERY).
below code is ,what i have hardcoded in PRE_QUERY
:GLOBAL.DFROMDT := NULL;
:GLOBAL.DTODT := NULL;
IF :HEADER_BLOCK.NBTFROMDT is NULL THEN
SELECT TO_DATE('10'||'/'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MM')||'/'||
TO_CHAR(ADD_MONTHS(SYSDATE,-12),'YYYY'),'DD/MM/YYYY')
INTO :HEADER_BLOCK.NBTFROMDT FROM SYS.DUAL ;
END IF;
IF :HEADER_BLOCK.NBTTODT IS NULL THEN
SELECT SYSDATE INTO :HEADER_BLOCK.NBTTODT
FROM SYS.DUAL;
END IF;
IF :HEADER_BLOCK.NBTFROMDT IS NOT NULL
OR :HEADER_BLOCK.NBTTODT IS NOT NULL THEN
:GLOBAL.DFROMDT := :HEADER_BLOCK.NBTFROMDT;
:GLOBAL.DTODT := :HEADER_BLOCK.NBTTODT;
END IF;
IF :DETAIL_BLOCK.nbtFjdDrCrInd IS NOT NULL THEN
svWhere_String := 'WHERE FJH_VCHR_DT BETWEEN '''||nvl(:GLOBAL.DFROMDT,TO_DATE(:GLOBAL.DFROMDT,'DD/MM/YYYY'))||''' AND '||
''''||NVL(:GLOBAL.DTODT,TO_DATE(SYSDATE,'DD/MM/YYYY'))||''')';
Set_Block_Property('DETAIL_BLOCK',DEFAULT_WHERE,svWhere_String);
ELSE
Set_Block_Property('DETAIL_BLOCK',DEFAULT_WHERE,' ');
END IF; -
Issue with select query to fetch data using Join from two tabels
Hello All-
I want to fetch the ShowName as "SUN NIGHTLY NEWS" and EpisodeName as "091706"
based on the condition a.TitleNo=b.TitleNo and a.seriesNo=b.TitleNo.
If i use the only first condition-a.TitleNo=b.TitleNo than output is displayed as-
SchedItemNo | Showname| EpisodeName
2702154 | 091706 | 091706
If i use the second Condition-a.seriesNo=b.TitleNo than Output is displayed as-
SchedItemNo| Showname | EpisodeName
2702154 | SUN NIGHTLY NEWS | SUN NIGHTLY NEWS
Than i tried following Query to use the Union based on two conditions:-
Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
from ScheduleItem a,Titles b where a.TitleNo=b.TitleNo and
a.ScheditemNo in ('2702154')
Union All
Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
from ScheduleItem a,Titles b where b.TitleNo=a.SeriesNo and
a.ScheditemNo in ('2702154')
than it display the following result-
SchedItemNo| Showname | EpisodeName
2702154 | 091706 | 091706
2702154 | SUN NIGHTLY NEWS | SUN NIGHTLY NEWS
Here also values are not what i want :(
I want the result to be displayed as using SQL:-
SchedItemNo | Showname | EpisodeName
2702154 | SUN NIGHTLY NEWS | 091706
Please help me out!
Thanks in Advance for putting your efforts.Looking forward for your replies.SQL> create table scheduleitem
2 as
3 select 2702154 scheditemno, 1 titleno, 11 seriesno from dual
4 /
Tabel is aangemaakt.
SQL> create table titles
2 as
3 select 1 titleno, '071706' titlename from dual union all
4 select 11, 'SUN NIGHTLY NEWS' from dual
5 /
Tabel is aangemaakt.
SQL> Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
2 from ScheduleItem a,Titles b where a.TitleNo=b.TitleNo and
3 a.ScheditemNo in ('2702154')
4 /
SCHEDITEMNO TITLENAME EPISODENAME
2702154 071706 071706
1 rij is geselecteerd.
SQL> Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
2 from ScheduleItem a,Titles b where b.TitleNo=a.SeriesNo and
3 a.ScheditemNo in ('2702154')
4 /
SCHEDITEMNO TITLENAME EPISODENAME
2702154 SUN NIGHTLY NEWS SUN NIGHTLY NEWS
1 rij is geselecteerd.
SQL> Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
2 from ScheduleItem a,Titles b where a.TitleNo=b.TitleNo and
3 a.ScheditemNo in ('2702154')
4 Union All
5 Select distinct a.SchedItemNo,b.TitleName,b.TitleName as EpisodeName
6 from ScheduleItem a,Titles b where b.TitleNo=a.SeriesNo and
7 a.ScheditemNo in ('2702154')
8 /
SCHEDITEMNO TITLENAME EPISODENAME
2702154 071706 071706
2702154 SUN NIGHTLY NEWS SUN NIGHTLY NEWS
2 rijen zijn geselecteerd.
SQL> select a.SchedItemNo "SchedItemNo"
2 , show.TitleName "Showname"
3 , episode.TitleName "EpisodeName"
4 from ScheduleItem a
5 , Titles episode
6 , Titles show
7 where a.TitleNo = episode.TitleNo
8 and a.SeriesNo = show.TitleNo
9 /
SchedItemNo Showname EpisodeName
2702154 SUN NIGHTLY NEWS 071706
1 rij is geselecteerd.Regards,
Rob. -
To fetch data using group by function
Hi Guys,
I am having a table where it holds data with value with zero in one of the column and i need to fetch the records from the table using group by function but to display all the records if zero occurs in my table
for eg
table1
id,customer_name,country
0 sam aus
1 peter ind
1 peter ind
0 samy us
0 rayan nz
if i use select count(*),id from table1 group by id
i will get
count(*),id
3-0
1-2
but wat i need is like below
0 sam aus
0 samy us
0 rayan nz
2 peter ind
whenever zero is occurring i need to display all the records but group by should work for non zero recordsThe simplest way would be to have two queries and UNION them together. For example:
WITH test_data AS
( SELECT 0 AS id, 'sam' AS customer_name, 'aus' AS country FROM DUAL UNION ALL
SELECT 1 AS id, 'peter' AS customer_name, 'ind' AS country FROM DUAL UNION ALL
SELECT 1 AS id, 'peter' AS customer_name, 'ind' AS country FROM DUAL UNION ALL
SELECT 0 AS id, 'samy' AS customer_name, 'us' AS country FROM DUAL UNION ALL
SELECT 0 AS id, 'rayan' AS customer_name, 'nz' AS country FROM DUAL
SELECT cnt
, customer_name
, country
FROM ( SELECT id
, customer_name
, country
, COUNT(*) OVER (PARTITION BY id) AS cnt
, ROW_NUMBER() OVER (PARTITION BY id ORDER BY id) rn
FROM test_data
WHERE id != 0
WHERE rn = 1
UNION
SELECT id
, customer_name
, country
FROM test_data
WHERE id = 0
This gives the following results:
CNT CUSTO COU
0 rayan nz
0 sam aus
0 samy us
2 peter ind -
Problem in Fetching data using RFC FM from NON SAP system
Hi All,
Need help from experts on data transfer using RFC from a non SAP system/database. I have creasted the destination in sm59.
I have created a function module too which has an import parameter as a query and export parameter as an internal table.
No when i test run this function module it returns some entries. But when I call this FM in a program it throws a dump 'rfc_external_abort' . Here is what the call to FM looks like in my program. Please guide me on this.
Thanks in advance,
Saket.
DATA : lv_query TYPE string,
it_gddbdata TYPE ZC9_TAB_SOLMAN_XI_RFC.
lv_query = 'SELECT * FROM GDDB.VW_GDDB_PERSONS WHERE LASTNAME = ''''A'''''.
CALL FUNCTION 'Z_C9_SOLMAN_XI_GDDBCON'
DESTINATION 'D39'
EXPORTING
in_sql_query = lv_query
IMPORTING
ET_GDDB_DATA = it_gddbdataHi,
your question..
DATA : lv_query TYPE string,
it_gddbdata TYPE ZC9_TAB_SOLMAN_XI_RFC.
lv_query = 'SELECT * FROM GDDB.VW_GDDB_PERSONS WHERE LASTNAME = ''''A'''''.
CALL FUNCTION 'Z_C9_SOLMAN_XI_GDDBCON'
DESTINATION 'D39'
EXPORTING
in_sql_query = lv_query
IMPORTING
ET_GDDB_DATA = it_gddbdata
you are telling that you are fetching the data from non sap system using RFC function module.. how it is possible..you canot fetch the data from non SAP system using RFC FM alone.. you have to use the concept BAPI.. it will work..
I hope this will help you..
Regards,
Kiran
Maybe you are looking for
-
I would like to know if my phone has been hacked in any sort of way.
I found two contacts of people in my contact book who I never added into it. I then got a new phone, but a few days later the same two contacts reappeared. Both of the times that I have found them on my phone the numbers have included contact photos.
-
Referenced memory could not be read - error
Hey, In an application on stop command, I exit from labivew on exit I get an error the referenced memory could not be read click ok to terminate program can any one suggest why this error is seen how this can be resolved? enclosed a screen shot of er
-
24" iMac Speaker Pop listening to iTunes
I have noticed this about 5-6 times since owning my iMac (3 months), and it just happened again. While listening to music with iTunes 7 (with my regular internal speakers) i will all of a sudden hear a loud pop sound (much louder than my music) and s
-
Cannot generate WSDL file with wscompile
I get an error while generating the WSDL file using wscompile tool. my compile line is "wscompile -gen:server CRAWS.xml -keep" and I get a RmiModeler error with an ClassNotFoundException . I have put my jar file in the bin folder (same folder of wsco
-
Hi Messages are being sent within a network (internal), colleagues are forwarding messages to each other. When the receiving colleague wants to answer to the original mail (via Mailto:[email protected]) it fails. The bounceback is always the same: Yo