Reading Binary Header text
Hello, I am new to reading binary files and have had a lot of help creating this simple read binary vi. There is header information (# of channels, sampling rate etc) on the sample files\ which no matter what I do, I cannot read it. I would really appreciate any help with this!!
Cheers,
Mark
Attachments:
Read Binary EMG.zip 151 KB
This thread has helped me out tremendously as I am encountering a similar issue. I am trying to read a binary file that contains very similar data (an EDF file if anyone is familiar) as Gorelick has described, but my files are very large (>150 MB). How can I modify this vi so that I only read so many data points from my binary file (after pulling the header) then when I perform some action such as a button click I will load up the next set of values. Originally I was using a MATLAB toolkit to read my file, but it would read the entire file at once an absolutely kill the machine in terms of memory usage, so I need to move away from this. I really appreciate any help here, this is for a design project, so that I can graduate and I've had to pretty much teach myself LabVIEW from scratch. If anyone is curious I am using LabVIEW 7.1.
Similar Messages
-
How to read header texts in the on save user exit of VA01
Hi Experts,
I have a requirement to read the header texts in the on save user exit.
I have to check whether departmental code in header text is not initial or not.
Can any one please pour in some points of how it can be done......
Thanks in Advance.
PremHi
U can use fm READ_TEXT:
DATA: THEAD LIKE THEAD,
TLINES LIKE STANDARD TABLE OF TLINE WITH HEADER LINE.
THEAD-TDID = <text id>.
THEAD-TDSPRAD = <language>.
THEAD-TDOBJECT = 'VBBK'.
THEAD-TDNAME = VBAK-VBELN.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = THEAD-TDID
LANGUAGE = THEAD-TDSPRAD
NAME = THEAD-TDNAME
OBJECT = THEAD-TDOBJECT
TABLES
LINES = TLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
U can use it in all situations ( inserting and updating) because that fm returns the buffered text.
Max -
Read header text before saving delivery during creation
Dear All,
Could you please suggest, how to read the header text before saving the delivery during creation.
Regards,I dont think you can do it before saving the delivery but you can after saving the delivery.
Check out the program MV50AFZ1 - There are two user exits "userexit_save_document" and "userexit_save_document_prepare" .
To read the text (as far as i know), you will need the document number (user READ_TEXT function module).
Document number is not available in user exit "userexit_save_document_prepare" but it is available in "userexit_save_document" .
I dont know what is your requirement but you can choose from the above options. You can read the text from save_document user exit but the delivery was already saved.
good luck -
Help required. How to print Header Text in customized PO ?
Hi experts,
Please help me go forward with this.
I'm using a ZMEDRUCK & standard printing program.
I have put my code here. Pls go through it and help me what has to be corrected here.
PROGRAM ZMEDRUCK_SUBP2.
FORM fetch_table_data TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
TABLES EKKO.
DATA: BEGIN OF header OCCURS 0,
ld_txt1(163),
ld_txt2(163),
ld_txt3(163),
END OF header.
DATA: li_lines LIKE STANDARD TABLE OF tline WITH HEADER LINE,
ID like THEAD-TDID,
TNAME LIKE THEAD-TDNAME,
TDOBJECT like THEAD-TDOBJECT.
DATA HTEXT LIKE EKKO-EBELN.
DATA f_lines TYPE P.
* HTEXT = EKKO-EBELN.
READ TABLE in_tab WITH KEY EKKO-EBELN.
if sy-subrc = 0.
TNAME = in_tab-value.
ENDIF.
*TNAME = EKKO-EBELN.
*CONCATENATE EKPO-ebeln EKPO-ebelp INTO v_item_text.
*MOVE v_head_text to HNAME.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = TNAME
IMPORTING
OUTPUT = TNAME
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = 'F01'
language = 'E'
name = TNAME
object = 'EKKO'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER = TNAME
tables
lines = li_lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE li_lines INDEX 1.
IF sy-subrc = 0.
header-ld_txt1 = li_lines-tdline.
ENDIF.
DESCRIBE TABLE li_lines LINES f_lines.
data: lstr type String,
lstr1 type string,
lstr2 type string,
lstr3 type string,
lstr4 type string.
read table li_lines index 1.
lstr = li_lines.
condense lstr.
clear li_lines.
read table li_lines index 2.
lstr1 = li_lines.
condense lstr.
clear li_lines.
read table li_lines index 3.
lstr2 = li_lines.
condense lstr.
clear li_lines.
if f_lines GT 3.
read table li_lines index 4.
lstr3 = li_lines.
condense lstr.
clear li_lines.
read table li_lines index 5.
lstr4 = li_lines.
condense lstr.
clear li_lines.
endif.
DATA: v_text type text.
CONCATENATE lstr1 lstr2 lstr3 lstr4 into v_text separated by ' '.
CLEAR out_tab.
READ TABLE out_tab WITH KEY name = 'TNAME'.
out_tab-value = v_text.
MODIFY out_tab INDEX sy-tabix.
ENDFORM.
And my script is :
/:PERFORM FETCH_TABLE_DATA IN PROGRAM ZMEDRUCK_SUBP2
/:USING &EKKO-EBELN&
/:CHANGING &TNAME&
/: ENDPERFORM
IL RECEIVED FROM M/S &TNAME&Hi,
Use this Function module 'READ_TEXT'
T_lines contains the header text, you can loop it and display it in sap script
Function module to read the header text
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'F01'
language = sy-langu
name = ekko-ebeln
object = ekko
TABLES
lines = t_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
Regards
Krishna -
How to Print Header text in PO SAPScript
Hi Gurus,
I am working on PO Script (MEDRUCK). I copied the Standard to a Z form. ZMM_MEDRUCK, Now I need to print the the Header text at the end of MAIN window. I created a a perform and call it from the Script and read the heder text by using FM Read_text
DEFINE &TEXT1& = ' '
PERFORM GET_TERMS IN PROGRAM ZMM_MEDRUCK_ROUTINE
USING &EKKO-EBELN&
CHANGING &TEXT1&
ENDPERFORM
PROTECT
&TEXT1&
ENDPROTECT
but while returning I am getting only one line. Can any body suggest me how I can read the Header text in PO script. Please provide the sample Code.
Regards
SonyHi,
Use this Function module 'READ_TEXT'
T_lines contains the header text, you can loop it and display it in sap script
Function module to read the header text
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'F01'
language = sy-langu
name = ekko-ebeln
object = ekko
TABLES
lines = t_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
Regards
Krishna -
Report with Delivery number and header text as output
Hello all,
I need to create a "quick and dirty" report that which will give me every delivery number, and the corresponding header text, in the month of July for given shipping points. I am having trouble figuring out how to get the header text for the deliveries. I have searched and searched but the solutions given just don't make sense to me.
Regards,
DavisHi,
You need to use the function module READ_TEXT to read delivery header text.
Please go to transaction SE75 and use VBBK as the OBJECT to find the specific ID which is required.
Regards,
Ferry Lianto -
Pulling the Header text for all the purchase orders
Hello,
Please help in resolving the below:
Is there any code in SAp to pull theHeader text for all the purchase orders in the data base,
Any tcode to pull the specific text automatically to pull the text from the requsition ( Plant wise in sourcing).
ThanksSTXH Text header
STXL Text detail
Chk the below message thread
Table to read PO Header text and item text
BR,
Krishna -
WHERE CAN I SEE THE PARAMETERS VALUES IN "READ_TEXT " FM
OBJECT
ID
NAME
LANGU
SUPPOSE I WANT TO READ THE HEADER TEXT FOR SALES ORDER. IAM USING 4.7 IDES.hi ,
its easy to find where the the parameters are stored.
Just right click on the parameter and click on Technical information to see the table name..
this is applicable for all.
Siva -
Hi Experts,
I need to read Purhcase order texts like Header note and Header text what is the Value i must specify For TDID in Read_Text function module to read the Header text and header note. In table TTXID there are many values for header text and header note.Hi
DOuble click on the Text in the PO
it will navigate to text editor
from menu GOTO-> HEADER
there you will see the ID,NAME,OBJECT and LANG paramters
The ID will change for different texts
For Header texts the same ID will be there(one Table like EKKO) and the OBJECTNAME will be the PO number
for all Item texts one OBJECT (like EKPO) will be there
and the OBJECT NAME will be the concatenation of PO + ITEM no.
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters * or ,.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
<b>Reward points for useful Answers</b>
Regards
Anji -
How to read file header/open filein binary mode
i am using FileConnenction API to read from a file. how can i open a file in binary mode so that i can read file header. In other words i want to open a file in binary mode.
You can always try looking at the [Header Signatures|http://www.techpathways.com/uploads/headersig.txt]. But it would probably be easier to adjust your application so it doesn't have to guess.
~ -
Javascrip to read Header text in pdf
Hi all
I'm new to use javascritp in PDf , i used javascript in Photoshop and illustrator i'm new to PDF
i need a script to read header text in all pages of pdf where font, fontsize must be same
Please anyone help me to develop scriptJS has no access to the type face information of text in a file. Best you
can do is get the font size by analysing the coordinates (quads) that
define each word on the page. -
Read Header Text From VF03 Transaction
Hi Frds,
I want to Read Header Text From VF03 Transaction
Read Transport Number and Transport Date From Vf03 Transaction.
Guide Me Briefly
How to pass the varaibles to the function Module
Regards,
Kabilhi Kabil ,
Your issue completely accepted just keep in mind
1) if you have to read both text you have to use read_text 2 times
2) in that for first read_text
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0002'
LANGUAGE = SY-LANGU
NAME = ' ' "" YOUR VARIABLE THAT CONTAINS Invoices number
OBJECT = 'VBRK'
TABLES
LINES = TLINE
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
is ok for Header note 1 .(means first text ) but for second text your ID is change other thing is same .
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0013'
LANGUAGE = SY-LANGU
NAME = ' ' "" YOUR VARIABLE THAT CONTAINS Invoices number
OBJECT = 'VBRK'
TABLES
LINES = TLINE
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this will help you
Thanking You,
shrikant padwale. -
PLEASE HELP!! Need some way to read header text in advanced datagrid using QTP
I am writing a function to read column names in advanced data
grid. There is no operation for that and any of the properties that
I can use to read the column names.
Please suggest any way that I can get the names of columns in
the advanced data grid.
ThanksI hope to hear something from adobe folks...I am providing
more info.....
I am using QTP 9.2 and Flex 3 add-in available from Adobe.
My application has flex Advanced datagrid object and I am
trying to read column names for the datagrid.
I have contacted developers and they told me that column
names for flex advanced datagrid are stored in "Header Text"
I have tried reading "Header Text" using
GetROProperty("HeaderText") but it doesn't return anything.
I have tried the following code:
x =
Browser("app").FlexApplication("flexapp").FlexCanvas("Canvas").FlexAdvancedDatagrid("esti mategridid").GetROProperty("Header
Text")
msgbox x
I have also tried getting value for column names using other
available properties for webtables like outerhtml, outertext, alt
etc. but I don't get any data.
Part of the problem may be because none of the above
mentioned properties are supported by Flex Advanced datagrid.
I have also tried getting child objects but I always get the
data in datagrid as values but not the column names.
My primary reason for getting column names is to write a
function to update cell in datagrid independent of application. So,
I want to pass column name as a parameter to the function and get
the corresponding columnIndex in the function by comparing the
parameter value against column names.
Thanks to all for you help... -
Dear All,
I have got a requirement where I need to change the sales order header text lines. My approach is to read the using READ_TEXT FM ,change the content and using SAVE_TEXT I am saving the text.But it is not updating in the document.Can anyone suggest the exact approach to change the texts.
Thanks in advance,
Nagesh Aswartha VarmaThis is working.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = header
set the save mod : directly
savemode_direct = 'X'
TABLES
lines = lines -
How can i read header text?
how can i read header text?
ie, i want to read two values that are stored as header text in purchase order.
how can i retrieve that values?Hi,
The long texts of a document are stored in a encrypted format in the STXH and STXL tables, where STXH stores the header information of the
long text like TDOBJECT, which indicates which text object the long text belongs to, TDID which indicates the Text ID and TDNAME which is
the actual name of the long text.
As these texts are stored in a encrypted format, the text cannot be read using a SELECT statement. You will have to use the function READ_TEXT. The easiest way of getting to know the parameter values is to go to a document, open the long text in a full screen mode. For example, when you wan to see the long text for a Purchase order, go to transaction ME23n. Assume, you want to see the parameters for the Header Text. In the first Tab Strip Control, click on the Texts tab and select the Header Text node on the left hand side, which will display the text on the right hand side. Now, double click on the text editor on the right hand side. This will open the text in the full screen mode. In the menu Go To --> Header, you should be able to see the values for all the three parameters we discussed above. We will have to do the same thing for whichever text parameters we want to see.
TREC-TDSPRAS = SY-LANGU.
TREC-TDID = 'ECCS'.
TREC-TDOBJECT = 'ZECCS'.
TREC-TDNAME = Z_ACCOUNT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = TREC-TDID
LANGUAGE = TREC-TDSPRAS
NAME = TREC-TDNAME
OBJECT = TREC-TDOBJECT
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
Details:
Language DE
Text ID F01 Header text
Text Object EKKO Purchasing doc. header texts
Regards,
Shiva Kumar
Maybe you are looking for
-
"BP Category 1 does not fit the data in category 2" "Replies Appreciated"
Hi Gurus, When i am trying to create an "Individual Account" in UI, I am getting the error "BP Category 1 does not fit the data in category 2". If i try to create a "group" then it says "BP Category 3 does not fit the data in category 2". It allows m
-
Can not update to ipod 2.1 software
I am trying to update my itouch to the ipod 2.1 software, but when it tries to backup my itouch, it takes about 30 minutes and then comes back and says "an error has occurred while attempting to backup the ipod, error code is -6971. It then asks if I
-
ISE 1.2 Self Registration
Hi I have set up self registration on an ISE 1.2 and am using a customised portal. Everything works OK except for one annoying element. Although I have assigned a time profile of 30 days as a test - the self registered accounts always expire after 5
-
No airportconnection after sleep
Any one more that have this problem? started after i install´d Leopard that is the worse´d Os since 7.5 And Safari is not compatible with mac os no longer just keeps shut down in time and un time. Maby Apple shuld have waited a year and finished Leop
-
Required SAP SD process Flow PPT's
hi Sd Guru's i required SAP SD process Flow PPT's for KT session purpose so if anyone got this please send me to [email protected] thanks ®ards tharakjram