Read text fun module

Hi I have developed a report to display all the long texts like Sales text, Basic text , PO text using material in seleciton screen. For this i have used READ_TEXT funcmodule and able to display on the output screen. But the problem is , In the output display  last part of the long text is missing ...but it is there in final internal table..it is only allowing 128 characters long inthe output field and remaining was not printing .
field catalog i have adjusted the size but it is not working....
the entire code is this:
*& Report  ZSG_READ_LONG_TEXT
REPORT  ztext .
PROGRAM ID      :  ZSG_READ_LONG_TEXT
TITLE           :  Display text field for download
CREATE DATE     :  17-10-2008
AUTHOR          :  Suresh Nittala
DESCRIPTION     : To be able to download and view long text
Authorisation checks
Object            Authority Fields         ABAP Fields
                 |                        |
CHANGE HISTORY
DATE            | NAME    |  DESCRIPTION   | Reference
                      |                |
TABLES: mara,
        marc,
        t001k,
        makt,
        tvkwz.
TYPE-POOLS: slis.
DATA : BEGIN OF it_mara OCCURS 0,
       matnr  LIKE  mara-matnr,
       mtart  LIKE  mara-mtart,
       matkl  LIKE  mara-matkl,
       werks  LIKE  marc-werks,
       maktx  LIKE  makt-maktx,
       END OF it_mara.
DATA : wa_mara LIKE LINE OF it_mara.
DATA: BEGIN OF it_text OCCURS 0,
        matnr LIKE marc-matnr,     "Materia No
        maktx LIKE makt-maktx,     "Material Desc
        vkorg LIKE tvkwz-vkorg,
        vtweg LIKE tvkwz-vtweg,
        ltext TYPE string,
      END OF it_text.
DATA : wa_text LIKE LINE OF it_text.
DATA : lv_obj_name LIKE thead-tdname,
       lv_obj_id   LIKE thead-tdid,
       lv_object   LIKE thead-tdobject,
       lv_vkorg    LIKE tvkwz-vkorg,
       lv_vtweg    LIKE tvkwz-vtweg,
       it_line     LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : wa_line LIKE LINE OF it_line.
DATA : gv_maktx1 TYPE string,
       gv_maktx2 TYPE string,
       gv_maktx  TYPE string,
       gv_text   TYPE string,
       gv_language TYPE ddlanguage,
       gv_lines TYPE i.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
       i_fieldcat  LIKE LINE OF it_fieldcat,
       k_repid LIKE sy-repid,
       v_events TYPE slis_t_event,
       wa_event TYPE slis_alv_event.
DATA : gt_list_top_of_page TYPE slis_t_listheader,
       gt_events TYPE slis_t_event,
       gc_formname_top_of_page TYPE slis_formname VALUE 'ALV_TOP_OF_PAGE',
       c_save TYPE c VALUE 'A',
       c_alv_struct LIKE dd02l-tabname VALUE 'TYP_FINAL',
       gs_layout TYPE slis_layout_alv,
       c_alv_command TYPE slis_formname VALUE 'ALV_USER_COMMAND'.
           SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : so_matnr   FOR  mara-matnr , "material
                 so_mtart   FOR  mara-mtart,             "MaterialType
                 so_matkl   FOR  mara-matkl.             "Material group
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS : rb_btext  RADIOBUTTON GROUP rad1,
             rb_stext  RADIOBUTTON GROUP rad1,
             rb_ptext  RADIOBUTTON GROUP rad1.
PARAMETERS : p_langu LIKE sy-langu DEFAULT 'EN'.       "Companycode
SELECTION-SCREEN END OF BLOCK blk2.
     INITIALIZATION
INITIALIZATION.
PERFORM build_top_of_page.
PERFORM alv_build_event.
     START-OF-SELECTION
START-OF-SELECTION.
  PERFORM build_top_of_page.
  PERFORM alv_build_event.
  PERFORM get_data.
     END-OF-SELECTION
END-OF-SELECTION.
Display data on ALV screen
  PERFORM display_output.
*&      Form  GET_DATA
      text
