Calculation to split data in a field

Hi
Can anyone help me with a calculation I need (if it is possible!)
I have a field (Subjective) an example of the data is "I420-PrimaryCareTrustsInc"
Im want to take the data from the 6th chararcter and add a space before every letter that is in capitals, so in this case the answer would be
"Primary Care Trusts Inc"
Thanks for your continued help
Andy Gill

Hi,
You can take data from the 6th character just using SUBSTR(field, 6).
There are 2 ways you could do the replace. You could write your own PL/SQL function to do the replace and map the function into the EUL. Or you could just map the REGEXP_REPLACE function into the EUL and use a regular expression. See this Re: Regular Expressions in Discoverer 10g for information about regular expressions.
Rod West

Similar Messages

  • Split data into different fields in TR

    I have a flat file with space (multiple spaces between different fields) as a delimiter. The problem is, file is coming from 3rd party and they don't want to change the separator as comma or tab delimited CSV file. I have to load data in ODS (BW 3x).
    Now I am thinking to load line by line and then split data into different objects in Transfer rules.
    The Records looks like:
    *009785499 ssss BC sssss 2988 ssss 244 sss 772 sss  200
    *000000033 ssss AB ssss        0  ssss   0 ssss 0 ssss 0
    *000004533 ssss EE ssss        8  ssss   3 ssss 2 ssss 4
    s = space
    Now I want data to split like:
    Field1 = 009785499
    Field2 = BC
    Field3 = 2988
    Field4 = 244
    Field5 = 772
    Field6 = 200
    After 1st line load, go to 2nd line and split the data as above and so on. Could you help me with the code pleaseu2026?
    Is it a good design to load data? Any other idea?
    I appreciate your helps..

    Hi,
    Not sure how efficient this is, but you can try an approach on the lines of this link /people/sap.user72/blog/2006/05/27/long-texts-in-sap-bw-modeling
    Make your transfer structure in this format. Say the length of each line is 200 characters. Make the first field of the structure of length 200. That is, the length of Field1 in the Trans Struc will be 200.
    The second field can be the length of Field2 as you need in your ODS, and similarly for Field3 to Field6. Load it as a CSV file. Since there are no commas, the entire line will enter into the first field of the Trans Structure. This can be broken up into individual fields in the Transfer Rules.
    Now, in your Start Routine of transfer rules, write code like this (similar to the ex in the blog):
    Field-symbols <fs> type transfer-structure.
    Loop at Datapak assigning <fs>.
        split <fs>-Field1 at 'ssss' into <fs>-field1 <fs>-field2 <fs>-field3....
        modify datapak from <fs>
    endloop.
    Now you can assign Field1 of Trans Struc to Field1 of Comm Struc, Field2 of Trans Struc to Field2 of Comm Struc and so on.
    Hope it helps!
    Edited by: Suhas Karnik on Jun 17, 2008 10:28 PM

  • Interest Calculation on posting date and due date

    Hi
    I want vendor interest calculation on due date as well as posting date. Let me know how to get it. According to me only its possible on the basis of one date only.

    HEllo!
    In the report RFINTITAR, you use the interest indicator customizing:                                                                               
    IMG   > Prepare Item Interest Calculation   > Ref. Date                                                                               
    (table V_T056UX)   >  field Ref.                                                                               
    (FI Item Interest Calculation: Reference Date)                                                                               
    You have the possibility to define what You need to be considered as 
    incoming payment due date, choosing between:                                                                               
    1 Value Date (or Baseline Date for Net Payment)                      
    2 Document Date                                                      
    3 Posting Date                                                       
    4 Payment Baseline Date                                                                               
    As you can use one interest indicator per customer/vendor you can use only of the dates is used. But, in this
    program you can use the BADI FI_INT_CUS01. Please, check if you can meet your business requirements using the methods
    of the BADI.
    REgards,
    REnan

  • Performing calculation on text data fields - for Master Data infoobjects

    Gurus,
    I've a MD InfoObject Z_Obj containing set of attributes -  Z_Attr1, Z_Attr2 and Z_Attr3 , the data for this fields contains text ( of single character)
    The requirement goes like this
    Attribute     Value   Value to be displyed in the Report
    Z_Attr1 -      Y                        A
    Z_Attr1 -      N                    <Blank>
    Z_Attr2 -      Y                         B
    Z_Attr3 -      N                     <Blank>
    Z_Attr4 -      Y                        C
    Z_Attr5 -      N                     <Blank>
    Without making use of any ABAP routine , What are the possible ways we can achieve this in Output.
    Remember I want the validation of the fields at report level not at the ODS/DSO/MD InfoObject level.
    Please do help me about the various possibilites.
    Thanks in advance <removed by moderator>
    Regards,
    Yaseen
    Edited by: Siegfried Szameitat on Nov 7, 2008 9:15 AM

    This can be done :
    Create 3 formula variables of type replacement path.
    While creating :
    In the general tab, choose reference characteristic as Z_Obj.
    In Replacement Path tab,
    Replace variable with : Infoobject
    Replace with            : Attribute value
    In below drop down choose your attribute appropriately.
    Now you can use this formula variables to create formula or CKF.
    Hope this helps.

  • Custom calculation script (roll date forward)

    I'm trying to add 6 days to a date that is in a user defined form field   called PeriodBegin
    The new calculated date should b e:   PeriodBegin + 6 days and should display in a new form field called PeriodEnd
    I've tried using some code that I've found on the web but can't get it to work.    Help!

    Hi pauker11,
    Read this tutorial from the acrobatusers.com Learning Center-
    http://acrobatusers.com/tutorials/2006/date_time_part2/
    and download the sample file DatesExample1 which includes a sample for adding a number of days to a date from another field.
    Hope this helps,
    Dimitri
    WindJack Solutions
    www.pdfscripting.com
    www.windjack.com

  • Splitting on customer defined fields in Grants Management

    Hi All,
    I am implementing a grants management solution where funds are drawn down from the sponsor using resource related billing based on payments.  As part of the reporting to the sponsor we are required to report information from the grants management ledger (payment documents) with information from a third party system which triggered the initial expenditure against the grant.  The join between the information is a reference number passed from the interfaced system.
    My solution is to put the reference number in a customer field in the coding block and have updated the GM field movement to populate the field in GMIA.  I would like to put this field in the splittng rules in grants management so that for the reporting to sponsor can be a straight forward join on the interfaced system and the data from payments in GMIA (rather than splitting in the general ledger then joining GMIA, flex GL data and the interfaced system).
    The fields which can be used in splitting in GM seem to be a predefined list.  I have traced this in debug and found a function module GM_SPLIT_T8G40_FIELDS which is defining the list of fields availale and translating the the field name.  Any field for which it cannot find a new field name in this function module is being deleted from the list of valid fields.  Therefore, customer fields are deleted from the available fields for splitting.
    Can anyone suggest a way around this?
    Kind regards,
    Geoffrey

    OK, it's something along the lines of:
    Vendor Invoice posted in GL:
    Entry view:
    CR Vendor                                         1000 GBP
    DR Expense/Customer field A              600 GBP
    DR Expense/Customer field B              400 GBP
    GL View (splitting on customer field):
    CR Vendor/Customer field A                 600 GBP
    CR Vendor/Customer field B                 400 GBP
    DR Expense/Customer field A               600 GBP
    DR Expense/Customer field B               400 GBP
    GM document (not possible to split on customer field)
    Value type 54 CR Vendor                            1000 GBP
    Value type 99 DR Expense/Customer field A  600 GBP
    Value type 99 DR Expense/Customer field B  400 GBP
    Payment Posted:
    GL Entry Veiw
    DR Vendor            £1000
    CR Bank Clearing  £1000
    General Ledger View (split on customer field)
    DR Vendor/Customer field A                 600 GBP
    DR Vendor/Customer field B                 400 GBP
    CR Bank Clearing/Customer field A       600 GBP
    CR Bank Clearing/Customer field B       400 GBP
    GM Document (not possible to split on customer field)
    Value Type 54 DR Vendor            £1000
    Value Type 57 CR Bank Clearing  £1000
    In GM, there is no link back to the values in the customer fields when the payment is made as the field movement from GL to GM is based on the line items and values in the the entry view and not the split general ledger view.  If  the split GL data were used to populate the GM tables, then the data would already be split by the customer field by the time it reaches GM, negating a need to split on the customer field once in GM.
    It still feels, however, that the simplest solution would just be to have the GM ledger split by customer fields.  I have tried raising a customer message with SAP, but this query falls outside of their support remit.
    Kind regards,
    Geoffrey

  • Copying data to multiple fields

    I have a number of forms which have been created in Acrobat 8 Professional using the Acrobat tools (not LiveCycle) where I need data entered in one field to copy to another. Usually this data is text. I have used the following Javascript in the Calculate tab in field properties:
    event.value = this.getField("SOURCE FIELD").value;
    In order to allow for a single point of data entry, the fields to which the data is copied are locked and flagged as read only. Most of the time this works, however I have been getting multiple support calls where the forms fail to follow the script. I've tried many options including PDF optimization. I've ensured that users are using the same version of Acrobat Reader (8.1.2).
    Is there a better way to accomplish this task?
    Is there something wrong with the JavaScript?
    I'm not very sophisticated with Javascript and would appreciate any assistance. Thanks!

    There is a user preference that controls whether automatic calculations are performed. Perhaps some users have turned this off. The most likely possibility is the field calculation order is not correct.
    If you've checked both of those things and it still doesn't work, can you give an example of some text that this doesn't work with?
    A different approach that avoids these issues is instead of setting up a custom calculation script in the read-only field, you can use something like the following in the Validate script of the text entry field:
    getField("destination_field").value = event.value;
    This way it will work if automatic calculations are turned off, and the calculation order doesn't come into play.
    George

  • Calculation based on date key figures in BEx

    Hi Friends,
    Hi Friends,
    I need to creat report for sales order data, which involved the calculation based on dates.
    In my cune iam having the data at the granual level with the dates as key figures. the calculation that i need to do is VTW = Actual PGI date - Customer want date.
    1) whn i run the report at the granual level my VTW is working correctly. No issues.
    2) when i run the report at higher levels the date fields are updated with X, as the system is unable to aggrigate the dates. The dates are at the material level in  a sales order. I need to show the VTW at the sales order level (each one of the two dates are same for all the materials). So, when i run the report with out mataril at the sales order level...i wanto sea the bothe date fields in a single line and also the VTW calculated as the different between throse two dates.
    3) Once we get the VTW correctly at the sales orde level. if i drill down the report for material, i want to sea both the dates in every record againest the matarial, but the VTW only aginest the first record...that is againest the sales order. I dont waht the VTW value repeated/duplicated for all the records againest the sales order,as VTW makes sence only at the Sales Order level.
    Please suggest me hwo i can achive the resulsts by meeting both Point 2 and 3.
    Thanks for ur help...in advance.
    Thanks,
    Renu

    Hi..
    I have the data from the extractore and in the cube as below.
    SALES ORDER    ITEM                MATERIAL            DATE1                         DATE2
    101                        Item1               Mat1              01/01/2010                15/01/2010
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                       Item3                Mat3             01/01/2010                15/01/2010
    I need the reports as below...
    Report1:
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                        01/01/2010                15/01/2010                14
    currently iam getting this Report1 output as below...
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                             X                                   X                           42
    Report2: Out put required as below
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                   I     tem3                Mat3             01/01/2010                15/01/2010
    currently iam getting this Report2 output as below...
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010               14
    101                   I     tem3                Mat3             01/01/2010                15/01/2010               14
    As VTW is need to be measued at the sales order level and we always have the DATE1 & DATE2 as same for all the itesm, it should be shon as only 14 in the first record. It mean once iget the required output from Report one in a single line with VTW as 14, it should not repeat with every line , when i dril down the report for Items or materials.
    Even if i can generate oly report2 as required in a single sheet ...that will be enough.
    Plas kindly provide some solution as how we can achieve this,
    Thanks,
    Renu

  • SPLIT data-record AT delimiter into table-fieldname

    Hi all,
    I have the following SPLIT statement. But unable to split into respective field in an internal table. I'm using the standard delimeter.
    Please help me how to create a file using the delimeter w_delimeter.
    When I create the file with separated by '#' even it is not spliting.
    w_delimeter TYPE c value cl_abap_char_utilities=>horizontal_tab.
    SPLIT data-record AT w_delimeter INTO i_0208-pernr
                                                                         i_0208-begda
                                                                        i_0208-endda
                                                                        i_0208-wtart
                                                                        i_p0208-allpc.
    Thanks,
    Prasad

    Hi Prasad,
    it should work try this bellow piece of code.
    REPORT  ZTEST_A.
    data: Begin of itab occurs 1,
            name(30),
            street(30),
            Apt(3),
            city(30),
            state(2),
            zipcode(5),
          end of itab,
          text1(250),
          text2(250).
    Text1 = 'Jacson  3 xyz dr  B4  abcd  DE  12345'.
    Text2 = 'Edward  3 Caaa dr  B4  pqr  DE  54623'.
    split text1  AT '  '  into   itab-name itab-street  itab-Apt
            itab-city itab-state itab-zipcode.
    append itab.
    split text2  AT '  '  into   itab-name itab-street  itab-Apt
            itab-city itab-state itab-zipcode.
    append itab.
    thanks,
    Venkat

  • Data carrier & application field are not getting displayed in CV04N

    Hi Guru's
    In TCode : CV04N,  data carrier & application field are not getting displayed.
    While i compare with my IDES system, data carrier & application fields are getting displayed in CV04N.
    Let me know is there any configuration that has been missed out.
    Regards
    Bhanu

    Hi Bhanu,
    Please note that the fields 'Data carrier' & 'Application field'  are visible only if no document type is entered.
    Suppose you enter a document type and press ENTER then these fields disappear. This is because the field 'Application' was designed when only the storage is archive, vault or SAP-SYSTEM was possible and the number of added originals was limited.
    Currently DMS allows storage of originals on Content Server and there is no limit on the number of added originals, the system behavior was changed due to performance reasons. To avoid performance problems if you search for a document with a lot of originals attached this field gets invisible if you enter a document type which uses the KPRO storage.
    Regards,
    Pradeepkumar Haragoldavar

  • Not getting data for 1 field in ODS

    Hi BW Experts,
    I am loading the data from R/3 to BW.I have loaded the data through PSA.The data is available in New data field. After activating the ODS, for 1 field the data is not uploaded and in the report, the values are not displaying.
    I have checked the Transformations also. it is mapped correctly.But still i am not getting data for that field.
    Thanks,
    Siva.

    Thanks for the Update
    1. What is your Service Pack Level?
      Service Pack is 0016
    2. Are you able to see the data in PSA?
       Yes I can see the data in PSA
    3. After load, are you able to see the value in New table?
       Yes i can able to see the data in New data table
    4. Anywhere, are you doing the SORTING of Data Package?
       No I have not sorted the data Package.I have not written any coding on this
    I have not written any coding in transformation also.
    Thanks,
    Siva.

  • How to retrieve data from a field of CLOB datatype?

    How can I retrieve data from a field of CLOB datatype in Oracle
    8 being called from an ASP or VB application? The recordset
    object in ASP or VB doesn't support the CLOB datatype.
    Thank you in advance for your help.

    How can I retrieve data from a field of CLOB datatype in Oracle
    8 being called from an ASP or VB application? The recordset
    object in ASP or VB doesn't support the CLOB datatype.
    Thank you in advance for your help. Hello.. were you able to solve your problem? I'm faced with pretty much the same task.. I have a VBA application that needs to pull various pieces of data(CLOBs, BLOBs, etc..) from an Oracle8i db.

  • How to extract data from the fields present in two or three tables

    Hi Experts,
          I have a scenario where i have to extract data from the fields of different tables. e.g. let there 2 tables which have some number of fields . I want the data of 3 fields each from these 2 tables. How can i get that??
    Sam

    Hi
    You can create view in tcode se11..
    here you include all tables from which you want to fetch the data..
    you need to give selection condition here
    eg..
    say select empname from table A, select empadd from table B.. where empno(from A)=empno(from B)
    (note that you dont need to write queries like this.. i have just given u the example)
    After creating the view you can create datasource in RSO2..
    Regards
    Swati

  • How do I post data in HTML fields

    Hi.
    I need to log onto a web server from LabVIEW 7.1. I have this working in VB, but I don't know how to use the Microsoft Web Browser ActiveX object (specifically how to find the types of some variants).
    In VB, I'd do the following to post data into two fields and click a button:
    WebBrowser1.Document.frames(1).loginform.UserName.Value = "username"
    WebBrowser1.Document.frames(1).loginform.Password.Value = "password"
    WebBrowser1.Document.frames(1).loginform.Item(2).Click
    From the web browser object in LV I can navigate to the URL, and decode the Document variant which seems to be of type MSHTML.DispHTMLDocument. How do I proceed from here? How do I access the different frames, forms, data fields and buttons on the web page?
    Since variants in LabVIEW carry type descriptors internally, it'd be nice to have some way to access this so I wouldn't have to guess what object prototype to convert the variant with.
    Regards
    Steen Schmidt
    CLA and CTA. Worked with LabVIEW from 4.0 to 2010 and counting...

    Hi Steen,
    I was workin in an application of accessing frames, forms and then buttons in web pages in background...
    In labview there was a problem in the MSHTMLDocument.frames functions and so will not be able to get the frames ..
    but it is possible to access forms in a page directly...i have an eg for searchin in google..(i have attached the vi)
    I need to know whether it is possible in VB to go to a particular frame in a page and then if the frame has a form i need to login in form in that frame...
    Could you please share me the code in VB (for the same)..so that it would be helpful for me...and also is it possible to make dll in vb and use in other enviorment like VC++..
    REGARDS
    vevek
    Attachments:
    autologin.vi ‏67 KB

  • Problem with Refreshing the data bound text fields

    Folks,
    First of all, this a GREAT product and I am moving my apps from Eclipse to Studio Creator. I am very impessed with it so far.
    I am gone through most tutorials, but can't help resolve the problem that I am having. I have a page, that lists all the users in a table. When you click on any user, it opens up another page that lists the detail of the specific user you have clicked on. This a typical use in most web applications, right?
    In the user detail page, I open it in "Read" only mode, by setting the "setReadOnly" to true for all text field components. Then users can edit it by clicking "Edit" button. Edit button just changes the "setReadOnly" to false, to allow editing. After editing, they can hit the "Save" button to save the changes. In the save button, I call this code:
    public void prerender() {
            try {
                userID=getSessionBean1().getUserID();
                getSessionBean1().getWeb_userRowSetUserDetail().setObject(1,userID);
                getWeb_userDataProviderUserDetail().refresh();
                info("prerender: Refresh called");
            } catch (Exception ex) {
                error("Error in userForm.prerender():"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.prerender():", ex);
            setReadWrite();
    public String btnSave_action() {
            try {
                getWeb_userDataProviderUserDetail().commitChanges();
                getWeb_userDataProviderUserDetail().refresh();
                info("Data Provider Refreshed in SAVE");
                _readOnly=true;
                form1.discardSubmittedValues("saveVForm");
                info("User Updated New:"+userID);
            } catch (Exception ex) {
                log("Error Description", ex);
            return null;
        public String btnEdit_action() {
            try {
                _readOnly=false;
                //info("User ID Edt="+getSessionBean1().getUserID());
            } catch (Exception ex) {
                error("Error in userForm.btnEdit_action:"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.btnEdit_action():", ex);
            return null;
        private void setReadWrite(){
            // Set read-only to true or false for all text fiels
            this.btnEdit.setVisible(_readOnly);
            this.btnSave.setVisible(!_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_email_client.setReadOnly(_readOnly);
            this.user_email_office.setReadOnly(_readOnly);
            this.user_fname.setReadOnly(_readOnly);
            this.user_lname.setReadOnly(_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_password.setReadOnly(_readOnly);
            this.user_password_conf.setReadOnly(_readOnly);
            this.user_phone_cell.setReadOnly(_readOnly);
            this.user_phone_cell_aac.setReadOnly(_readOnly);
            this.user_phone_client.setReadOnly(_readOnly);
            this.user_phone_home.setReadOnly(_readOnly);
            this.user_phone_office.setReadOnly(_readOnly);
        }When the save button is clicked, the database is updated (as I can verify by looking directly into the database), but the data-bound text fields do not display the new value. YES, I am calling refresh() on data provider? I tried to call refresh in both "preRender()" and "Save" button action event, but that did not help either.
    Please note that the save button also changes the "setReadOnly" back to TRUE for all text fields. That means, users view the page in Read-Only mode after saving. (They have to click on "Edit" button again to edit it). I discovered that if I do not set the text field components in "ReadOnly" mode, then they display the updated value of the fields. But if I change setReadOnly to TRUE, then they display the old values (before the save).
    Any idea what I am doing wrong here?
    Thanks

    Here is my experience with it. I have three text
    boxes to be filled out. They are part of a virtual
    form with an add button as the submit. You can fill
    out the 3 and add them and a node is added to a tree
    component. When you click on a node in the tree
    component (the submit to another virtual form that
    the 3 buttons participate in) the text fields should
    be loaded with the values that they where added with.Hard to tell from this explanation, but if the text fields do not participate in a virtual form, then they are not going to get updated when an action in the virtual form happens. Not sure this is your problem. Like I say, hard to tell from this explanation.
    They will not display the values though...having
    nothing to do with read only. If I disable them
    before hand...they display the updated values. If I
    set their value at the top or bottom of prerender,
    they display the change...if I set the value in an if
    conditional that is hit (I have checked many times)
    in prerender, they will not display the values. If I
    set them in the tree handler anywhere, they will not
    display the values. This is very frustrating and is
    wasting tons of my time...I simply want to load the
    text fields based on the tree node that was
    clicked...I have messed with this for hours and it
    certainly does not work.Well, setting them in the tree handler won't work because the tree handler gets called in the page instance that handles the submit and not the page instance that renders the response.
    Posting your prerender code might help. Also, your action handler.
    >
    >
    - Mark

Maybe you are looking for

  • Edit in External Editor (photoshop)?

    I want to do a quick edit of an image in my new version of photoshop and when I select the image in the Album or in the Published Album Aperture is not giving me an option to Photo > Edit in External Editor because this is greyed out for some reason.

  • Belkin Router Firewall Settings - Need Help Please

    Hi I'm new to Apple and love the machine, but I am having a problem with the firewall on my router. Let me explain the setup, then the problem... I have the following in my home network: 1 hp desktop running Windows XP Media Center Edition, SP3 (Prof

  • Relaying iMS5.2 behaviour

    Hello, I noticed a strange behaviour in iMS5.2 with mail relaying. iMS5.2 accepts messages to users on sub-domains of my default domain, even though this sub-domain don't exist. Example: my default domain: domain.com iMS 5.2 accepts messages for ever

  • Summing command is not getting the result

    Hi All, I am using summing command in my script to print page total on every page. I have used: SUMMING &ITAB_TDS-BASAMT& INTO &ZTDS-BASE_AMT& here itab-tds is my internal table which contains the line items..and ztds is the R/3 transparent table(glo

  • HT1338 i am unable to mirror my macbook on my tv.

    iam unable to mirror my macbook useing the apple tv.  all of my other device are able to mirror the image.  what am i doing wrong?