How to calcaulate the text field data

hi frnds need help,
how to find difference bet time if i taking  the data  from texts fields data i.e long text
i called the FM & passed the parameters
of text data but iam gettin answer as zero
i hope ur gettin my point

Hi
You have to use READ_TEXT fun Module to fetch the Long text data by passing the correct paramters like OBJECT,ID,OBJECTNAME and LANGuage fields
see the doc
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

Similar Messages

  • How to populate the TEXT field in MIGO

    Hi folks,
    While creating material document in MIGO or MB01, i am inserting some data in TEXT ( Field in line item level ). This text data is disappearing , once mat doc is created.
    how to populate the TEXT field in MIGO?Is there any cusomisation?it's urgent .
    Regards
    pabi

    Hello Pabitra,
    I had a similar issue in my Project.
    Please verify if the SMOD enhancement MBCF0002 (EXIT_SAPMM07M_001) is active in your system.
    If this is the case, verify from two angles:
    a) Whether the Enhancement was accidentally activated - If yes, then De-activate the same
    b) If there is some logic coded in the User Exit, but, the Text is somehow not determined...even the existing content in the text field (input to EXIT_SAPMM07M_001) will get vanished.
    Hope that your problem will be resolved by this.  Pls reward points.
    With Regards
    Vijay Gajavalli

  • How to export the text edit data to excel file without splitting the data in excel file?

    how to export the text edit data to excel file without splitting the data in excel file?
    I have a requirement in SAP HR where in the appraiser can add comments in the area given and can export that to excel file. Currently the file is getting exported but the comments getting split into deifferent rows.
    I want the entire comment to be fit in one row.
    Please help.
    Thank you

    Hi,
    if your text edit value is stored in 'lv_string' variable.
    then before exporting the value to excel you have to remove CL_ABAP_CHAR_UTILITIES=>NEWLINE
    that is '#' from the variable lv_string.
    for that use code some thing like this.
    REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE in lv_string WITH space.
    I think this will do the trick.

  • How to find the structure fields data in database tables?

    how to find the structure fields data in database tables?

    Your question doesn't appear to be Web Dynpro ABAP related. Please only post questions in this forum if they are directly Web Dynpro ABAP related.  There are several other more general ABAP related forums.

  • How to keep the Text Fields in Nested Subforms together?

    Please find the structure of nested subforms as below:
    --Subform 1
        --Subform 2 {Subform 2 is repeatable}
          Text Field 1
            --Subform 3 {Subform 3 is repeatable}
              Text Field 2
            --Subform 4 {Subform 4 is repeatable}
                  Text Field 3(Header)
                --Subform 5 {Subform 5 is repeatable}
                  Text Field 4(Data) 
    I want to keep the Text Field 2, Text Field 3 and Text Field 4 together.
    I am able to keep the Text Field 3 and Text Field 4 together by checking Keep with next and checking Allow Page Break. But checking Keep with next and checking Allow Page Break for Text Field 2 doesn't help in keeping all the three Text Fields together.
    Can anyone please tell me how do I keep all the three Text Fields (2, 3 & 4) together?
    Please mail me at [email protected] for any solutions. Thanks.

    It would be easier to answer by looking at the form settings.
    You can send the form to [email protected] so I can have a look at it.
    Thanks
    Srini

  • How to enlarge the Text field?

    Hi Gurus,
    Can it possible to enlarge the text field in f-43 screen.Presently the text field is limited with 50 characters,i want it be 75 or 80 characters to display the whole text in print outs of the invoice.If i ask the access key to my basis consultant and change the field to 75 characters(now it is 50) then ll it put impact in any other pragrammes or screens??
    Please suggest.
    Regards,
    Sumeya Offrin

    Hi Sumeya,
    We are not sure, where else the domain(text50) and data element(SGTXT) is being used in SAP. There could be so many objects using this domain. All the objects would be effected, if you change this.
    The side effects of this could be like, when you upgrade your service pack levels or patches, system may throw short dumps or syntax errors. Please take the advise of an ABAPER, before changing the field length.
    Pls go through the below links, which could help you.
    CHANGING STANDARD DOMAIN FIXED VALUES
    Change the SAP field Length
    Re: changing filed length
    Regards,
    Praisty

  • How to resize the text field through the expression?

    It is necessary that another layer was at 150 pixels to the right of the right side of the text field.

    PACK
    Syntax
    PACK source TO destination.
    Effect:
    This statement, which is forbidden in classes, converts the content of the data object source to the data type p of length 16 without decimal places. In contrast to the conversion rules for elementary data types, a decimal separator in source is ignored. This assigns the converted content to the data object destination.
    The data type of source must be character-type, flat, and its content must be interpretable as a numeric value. The data type of destination must be flat. If destination has the data type p, the interim result is assigned to it from left to right. Surplus characters are cut off on the left, and the decimal places are determined by the data type of destination. If destination does not have the data type p, the interim result is converted to the data type of destination according to the rules in the conversion table for source field type p.
    Notes:
    The function of the statement PACK is based on the second half-byte of the code corresponding to a character in most character representations of the BCD representation for the corresponding numeric value. This compilation is generally known as "packing".
    If the source field contains a number without a decimal separator, and the target field has dobj2 of data type p with sufficient length and without decimal places, the result of the PACK statement (which is forbidden in classes) corresponds to the result of the statement MOVE.

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • How to disable the text field in File upload element?

    Hi,
    How can we disable the text field in the "File upload" UI element so that the user won't be able to type the file path there, but he will still be able to browse the file using the Browse button?
    Regards
    Praveen

    Hi Praveen,
    This is not possible with the Web Dynpro File Upload UI element.
    Thanks,
    Samta

  • How to make the text fields as mandatory (in 'notes and attachment' tab)?

    Hi,
    We have defined some Fixed Values for texts under IMG>SRM>SRM Server>Cross Application Basic Settings>Text Schema>Define Fixed Values for Texts, for a certain transaction type of RFx responses for a text schema.
    Because of this, the bidder can choose one of these fixed values for texts. This is perfectly working fine.
    Now the question is, we want to make the texts fields as mandatory. i.e. The bidder should not be able to submit the responses if certain texts are blank.
    Is there be any BadI for this?
    GH

    You can use BBP_DOC_CHECK_Badi for this field validation using a filter value RFx/Bid (I ont remember exact word).
    Regards,
    Jagadish.

  • How to Validate the Text Field in JSF

    Hi,
    I am facing a issue to validate the text field where the below code accepts (space' ',underscore'_',pipe'|') symbol as a first character and last character.Where by it can accept in the middle.
    It should not accept special characters also. Below code is working properly for special characters.
    <tr>
    <td width="30%" align="right"><b><h:outputText id="aAccrualType" value="Accrual Type" /> </b> <span style="color:red">*</span></td>
    <td width="50%">: <h:inputText id="accrualType" value="#{accrualTypeMast.accrualType}" required="true" >          
    <t:validateRegExpr pattern="^[(a-z)||(A-Z)||(0-9)||(_)||(\s)||(/)]+$" />     
    <f:validateLength minimum="1" maximum="50"/>     
    </h:inputText>
    <h:message for="accrualType" showDetail="true" style="color:red" />
    </td>
    </tr>
    The thing is i dont have much knowledge in regular expression.
    Is there any other way to do this.
    Could anyone help me in this.
    Thanks,
    Ambika&#9786;

    This has nothing to do with JSF.
    I suggest you to read the Pattern API documentation [1]. You can easily create a small Java Application and test the regexp using String#matches() as it uses the same regexp guidelines.
    public static void main(String[] args) {
        String regexp = "^[a-z]+$";
        String value = "foo";
        boolean match = value.matches(regexp);
        System.out.println(value + " matches " + regexp + ": " + match);
    }[1] http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • How to change the text field typestyle in InDesign 6 forms

    I am designing a form in Indesign CS6. I would like to change the typestyle in my text fields. It seems to default to Times Roman. I want to change it to Ariel. Any suggestions on how to do this. I do not want to have to do it in Acrobat.

    You can't do that in InDesign, unfortunately, so you'll have to make changes in Acrobat after exporting to PDF. With scripting you have the opportunity to automate this. Post again if you'd like more info.
    Also, I would strongly advise against using Arial and use the built-in Helvetica instead. Acrobat/Reader actually use a version of Arial when Helvetica is specified. If you specify Arial, it will embed the entire font, resulting in a sigificant and unnecessary increase in file size.

  • How to restrict the text field to enter only numbers???

    I have used "onkeyup" event to call a function "test", I am getting the alert message for every entry (even for a number), I dont know why I am getting this. Please help me out.....
    Number1 : <input type="text" name="myin1" id="a" onkeyup="test(this,event)">
    function test(ff,evt)
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :
    ((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
    alert("Only numbers are allowed"); }
    }

    Hi,
    However this is java forum and you are asking for a solution of a javascript problem,
    I think I got the problem.
    This script works fine when I run it on IE and use the numeric keys above the text keys,
    but give error when I use the numerical keypad on the right.
    I think you should change your if condition like this
    if (charCode > 31 && ((charCode < 48 || charCode > 57) || (charCode < 96 || charCode > 105)) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to fix the text field width wir=thout wrapping in obiee 11g

    Hi,
    In OBIEE 11g I want the text filed width should be fixed as 30 character, at the same time if the width beyond 30 characters it should not be wrapped.
    To achieve this we went to column properties and removed the wrap check box and in Additional Formatting Options section we set the width size as 30. But still if the text size is beyond 30 getting wrapped
    Please help me
    Thanks,
    Anilesh

    Hi,
    Yup..its really tricky one..u have play around changing the laft/right padding the additional format options
    Thanks
    Deva

Maybe you are looking for

  • Sync problem with itunes 64 bit

    Hi, it's impossible to sync an iPhone 4 with iTunes 10.4 64 bit (sync in one step and in only few seconds but actually it do nothing) and cannot install iTunes 32 bit on windows 7 64 bit. Never had that problem on 32 bit. What can I do?

  • How to get Adobe Flash Player to Function in Explorer 11

    I am using Windows 7 64 Bit.  Have Version 16.0.0.305 of Flash Player.  Use Internet Explorer 11.  Have enabled Shockwave Flash Object.  Have cleared Active X Filtering.  Still cannot view all videos on things such as U-Tube or anything on Weather Ch

  • IView to Refresh Upper Level Navigaton

    Hello All... Just wondering if you know of a better way that I can accomplish this in the Portal.  I have something that works but I just want to know if there is anything better you can come up with. <u><b>Here is the situation:</b></u> We have an i

  • Time Machine Restore Failure... HELP!

    My Mac wouldn't boot. Since I had my trusty Time Machine Backup I formatted the drive and tried to use Migration Assistant to use Time Machine Backup to restore everything but when I tried the backup had an error. Is there anything I can do to restor

  • How do I convert .flv files to an audio (.mp3) file and how do I rip my CDs

    I'm a recent convert from Windows. I doubt if this is the right place to post this question but I have no idea which discussion group is correct. I did a search and found nothing on this topic. I don't even know if Macs use .mp3 files or some other f