FM to fix text length

Hi....
I've got a problem in Smartform where in if the firs column fields lenght(character type) is less it printing the second column in the space and the order of column entry is shuffling.....
My text length is 30 character long i've fixed it like &itab-text(30)& in text element........but when the text character is less that 20 chars i'm having the shuffling problem and the second column get fixed up the space and the order gets misplace.....i'm using tab stop for giving space between two columns and its fixed for every columns......i tried this my concatenating space when the text lenght is less than 20 chars....but still the same problem........and tried every thing now i just wonder do we have any FM to fix the lenght of text to achieve the result.......
Points wud be surely awarded.....Thxxxxxxxxxxxxx

hi,
may be this  function module will helpful for u for fomating the text.
CALL FUNCTION 'FORMAT_TEXTLINES'
EXPORTING
cursor_column = 1
cursor_line = 1
endline = 99999
formatwidth = 45
linewidth = 45
startline = 1
language = sy-langu
*IMPORTING
*NEW_CURSOR_COLUMN =
*NEW_CURSOR_LINE =
TABLES
lines = g_tline
EXCEPTIONS
BOUND_ERROR = 1
OTHERS = 2
IF sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • SRM Fixed Text Mapped to ERP Purchase Order for Extended Classic

    We are switching from Classic to Extended Classic.
    We currently have "Contract Riders" which are fixed text that the users can select and the header level on the ERP purchase order. 
    We need to add this functionality to the SRM purchase order.  Unfortunatly the fix text on the SRM purchase order is only 30 in length.  Can we map the fixed text codes from the SRM purchase order to the ERP purchase order so that the full text on the ERP side is selected?
    Or is there a way to allow more than 30 characters for the fixed text in the SRM purchase order?
    Regards,
    -Paul

    Answered.

  • How to load unicode data files with fixed records lengths?

    Hi!
    To load unicode data files with fixed records lengths (in terms of charachters and not of bytes!) using SQL*Loader manually, I found two ways:
    Alternative 1: one record per row
    SQL*Loader control file example (without POSITION, since POSITION always refers to bytes!)<br>
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode.dat
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001111112234444
    01NormalDExZWEI
    02ÄÜÖßêÊûÛxöööö
    03ÄÜÖßêÊûÛxöööö
    04üüüüüüÖÄxµôÔµ Alternative2: variable length records
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode_var.dat "VAR 4"
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001501NormalDExZWEI002702ÄÜÖßêÊûÛxöööö002604üuüüüüÖÄxµôÔµ Problems
    Implementing these two alternatives in OWB, I encounter the following problems:
    * How to specify LENGTH SEMANTICS CHAR?
    * How to suppress the POSITION definition?
    * How to define a flat file with variable length and how to specify the number of bytes containing the length definition?
    Or is there another way that can be implemented using OWB?
    Any help is appreciated!
    Thanks,
    Carsten.

    Hi Carsten
    If you need to support the LENGTH SEMANTICS CHAR clause in an external table then one option is to use the unbound external table and capture the access parameters manually. To create an unbound external table you can skip the selection of a base file in the external table wizard. Then when the external table is edited you will get an Access Parameters tab where you can define the parameters. In 11gR2 the File to Oracle external table can also add this clause via an option.
    Cheers
    David

  • Is there a way to change the master text length in FCP? The default length is 10 seconds, which is too long. I can easily adjust the length but I don't want to do it each time, and I don't want to adjust one and then have to copy and paste this length.

    Is there a way to change the master text length in FCP? The default length is 10 seconds, which is too long. I can easily adjust the length but I don't want to do it each time, and I don't want to adjust a text clip and then have to copy and paste this each time. Ideally, there should be something in User Preferences but there is not. Thanks.

    Maybe some one else can pipe up with a solution, but this would literally take 2 seconds to do for a new project.  And you can create a "template project" that includes this "text" clip.  Save this project and then to a get info and check "stationary pad."  When you double click on this file, fcp will open with a copy of this project and you just need to do a save as. 
    I've been working with computer editing systems for longer than i can remember and at a certain point you just have to adapt your workflow to the limitations of the software.  

  • Issue in FCC paramenter in Fixed Filed Length file at reciver side

    Hi,
    I am doing IDOC to File interface. In that at receiver side I am sending file in Fixed Field Length Format.
    Receiver File Message structure is as fallows.
    Recordset                       
    --Control                        
    CTID                    
    CTGUI
    .... Control Fields
    --Header                     
    AHID                    
    AHGUI                  
    ....Header Fields
    --Detail
    ADID                   
    ADGUI               
    ... Detail Fields
    --Notes
    INID
    INGUI
    ...Notes Field
    We want output File format in such a way that each Control, Header, Detail & Notes records should come on different line.
    I am using following paramater in File Content conversion:
    Recordset Structure* = Control,Header,Detail,Notes
    Control.fieldFixedLengths  = control field lengths
    Header.fieldFixedLengths  = header field lengths
    Detail.fieldFixedLengths     = detail field lengths
    Notes.fieldFixedLengths     = Notes field lengths
    ignoreRecordsetName        = true
    But the problem is I am getting all records in same line in file.
    Any help on this issue will be appreciated.
    Regards,
    Prashant Kudtarkar

    Hi Suraj,
    You are right. When I open that file in notepad I am getting boxes at end of each record and all records are coming in same line but when I open that file in XL or wordpad I am getting each record on new line.
    I am using following paramater in File Content conversion:
    Recordset Structure* = Control,Header,Detail,Notes
    Control.fieldFixedLengths = control field lengths
    Header.fieldFixedLengths = header field lengths
    Detail.fieldFixedLengths = detail field lengths
    Notes.fieldFixedLengths = Notes field lengths
    ignoreRecordsetName = true
    Thanks and regards,
    Prashant Kudtarkar

  • Fixed note length in piano roll

    Hello ,is there any way to draw notes with a fixed length in the piano roll rather than using the last edited note's length?
    In other words,i want the default note length not to automatically change every time i draw/edit a new note (with a different length).
    Im quite sure this cannot be done, but i thought i should ask to confirm...
    I also feel i want to say my opinion on that,you dont have to read it or answer back to it:
    I find this way of editing very confusing and counter creative ,it sure adds extra thinking proccess.While you are drawing notes it
    constantly keeps your mind away from your melody line since in every step, you have to stop some milliseconds and think
    "which side should i drag to resize now given the new facts left or right?"....
    And extra (unnecessary) thinking always acts against creativity.
    I think it seems very logical the way i said that and that objectively, irrelevant to any personal preferences, this way of editing
    ,even if i doesnt annoy everyone ,it is indeed counter creative.
    Especcially if one really does a lot of editing rather than recording.
    I wish there was an option for that in the preferences, maybe something very simple like a checkbox "Automaticaly define default note" to uncheck.
    Im sure it would be only a few hours of programming for the developers to do something like that, but it would be such a saver for people
    who edit a lot or for people coming from other DAWS, or for anyone that simply cant get used to it because they feel it anti-intuitive / unatural...
    There...i shared my thoughts, at least i feel a better know...!
    (However if you read my opinion i d like to hear what other people (that do a lot of editing) feel )

    You can use the transform tool but it's "after the fact". Simply rubberband a group of notes to be changed and use the Transform tool under the piano roll's "function" menu. Choose "Fixed Note Length" then set the parameter box to the value you need.
    There's also this workaround:  Find a note of the correct length already in the sequence or create temporary notes of the correct length. I'm assuming by "draw" you mean using the pencil tool. Move the pencil over the *center of note with the length you need, left mouse click and hold for a second, until the pencil turns into a hand, you will now have the length set for drawing new notes. The pencil tool is still selected so you don't have any additional selections to make.
    Yes, it's a hassle, but once you get used to it you will find it's faster than what you've been doing.
    *slight correction: when moving the pencil tool over the *center of a note, it will change into the pointer arrow, left click and hold and it will change into the hand, move the pointer away and it goes back to the pencil.

  • Fixed record length with GUI_DOWNLOAD

    Hi All,
    In our current system we set global variables GLOBAL_FIXLEN_* by calling form SET_FIXLEN(SAPLGRAP).  This allows us to create ASCII download files using function module WS_DOWNLOAD that have a fixed record length of 160 as required by the bank.
    We are now going to a unicode system and WS_DOWNLOAD is being replaced by GUI_DOWNLOAD.  How can I continue to create a fixed record length of 160 using this function module?  I cannot find any similar GLOBAL_FIXLEN* variables in GUI_DOWNLOAD.
    Thanks in advance for suggestions,
    Kirsten

    Hi,
    Kirsten,
    I find form "set_trail_blanks" also not available in GUI_DOWNLOAD.
    FYI
    aRs

  • Issue with row/column text lengths in report painter

    Hi Gurus,
    I have created a report painter report with formatting of the row/column length text as medium, but for one FS item/GL Account the report when executed still picks up only the short text length. I am not sure how this can be resolved.
    Any ideas is appreciated.
    Regards
    Satish

    Applied OSS Note 360096 and it worked. Thanks for all your help.

  • Is it possible to import a Fixed Text file that does not have a header?

    I'm trying to import a Fixed Text file through Import Manager, but the text file I am receiving does not have a header on it (the first row is valid data). When I try importing this, Import Manager uses the first row of data as the headings. Is there any way to turn this off and tell Import Manager there is no header data in the file?
    Thanks!

    Hi Ryan ,ur requirement can be met only when u import the file as ODBC .for this follow the below steps.
    1)Go to control panel,in ur settings,select administrative tools
    2) In that select DATA SOURCE(ODBC ).
    3)Go to SYSTEM DSN tab select tab .
    4)Select ur file type MICROSOFT TEST DRIVER (.txt,.csv)
    5)Double click on "Import DSN" and in the blank give the name of DATA SOURCE NAME any name u want to give.
    6)Uncheck the use current directory box and select the directory ur file is it will automatically show ur source file select it and click ok.
    7) Now when u import ur file as ODBC give the name of ur DATA source name which u have given and it will show ur file in the source preview itself .
    In  this way u can import ur file as ODBC.
    Hope this may help u.
    Regards
    Ankit

  • CS3: how to create action to add fixed text of foreground color, etc.

    I'm trying to create an action and/or brush preset(?) that will:
    1) Add a fixed text string in the forground color, consistent font, size, etc.
    2) Apply a consistent Layer Style -> Bevel and Emboss setting
    3) Allow me to move the text to whatever position
    4) Change text layer opacity
    5) Flatten
    At some point in the past when searching the internet I came upon a description of how to create a brush preset (I think that was it) that did at least most of this, but somehow I seem to have lost the preset and don't know how to recreate it.
    thanks,
    Mike

    j_m_d wrote:
    I'm trying to create an action and/or brush preset(?) that will:
    1) Add a fixed text string in the forground color, consistent font, size, etc.
    2) Apply a consistent Layer Style -> Bevel and Emboss setting
    3) Allow me to move the text to whatever position
    4) Change text layer opacity
    5) Flatten
    At some point in the past when searching the internet I came upon a description of how to create a brush preset (I think that was it) that did at least most of this, but somehow I seem to have lost the preset and don't know how to recreate it.
    thanks,
    Mike
    First it is And/or you can create both or one or the other. For in actions  and scripts you can not automate the use of a brush.
    1) Add a fixed text string in the forground color, consistent font, size, etc.
        Easy if all images are the same size and a little more work if image size vary for you will need to scale the image.
        If you want to scale the image back to it original scale at the end of the action you need to use a little script in the action. .
    2) Apply a consistent Layer Style -> Bevel and Emboss setting
        Again easy if aoo images are the same size not posible if images vary in size for many setting in layer style are in absolute pixel size.
        However layer styles will look good for a range of images sizes like Print Size or thunbnail size or small web sizes.
        Therfore I create actions for print size images and work full size. if I need smaller image I work full size and resize before output.
    3) Allow me to move the text to whatever position
         This is quite easy to do in an action you simply add an interactive transform step after adding the text layer.
         However this is not a good idea if you want to batch the action. Interactive sort of defeats batch.
         With an action it is easy to posion a layer.
    4) Change text layer opacity
        Simply change the added text layers opacity and or fill and it will be recorded.
    5) Flatten
        Simple just record it I don't like actions that flatten though. If you give your action to some and the use it on an image the did a lot of work on the may get very upset the your acrion flatten all their work.
    Have a look at my Crafting Actions Package it cantains a sample action that add a text copyright layer to any size image.
    Package Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    12 Scripts for actions
    Example
    Download

  • 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

  • FIXED FIELD LENGTH is not constant

    Hello Guru's,
        This is the question asked in IBM .
    What will you do if field length of a field in flat file is not constant or not equal to the FIXED FILED LENGTH ?.
    i.e. f1 is of length is 10 and in one row its length is only 9 what will happen and what will you do to overcome this situation.( consider its a FILE TO FILE SCENARIO )
    can anyone help me in this regard.
    Thanks in advance.

    >     This is the question asked in IBM .
    > What will you do if field length of a field in flat file is not constant or not equal to the FIXED FILED LENGTH ?.
    > i.e. f1 is of length is 10 and in one row its length is only 9 what will happen and what will you do to overcome this situation.( consider its a FILE TO FILE SCENARIO )
    The ans for this question is very simple.
    Since your FIXED FIELD LENGTH is 10 correct. now if any value comes of length 9 or less, then there will be no problem at all. It will work perfectly without doing anything. BUT if your length goes beyond 10 then it will throw an error message which you can see in RWB.
    Shorter length is never a problem in case of FIXED FIELD LENGTH.
    I hope now you got the ans, but good way to learn is, to create a simple scenario and test it. )
    Regards,
    Sarvesh

  • How to fix the length of select list box?

    Halo, i am doing the research. I need to find out what is the method to fix the length of select list box. This is b'cos i can set the length of select list due to different length of record(s)/data(s).
    Another question to select list box. What is the maximum length of the select list box?? Can i enter the character with 255 lenght??
    Thank you very much..... a prompt reply will be appreciate!!

    Thanks for ur reply! actually that answer that you gave is right, but i also need to know what is the maximum lenght of character in the select list box?? any idea to that??
    Meanwhile, i also need to know how can i make the character display in select list box dynamically?? that means i can change the font style or font size??
    Anyway, thanks for ur answer.
    bscs.

  • How to perform Text length more than 4000 bytes

    I want to read each row from txt file
    and used utl_file pacage to concat contents into a variable,
    the variable datatype is varchar2(4000), so text length can't more than 4000 bytes,
    but I wish get full text from txt file, How can I do?

    Thans! Detlev.
    I have a code :
    PROCEDURE read_file( path in varchar2, filename in varchar2, msg in out varchar2) AS
    data_line varchar2(4000);
    ifile utl_file.file_type;
    BEGIN
    ifile := utl_file.fopen(path,filename,'R');
    LOOP
    utl_file.get_line( ifile, data_line);
    msg := msg | | rtrim(data_line);
    END LOOP;
    utl_file.fclose(ifile);
    EXCEPTION
    WHEN no_data_found THEN
    utl_file.fclose(ifile);
    END;
    My question is
    1. The msg length can't more than 4000
    2. I use utl_raw.cast_to_raw function, that can't cast varchar2 to raw if varchar2 length more than 2048
    3. If I want to change the data type varchar2 to raw,
    the utl_raw.concat function can't use Loop ....end loop clause,
    So that only use utl_raw.concat(ra1, ra2,ra3,ra4,ra5, ... ra12)
    I want to concat all line to a raw datatype from text file , How can I do?

  • How to hide the fixed text when it is not needed?

    Hi All,
    I am using a fixed texts in a lot of reports to detail queries.
    How to cancel or hide these fixed texts when there is no data returned for some detail query in the report?
    Note: I am using Reports 6i.

    Select that text and press F11 to call PL/SQL Editor and use the code as below.
    IF your_condition_when_no_data_returned THEN
      RETURN FALSE;
    ELSE
      RETURN TRUE;
    END IF;-Ammad

Maybe you are looking for

  • Tcode for report: PO missed delivery date

    Dear SAP Gurus, Kindly let me know is there any T-code for report which list the purchase orders missed for delivery date. Please help. Regards, Prashanth

  • How to get the filename when parsing a file with d3l

    All After some time have experience with interconnect, IStudio I need the following info. Is it possible to get the filename when parsing a flat file using a d3l? This is needed because we need to store the filename together with the data into the da

  • Business Area field should not get translate while doing allocations in co

    Dear All, In ecc 6.0 when we will be allocating expenses through assessment and Distribution the system credits sender cost center and debits receiver cost center,the same will be applicable for Business Area also. But my client is having plant =busi

  • Problem installing sun java studio creator

    I have downloaded the installable for sun java studio creator 2 update 1 for windows platform. I am unable to install the package. Following is the error Iog I get, when used in debug mode(Notice the last part ErrOut indicating the error). What is go

  • (261680070) Q SYNCH-11 How do my web service methods accees EJBs and java classes?

    A<SYNCH-11> How do my web service methods accees EJBs and java classes? A<SYNCH-11> It is simple to use java classes, just do it as you would ordinarily. The .jws file really contains a simple class so you can program with it in the same way that you