-->  p1        text
<--  p2        text
FORM get_data .
Get the material.
  SELECT amatnr amtart amatkl bwerks c~maktx INTO CORRESPONDING
   FIELDS OF TABLE it_mara FROM mara AS a
      INNER JOIN marc AS b ON bmatnr = amatnr
      INNER JOIN makt AS c ON cmatnr = amatnr
      WHERE a~matnr IN so_matnr AND
            a~mtart IN so_mtart AND
            a~matkl IN so_matkl AND
            c~spras = p_langu.
  CLEAR : wa_mara.
  LOOP AT it_mara INTO wa_mara.
    IF rb_stext = 'X'.                          " FOR SALES TEXT
      SELECT SINGLE vkorg vtweg INTO (lv_vkorg, lv_vtweg)
       FROM tvkwz WHERE vtweg = '01'      AND
                        werks = wa_mara-werks.
      REFRESH it_line.
      CLEAR : wa_text,lv_obj_id,lv_object,lv_obj_name,it_line,gv_text.
      lv_obj_id = '0001'.
      lv_object = 'MVKE'.
      CONCATENATE wa_mara-matnr lv_vkorg lv_vtweg
           INTO lv_obj_name RESPECTING BLANKS.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = lv_obj_id
          language                      = sy-langu
          name                          = lv_obj_name
          object                        = lv_object
          archive_handle                =   0
           LOCAL_CAT                = ' '
         IMPORTING
           HEADER                   =
        TABLES
          lines                         = it_line
       EXCEPTIONS
         id                                 = 1
         language                      = 2
         name                           = 3
         not_found                     = 4
         object                          = 5
         reference_check           = 6
         wrong_access_to_archive       = 7
         OTHERS                               = 8.
      IF sy-subrc = 0.
        LOOP AT it_line INTO wa_line.
          IF wa_line-tdline IS NOT INITIAL.
            CONCATENATE gv_text wa_line-tdline
                 INTO gv_text  RESPECTING BLANKS.
          ENDIF.
        ENDLOOP.
        CONDENSE gv_text.
      ENDIF.
    ELSEIF rb_btext = 'X'.                       " FOR BASIC TEXT
      REFRESH it_line.
      CLEAR : wa_text,lv_obj_id,lv_object,lv_obj_name,it_line,gv_text.
      lv_obj_id = 'GRUN'.
      lv_object = 'MATERIAL'.
      lv_obj_name = wa_mara-matnr.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = lv_obj_id
          language                      = sy-langu
          name                          = lv_obj_name
          object                        = lv_object
          archive_handle                =  0
         LOCAL_CAT                     = ' '
     IMPORTING
         HEADER                        =
        TABLES
          lines                         = it_line
       EXCEPTIONS
         id                            = 1
         language                      = 2
         name                          = 3
         not_found                     = 4
         object                        = 5
         reference_check               = 6
         wrong_access_to_archive       = 7
         OTHERS                        = 8.
      IF sy-subrc = 0.
        LOOP AT it_line INTO wa_line.
          IF wa_line-tdline IS NOT INITIAL.
            CONCATENATE gv_text wa_line-tdline
                   INTO gv_text RESPECTING BLANKS.
          ENDIF.
        ENDLOOP.
        CONDENSE gv_text.
      ENDIF.
    ELSEIF rb_ptext = 'X'.                         " PO TEXT
      REFRESH it_line.
      CLEAR : wa_text,wa_line, lv_obj_id, lv_object,gv_text.
      lv_obj_id = 'BEST'.
      lv_object = 'MATERIAL'.
      lv_obj_name = wa_mara-matnr.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = lv_obj_id
          language                      = sy-langu
          name                          = lv_obj_name
          object                        = lv_object
          archive_handle                =  0
         LOCAL_CAT                     = ' '
     IMPORTING
         HEADER                        =
        TABLES
          lines                         = it_line
       EXCEPTIONS
         id                            = 1
         language                      = 2
         name                          = 3
         not_found                     = 4
         object                        = 5
         reference_check               = 6
         wrong_access_to_archive       = 7
         OTHERS                        = 8.
      IF sy-subrc = 0.
        LOOP AT it_line INTO wa_line.
          IF wa_line-tdline IS NOT INITIAL.
            CONCATENATE gv_text wa_line-tdline
                    INTO gv_text RESPECTING BLANKS.
          ENDIF.
        ENDLOOP.
        CONDENSE gv_text.
      ENDIF.
    ENDIF.
    MOVE wa_mara-matnr TO wa_text-matnr.
    MOVE wa_mara-maktx TO wa_text-maktx.
    MOVE gv_text       TO wa_text-ltext.
    MOVE lv_vkorg      TO wa_text-vkorg.
    MOVE lv_vtweg      TO wa_text-vtweg.
    APPEND wa_text TO it_text.
    CLEAR : wa_text.
  ENDLOOP.
