How to COUNT all data Characters in an IDOC ?

Hi All,
I am doing an IDOC-->File scenario.
As per the Third party system requirements, I need to COUNT all the Data characters (Minus the EDIDC record) and  write this value at the end of the trailer record in the file.
Example:
EDIDC--> SAPR3, LS...
E1KNA1M-->SHIRIN, UK, SW1DPL
E1KNBKM-->SHIRIN, CITIBANK
So in this example I should sum up(COUNT) all the characters(of Data) belonging to segment E1KNA1m and E1KNBKM. So here COUNT is '28'. So I need to write the value '28' at the end of the file.
I want to know, is it possible to count data in XI mapping or should this be done in R/3 itself and appended as a COUNT field to the IDOC.
Appreciate any suggestion help on this. All I want to know which is the best practise/place to count the data characters in this scenario.
Thanks
Shirin

Hi,
Thanks for explaining.Really appreciated.
Just to confirm,
in Java edit Section I have added the following data: Please let me know if that is correct.
Imports:
Global Variables: len
Initilisation section: 0
Clean-up:
Similarly in UDF I have entered the following data:
Label/Description: Calculate length
Cache: Value(radiobutton)
Arguments: a
Next screen:
Imports:
public String Calculate(String a, Container container)
Then entered ur code.
When I save and activate I get the following error
Starting compilation  Source code has syntax error:  D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map2494b0c0596b11dda115001a4b52813a/source/com/sap/xi/tf/_MM_ALLOCATION_RESPONSE_.java:32: <identifier> expected public /*!_$ClNRep_*/_MM_ALLOCATION_RESPONSE_(){} ^ D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map2494b0c0596b11dda115001a4b52813a/source/com/sap/xi/tf/_MM_ALLOCATION_RESPONSE_.java:210: ';' expected } ^ 2 errors
Appreciate if you could help.
Thanks
Shirin

