Prepopulate text in Claim's long text

Hi,
My client has a requirement to prepopulate the long text of claim notification with a predefined fixed text. So, whenever user will try to create a claim, the long text will already be showing some predefined text which would be editable. Is there a way to achieve this in standard SAP?
Thanks,
Nitisha

Hi Nitisha,
please try BAPI_CLAIM_CREATE .
thanks
Sunil

Similar Messages

  • Text Wrapping issue in Long Texts in ECC 6.0

    Hi,
    We are migrating Tasklist data from SAP 3.1i system to SAP 6.0. So we were moving the existing Long Text in 3.1i with the same paramenters to 6.0, I am facing an issue of text Wrapping(while displaying).
    I am updating complete header data like - TDID, TDOBJECT, TDNAME, Lang, TDFORM(SYSTEM as in 3.1i), Version, Line Size(72 as in 3.1i), Number of Lines by using SAVE_TEXT FM.
    I can see the text is updated properly but when i open the text in display mode(With PC Editor), i can see the text getting wrapped. Line size is limited to 40 Characters whereas in 3.1i its 72 characters.
    Please help me here.
    Thank you.
    Prasad

    Actually i tested with READ_TEXT function module. All parameters are fine, matches exactly with 3.1i but i am facing this issue while displaying.
    In display mode - in 3.1i Ruler shows 7.2 Inches(72 Characters) whereas in 6.0 its 4 inches(40 Characters). Should i go for any settings change so that i can see complete 72 characters in 1 line.
    Prasad

  • Find a word in long text

    Hi,
    I need to find all the routing cards that don't contain a certain word in their long text. any suggestions???
    Eti

    Hi
    Please check in following links.....you will find some solution.
    How to search for a word in a text editor
    Search in long text
    Word Search
    search word for '.'.
    Regards
    Sujit

  • How to add long text in bdc for transaction fb01 ?

    IN the existing program of bdc fb01
    i have to add a long text field
    but it gets stuck while i process in sm35
    is there a fm to add the field directly
    thanks in a advance

    Hi
    You can upload the Long texts separately into the transaction using the CREATE_TEXT fun module
    Need to pass the correct parameters like OBJECT,ID, OBJECTNAME and LANGuage with the proper declarations.
    see the sample code and do accordingly
    REPORT zmm_longtext_sm
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Description :   This Program is used to Upload the Service Master
                 :   Long Texts using the Fun Module CREATE_TEXT
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab OCCURS 0,
            asnum like asmd-asnum,    " Service No
            text  LIKE tline-tdline,  " Long Text
          END OF itab.
    To create Long Text lines for CREATE_TEXT function module
    DATA:BEGIN OF dt_lines OCCURS 0.
            INCLUDE STRUCTURE tline.   " Long Text
    DATA:END OF dt_lines.
    Variable declarations for CREATE_TEXT function module
    DATA : dl_name TYPE thead-tdname,   " Object Name
           dl_lan TYPE thead-tdspras.   " Language
    Constants
    CONSTANTS:
    Object ID for Long Text of Service Master
      c_best     TYPE thead-tdid VALUE 'LTXT',
      c_material TYPE thead-tdobject VALUE 'ASMD'. " Object
    Parameters
    PARAMETERS p_file LIKE rlgrap-filename.
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start Of Selection
    START-OF-SELECTION.
    *To Upload Flat file
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = itab
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
    Upload the Texts
      SORT itab BY asnum.
      LOOP AT itab.
        dt_lines-tdformat = 'ST'.
        dt_lines-tdline = itab-text.
        APPEND dt_lines.
        dl_lan = sy-langu.
        concatenate '00000000000' itab-asnum into dl_name.
    Call the Function Module to Create Text
        CALL FUNCTION 'CREATE_TEXT'
          EXPORTING
            fid         = c_best
            flanguage   = dl_lan
            fname       = dl_name
            fobject     = c_material
            save_direct = 'X'
            fformat     = '*'
          TABLES
            flines      = dt_lines
          EXCEPTIONS
            no_init     = 1
            no_save     = 2
            OTHERS      = 3.
        IF sy-subrc <> 0.
          WRITE:/ 'Long Text Creation failed for Service No'(001),
                 itab-asnum.
        ELSE.
          WRITE:/ 'Long Text Created Successfully for Service No'(002),
                 itab-asnum.
        ENDIF.
        AT END OF asnum.
          REFRESH dt_lines.
        ENDAT.
      ENDLOOP.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to upload long text in CA02 Transaction

    Hi,
    I am getting a file with the following format.
    Input File Record Layout:
    Group#                  like PLKO-PLNNR,     
    Group Counter             like PLKO-PLNAL,
    Operation#          like PLPO-VORNR,     
    Work Center#          like PLPOD-ARBPL,
    Control Key          like PLPO-STEUS,     
    Short-text          like PLPO-LTXA1,
    Long-text          type c(1000).     
    i have to upload the long text in the CA02 transaction. Could you please let me know the procedure that i should follow in uploading this in doing a call transaction in BDC.
    Thanks in Advance,
    Suresh

    Take a look at FM SAVE_TEXT
    To get the parameters of the FM :
    Goto the long text in CA02 and then via the menu :
    Goto --> Header .
    A popup is displayed containing the input parameters  :
    Text Name
    Language
    Text ID 
    Text object.
    Hope it helps,
    Erwan.
    Message was edited by: Erwan LE BRUN

  • Upload Material master with long text using LSMW

    Hello,
    i want ot upload material master data via MM01 using LSMW in following views: basic data 1 ,2,  purchasing, purchase order text, plant data 1,2.
    i have to upload long text in purchase order text with length more then 132 char. (approx 700 char long text). and i have text file in which long text is maintained in a single row. then how can i do it without formating text file or anyother possible solution.
    please help.

    ca u clarify how can i do it.
    suppos i have longtext   "Air cooled type air-conditioning unit complete with following components & distance between indoor & outdoor unit is  10 RMT.  A).Indoor evaporating unit comprising of cooling coils,insulated drain tray,20 micron HDPE washable filters,blower,motor,electical junction box etc. B).Outdoor condensing unit comprising of hermatic/semiharmetic compressor's.condenser coils,propeller/axial fans,motors,pressure switches/cutout etc.C).Charging of refrigerant gas & oil.D).Inter connecting refrigerating piping  of copper duly insulated with EXPANDED POLYETHYLENE tubing.E).Complete electical power wiring of AL.&Control wirng of copper required from indoor & outdoor units.Earthing of the complete system with 8 G G.I.wire.  F).Electrical panel will be completed with necessary starter,fuses,switches,timers,over-load relays,contactors,push button and indicating lamps,single phasing preventer etc..and also with remote control with cording. G).The panel should have 1 no.potential free contactor to connect with central fire detection system.The panel should have voltage scanner to ensure stabilized power input to the machine.H).Outdoor unit shall be mounted on MS angle base frame structure duly black painted with synthetic epoxy paint.I).The frame structure shall be mounted on MS plate & serrated rubber pads."
    then what i have to do changes in lsmw.?

  • SAVE TEXT not updating the database for Recipe Operation Long Texts

    Hi,
    We are trying to update the Recipe Operation long text using the FM SAVE_TEXT.
    The FM is not throwing any error, but the changes are not reflecting in the database.
    Text ID: PLPO
    Text Object: ROUTING
    Language: EN
    Text Name: Concatenated string of ARBPL,PLNNR,OPRATIONCOUNTER
    If someone faced similar scenarios, please share your inputs.
    Thanks in advance,
    Anand

    After some more R & D, i got to know that the Long Text indicator should be enabled to get the changes reflected in the C203 recipe operation details.
    In C202, if you pass two text lines for Operation long text, this Long text indicator is automatically enabled and its a non editable field.
    Can some one provide inputs how to enable this through program?
    Regards,
    Anand

  • Upload Task List Operation long Text using SAVE_TEXT-Urgent

    Hi ,
    I am trying to create Task List Operation Long text using the function module ..
    SAVE_TEXT .I am passing the following keys
    Text Name       300ATEST057 0000000900000009
    Language        EN
    Text ID            PLPO Long Text
    Text Object     ROUTING    Texts for task list types
    But the long texts are not getting updated in the Task lists operations .
    Can anyone please suggest whether SAVE_TEXT will work for Operation long Texts or not Are we missing something
    .This is pretty urgent requirement .Award points are assured.
    Regards
    Sam

    hi,
    use function module create text
    check the sample code
    DATA: BEGIN OF itab OCCURS 0,
          asnum LIKE asmd-asnum, " Service No
          text(5000)  TYPE c, " Long Text
          END OF itab.
    *DATA: itab1 LIKE itab OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF itab1 OCCURS 0,
          asnum LIKE asmd-asnum, " Service No
          sequ  type i,          " Text Sequence
          text(5000)  TYPE c, " Long Text
          END OF itab1.
    To create Long Text lines for CREATE_TEXT function module
    DATA:BEGIN OF dt_lines OCCURS 0.
            INCLUDE STRUCTURE tline. " Long Text
    DATA:END OF dt_lines.
    Variable declarations for CREATE_TEXT function module
    DATA : dl_name TYPE thead-tdname, " Object Name
           dl_lan TYPE thead-tdspras. " Language
    Constants
    Object ID for Long Text of Service Master
    CONSTANTS:c_best TYPE thead-tdid VALUE 'LTXT',
              c_material TYPE thead-tdobject VALUE 'ASMD'. " Object
    for file splitting.
    DATA: start TYPE i,
          len   TYPE i VALUE 92,
          totlen TYPE i,
          n TYPE i.
    PARAMETERS p_file LIKE rlgrap-filename."input file
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start Of Selection
    START-OF-SELECTION.
    *To Upload Flat file
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = itab
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      LOOP AT itab.
        itab1-asnum = itab-asnum.
        CLEAR: totlen,n, start.
        totlen = STRLEN( itab-text ).
        n = totlen / len.
        n = n + 1.
        DO n TIMES.
          itab1-text  = itab-text+start(len).
          itab1-sequ  = sy-index.
          start = start + len.
          APPEND itab1.
        ENDDO.
      ENDLOOP.
      delete itab1 where text is initial.
      SORT itab1 BY asnum sequ.
      LOOP AT itab1.
        dt_lines-tdformat = '*'.
        dt_lines-tdline = itab1-text.
        APPEND dt_lines.
    Call the Function Module to Create Text
        AT END OF asnum.
          dl_lan = sy-langu.
          WRITE : / itab-asnum.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = itab1-asnum
            IMPORTING
              output = itab1-asnum.
          MOVE itab1-asnum TO dl_name.
          CALL FUNCTION 'CREATE_TEXT'
            EXPORTING
              fid         = c_best
              flanguage   = dl_lan
              fname       = dl_name
              fobject     = c_material
              save_direct = 'X'
              fformat     = '*'
            TABLES
              flines      = dt_lines
            EXCEPTIONS
              no_init     = 1
              no_save     = 2
              OTHERS      = 3.
          IF sy-subrc <> 0.
            WRITE:/ 'Long Text Creation failed for Service No'(001),
            itab1-asnum.
          ELSE.
            WRITE:/ 'Long Text Created Successfully for Service No'(002),
            itab1-asnum.
          ENDIF.
          REFRESH dt_lines.
        ENDAT.
      ENDLOOP.
    in text file give first field records in capitals
    regards
    siva

  • Long Text in Main Window

    Hi,
    I am trying to print 'Item Text' from invoice just below each item description(same cell of 'item descripotion' is used to print 'Item Text' in MAIN WINDOW )  in smartform. I had used an include text.
    For Ex: long text maintained is
    TEXT1 TEXT1TEXT1
    TEXT1TEXT1TEXT2
    TEXT1TEXT1TEXT3
    TEXT1TEXT1TEXT4
    TEXT1TEXT1TEXT5
    If suppose maximum size of cell can occupy only 3 lines of above long text , then it should only print remaining last two lines on the next page .
    Main Window
    Page 1
    Item Desciption
    TEXT1 TEXT1TEXT1
    TEXT1TEXT1TEXT2
    TEXT1TEXT1TEXT3
    Page 2
    TEXT1 TEXT1TEXT4
    TEXT1TEXT1TEXT5
    Also in the layout design height of main window on NEXT PAGE  is slightly greater than size on FIRST PAGE.
    But , in my case it is generating three pages.  Page 2 and 3 are printed as shown below.
    Page 2
    Item Desciption
    TEXT1 TEXT1TEXT1
    TEXT1TEXT1TEXT2
    TEXT1TEXT1TEXT3
    TEXT1 TEXT1TEXT4
    Page 3
    Item Desciption
    TEXT1 TEXT1TEXT1
    TEXT1TEXT1TEXT2
    TEXT1TEXT1TEXT3
    TEXT1 TEXT1TEXT5
    Please let me know , how to correct this.
    Note:- Form is Migrated from SAP Script to Smartform.

    Hi Mayank,
    Use Page protection For that TEXT Element (Include) in output options.
    Regards,
    Soorya

  • Problem in formatting of long text -- line break not recognized.

    Hi ,
    We have a PO smartform in our SRM system and we are facing problem with formatting of long text on the smartform for long texts maintained for the PO.
    for ex, we maintain the long text as --
    "this is long text for item 1.
    1. this is line 1.
    2. this is line 2."
    On the smartform it is displayed as --
    this is long text for item 1. 1. this is line 1. 2. this is line 2.
    So basically, the line breaks in the text are not considered in the smartform .
    Any suggestions on how to fix this issue ??
    Thanks.

    Hello Harmeet,
    Which Std. FM are you using to fetch the PO texts? If the PO doesn't exist in your system, i'm afraid you cannot use Include Texts as mentioned by Harsh.
    As an alternative you'll have to create a table & pass the text lines to it! I don't think SmartForms are not smart enough to identify new-line character.
    BR,
    Suhas

  • Issue with Capturing Long text using CALL METHOD EDITOR- GET_TEXT_AS_STREAM

    HI Experts,
    Standard Long text is capturing using CALL METHOD EDITOR->GET_TEXT_AS_STREAM
         but not working for Custom Long text – Only changes
    Here is the Issue:
    1)      Created Custom Long text in TAB. --> Good
    2)      Entered few lines in custom Long text  --> Good
             Click on Standard Tab , Leaving Custom tab and Custom Long text-->Good
    4)      In PAI of Custom Tab – Changes captured using CALL METHOD 1 ( See below Code 1)--> Good
    5)      Entered few lines in Standard Long text in Standard Tab -->Good
    6)      Click another Standard Tab
    7)      In PAI of Standard Tab – Changes captured using CALL MEHTOD 2 ( See Below Code 2)-->Good
    8)      Come back to Standard Tab / Standard Long Text , Enter few more lines.
    9)      Change the Tab , IN PAI of Standard Tab/Standard Text , Changes Captured using CALL METHOD2 ( See Below CODE 3) --> Good
    10)   Go to Custom Tab , Custom Long text , Entered few more lines--> Good
    11)   Click on any other tab, Triggered again PAI of Custom tab / Custom Long text using Call Method1 ( See Below Code 4) -->Good triggered PAI same CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM.
    12)   But additional lines are not captured , saying ZERO LINES in Internal Table and IF_MODIFIED = NO  -->Issues lies here.
    CODE1 ( Custom Long text entry capturing – First Few Lines )
    Custom Long text Entries are stored in LS_OUTTAB-TEXT first time when entered few lines and LV_MOD is 1.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT ( FIlled with Lines entered in custom long text )
              IS_MODIFIED            = LV_MOD ( Value 1 , Modified )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    CODE2 ( Standard Long Text Entry Capturing – First Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT first time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE ( Value 1 , Modified )
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED.
    CODE 3 ( Standard Long Text Entry Capturing – Second time Few Lines )
    Standard Long text Entries are stored in SELECTED_TEXT  second  time when entered few lines and FLAG_MODIFIED is 1.
    PAI of Standard tab
       CALL METHOD EDITOR->GET_TEXT_AS_STREAM
          EXPORTING
            ONLY_WHEN_MODIFIED = YTRUE
          IMPORTING
            TEXT                               = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
            IS_MODIFIED        = FLAG_MODIFIED. ( Value 1 , Modified )
    CODE4 ( Custom Long text entry capturing – Second Time Few Lines )
    Custom Long text Entries are not stored in LS_OUTTAB-TEXT Second Time when entered few lines and LV_MOD is 0.
    PAI of Custom tab
    CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
            EXPORTING
              ONLY_WHEN_MODIFIED     = CL_GUI_TEXTEDIT=>TRUE
            IMPORTING
              TEXT                                       = LS_OUTTAB-TEXT  ( ZERO ENTRIES )
              IS_MODIFIED            = LV_MOD   ( NOT MODIFIED Flag )
            EXCEPTIONS
              ERROR_DP               = 1
              ERROR_CNTL_CALL_METHOD = 2
              OTHERS                 = 3
    Can anyone help me out of this.
    With Regards,
    Bala M

    Excellent Eitan,
    Here is what I am trying to Achieve.
    In Create Notification IW21 , They need 5 Long Text in Custom Tab ( Say Tab Name is MBR ).
    TAB1 NOTIFICATION Standard Information , TAB2 REFERENCE OBJ , TAB 3 MalFunction , Breakdown Standard one...... TAB 7 ( Custom Tab ).
    In Custom Tab , I added 5 LONG TEXT ( its 5 WHY Concept ).
    When the User enters data in 5 Long text , it should store long text along with Notification number when save.
    But Notification number will be generated @ the time of SAVE , but before that its just shows as
    %0000000001 ( and Number will be generated 1000065479) at Save.
    How to achive this .
    I did this:
    Added 5 Custom Container. and In PBO / PAI
      PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    IN PBO
       CREATE OBJECT TEXT_EDITOR1 ,    CREATE OBJECT TEXT_EDITOR2,    CREATE OBJECT TEXT_EDITOR3 like wise 5
       CALL METHOD TEXT_EDITOR1->SET_TEXT_AS_R3TABLE ,    CALL METHOD TEXT_EDITOR2->SET_TEXT_AS_R3TABLE .. Like wise 5 , So when the user Click on Custom Tab ( MBR ).
    It give 5 Long text.
    When he click tab1 or tab2 or tab3 .. and again tab MBR , still data is available.
    How to store this data for future retrival ( IW22 or IW23 ) ?
    Its working fine when I enter first time and goes here and there and finall save .
    IN SAVE BADI , I imported the Long text and created Standard Text SO10 with Notification Number with LONG1 , LONG2 .. means 1000065479LONG1 as standard text.
    But not working when I entered first time and go to tab1 and tab2 and then to MBR tab and added few more lines , its not exporting full lines and in IMPORT ( SAVE BADI ) giving ZERO Lines.
    Please help and thanks for your quick response.

  • How to display field values in long text of messages....

    Hi,
      Currently iam doing an userexit. In that i want to display error messages. and if we click on message it will display the long text. My question is i want to display field values in the long text. Under the long text's &system_response& i want  to display a field value.
    Regards
    chinna

    Hi Chinna,
    Within short and long texts, you can use placeholders, which can be replaced with the content of data objects using the MESSAGE statement. A maximum of four character-type placeholders are permitted; they are indicated by #&i# in short texts, and by #&Vi&# in long texts, where i = [1, 4]. If #&# itself is to be displayed as part of the text, it must be specified as #&&# in short texts and as "&" in long texts.
    To add some detail on how to create variables in Long text, you have to go to 'commands' and in symbol option provide the variables like
    &V1&  &V2&  and so on.
    Hope this helps you.
    revert for further clarification.
    <b>Alwyas reward Points to useful suggestions.</b>
    Regards,
    Vikas
    Message was edited by:
            Vikas Taneja

  • Dynamic text in Long text of message

    Hi All
    Can you please guide me that how dynamic text are maintained in long text of the messages.
    I have used variable name between 2 ampersands 1.e. &var&..but its nt working. Where could be the mistake ?
    Regards,
    Shreya

    The problem is... I want to show an error message. and when user double clicks on that message, a pop up screen should come showing the detailed description of that message which also contains some dynamic text...eg:
    The message is "Please maintain ABC field for Company Code &1".
    To this short text i want to give a long text description eg:
    "For the Combination of Compay Code &2 and Account &3, ABC field should not be blank".
    Dynamic text element in short text is working fine,  but in long text it is showing &2 and &3..,, ie these are not populated with values.
    Where could be the mistake ?

  • Alv- displaying long text in alv output

    hi,
              as per my requirement, i need to be display long text (length >1000 characters) in alv list or alv grid.
    i get the entaire long text and keep it in final internal table and pass it to alv functional module,  but  it unable to display the compleate long text( in alv-grid).
    the alv list displays the complete long text but not in the row, it displays in the second rown and few field labes of long text and its previous field label are displayed in impro[per order.
    is there any possible way to display long text in alv.
    regards,
    revoori

    Hi Ashok,
    try to pass the below while filling your long text.
    wa_fieldcat-seltext_l  = 'Your Long Text'.
    wa_fieldcat-ddictxt = 'L'.
    for more info check below
    Long Text --- 1000 characters
    hope it works
    Thnaks!
    Edited by: Prasanth on Mar 8, 2009 4:03 PM

  • BDC-Long-Text

    Hi All,
    When Uploading the Data for FB02, i am facing problem with long-text.I have used FM SAVE_TEXT.But How to Save all the lines Data.Please send me the code for FB02,where all lines data has to be saved.
    Thanks&Regards.

    Sri,
    check this code for more than 5K char:
    TABLES : MARA, TLINE, THEAD.
    DATA: BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR, " MATERIAL NUMBER
    TEXT(5000) TYPE C, " Long Text
    END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 0,
    MATNR LIKE MARA-MATNR, " Material No
    SEQU TYPE I, " Text Sequence
    TEXT(5000) TYPE C, " Long Text
    END OF ITAB1.
    DATA:BEGIN OF DT_LINES OCCURS 0.
    INCLUDE STRUCTURE TLINE. " Long Text
    DATA:END OF DT_LINES.
    DATA : P_FILE1 TYPE STRING.
    DATA : DL_NAME TYPE THEAD-TDNAME, " Object Name(material no)
    DL_LAN TYPE THEAD-TDSPRAS. " Language
    CONSTANTS:C_BEST TYPE THEAD-TDID VALUE 'BEST',
    C_MATERIAL TYPE THEAD-TDOBJECT VALUE 'MATERIAL'. " OBJECT
    DATA: START TYPE I,
    LEN TYPE I VALUE 92,
    TOTLEN TYPE I,
    N TYPE I.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-101.
    PARAMETERS P_FILE LIKE RLGRAP-FILENAME."input file
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    PERFORM FETCH_FILE USING P_FILE.
    *& Form fetch_file
    text
    -->P_FILE text
    FORM FETCH_FILE USING P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    IMPORTING
    FILE_NAME = P_FILE.
    ENDFORM. "fetch_file
    START-OF-SELECTION.
    PERFORM UPLOAD USING P_FILE. " *To Upload Flat file
    PERFORM UPLOAD_TEXT.
    *& Form UPLOAD
    text
    -->P_FILE text
    FORM UPLOAD USING P_FILE.
    P_FILE1 = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = P_FILE1
    FILETYPE = 'DAT'
    HAS_FIELD_SEPARATOR = ' '
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    TABLES
    DATA_TAB = ITAB
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF SY-SUBRC EQ 0.
    *message i001 with p_file .
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. "UPLOAD
    *& Form UPLOAD_TEXT
    text
    FORM UPLOAD_TEXT.
    LOOP AT ITAB.
    ITAB1-MATNR = ITAB-MATNR.
    CLEAR: TOTLEN,N, START.
    TOTLEN = STRLEN( ITAB-TEXT ).
    N = TOTLEN / LEN.
    N = N + 1.
    DO N TIMES.
    ITAB1-TEXT = ITAB-TEXT+START(LEN).
    ITAB1-SEQU = SY-INDEX.
    START = START + LEN.
    APPEND ITAB1.
    ENDDO.
    ENDLOOP.
    DELETE ITAB1 WHERE TEXT IS INITIAL.
    SORT ITAB1 BY MATNR SEQU.
    LOOP AT ITAB1.
    DT_LINES-TDFORMAT = '*'.
    DT_LINES-TDLINE = ITAB1-TEXT.
    APPEND DT_LINES.
    AT END OF MATNR.
    DL_LAN = SY-LANGU.
    WRITE : / itab-MATNR.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = ITAB1-MATNR
    IMPORTING
    OUTPUT = ITAB1-MATNR.
    MOVE ITAB1-MATNR TO DL_NAME.
    CALL FUNCTION 'CREATE_TEXT'
    EXPORTING
    FID = C_BEST
    FLANGUAGE = DL_LAN
    FNAME = DL_NAME
    FOBJECT = C_MATERIAL
    SAVE_DIRECT = 'X'
    FFORMAT = '*'
    TABLES
    FLINES = DT_LINES
    EXCEPTIONS
    NO_INIT = 1
    NO_SAVE = 2
    OTHERS = 3.
    IF SY-SUBRC 0.
    WRITE:/10 'Long Text Creation failed for Material No', ITAB1-MATNR.
    ELSE.
    WRITE:/10 'Long Text Created Successfully for Material No', ITAB1-MATNR.
    ENDIF.
    REFRESH DT_LINES.
    ENDAT.
    ENDLOOP.
    ENDFORM. "UPLOAD_TEXT

Maybe you are looking for

  • Indesign CS3 plugin..enabling/disabling operations

    Hi, Is it possible to perform save/close operation after enablin the save menu, close button of an open indesign document (they were disabled befor i.e. when app loads)? I have 2 menus, one for enabling close button in the document, second for enabli

  • Cannot save an MP3 file from a webpage after Leopard upgrade

    Hello, I am a graduate student and my instructor posts his lectures online as mp3 files. When I was using Tiger and Safari, I was able to right click the file and save it to my computer. Now, after I upgraded to Leopard, I right click and attempt to

  • Confused on my new BofA card

    I believe mine was charged within the first month or two. I know when the first statement cut and they reported to the bureaus, they did report the $39 fee. Keep your eye out for it, it will come. Edit: I just re-read your post. You definitely should

  • No transition found from state: STARTING

    Hi Experts, I am doing a scenario with JMS receiver communication channel, and there is an error occurring when I send the data to JMS adapter: Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: No transition found from

  • Using Windows Media Player How is it done

    I am using the IPod Shuffle. My Family has several mp3 player that all use the Windows Media Player to upload the music we want to hear. I would like to do the same with the Shuffle. I do not want to download the iTunes. As of right now my computer s