ENDFORM.                    " GET_DATA
*&      Form  DISPLAY_OUTPUT
      text
-->  p1        text
<--  p2        text
FORM display_output .
  k_repid = sy-repid.
  PERFORM field_catalog.
PERFORM event_call.
  PERFORM alv_display.
ENDFORM.                    " DISPLAY_OUTPUT
*&      Form  FIELD_CATALOG
      text
-->  p1        text
<--  p2        text
FORM field_catalog .
  DATA: lv_col TYPE i.
  lv_col = 0.
  IF rb_stext = 'X'.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 10.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'MATNR'.
    i_fieldcat-seltext_l      = 'material'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 30.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'MAKTX'.
    i_fieldcat-seltext_l      = 'material description'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 5.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'VKORG'.
    i_fieldcat-seltext_l      = 'Sales Org'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 4.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'VTWEG'.
    i_fieldcat-seltext_l      = 'dis ch'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 150.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'LTEXT'.
    i_fieldcat-seltext_l      = 'Long text'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'STRING'.
    APPEND i_fieldcat TO it_fieldcat.
  ELSEIF rb_btext = 'X'.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 10.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'MATNR'.
    i_fieldcat-seltext_l      = 'material'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 30.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'MAKTX'.
    i_fieldcat-seltext_l      = 'material description'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 150.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'LTEXT'.
    i_fieldcat-seltext_l      = 'Long text'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'STRING'.
    APPEND i_fieldcat TO it_fieldcat.
   lv_col = lv_col + 1.
   CLEAR i_fieldcat.
   i_fieldcat-col_pos        = lv_col.
   i_fieldcat-fieldname      = 'LTEXT'.
   i_fieldcat-tabname        = 'IT_text'.
   i_fieldcat-reptext_ddic   = 'Value Total Cod 6190'(025).
   i_fieldcat-outputlen      = 150.
   i_fieldcat-intlen         = 150.
   i_fieldcat-ddic_outputlen = 150.
   APPEND i_fieldcat TO it_fieldcat.
  ELSEIF rb_ptext = 'X'.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 10.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'MATNR'.
    i_fieldcat-seltext_l      = 'material'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 30.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'MAKTX'.
    i_fieldcat-seltext_l      = 'material description'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'C'.
    APPEND i_fieldcat TO it_fieldcat.
    lv_col = lv_col + 1.
    CLEAR i_fieldcat.
    i_fieldcat-outputlen      = 150.
    i_fieldcat-tabname        = 'IT_text'.
    i_fieldcat-fieldname      = 'LTEXT'.
    i_fieldcat-seltext_l      = 'Long text'.
    i_fieldcat-col_pos        = lv_col.
    i_fieldcat-datatype       = 'STRING'.
    APPEND i_fieldcat TO it_fieldcat.
  ENDIF.
ENDFORM.                    " FIELD_CATALOG
*&      Form  ALV_BUILD_EVENT
      text
-->  p1        text
<--  p2        text
FORM alv_build_event .
  DATA: ls_event TYPE slis_alv_event.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type = 0
    IMPORTING
      et_events   = gt_events.
  READ TABLE gt_events WITH KEY name = slis_ev_top_of_page
  INTO ls_event.
  IF sy-subrc = 0.
    MOVE gc_formname_top_of_page TO ls_event-form.
    APPEND ls_event TO gt_events.
  ENDIF.
ENDFORM.                    " ALV_BUILD_EVENT
*&      Form  ALV_DISPLAY
      text
-->  p1        text
<--  p2        text
FORM alv_display .
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program      = k_repid
       i_callback_user_command = c_alv_command
      i_structure_name        = c_alv_struct
     is_layout               = gs_layout
      it_fieldcat             = it_fieldcat[]
      i_save                  = c_save
      it_events               = gt_events[]
    TABLES
      t_outtab                = it_text
    EXCEPTIONS
      program_error           = 1
      OTHERS                  = 2.
ENDFORM.                    " ALV_DISPLAY
*&      Form  BUILD_TOP_OF_PAGE
      text