Similar Messages

  • How to get all data from nokia to i5s

    how to get all data from nokia E71 to i5s???

    if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.

  • Me and my partner are currently using the same apple id and have no space left on our devices. We are currently waiting on the iphone 6 plus to arrive and don't know how to transfer all data to the new phones.

    Me and my partner are currently using the same apple id and have no space left on our devices. We are currently waiting on the iphone 6 plus to arrive and don't know how to transfer all data to the new phones.?

    I don't know if I'm asking this all in a way that can be understood? Thanks ED3K, however that part I do understand (in the link you provided!)
    What I need to know is "how" I can separate or rather create another Apple ID for my son-who is currently using "my Apple ID?" If there is a way to let him keep "all" his info on his phone (eg-contacts, music, app's, etc.) without doing a "reset?') Somehow I need to go into his phone's setting-create a new Apple ID and possibly a new password so he can still use our combined iCloud & Itunes account?
    Also then letting me take back my Apple ID & password, but again allowing us (my son and I) to use the same iCloud & Itunes account? Does that make more sense??? I'm sincerely trying to get this cleared up once and for all----just need guidance from someone who has a true understanding of the whole Apple iCloud/Itunes system!
    Thanks again for "anyone" that can help me!!!

  • How to erase all data on macbook pro and reinstall operating system

    how to erase all data on macbook pro and reinstall operating system

    OS X Snow Leopard
    https://support.apple.com/en-us/HT3910
    http://www.thesafemac.com/how-to-reinstall-mac-os-x-from-scratch/
    OS X Yosemite
    https://support.apple.com/kb/PH18869?locale=en_US&viewlocale=en_US
    Best.

  • How to retrieve all datas that lost when i update my iphone4 to that 6.10 ios. i tried to look at may i tunes in my computer but it seems that i forgot to perform back ups since i purchased this phone 2yirs ago.. pls send me an advice..thank u.

    how to retrieve all datas that lost when i update my iphone4 to that 6.10 ios. i tried to look at may i tunes in my computer but it seems that i forgot to perform back ups since i purchased this phone 2yirs ago.. pls send me an advice..thank u.

    All of the data should be on your computer, simply sync it back.
    If the update was done via iTunes on the computer, the first step in the process is a backup of the device.

  • How to erase all datas and reset default

    How to erase all datas and factory reset in iMac

    Boot into the Recovery HD (restart holding down Command+r). Launch Disk Utility and erase the drive (all data will be gone forever so make sure you have a reliable copy of any valuable data). Quit out of Disk Utility when formatting is complete and select re-install OS X (you'll need an Internet connection).
    Fuller details here: http://support.apple.com/kb/ph11273

  • How to download all data (music.contacts,apps) from iPhone to a new PC ?

    How to download all data (music.contacts,apps) from iPhone to a new PC ?
    I mean to say that I downloaded mp3 songs from websites (not from iTunes) which I synced in my iPhone 4 using ''Manaually Manage Music''.
    Now I am in my homecountry for vacations and don't have the laptop in which my iTune library is synced and I need to add more songs to my iPhone but when I put more songs to my iPhone it tells me that all current data from iPhone will be deleted.
    Please help!

    The iphone is not a backup device.  The music sync is one way - computer to iphone.  The only exception is itunes purchases.  Without syncing:  File>Transfer Purchases.
    " I need to add more songs to my iPhone but when I put more songs to my iPhone it tells me that all current data from iPhone will be deleted."
    That is correct.

  • How to get all data from time maschine to windows pc?

    pls can somebody helps me, i lost my macbook and all data have on time maschine.................... need to get them out on windows pc, and second problem, downloaded itunes to windows but how i can get pictures and music from my ipod and iphone to itunes, thx for every help

    if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.

  • How to print all data in a table?

    Hello!
      I am doing report with VC. Now I want to print data ,The system action "print" can not print all data,only a page in the table  can be printed. Are there any ways to finishe the print function,Can you help me?
    Thank you very much!

    See this how to guide I put together:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123

  • How to display all data on one page in web app

    Hello.
    So I have web app JSF (IceFaces framework) + JBoss all Crystal Report working perfectly. So I have page with Crystal Report tags (e.g.
    <bocrv:reportPageViewer reportSource="#{crystalReport.reportPath}" ...
    in this report I have table with some data (data from DB) and I want to display this data on one page. Unfortunately now this data are moving to the next page and unfortunately I even donu2019t know how switch to the next page (I see only info e.g. 1with 2).
    So how to display this data on one page if its impossible how to torn on pagination.

    So I canu2019t do this, I canu2019t display all data on one page (until Iu2019m using JSF tags)?
    In JSF tags Iu2019m setting only path to file. In my bean Iu2019m using u201CReportClientDocumentu201D object itu2019s easy way to load report file (u201Copenu201D method) and set parameters (u201CgetDataDefController().getParameterFieldController()u201D method) and also connect to data base (u201Clogonu201D method) but I havenu2019t this property u201CsetSeparatePages(boolean)u201D.
    Maybe Iu2019m doing this wrong and there is a simpler way maybe I can use somehow u201CCrystalReportVieweru201D please give my any advice.

  • How to get all data in a section from profile file?

    Suppose I have profile ini have a section like:
    [Mysection]
    k1 =v1
    k2=v2
    the key-value pair could be dynamically in this section. then I want to get all data in Mysection.  How can I get it in a loop for all in powerscript?

    This is what you need:
    integer     li_fhandle, li_rcode = 1, li_sfound = 0, li_idx = 0, li_eqpos, i
    string ls_filename = 'C:\app.ini'
    string ls_line, as_key[], as_val[]
    string ls_section = '[General]'
    // OPEN INI FILE
    li_fhandle = FileOpen(ls_filename, LineMode!)
    IF IsNull(li_fhandle) OR li_fhandle < 1 THEN
      // DO NOTHING
    ELSE
      DO WHILE li_rcode > 0
      li_rcode = FileRead(li_fhandle, ls_line)
      IF li_rcode > 0 THEN
      IF POS(ls_section, ls_line) > 0 THEN
      li_sfound = 1
      CONTINUE
      END IF
      IF li_sfound = 0 THEN CONTINUE
      IF POS(ls_line, '[') > 0 AND POS(ls_line, ']') > 0 THEN EXIT
      li_eqpos = POS(ls_line, '=')
      li_idx++
      as_key[li_idx] = MID(ls_line, 1, li_eqpos - 1)
      as_val[li_idx] = MID(ls_line, li_eqpos + 1)
      END IF
      LOOP
    END IF
    FOR i = 1 TO li_idx
      messagebox('Key - Value',as_key[i] + ' = ' + as_val[i])
    NEXT
    // CLOSE INI FILE
    IF li_fhandle > 0 THEN
       FileClose(li_fhandle)
    END IF
    Adapt it to your needs... you probably should make it a function.

  • How to Drop all data in a database?

    Hi There,
    I'm use to dropping all the objects in a database, however, how do I drop ONLY the DATA in the database? Is all data in the database stored in tables? Do I have to TRUNCATE all the tables in the database only? Thanks in advanced.
    J

    You can try to:
    1. disable foreign key constraints instead of dropping them.
    2. truncate all tables in any order
    3. enable foreign key constraints.
    Short example:
    SQL> truncate table parent;
    truncate table parent
    ERROR at line 1:
    ORA-02266: unique/primary keys in table referenced by enabled foreign keys
    SQL> select constraint_name, table_name from user_constraints where r_constraint_name is not null;
    CONSTRAINT_NAME                TABLE_NAME
    SYS_C0011060                   CHILD
    JHIST_JOB_FK                   JOB_HISTORY
    JHIST_EMP_FK                   JOB_HISTORY
    JHIST_DEPT_FK                  JOB_HISTORY
    EMP_DEPT_FK                    EMPLOYEES
    EMP_JOB_FK                     EMPLOYEES
    EMP_MANAGER_FK                 EMPLOYEES
    DEPT_LOC_FK                    DEPARTMENTS
    DEPT_MGR_FK                    DEPARTMENTS
    LOC_C_ID_FK                    LOCATIONS
    COUNTR_REG_FK                  COUNTRIES
    11 rows selected.
    SQL> alter table child disable constraint sys_c0011060;
    Table altered.
    SQL> truncate table parent;
    Table truncated.
    SQL> truncate table child;
    Table truncated.
    SQL> alter table child enable constraint sys_c0011060;
    Table altered.
    SQL>

  • How to show all data when using more than one parameter?

    Hi All,
    I used a query like this to show the data in a report:
    select col1, col2 // col1 and col2 are columns of tabale tab1
    from tab1
    where
    tab1.col1 =
    (case when :P_COL1 IS NOT NULL then // :P_COL1 IS A USER PARAMETER TO EQUAL COL1
    :P_COL1 ELSE tab1.col1
    end)
    AND TAB1.COL3 =
    (case when :P_COL3 IS NOT NULL then // :P_COL3 IS A USER PARAMETER TO EQUAL COL3
    :P_COL3 ELSE tab1.col3
    end)
    The problem is when I run the report with paramters values or not, It shows the data which is not null for both col1 and col3.
    That is when the value of col1 or col3 is null the report would not return that record!
    I want the report to show all data not only values which is not null!
    How to do this?

    Rainer,
    That where clause will fail when col1 in the table is null and the parameter has the dummy value. Consider the following:
    variable p_col1 varchar2
    exec :p_col1 := 'yourdummyvalue';
    select
    from
         select 'yourdummyvalue' col1 from dual
         union all
         select 'other' from dual
         union all
         select null from dual
         union all
         select 'X' from dual
    ) tab1
    where nvl(tab1.col1,'yourdummyvalue') = nvl(nvl(:p_col1,tab1.col1),'yourdummyvalue')In this case, the query returns the row with null and the row with 'yourdummyvalue', where only the row with 'yourdummyvalue' should be returned.
    You must do something like this:
    where ( :p_col1 is null or ( :p_col1 = tab1.col1 ) )That one is the simplest and does not need a dummy value. Here are some other more complicated examples:
    where nvl( :p_col1, 'yourdummyvalue' ) = decode( :p_col1, null, 'yourdummyvalue', tab1.col1 )or this:
    where nvl( :p_col1, 'yourdummyvalue' ) = nvl2( :p_col1, tab1.col1, 'yourdummyvalue' )In the last 2 cases, it will not matter if the dummy value exists in the data, but they are unnecessarily complex.
    Kurz

  • How to erase all data on E71x ?

    I just bought an E71x and I really regret. Because :
    1. batter--hard to take it in/out
    2. Sync--no contact group function when sync with outlook. I have to group my contact manually
    3. Voice command sucks
    4. Very hard to hard rese/erase all data after doing the factory configuration
    Can anyone tell me how to erase all the data? My steps are as follows:
    1. Go to factory configuration
    2. Enter lock code 12345
    3. After the device restart, calendar/to-do data... are still on the device.
    Thank you in advance.

     because newer nokia devices have udp- user data preservation feature even if you reset your phone data will remian intact. the only way to truly get rid off your stuff is to use option 3 on this list. understand that you will lose all your data and make sure you ahve a back up of everything you need before doing this. the default code is always 12345. the restore setttings option DOES not remove any data, just restores default settings on your phone. 
    1. *#7780# - Restore factory settings - resets all the settings to the default ( you will not lose any data)
    Make sure you back up your data as you will lose all of it when you perform option 2 or 3 on this list. The default code for all operations listed here is 12345
    2. *#7370# - Reformat your phone
    3. This you perform as a last resort. Nothing else is working.If the phone is not showing any activity, proceed with hard formatting , turn off your phone, hold the following buttons while pressing the power button. (the default code is 12345)
    hard reset - hold the following buttons *, 3 (number button) and talk/green key. turn on the phone and do not release those buttons until you see the Nokia boot up screen. once you feel the phone power up you can let go off the power button while still holding all three buttons ( for Nokia 5800XM - use the following buttons to do a hard reset, GREEN/RED/CAMERA keys pressed all at once on power up. this will only work on 5800's that have firmware version 20... and up. )
    If these codes are not working the only thing for you to do is contact your Nokia Care Center/Service for assistance.
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • How to erase all data

    I want to erase all data before I give my iPhone 5 to repair.
    When I go to "Erase all Content and Settings"
    it askes me for my 4 digit Passcode.
    The problem is, I never set a Passcode to the iPhone.
    I did once to my iPad.
    I tried 2 different Passcodes I used on other devices, none of them worked... of course!
    So how can I erase the data on my iPhone then?

    if I will do that, what happens to the backup I wanted to bring back when I want to restore the phone to its current state? It might overwrite an empty backup over the original one?

Maybe you are looking for

  • Do I need a separate membership to export pdf's to excel?

    Why does Acrobat prompt me to sign up when I need to export to excel?Why does Acrobat prompt me to sign up when I need to export to excel?

  • XI Install SM59 destination error messages

    I have an IDES system installed and now we are trying to get XI 3.0 SR1 on SQL Server installed for a project for one of our customers. I have followed the XI install guide and I think I have almost everything working except for one major issue. I ca

  • Config willy agent

    hello expert, i have need help urgent. We can not see the data of server node for perform introscope agent setup. url smd ---> diagnostics setup ---> managed system ---> introscope agent the setupwizard is done with warning message in java "  Step E2

  • Fusion BI or Daily BI

    Oracle Daily BI was YESTERDAY'S solution for e-business suite intelligence. Oracle Fusion BI is TODAY'S preferred solution. Please discuss???

  • Conflict with PC-Cillin firewall?

    I just bought Trend Micro's PC-Cillin Internet Security 2007 for my wife's new computer which has Microsoft Vista and is hooked up to our home network via a WUSB54G.  The WRT54G router is on my computer which runs Windows XP Service Pak 2. The instru