PASS THE LONG TEXT TO SAPSCRIPT

Hello Friends,
I m using itcsy structure to pass long text of quality certificate to sapscript output but im able to show only 80 characters in the output but my long text is more than 250 characters.
so how i can show these many characters value in my sapscript pls guide....
Regards,
Sunny

If you want to print the long text, you should use the INCLUDE statement in your SAP SCript.
1. You don't have to take the pain of fetching the text.
2. You don't have to reformat the same.
INCLUDE TEXT_NAME OBJECT TEXT ID
example:-
INCLUDE ZSDINV2A OBJECT TEXT ID ST LANGUAGE EN
Edited by: krupa jani on Nov 25, 2008 10:17 AM

Similar Messages

  • BAPI : "BAPI_REQUISITION_CREATE" pass the Long Text Field of *Header Note*,

    Hi Experts,
            i am using the BAPI : "BAPI_REQUISITION_CREATE". it' is working Fine.But i need to pass the Long Text Field of Header Note, Item Text, Item Note,Delivery text and Material P.O text through the BAPI.
    Plz,Help me to Achieve this.
    Thanks in Adv.
    V.S.Naidu.

    Below is the code for BAPI_PR_CREATE just go through it and your dbout will be solved
    it has example for multi line header text as well as line items...!
    Hope it helps
    CLEAR GV_BAPIMEREQHEADER.
    MOVE 'NB' TO GV_BAPIMEREQHEADER-PR_TYPE.
    move 'X' To GV_BAPIMEREQHEADER-AUTO_SOURCE.
    CLEAR GV_BAPIMEREQHEADERX.
    MOVE 'X' TO GV_BAPIMEREQHEADERX-PR_TYPE.
    MOVE 'X' TO GV_BAPIMEREQHEADERX-auto_source.
    CLEAR WA_BAPIMEREQITEMIMP.
    MOVE :
    '00010' TO WA_BAPIMEREQITEMIMP-PREQ_ITEM,
    **'001' TO  WA_BAPIMEREQITEMIMP-PUR_GROUP,
    *'TWISTED PAIR CABLE' TO  WA_BAPIMEREQITEMIMP-SHORT_TEXT,
    'C-1030' TO WA_BAPIMEREQITEMIMP-MATERIAL,
    '1000' TO WA_BAPIMEREQITEMIMP-PLANT,
    '100' TO WA_BAPIMEREQITEMIMP-QUANTITY,
    '20091001' TO WA_BAPIMEREQITEMIMP-DELIV_DATE.
    APPEND WA_BAPIMEREQITEMIMP TO GT_BAPIMEREQITEMIMP.
    CLEAR WA_BAPIMEREQITEMX.
    MOVE :
    '00010' TO WA_BAPIMEREQITEMX-PREQ_ITEM,
    'X' TO WA_BAPIMEREQITEMX-PREQ_ITEMX,
    *'X' TO  WA_BAPIMEREQITEMX-PUR_GROUP,
    'X' TO  WA_BAPIMEREQITEMX-SHORT_TEXT,
    'X' TO WA_BAPIMEREQITEMX-MATERIAL,
    'X' TO WA_BAPIMEREQITEMX-PLANT,
    'X' TO WA_BAPIMEREQITEMX-QUANTITY,
    'X' TO WA_BAPIMEREQITEMX-DELIV_DATE,
    'X' TO WA_BAPIMEREQITEMX-EXT_PROC_PROF.
    *EXT_PROC_REF_DOC
    *EXT_PROC_REF_ITEM
    APPEND WA_BAPIMEREQITEMX TO GT_BAPIMEREQITEMX.
    CLEAR EXTRA_FIELDS.
    MOVE '00010' TO EXTRA_FIELDS-BNFPO.
    MOVE '12345678901' TO EXTRA_FIELDS-ZZDANOSPR_NO.
    MOVE 'MUM01' TO EXTRA_FIELDS-ZZPORT.
    MOVE '20100505' TO EXTRA_FIELDS-ZZETD.
    MOVE '20100506' TO EXTRA_FIELDS-ZZETA.
    MOVE '123456789123456789' TO  EXTRA_FIELDS-ZZEXTWG.
    MOVE TEMP TO  EXTRA_FIELDS-ZZrob.
    CLEAR WA_EXTENSIONIN.
    MOVE 'BAPI_TE_MEREQITEM' TO  WA_EXTENSIONIN-STRUCTURE.
    MOVE EXTRA_FIELDS TO WA_EXTENSIONIN-VALUEPART1.
    APPEND WA_EXTENSIONIN TO GT_EXTENSIONIN.
    CLEAR WA_EXTENSIONIN.
    MOVE 'BAPI_TE_MEREQITEMX' TO  WA_EXTENSIONIN-STRUCTURE.
    MOVE EXTRA_FIELDS TO WA_EXTENSIONIN-VALUEPART1.
    APPEND WA_EXTENSIONIN TO GT_EXTENSIONIN.
    CLEAR WA_EXTENSIONOUT.
    MOVE 'BAPI_TE_MEREQITEMX' TO  WA_EXTENSIONOUT-STRUCTURE.
    *MOVE EXTRA_FIELDS TO WA_EXTENSIONOUT-VALUEPART1.
    APPEND WA_EXTENSIONOUT TO GT_EXTENSIONOUT.
    clear wa_PRITEMTEXT.
    MOVE '00010' TO wa_pritemtext-preq_item.
    move 'B01' TO WA_PRITEMTEXT-TEXT_ID.
    MOVE 'THIS IS JUST FOR TEST' TO WA_PRITEMTEXT-TEXT_LINE.
    APPEND WA_PRITEMTEXT TO GT_PRITEMTEXT.
    clear wa_PRITEMTEXT.
    MOVE '00010' TO wa_pritemtext-preq_item.
    move 'B01' TO WA_PRITEMTEXT-TEXT_ID.
    MOVE 'THIS IS THE SECOND LINE' TO WA_PRITEMTEXT-TEXT_LINE.
    APPEND WA_PRITEMTEXT TO GT_PRITEMTEXT.
    BREAK-POINT.
    CALL FUNCTION 'BAPI_PR_CREATE'
    EXPORTING
       PRHEADER                     = GV_BAPIMEREQHEADER
       PRHEADERX                    = GV_BAPIMEREQHEADERX
    *   TESTRUN                      =
    IMPORTING
       NUMBER                       = GV_NUMBER
       PRHEADEREXP                  = GV_PRHEADEREXP
      TABLES
        RETURN                       = GT_BAPIRET2
        PRITEM                       = GT_BAPIMEREQITEMIMP
        PRITEMX                      = GT_BAPIMEREQITEMX
    *   PRITEMEXP                    =
    *   PRITEMSOURCE                 =
    *   PRACCOUNT                    =
    *   PRACCOUNTPROITSEGMENT        =
    *   PRACCOUNTX                   =
    *   PRADDRDELIVERY               =
        PRITEMTEXT                   = GT_PRITEMTEXT
    *   PRHEADERTEXT                 =
        EXTENSIONIN                  = GT_EXTENSIONIN
    *    EXTENSIONOUT                 = GT_EXTENSIONOUT
    *   PRVERSION                    =
    *   PRVERSIONX                   =
    *   ALLVERSIONS                  =
    *   PRCOMPONENTS                 =
    *   PRCOMPONENTSX                =
    *   SERVICEOUTLINE               =
    *   SERVICEOUTLINEX              =
    *   SERVICELINES                 =
    *   SERVICELINESX                =
    *   SERVICELIMIT                 =
    *   SERVICELIMITX                =
    *   SERVICECONTRACTLIMITS        =
    *   SERVICECONTRACTLIMITSX       =
    *   SERVICEACCOUNT               =
    *   SERVICEACCOUNTX              =
    *   SERVICELONGTEXTS             =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =
    WRITE : 'THE PR CREATED IS : -',GV_NUMBER.

  • Pass a varaible (Place holder) in the Long text of message class

    Hi Gurus,
    My requirement is to display an error messages using message class for better understanding I am using Long text will it possible to pass a variable (place holder) in the long text if possible means suggest how to pass the variable (we need to put any &1 like this similar we do in message class) or only we can display only text in long text.
    Confirm the same
    Regards
    Dhanoo

    hiii
    Create new message in message class with text like material number & is not valid
    Here  .
    & symbol is the place holder. you can dynamically pass some thing to this message. In your validation do like this.
    MESSAGE e001 WITH wa_matnr.
    Here wa_matnr is the input field value.Display this message under appropriate events.
    eg: AT SELECTION-SCREEN ON wa_matnr  in case of reports.
    reward if useful
    thx
    twinkal

  • FB03 Long text to sapscript

    Hi
      My requirement is ,i have to read the long text entered in the FB03 transaction(it may be several lines) in my Z Print program and pass that to the sapscript form that it gets displayed as line item. can you please send sample how to do in program and how it is called in sapscript form..
    Thanks
    Swarna.

    Hi
    You have to use FM READ_TEXT.
    In FB03 Transaction, you can get the Technical information of the Text Area. Use those as inputs to this FM, which will return the text entered into an internal table.
    You can use this Internal table data to write onto script.
    Eg:
    stxl_id-tdobject = 'VBBK'.
    stxl_id-tdname = wa_vbfa-vbelv.
    stxl_id-tdid = '0012'.
    stxl_id-tdspras = 'EN'.
    DATA: BEGIN OF tlines OCCURS 10.
    INCLUDE STRUCTURE tline.
    DATA: END OF tlines.
    clear: i_text.
    *DATA : l_text(120) TYPE c,
    DATA : l_text(1050) TYPE c,
    v_tline LIKE tline-tdline.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = stxl_id-tdid
    language = stxl_id-tdspras
    name = stxl_id-tdname
    object = stxl_id-tdobject
    archive_handle = 0
    local_cat = ' '
    IMPORTING
    HEADER =
    TABLES
    lines = tlines
    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.
    LOOP AT TLINES.
    CALL FUNCITON 'WRITE_FORM' with the text element..
    ENDLOOP.
    Regards,
    Raj

  • Box in Long text of sapscript

    Hi All,
    I have  created a script.....in that i have to print  only long text in the main window.
    Now my problem is...the LONG text is breaking and going to next page...
    means a part on 1 page and remaining  on subsequent pages..
    And the problem is the box which i have put arround the main window is coming only in first page and last page .  In between pages the box arround the main window is not coming .
    How to get the box around those pages also.
    help me out...
    Thanks,
    Guru

    Hi
    The property of MAIN window is like that, If the Data is more than a Page it automatically goes to next pages.
    So better decide where I mean in which you wants to print ? In MAin window , then it automatcially goes to other pages. use a new paragraph format and mention PAGE PROTECTION for that such that it prints in the Same page.
    For the boxes see the seetings of the main window in all pages, especially in NEXT page.. so that the box is coming properly
    see the box related commands
    SAPScripts
    POSITION WINDOW
    SIZE WIDTH '160' MM HEIGHT '140' MM
    BOX FRAME 10 TW
    Box
    BOX HEIGHT '11' MM WIDTH '160' MM FRAME 10 TW INTENSITY 35
    linessssssss
    BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    Boxes, Lines, Shading: BOX, POSITION, SIZE
    Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
    The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
    Syntax:
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    BOX Command
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
    XPOS, YPOS
    Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    WIDTH
    Width of the box. Default: WIDTH value of the SIZE command.
    HEIGHT
    Height of the box. Default: HEIGHT value of the SIZE command.
    FRAME
    Thickness of frame.
    Default: 0 (no frame).
    INTENSITY
    Grayscale of box contents as %.
    Default: 100 (full black)
    Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    TW (twip)
    PT (point)
    IN (inch)
    MM (millimeter)
    CM (centimeter)
    LN (line)
    CH (character).
    The following conversion factors apply:
    1 TW = 1/20 PT
    1 PT = 1/72 IN
    1 IN = 2.54 CM
    1 CM = 10 MM
    1 CH = height of a character relative to the CPI specification in the form header
    1 LN = height of a line relative to the LPI specification in the form header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shading having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    POSITION Command
    Syntax
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
    Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
    XORIGIN, YORIGIN
    Origin of the coordinate system.
    WINDOW
    Sets the values for the left and upper edges to match those of the current window (default setting).
    PAGE
    Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
    /: POSITION WINDOW
    Sets the origin for the coordinate system to the upper left corner of the window.
    /: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
    Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
    /: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
    Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
    SIZE Command
    Syntax
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
    Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
    WIDTH, HEIGHT
    Dimensions of the rectangle or line.
    WINDOW
    Sets the values for the width and height to the values of the current window (default setting).
    PAGE
    Sets the values for the width and height to the values of the current output page.
    /: SIZE WINDOW
    Sets WIDTH and HEIGHT to the current window dimensions.
    /: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
    Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
    /: POSITION WINDOW
    /: POSITION XORIGIN -20 TW YORIGIN -20 TW
    /: SIZE WIDTH +40 TW HEIGHT +40 TW
    /: BOX FRAME 10 TW
    A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • I get the long text description 0f transaction fb03

    Hi Gurus,
    How can I get the long text description in the information view (field <b>ZEILE</b>,
    data element EENO_ZEILE) on the G/L account documet overview(transaction Fb03)?
      My prob is, This field stored in a structure called
    Thanks in ad.
    Regds,
    Bala

    Hi,
    a) Find out for which <b>table</b> this long text is linked.
    b) Go to <b>TTXOB</b> table and in the field <b>TDOBJECT</b>, check whether this entry is present.
    c) If present, then use FM READ_TEXT, to get the long text value.
    Important parameters to be passed in READ_TEXT
    a) ID         
    b) Language (EN??)
    c) Name   ( I believe in this case it would be ZEILE)
    d) Object (TTXOB-TDOBJECT value)
    Regards,
    Subramanian V.

  • Unable to upload RTF file in the long text

    Hi all,
    Could you please help me out in this issue. I am trying to upload the RTF file in the long text editor through this menu path Text-> Upload->RTF file.The RTF file is about only 56 KB memory size consists only texts.
    I could able to select the file and when i am executing , ABAP dump is showing as follows:
    Runtime error : TABLE_INVALID_INDEX
    abap program : SAPLSTXK
    Whether any SAP notes to be applied for this ?
    Please throw you ideas
    Regards,
    Suresh.

    try this.
    REPORT YCMTESTE LINE-SIZE 255 MESSAGE-ID TD.
    PARAMETERS:
    TEXTNAME LIKE THEAD-TDNAME DEFAULT 'SAPSCRIPT-DRUCKERTEST',
    FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\temp\'.
    DATA: TEXTHEADER LIKE THEAD.
    DATA: TEXTLINES LIKE TLINE OCCURS 100 WITH HEADER LINE.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING NAME = TEXTNAME
    LANGUAGE = SY-LANGU
    OBJECT = 'TEXT'
    ID = 'ST '
    IMPORTING HEADER = TEXTHEADER
    TABLES LINES = TEXTLINES
    EXCEPTIONS OTHERS = 1.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'EXPORT_TEXT'
    EXPORTING CODEPAGE = '1133'
    FILE = FILE
    FORMATWIDTH = 132
    FORMAT_TYPE = 'RTF'
    HEADER = TEXTHEADER
    SSHEET = ' '
    WITH_TAB = ' '
    TABLES ITF_LINES = TEXTLINES
    EXCEPTIONS DOWNLOAD_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_WRITE_ERROR = 3.
    CASE SY-SUBRC.
    WHEN 0. MESSAGE S807 WITH FILE.
    WHEN 1. MESSAGE E815 WITH FILE.
    WHEN 2. MESSAGE E811 WITH FILE.
    WHEN 3. MESSAGE E814 WITH FILE.
    ENDCASE.
    Reference::[http://help.sap.com/saphelp_sm32/helpdata/en/d6/0db7f3494511d182b70000e829fbfe/content.htm]
    <removed_by_moderator>
    Edited by: Juan Reyes on May 16, 2011 12:05 PM

  • Special fonts to the long text

    Hi all,
    I want to apply special fonts to the long text which I am saving using save text.
    I have a container in which I am wrintin the text,Now I want to provide the functionality such that I can make few lines bold,few undelined etc.
    same as we have in standard transactions.(text).
    How can I achieve that.
    Regards,
    Sudha

    Hi,
    Try this,
    pass appropriate stype into THEAD-TDSTYLE.
    Regards,
    Peranandam

  • Where do I find the long text for Damage and Cause in Notifications (IW21)

    Hi ppl,
    Can anyone let me know where the long text for Damage and Cause is stored (can be seen in IW21)?
    Can I retrieve it through FM READ_TEXT? If yes, what are the values of the parameters to be passed?
    Thanks,
    David.

    Hi!
    It is easy to check whether some text is read by "READ_TEXT" or not.
    1) Create text in dialogue mode and save it.
    2) Place brake-point in READ_TEXT FM
    3) go to view this text in transaction again
    If the program is switched to debug mode, it means u can use this FM. Have u tried do this stuff?

  • The long text for purchase order text  field in mm03

    Hi,
         Please provide me long text for purchase order field.in mm03 the view purchase order text having the long text for purchase order.this is enter when ever your creating the material.but we have table and field name for that and also how to handle this long text.please provide me urgently.
    Thanks & Regards,
    Radhakrishna.

    Hi,
    A sample code for ur requirement.
    TABLES : ekko,   "Purchasing Document Header
             ekpo,   "Purchasing Document Item
             thead.  "SAPscript: Text Header
    DATA: t_theads LIKE stxh  OCCURS 0 WITH HEADER LINE.
    DATA: t_tlines LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: v_ebeln_ebelp(15) TYPE c.
    TYPES: BEGIN OF t_download,
           ebeln LIKE ekko-ebeln,
           ebelp LIKE ekpo-ebelp,
           tdobject LIKE stxh-tdobject,
           tdid LIKE stxh-tdid,
           tdspras LIKE stxh-tdspras,
           count(4) TYPE c,
           tdformat LIKE tline-tdformat,
           tdline LIKE tline-tdline,
         END OF t_download.
    TYPES: BEGIN OF t_header,
          line1(20) TYPE c,
          line2(20) TYPE c,
          line3(20) TYPE c,
          line4(10) TYPE c,
          line5(10) TYPE c,
          line6(10) TYPE c,
          line7(10) TYPE c,
          line8(10) TYPE c,
          END OF t_header.
    DATA: g_filename TYPE string.
    DATA: gt_header TYPE STANDARD TABLE OF t_header.
    DATA: gs_header TYPE t_header.
    DATA: gt_download TYPE STANDARD TABLE OF t_download.
    DATA: gs_download TYPE t_download,
        gt_tlines   LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: v_subrc TYPE subrc.
    DATA: v_nb_lines TYPE i.
    DATA: v_ok TYPE i.
    DATA: v_ko TYPE i.
    DATA: v_ow TYPE i.
    DATA:  p_fname TYPE string.
    DATA: g_append.
                              SELECTION SCREEN                          *
    SELECT-OPTIONS : s_ebeln  FOR ekko-ebeln.
    PARAMETERS:
       p_filedn(132) TYPE c OBLIGATORY,
       p_file(132) TYPE c OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filedn.
      PERFORM file_f4_get CHANGING p_filedn.
    START-OF-SELECTION.
    *Select all the purchase order corresponding to select criteria
      CLEAR t_theads. REFRESH t_theads.
      SELECT *
      FROM ekko
      WHERE ebeln IN s_ebeln.
    *Select all the text for P.O. header
        SELECT * FROM stxh
              APPENDING TABLE t_theads
              WHERE tdobject = 'EKKO'
              AND tdname      = ekko-ebeln.
    *Select Item of each P.O.
        SELECT *
        FROM ekpo
        WHERE ebeln = ekko-ebeln.
          CONCATENATE ekpo-ebeln ekpo-ebelp
          INTO v_ebeln_ebelp.
    *Select the text for P.O. item.
          SELECT * FROM stxh
                APPENDING TABLE t_theads
                WHERE tdobject = 'EKPO'
                  AND tdname   = v_ebeln_ebelp.
        ENDSELECT.              "select ekpo
      ENDSELECT.             "select ekko
      DESCRIBE TABLE t_theads LINES v_nb_lines.
      LOOP AT t_theads.
    Read the text from pool
        CLEAR thead.
        REFRESH t_tlines.
        CALL FUNCTION 'READ_TEXT'                               "#EC *
             EXPORTING
                  id                      = t_theads-tdid
                  language                = t_theads-tdspras
                  name                    = t_theads-tdname
                  object                  = t_theads-tdobject
             IMPORTING
                  header                  = thead
             TABLES
                  lines                   = t_tlines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        MOVE-CORRESPONDING thead TO gs_download.
        gs_download-ebeln = thead-tdname+0(10).
        IF thead-tdobject = 'EKPO'.
          gs_download-ebelp = thead-tdname+10(5).
        ENDIF.
        gs_download-count = 0.
        LOOP AT gt_tlines.
          gs_download-tdformat = gt_tlines-tdformat.
          gs_download-tdline = gt_tlines-tdline.
          gs_download-count = gs_download-count + 1.
          APPEND gs_download TO gt_download.
        ENDLOOP.
        CLEAR gs_download.
      ENDLOOP.
    END-OF-SELECTION.
    Hope this helps.
    please reward points if  useful.
    Regards
    rose

  • Error while reading the Long text Using READ_TEXT

    Hi friends,
    Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT  I am getting the following error if the text is not there.
    OUT_PURCH_PO ID GRUN language EN not found.
    I should not get this error Instead I should get the blank value.
    OUT_PURCH_PO   -  my material name.
    Following is my code.
    IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.
       READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.
       WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.
         NAME = WA_EKPO-MATNR.
        CALL FUNCTION 'READ_TEXT'
           EXPORTING
             CLIENT            = SY-MANDT
             ID                =  ID
             LANGUAGE          =  SY-LANGU
             NAME              =  NAME 
             OBJECT            =  OBJECT
          IMPORTING
            HEADER            =  THEAD
           TABLES
             LINES             =  LTEXT.

    Hi,
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                      = id
        language                = sy-langu
        name                    = name
        object                  = object
      TABLES
        lines                   = ltext
      EXCEPTIONS                           " --> have this
        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.
    Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM

  • How to add the long text in Production order through FM

    Hi,
    Iam having custom program which has BAPI (BAPI_PRODORD_CREATE) inside it and this program is used to create Production orders with the details of Sales order Number,Line item,Plant,Order type,Quantity and Start date. This program is scheduled in Background.
    Now client wants to add the Long text (seperate TAB in production order and they want to update the VC details of Sales order in the Long text area).
    One option is after creation of Production order, through BDC(calling CO02 and update the long text) we  can update the long text and client doesn't want this option.
    Another option is after creation of Production order, using Function module SAVE_TEXT, Update the Long text in Production Order and this is not working in Production order (already my ABAP consultant checked it ).
    If any one of you came across this requirement, pl share with me how you addressed it.
    Regards
    A.Sureshbabu

    Hi,
    The method is quite simple, i presume you're quite well versed with doing recording, so the key thing to keep in mind is how to prepare the input file.
    At my end i had about 5 lines of data which needed to be uploaded, hence i had a tab-delimited file with the order nos. in the first column & the five lines of text in five different columns (Refer format below)
    Order No.
    Line - 1
    Line - 2
    Line - 3
    Line - 4
    Line - 5
    12345
    txt - 1
    txt - 2
    txt - 3
    txt - 4
    txt - 5
    67890
    txt - a
    txt - b
    txt - c
    txt - d
    txt - e
    Now provide this input file for your lsmw or bdc program & it will work. You can work with your abaper if you're not so comfortable with LSMW or BDC programming he / she should be able to easily make it work for you.
    Regards,
    Vivek

  • Get the long text into BADI from text editor

    hi all,
    I implemented BADI ME_PROCESS_PO_CUST, before saving the purchase order i am calling the text editor where i am writng
    the long text . but when save the text from the text editor the long text in the editor is not updating to the BADI.
    Can anybody help how can i get the long text to the BADI.
    Regards,
    Madhavi

    Hi
    Have you tried with interface 'IF_PURCHASE_ORDER_MM' with these methods in the BADI?
    IF_LONGTEXTS_MM~GET_TEXTOBJECT
    IF_LONGTEXTS_MM~GET_TYPES
    IF_LONGTEXTS_MM~GET_TEXT
    IF_LONGTEXTS_MM~SET_TEXT
    IF_LONGTEXTS_MM~ADOPT_TEXT
    IF_LONGTEXTS_MM~DELETE_TEXT
    IF_LONGTEXTS_MM~EDIT_TEXT
    Regards
    Eduardo

  • Get the long text from Text Editor

    Hi,
    I am using text editor to enter the long text, after entering the text in the text editor
    when press the save button i am getting the long text into the internal table . this is working fine till here.
    But when press SAVE button , i want the text into the internal table  and  the text editor to be closed.
    but here i am not able to get the data into internal  table as it is again creating text editor .
    Can anyboby help me .

    Hi,
    Refresh the table.

  • Problem in loading the long text in bdc.

    Hai Friends,
                  I am uploading the material master using bdc, Here i need to upload the long text field. so am using the separate report for upload the long text field using the create_text function module. but the problem is the long text field only accepting 132 charactors. but i need to upload the 500 charactors. what i want to do now ?
    Regards ,
    Sathis Kumar R

    Hi Sathis,
    What u do is that while recording the text part in bdc , click on the first delete button,  and then create button and after that double click on the editor or click on the text-editor change button, a window will get opened , then click go-to menu -> change editor.
    there u can use loop the text table and wirte it according .
    eg
    PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TP_DELETE'.            "first delete
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TP_CREATE'.             " then create
      PERFORM bdc_field       USING 'LV70T-SPRAS'
                                    sy-langu.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TP_DETAIL'.             "if not double click then click on change button after the delete button and then click on the change-editor menu .
      PERFORM bdc_field       USING 'LV70T-SPRAS'
                                    sy-langu.
      PERFORM bdc_dynpro      USING 'SAPLSTXX' '1100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RSTXT-TXLINE(02)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TXVB'.
      PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(02)'
      PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(03)'
      PERFORM bdc_field       USING 'RSTXT-TXLINE(02)'
                                    wa_itab-htext1.
      PERFORM bdc_field       USING 'RSTXT-TXLINE(03)'
                                    wa_itab-htext2.
      PERFORM bdc_dynpro      USING 'SAPLSTXX' '1100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RSTXT-TXLINE(02)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TXBA'.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/EBACK'.
    regards,
    Santosh Thorat

Maybe you are looking for