-->  p1        text
<--  p2        text
FORM build_top_of_page .
  DATA: ls_line TYPE slis_listheader.
  CLEAR gt_list_top_of_page.
  CLEAR ls_line.
  ls_line-typ = 'H'.
  ls_line-key = ''.
    ls_line-info = 'Basic,Sales,PO Text'.
  IF rb_btext EQ 'X'.
    ls_line-info = 'Basic Text'.
  ELSEIF rb_stext EQ 'X'.
    ls_line-info = 'Sales Text'.
  ELSEIF rb_ptext EQ 'X'.
    ls_line-info = 'PO Text'.
  ENDIF.
  APPEND ls_line TO gt_list_top_of_page.
  ls_line-typ = 'S'.
  ls_line-key = 'User :'.
  ls_line-info = sy-uname.
  APPEND ls_line TO gt_list_top_of_page.
  ls_line-typ = 'S'.
  ls_line-key = 'Date :'.
  WRITE sy-datum TO ls_line-info.
  APPEND ls_line TO gt_list_top_of_page.
ENDFORM.                    " BUILD_TOP_OF_PAGE
*& Form ALV_TOP_OF_PAGE
ALV top of page
--> p1 text
<-- p2 text
FORM alv_top_of_page.
*Write the report header for event "top of page"
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = gt_list_top_of_page.
ENDFORM. " ALV_TOP_OF_PAGE

try with intlen and ddic_outputlen and see .
fieldcat-intlen = 200. "the length which you want to show
fieldcat-ddic_outputlen = 200. " change the length according to your need.

