How to handle the source text length exceed more than target text length size in Message mapping  PI 7.31

I have a File to IDOC Message Mapping Scenario:
Source Field                         Targefield
Communiication Address-(Email ID)                                    E1EDK2 - TDLINE
Source Field length: 1/80                                                                               target Field length: Char\70
Mapping Condition:
Note: TDFORMAT =  ‘=’ (Long Line), may need to create 2 TDLINE fields depending on length of text
So give the Solution for handling text Length exceed than target field lenght Using TDLNE and TDFORMAT......
Guide me  and give Suggestions to achive this.

Hi ,
Below is the generic sol for your problem .Graphical mappings wont workout for your problem while using sub string .
Input -->Input string
Length -->length of TDLINE
MESSAGE_V1,V2,V3,V4....depends on how many TDLINES you expect .Here I have taken 4 .
public void SplitbyLength(String[] Input, String[] Length, ResultList MESSAGE_V1, ResultList MESSAGE_V2, ResultList MESSAGE_V3, ResultList MESSAGE_V4, Container container) throws StreamTransformationException{
int lengthVal = Integer.parseInt(Length[0]);
int InpLenVal ;
for(int i=0;i<Input.length;i++)
InpLenVal  =Input[i].length() ;
if (InpLenVal<=lengthVal)
MESSAGE_V1.addValue(Input[i].substring(0));
MESSAGE_V2.addValue(ResultList.SUPPRESS);  
MESSAGE_V3.addValue(ResultList.SUPPRESS);  
MESSAGE_V4.addValue(ResultList.SUPPRESS);  
else if ((InpLenVal>lengthVal) && (InpLenVal <= (lengthVal*2)))
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,InpLenVal));
MESSAGE_V3.addValue(ResultList.SUPPRESS);  
MESSAGE_V4.addValue(ResultList.SUPPRESS);  
else if ((InpLenVal>(lengthVal*2)) && (InpLenVal <= (lengthVal*3)))
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),InpLenVal));
MESSAGE_V4.addValue(ResultList.SUPPRESS);  
else if (Input[i].length()>(lengthVal*3)  && (InpLenVal <= (lengthVal*4)))
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),InpLenVal));
else if (Input[i].length()>(lengthVal*4) )
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),(lengthVal*4)));
Regards
Venkat