Similar Messages

  • How to read mutiple texts using read text

    Hi friends,
    iam facing a problem.
    iam using READ_TEXT  function module to read the text in va01 for line item.
    name = w_test i always have same ie : vbeln & posnr   1000020012000010
    vbeln = 1000020012   posnr = 000010
       CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = p_textid
    language = sy-langu
    name = w_test
    object = 'VBBK'
    TABLES
    lines = t_tline
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    OTHERS = 8.
    now i have to read text for different ids for same line item and order number
    0001 , 1000 , 2000 , 3000
    now in the above code only my textid will be change
    do i need to call the read text function module 4 times to read 4 diferent texts.
    can one one tell me how can i use it as per modulirization coding.
    Regards
    Priyanka.

    Hi,
    Put the Function module READ_TEXT in LOOP ... ENLOOP.
    When you put inside the loop .. based on ID it will change...
    Thanks ,
    Chandra Babu.A

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • Reading Texts longer than 132 Characters

    Hello Seniors,
    I am working on Reading Texts more that 132 characters long.Texts should include Symbols also.I want to <b>Create and Save</b>the texts and then <b>read</b> them wherever I want from ABAP functions.
    I want to know the Transports information relating to this.
    Could there be any function modules (with relevant parameter passing)to create long texts and then read them where ever I need.
    Thank You,
    cnc.

    HI
    Check the fun module <b>READ_TEXT</b>, CREATE_TEXT and SAVE_TEXT and EDIT_TEXT etc related to the Std texts
    Have to pass the parameters like OBJECT,ID, OBJECTNAME,LANGUAGE
    You can transport these texts using the program <b>RSTXTRAN</b>
    see the doc
    READ_TEXT
    READ_TEXT provides a text for the application program in the specified work areas.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
    Function call:
    CALL FUNCTION 'READ_TEXT'
    EXPORTING CLIENT = SY-MANDT
    OBJECT = ?...
    NAME = ?...
    ID = ?...
    LANGUAGE = ?...
    ARCHIVE_HANDLE = 0
    IMPORTING HEADER =
    TABLES LINES = ?...
    EXCEPTIONS ID =
    LANGUAGE =
    NAME =
    NOT_FOUND =
    OBJECT =
    REFERENCE_CHECK =
    WRONG_ACCESS_TO_ARCHIVE =
    Export parameters:
    CLIENT
    Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
    Reference field: SY-MANDT
    Default value: SY-MANDT
    OBJECT
    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
    Reference field: THEAD-TDOBJECT
    NAME
    Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
    Reference field: THEAD-TDNAME
    ID
    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
    Reference field: THEAD-TDID
    LANGUAGE
    Enter the language key of the text module. The system accepts only languages that are defined in table T002.
    Reference field: THEAD-TDSPRAS
    ARCHIVE_HANDLE
    If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
    The value '0' indicates that you do not want to read the text from the archive.
    Reference field: SY-TABIX
    Default value: 0
    Import parameters:
    HEADER
    If the system finds the desired text, it returns the text header in this parameter.
    Structure: THEAD
    Table parameters:
    LINES
    The table contains all text lines that belong to the text read.
    Structure: TLINE
    Exceptions:
    ID
    The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
    LANGUAGE
    The parameter LANGUAGE contains a language key that does not exist in table T002.
    NAME
    The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
    Possible errors:
    The field contains only blanks.
    The field contains the invalid characters ‘*’ or ‘,’.
    OBJECT
    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
    NOT_FOUND
    The system did not find the specified text module.
    REFERENCE_CHECK
    The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
    WRONG_ACCESS_ TO_ARCHIVE
    The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to download / read  text attachment  in Sender Mail Adapter  IN XI

    Hi
    I would like to know how to download / read text attachment in sender mail Adapter & sent same attachment to target system using file adapter.
    Please help how to design / resolve this concept.
    Regards
    DSR

    I would like to know how to download / read text attachment in sender mail Adapter & sent same
    attachment to target system using file adapter.
    Take help from this blog:
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    From the blog:
    However in most cases
    our message will not be a part of the e-mail's payload but will be sent as a file attachment.
    Can XI's mail adapter handle such scenarios? Sure it can but with a little help
    from the PayloadSwapBean adapter module
    Once your message (attachment) is read by the sender CC, you can perform the basic mapping requirement (if any) to convert the mail message fromat to the file format.....configure a receiver FILE CC and send the message...this should be the design...
    Regards,
    Abhishek.

  • What is use of Read-Text  command in Sapscript  plz replay

    What is use of Read-Text  command in Sapscript  plz replay
    i m geting problem with read-text command in sapscript as will as
    perform and endperform .

    Hi Majid,
              It's a function module to read the texts from a text file. Generally it is used to retrieve the long texts.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    OBJECT = ?...
    NAME = ?...
    ID = ?...
    LANGUAGE = ?...
    ARCHIVE_HANDLE = 0
    IMPORTING HEADER =
    TABLES LINES = ?...
    EXCEPTIONS ´
    ID =
    LANGUAGE =
    NAME =
    NOT_FOUND =
    OBJECT =
    REFERENCE_CHECK =
    WRONG_ACCESS_TO_ARCHIVE =
    Export parameters
    Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
    Reference field: SY-MANDT
    Default value: SY-MANDT
    OBJECT
    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
    Reference field: THEAD-TDOBJECT
    NAME
    Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
    Reference field: THEAD-TDNAME
    ID
    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
    Reference field: THEAD-TDID
    LANGUAGE
    Enter the language key of the text module. The system accepts only languages that are defined in table T002.
    Reference field: THEAD-TDSPRAS
    ARCHIVE_HANDLE
    If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
    The value '0' indicates that you do not want to read the text from the archive.
    Reference field: SY-TABIX
    Default value: 0
    Import parameters:
    HEADER
    If the system finds the desired text, it returns the text header in this parameter.
    Structure: THEAD
    Table parameters:
    LINES
    The table contains all text lines that belong to the text read.
    Structure: TLINE
    Exceptions:  
    ID
    The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
    LANGUAGE
    The parameter LANGUAGE contains a language key that does not exist in table T002.
    NAME
    The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
    Possible errors:
    The field contains only blanks.
    The field contains the invalid characters ‘*’ or ‘,’.
    OBJECT
    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
    NOT_FOUND
    The system did not find the specified text module.
    REFERENCE_CHECK
    The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
    WRONG_ACCESS_ TO_ARCHIVE
    The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
    Br,
    laxmi.

  • Heading  during downloading into local file using GUI_DOWNLOAD fun.module

    Hi Guru's
    we have a requirement that we want the plant description as a heading (first line of the file) in the local file. iam using "GUI_DOWNLOAD" function module for downloading data for which iam passing the charecter type internal table. before downloading iam passing all the filed headings to that table and then appending the internal table data into it. now iam getting data properly with field headings . but before that heading i want one more description for a plant field which iam using in my selection screen
    in the fun.module "GUI_DOWNLAOD"
    we have HEADER file but it is of XSTRING type so it is taking only 2 char.
    so how to use this . Plz help me.
    thanks well in advance.
    UR's
    GSANA

    Hi,
    Please check the below link,
    header in 'gui_download'
    Also check Manoj kumar's reply in the link,
    header information to gui_download
    Hope this helps.
    Best Regards.

  • Dynamic text in module pool table control

    Hi ,
    Can we have dynamic header text in module pool table control. Like dynamic header text in ALV report.
    Thanks,
    Prem.

    Hi,
    Populate an internal table with the header text that you want.
    Replace the headers with I/O fields.
    Populate the Headers in the PBO.

  • Reading Texts from Infotype

    Hi,
    How can we read texts from the Infotype. There is this function module HR_ECM_READ_TEXT_INFOTYPE, but we need the Employee Number, Begin date and End Date as inputs.
    I just want to check if a field with a particular value exists or not.
    just like this works to check whether the field DAT35 with value 99991231 exits or not.
    SELECT PERNR FROM PA0035 INTO V_PERNR WHERE DAT35 = '99991231'.
    IF SY-SUBRC = 0.
    ENDIF.
    the same way for a text, but this text actually gets stored in a structure thats why we cannot use a select for infotype
    Thanks in advance.

    Hi,
    What i am getting from ur explanation is that u are having a probelm in accessing a text field from the infotype, i.e: the value field in included in the infotype table (PA0035) but its text is in another table.
    If this is the problem, u should first use select statement on PA0035 to get the required infotype record. Then use F1 help on the required text field on the infotype screen to get the table and field name. Then u can use select statement on that table by specifying the relavant value field from the previous select in the where clause.
    Hope this hepls

  • SAP beginner !! steps to create a fun module which accept int table

    steps to create a fun module
    1. which accept internal  table and a flag value
    2. based on flag value it calls screen.
    3. if flag value is ' D' it displays the internal table in Table Control in Display Mode
    4. if flag value is ' E' it edits the table control also the internal table,
        it can also append a new row in table control or delete it.
    5. the function module should then send the output the internal table which has changed.
    plz if any one can provide solution to this do it for me
    thnk u

    Hi Shailesh,
        U just create 2 table control (one in Display Mode & the another in Change Mode ).While sending the Internal Table values, u send the values to the corresponding Table Control based on the Flag Value.

  • Save text and read text

    Hi all.
    i have a requirement to copy shipment instructions text from delivery to shipment in struction text in shipment when a delivery is added to a shipment.
    i can read the shipment text corresponding to the delivery using the fm read_text but when saving it to shipment i am facing a problem.
    my shipment number is not geneerated at that time.so how can i get the text read using read text to be seen in the shipment before it is saved.
    is there a way out?'
    regards

    Hi,
    Till the time it gets created you can not save text, because you need to have object name to pass into save_text function module.
    Regards,
    Satish

  • 'Could not read text' pop-up in IT0128 (Notifications)

    Hi,
    We have customized the Notifications subtype to Z1, Z2, Z3 and Z4. The configuration works every time the Create button is used. However, once the record already exists and the Change button is ticked a pop-up occurs indicating 'Could not read text'.
    I have already tried configuring the text in SO10 to be consistent with that in Infotype 0128 but it does not work. We would like to keep the subtype values as is (Z1-Z4).
    If anyone needs further information, let me know. Appreciate any thoughts. Thanks!
    Vance

    Hi,
    Did you also customize the subtypes of your notifications? If that is the case, we have the same query. We investigated the issue already and came up with several options, but it is still approval to the business side. For me, option 1 is still the best way to go.
    OPTION 1:
    In order to correct the issue, delete the customized subtypes and configure back the original subtype 1: General Notification and 2: Personal Notification. Configure the customized subtypes deleted in the text name field by putting the values in transaction Code SO10. Then add the text name field in the Infotype.
    OPTION 2:
    A Possible Code Change for Infotype 128 by commenting out the module pool that validates the text name field and subtype in the Infotype. Then create a new Include program that will cater to the customized subtype.
    OPTION 3:
    No Changes will occur but take note that changing, displaying and copying are not possible in PA30 and PA20. The only possible way to view Infotype 128 is the Overview button.
    For those that have a different solution, please feel free to drop a line. I hope these options will help you as well.

  • SAPGUI_PROGRESS_INDICATOR what is use of this fun module when sending data

    dear ,
    what is use of
    SAPGUI_PROGRESS_INDICATOR  fun module when sending data to FTP SERVER . POINTS MUST BE GIVEN

    Dear ,
    when i am trying to send data in internal table of type charterter declared below(i.e iresult) to FTP SERVER program giving the DATA ERROR = 3 when 'FTP_R3_TO_SERVER' fuction module is exected and file it not creating in ftp server . plz help me pointS must be given .
    the FTP_CONNECT ,FTP_COMMAND function modules are executing properly giving handle 1 and its sy-subrc = 0 .
    when 'FTP_R3_TO_SERVER' is executed it is giving SY-SUBRC = 3 ( DATA ERROR ) i.e it is failing to out internal table data in FTP SERVER . PLZ HIDE ME ITS URGENT .
    THIS IS CODE I USED .
    DATA : BEGIN OF iresult OCCURS 5,
    rec(450),
    END OF iresult,
    DATA :
    dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
    compress TYPE c VALUE 'N',
    host(64) TYPE c.
    DATA: hdl TYPE i.
    DATA: BEGIN OF result OCCURS 0,
    line(100) TYPE c,
    END OF result.
    DATA : key TYPE i VALUE 26101957,
    dstlen TYPE i,
    blob_length TYPE i.
    host = p_host .
    DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
    ID 'SOURCE' FIELD p_password ID 'KEY' FIELD key
    ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD p_password
    ID 'DSTLEN' FIELD dstlen.
    CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
    user = p_user
    password = p_password
    host = host
    rfc_destination = dest
    IMPORTING
    handle = hdl
    EXCEPTIONS
    not_connected = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = ftppath
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    IF sy-subrc = 0 .
    CLEAR result .
    REFRESH result .
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = 'ascii'
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    IF sy-subrc = 0 .
    DESCRIBE TABLE iresult LINES lines.
    blob_length = lines * width .
    clear : lines.
    Delete the existing file
    CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = delfile
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    *End of deleting the existing file
    CALL FUNCTION 'FTP_R3_TO_SERVER'
    EXPORTING
    handle = hdl
    fname = ftpfile
    blob_length = blob_length
    TABLES
    blob = iresult
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4.
    IF sy-subrc 0 .
    WRITE 'Error in writing file to ftp' .
    ELSE.
    WRITE 'File downloaded on the ftp server successfully'.
    ENDIF.
    ENDIF.
    ELSE.
    WRITE : 'Path on ftp not found : ' , ftppath .
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
    handle = hdl.
    CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
    destination = 'SAPFTP'
    EXCEPTIONS
    OTHERS = 1.
    ELSE.
    WRITE 'Could not connect to ftp' .
    ENDIF.
    ENDFORM. " FTPFINANCEACCESS_DOWNLOAD
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-name = 'PASSWORD'.
    screen-invisible = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.

  • To get fun module for Creating prebooking

    Hi friends,
        Here is my query,
    My requirement is a person will prebook the employees for the events from portal
      & i need to provide the RFC for that.
      I got 2 fun modules for creating prebookings
    1) RH_PARTICIPATION_PREBOOK
    2) HRIQ_PARTICIPATION_PREBOOK
      but these fun modules POPS UP a window after providing the i/p's to it to select the button of prebooking.......
    But these is not possible as the SAP screen can't be popped up in portal....
      So how do i proceed with this problem??

    Hi,
    See the source code of FMs. Inside somewhre it must be calling other FM which collects actual data. Use that FM.
    Reward if useful!

  • Reading text elements

    Dear Friends;
    I want to read text elements of a purchase request's lines. Is there a fm or method to read text elements of the relevant lines of a purchase requisition?
    Thx in advance
    Ali

    Hi Please Look into the following sample code.
    Like that you can use the READ_TEXT Function module for your case.
    REPORT  ylsr_read_text_from_std_tcode.
    DATA : w_id        TYPE thead-tdid,        " Text ID of text to be read
           w_name      TYPE thead-tdname,      " Name of text to be read
           w_object    TYPE thead-tdobject,    " Object of text to be read
           w_language  TYPE thead-tdspras.     " Language of text to be read
    DATA: it_tline TYPE TABLE OF tline,
          st_tline TYPE tline.
    w_id = 'F01'.
    w_name = '450000004800010'.
    w_object = 'EKPO'.
    w_language = 'EN'.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id                      = w_id
        language                = w_language
        name                    = w_name
        object                  = w_object
      TABLES
        lines                   = it_tline
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    The required output will be avialable in the IT_tline table.
    LOOP AT it_tline INTO st_tline.
      WRITE :/   st_tline-tdline.
    ENDLOOP.
    Message was edited by:
            Lakshmi Sekhar Reddy

Maybe you are looking for