Similar Messages

  • How to get the source code of an HTML page in Text file Through J2EE

    How to get the source code of an HTML page in Text file Through J2EE?

    Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
    - Saish

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How to use the same credit card for more than one customer master

    Hi,
    this is a question for consultants at least a little familiar with SAP business partner, Customer-vendor-intergration cvi, contract accounting:
    My customer wants to store the same credit card with more than one customer. Arguments are that family members or partners may mutually agree to use the same credit card for their distinct purchases.
    I never tried with amazon or the likes but I know that SAP validates the uniqueness of credit cards.
    I found 6 code line where the message (V/)005 "Payment card &1 &2 is already assigned to customer &3" prohibits duplicate assignment.
    Even if I create a couple of enhancements to suppress the error, I don't know how the system will work.
    The customer does not like the idea of using alternative payer.
    Did you ever face the same problem and how did you solve it?
    Much Thanks in advance
    Best regards
    Clemens

    thanks

  • How to define the lenght of a variable more than 10k

    Hi All,
    I am developing scripts with  eCATT /QTP tool .
    I am fetching a huge data from QTP more than 10k charaters , and now i am not able to receive completely into eCATT variable as i am able to define the lenth of a eCATT variable till 9999 can anyone kindly suggest a way to increase the lenght of the variable .
    regards
    harsha

    Yes yes ... it does work ... but 'G' changes to 'g' and the paramter reference becomes 'STRING' ..
    For some reason, this is made lowercase while other datatypes are in uppercase.

  • How to make the new iTunes Radio play more than 2 songs without stopping?

    I just upgraded to the latest version of iTunes (11.1.3 (8)) on my Macbook Pro and now the radio stations aren't working! It worked flawlessly before the upgrade! I've searched everywhere for troubleshooting tips and found many, many users with the same problem, but no response from Apple. I'm running OS 10.8.5 - is this the issue?
    I can listen to maybe two songs before it stops playing. My internet connection is fine and I never experienced this problem before the upgrade. Also, I hate how you can't see a list of stations. I've searched and added some of my favorite stations I knew about from before, however, they are playing completely different music? How can this be?
    Thanks!

    I just found the answer. iTunes will play consecutively the songs that are checked, if Controls --> Repeat Off is checked. When I asked the question I had unchecked all songs.

  • How to display the date from callender for more than one date format items

    i have one form which contains many date format items. i want to show the calendar and take the date from calendar.
    i am successfully show the calendar and take the date from calendar for one date item.
    my problem is i want to do same for all date format items in the form
    can any one help me?
    thanks

    Maybe you could provide more information.
    What calendar ? what item works ? what other don't ?
    is the issue in the different format masks ?
    Please elaborate more your situation.
    Francoisit is not the issue of different format masks.
    i created a block which name is jbeanblock. in this block item is bean. bean has one trigger when_custom_item_event.
    the code of this trigger is :
    DECLARE
    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
    LC$Date varchar2(256);
    LC$Day varchar2(256);
    LC$Month varchar2(256);
    LC$Year varchar2(256);
    v_date date;
    BEGIN
    IF (eventName='CALENDAR_EVENT') THEN
    eventValues := get_parameter_list(:system.custom_item_event_parameters);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_DATE',eventValueType, LC$Date);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_DAY',eventValueType, LC$Day);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_MONTH',eventValueType, LC$Month);
    get_parameter_attr(eventValues,'CALENDAR_EVENT_YEAR',eventValueType, LC$Year);
    Clear_Message;
    select to_date(LC$Day||'/'||LC$Month||'/'||LC$Year,'dd/mm/yyyy') into v_date from dual;
    :ds_employee.hiredate:=v_date;
    synchronize ;
    END IF;
    END;
    hiredate is the item of the ds_employee table. hiredate has trigger when_new_item_instance. The code is
    Set_Custom_Property('JBEANBLOK.BEAN',1, 'SHOW_CALENDAR','50,50');
    ds_employee is my table name. which has 2 date items. one is hiredate and another is date_of_birth.
    for hiredate it is working. if i want to do same thing for date_of_birth also then how can we do?

  • Changing text colour affecting more than one text box

    I am creating a word cloud in a shape as a design.
    I want to use only 3 colours for the words randomly. Each word is in a seperate text box
    I am finding however that when I change the colour of one word it automatically changes a few? I cant work out why?

    What I've done in the past is
    Find out how many characters per line.
    Setup character style called VarLine 1, VarLine 2, VarLine 3 etc.
    Set up a paragraph style for your text.
    Go to the nested style.
    VarLine 1 up to # characters
    VarLine 2 up to # characters
    VarLine 3 up to # characters
    etc.
    Set up your Variables for
    Line 1
    Line 2
    Line 3
    Then set each one to pick up the appropriate VarLine character style.
    This works to a certain extent, it will need tweaking, as each application is different. I'm not sure if it will work in your case, but you never know.

  • How to handle the drop event

    Hi everyone,
    Now I'm developing the function about drag-drop source(image & text) from Panel Tree to the document.
    I also have a look at the basic drag/drop & Panel Treeview, but all of them is not the source code mentions to how to handle the drop event, almost about drag event only.
    Now when user Drags(image, text) from PanelTreeView(example) and drops them to document and then new page Item contains source(image, text) created, so I want to get the page item after drop event.
    so anyone know about this please give me suggestion
    thanks so much.

    i dont think you can.
    ~~~~~~~~~~~~~~~~
    --> Adobe Certified Expert
    --> www.mudbubble.com
    --> www.keyframer.com
    ~~~~~~~~~~~~~~~~
    keyoke_za wrote:
    > Hi,
    > How can I get my flash movie to handle the drop event
    when dropping objects from outside the flash window.
    > Thanks for your help..

  • How to handle the extended vo in the extended controller

    Hi,
    I want to know how to handle the extended vo attributes in the extended controller.
    I extended CompetenceElementsVO as 'CompetenceElementsEx' with 2 transient attributes called col1 and col2.
    Here i want to pass value according based on some condition. for this i want to know how to handle these attributes.
    I tried by using the extended vo name in the controller, if i use means then it is throwing error after the extended controller is implemented.
    Same time if i try to refer this attributes from the original vo definition, jdev itself showing error.
    please tell me how to handle this?
    Thanks in advance,
    SAN

    Hi San,
    You have to extend the controller where your region is associated with,
    And in that controller you get the AM(if there is more than one AM and your VO is associated with a child AM, first you have to get your required AM) and then
    get the ViewObject(standard).
    Then you should be able to get your newly added attributes.
    Please find the below sample code to get the AM handle and VO from there, update the code according to your requirement,
         Get all the VOs under the Root AM
         writeLog(pageContext, "Room AM"+ pageContext.getRootApplicationModule());
    String[] rootViewNames = pageContext.getRootApplicationModule().getViewObjectNames();
    /* writeLog(pageContext," Length of the VOs from Rootm AM "+rootViewNames.length);
    for (int j =0 ;j<rootViewNames.length ;j++ )
    writeLog(pageContext,j +" Value "+rootViewNames[j]);
         // Get requested AM from Root am
    public OAApplicationModule getRequestedAM(OAPageContext pageContext, String requestedAMName)
    writeLog(pageContext,"Requested AM called to check the AM "+requestedAMName );
    String amName = "";
    String objectivesAMName = requestedAMName;//"ObjectivesAM";
    String nestedAMArray[] = pageContext.getRootApplicationModule().getApplicationModuleNames();
    pageContext.writeDiagnostics(this,"Root AM=>"+pageContext.getRootApplicationModule().getName() + " Child AMs=>"+ nestedAMArray.length,1);
    OAApplicationModule currentAM = null;
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule();
    for(int i = 0; i < nestedAMArray.length; i++)
    amName = nestedAMArray;
    pageContext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule(amName);
                        //Get the view names
                   String[] viewNames = currentAM.getViewObjectNames();
    for (int i =0 ;i<viewNames.length ;i++ )
    writeLog(pageContext,i +" Value "+viewNames[i]);
    if(!(amName.indexOf(objectivesAMName)==-1))
    pageContext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
    break;
    return currentAM;
    Get the VO from the AM
    OAViewObject objAssessmentVO = (OAViewObject)yourAM.findViewObject("yourVO");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • How to change the source ip address

    hi all,
    i got the problem that how to change the source ip address when i
    get a website's page!
    i mean i want to change the source ip address when i access the
    remote website, sure i know when change the source ip, i can not get
    the result correctly when changing the source ip address, but it is not
    important to get the result i just want to send out a "click" event to the website by calling a post method in the site!
    does anybody have some ideas?
    Best Regards,
    Eric Gau

    Here's some code that connects to google and does a get:
    import java.io.*;
    import java.net.*;
    public class HTTPTest {
        private Socket sock;
        private BufferedReader in;
        private BufferedWriter out;
        private boolean running = false;
        HTTPTest() {
        private void go(String site) {
            try {
                sock = new Socket(site, 80);
                in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
                System.out.println("Connected");
                out.write("GET / HTTP/1.1\r\n\r\n");
                out.flush();
                doRead();
            } catch (IOException e) {
                e.printStackTrace();
        private void doRead() {
            running = true;
            String line;
            System.out.println("Read started");
            while (running) {
                try {
                    line = in.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                    line = null;
                if (line == null) {
                    running = false;
                } else {
                    System.out.println(line);
            System.out.println("Socket closed");
        public static void main(String [] args) {
            String site;
            if (args.length > 0) {
                site = args[0];
            } else {
                site = "google.ca";
            new HTTPTest().go(site);
    }

  • How to limit the number of search results returned by oracle text

    Hello All,
    I am running an oracle text search which returned the following error to my java program.
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    #### ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    java.sql.SQLException: ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    When i looked up the net, one suggestion that was given is to narrow the wildcard query, which i cannot in my search page. Hence I am left with the only alternative of limiting the number of results returned by oracle text search query.
    Please let me know how to limit the number of search results returned by oracle text so that this error can be avoided.
    Thanks in advance
    krk

    Hi,
    If not set explicitly, the default value for WILDCARD_MAXTERMS is 5000. This is set as a wordlist preference. This means that if your wildcard query matches more than 5000 terms the message is returned. Exceeding that would give the user a lot to sift through.
    My suggestion: trap the error and return a meaningful message to the user indicating that the search needs to be refined. Although it is possible to increase the number of terms before hitting maxterms (increase wildcard_maxterms preference value for your wordlist), 5000 records is generally too much for a user to deal with anyway. The search is not a good one since it is not restricting rows adequately. If it happens frequently, get the query log and see the terms that are being searched that generate this message. It may be necessary to add one or more words to a stoplist if they are too generic.
    Example: The word mortgage might be a great search term for a local business directory. It might be a terrible search term for a national directory of mortgage lenders though (since 99% of them have the term in their name). In the case of the national directory, that term would be a candidate for inclusion in the stoplist.
    Also remember that full terms do not need a wildcard. Search for "car %" is not necessary and will give you the error you mentioned. A search for "car" will yield the results you need even if it is only part of a bigger sentence because everything is based on the token. You may already know all of this, but without an example query I figured I'd mention it to be sure.
    As for limiting the results - the best way to do that is to allow the user to limit the results through their query. This will ensure accurate and more meaningful results for them.
    -Ron

  • How to handle the Timestamp datasource while migration

    Hi All
    " I tried searching the forum,but didnt get the relevant one,hence posting this question".
    While migration from 4.7 to ECC in R/3 system,
    how to handle the Timestamp datasources( especially FI like COPA and other ) while extarcting the data from source to BW during source system migration.Since we need to empty the delta queue and should make sure that there are no delta records exists in delta queue.
    Like for sales datasources using LO,we will be executing the V3 jobs for execting the LUW's from LBWQ to RSA7?  In the same way is there any particular way for this also.
    Anyone whi knows abt this pls share your views
    Regards
    Shankar

    Hello Shankar.
    Before the upgrade (import of a queue), all extraction queues and open
    update orders in all clients must be processed. The content of the setup
    tables must be deleted. To avoid problems during the upgrade or to
    correct them, carry out the following steps:
    1. Call transaction SMQ1 and check whether all queues in all clients
    (client = '', queue name 'MCEX') have been processed. To process the
    queues, start the collective run report for each application in the
    displayed clients. If you no longer need the data in the BW system,
    deactivate the relevant extraction queues and DataSource in the LO
    cockpit (transaction LBWE) and delete the queue entries in transaction
    SMQ1.
    2. If you use the V3 update that is not serialized (usually only for
    application 03): Start collective run report RMBWV303. Then check the
    update orders in transaction SM13. If there are incorrect update orders
    in transaction SM13, correct the orders and then start the collective
    run report again. If you no longer require the update orders, you can
    delete them. There may be inconsistencies between tables VBMOD and
    VBHDR. For further information about this, see Notes 652310 and 67014.
    3. Before the upgrade, delete the contents of the setup tables. Execute
    report RMCEX_SETUP_ENTRIES to find out which setup tables still contain
    entries. You can use transaction LBWG to delete the contents of the
    setup tables for all clients.
    Unfortunately the check that the system carries out during the upgrade
    or when you import a Support Package does not display all affected
    applications. Therefore, Note 1083709 provides a check report that you
    can use to determine all affected applications and tables or queues.
    More detailed information please check these following notes:
    1083709-Error when you import Support Packages
    1081287-Data extraction orders block the upgrade process
    I hope I can be helpful.
    Thanks,
    Walter Oliveira.

  • How to handle the error handling..its urgent

    hi guys...
    how to handle the Exception using jsf. for example...in java program we try to connect the server...if server not connect then the exception occur like java.net.ConnectException.. i have to handle exception using jsf and display related error page...plz give me ur valuable words..its need is very urgent..
    advance thanx and with regards
    DJ

    Hi,
    1. create a new error bundle (myErrMsg) // copy from javax/faces/Messages.properties in jsf-impl.jar
    2. declare this bundle in your faces-config
    <application>
    <message-bundle>bundle.MyErrMsg</message-bundle>
    <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>fr</supported-locale>
    </locale-config>
    </application>
    3. handle the Exception in your backing bean
    ResourceBundle bdle = ResourceBundle.getBundle("bundle.MyErrMsg",this.getLocale());
    context.addMessage(clientId, new FacesMessage(severity, bdle.getString(key), null));
    4. add the tag messages in your jsp
    <h:messages layout="table" errorClass="TextError" infoClass="Text"/>

  • How to handle the table control While working with LSMW?

    How to handle the table control While working with LSMW?

    its possible in lsmw,
    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, it that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Thanks

Maybe you are looking for

  • Software Update ignores Scheduled Check under Snow Leopard

    I've tried asking our local Apple Genius Bar about this, but they weren't able to help me.  Here's the problem: I've upgraded to Snow Leopard on my late 2006 Mac Pro last year and changed my daily user account from Administrator to User.  I run the S

  • Service start/stop

    I am trying out service start/stop between different JVMs but am not seeing what I expected. I have attached a quickly written test program to try out a scenario. 1. Run the attached program (java Test -Dtangosol.coherence.cacheconfig=servicetest.xml

  • AS Java 7.10: Can't create JCO destination 'WD_RFC_METADATA_DEST' in SLD

    Hello, I registered my J2EE 7.10 in the central SLD (sldmain.wdf.sap.corp:53000) successfully and created JCO destinations WD_RF_METADATA_DEST + WD_MODELDATA_DEST there. But the deployment of a WD application using Adaptive RFC fails because the abov

  • Applescript delete certain text?

    Hello all. I need some help. I have a mailing list for my business and the way email addresses are entered is like this: "email","date","ip" So a quick example would be: "[email protected]","1268080664","XX.XXX.XXX.XXX" I don't want to use the online

  • Facebook app crashes immediately upon opening

    For some reason, I can not open Facebook app on iPhone or iPad .it crashes and closes immediately upon opening. Any ideas?