LONG TEXT FOR PROD ORDER

how to create text for production order if earlier text is not available.
i m using create_text.
CALL FUNCTION 'CREATE_TEXT'
         EXPORTING
           fid               =  'KOPF'
           flanguage         = v_lang
           fname             = '100000100001015'
           fobject           =   'AUFK'
          SAVE_DIRECT       = 'X'
         FFORMAT           = '*'
         tables
           flines            = it_lines
        EXCEPTIONS
          NO_INIT           = 1
          NO_SAVE           = 2
          OTHERS            = 3
       IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
  endif.
    CALL FUNCTION 'COMMIT_TEXT'.
PLZ HELP ME.

Hi,
SAVE_TEXT will create the long text if it does not already exist.
call function 'SAVE_TEXT'
exporting
client = sy-mandt
header = text_header
insert = 'X'
savemode_direct = 'X'
tables
lines = text_lines
exceptions
id = 1
language = 2
name = 3
object = 4
others = 5.
[/code]
Regards,
Raj.

Similar Messages

  • 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

  • Create long text for network activity

    Hello,
    I'll create a long text for a network activity, but I found no BAPI for that.
    When I create long text for an order activity I use the BAPI BAPI_ALM_ORDER_MAINTAIN. There it is possible to specifiy the long text lines.
    In the BAPI BAPI_NETWORK_MAINTAIN there ist no table for specifying long text.
    Did anyone know how to create a long text for an network activity?

    Hello Vivek,
    I'll tried this too. My problem was, if I add long text to a existing network activity, everything works well. But in my programm I create a new network plan with one network activity (0010). After commit I become the correct network plan number. Then I try to add long text to the network activity. I get correct return codes but if I look in the transcation CJ20N I could not see some text. If I use the READ_TEXT function with the key I insert the text, I see the text, but not with the transaction CJ20N.
    I compared the key I used in my program with the key if I insert text with transaction CJ20N. I could'nt found some differences.
    SELECT SINGLE afvcp~mandt afvcp~aufpl afvcp~aplzl
                      INTO (mandant,aufpl,aplzl)
                      FROM afvcp INNER JOIN
                      afko ON
                      afko~mandt = afvcp~mandt
                      AND afko~aufpl = afvcp~aufpl
                      AND afko~aufnr = ordernumbernew.
                        "*Create Identifier
                        CONCATENATE
                        mandant aufpl aplzl
                        INTO lv_name.
                        header-tdobject = 'AUFK'.
                        header-tdname = lv_name.
                        header-tdspras = sy-langu.
                        header-tdform = 'SYSTEM'.
                        header-tdid  = 'AVOT'.
                        header-mandt = sy-mandt.
                        header-TDLINESIZE = '079'.
                        CALL FUNCTION 'SAVE_TEXT'
                          EXPORTING
                            client          = sy-mandt
                            header          = header
                            insert          = 'X'
                            savemode_direct = 'X'
                            owner_specified = ' '
                            local_cat       = ' '
                          IMPORTING
                            function        = func
                            newheader       = newheader
                          TABLES
                            lines           = lines
                          EXCEPTIONS
                            id              = 1
                            language        = 2
                            name            = 3
                            object          = 4
                            OTHERS          = 5.
                          CALL FUNCTION 'COMMIT_TEXT'
                           EXPORTING
                             OBJECT                = header-tdobject
                             SAVEMODE_DIRECT       = 'X'
                           IMPORTING
                             COMMIT_COUNT          = commit_count
                          COMMIT WORK AND WAIT.
    For example in the debug the header ist filled with:
    1 TDOBJECT C 10 AUFK
    2 TDNAME C 70 210000044156300000001
    3 TDID C 4 AVOT
    4 TDSPRAS C 1 D
    5 TDTITLE C 50
    6 TDFORM C 16 SYSTEM
    7 TDSTYLE C 8
    8 TDVERSION N 5 00000
    9 TDFUSER C 12
    10 TDFRELES C 4
    11 TDFDATE D 8 00000000
    12 TDFTIME T 6 000000
    13 TDLUSER C 12
    14 TDLRELES C 4
    15 TDLDATE D 8 00000000
    16 TDLTIME T 6 000000
    17 TDLINESIZE N 3 079
    18 TDTXTLINES N 5 00000
    19 TDHYPHENAT C 1
    20 TDOSPRAS C 1
    21 TDTRANSTAT N 1 0
    22 TDMACODE1 C 16
    23 TDMACODE2 C 16
    24 TDREFOBJ C 10
    25 TDREFNAME C 70
    26 TDREFID C 4 4
    In CJ20N the header is filled with
    1 TDOBJECT C 10 AUFK
    2 TDNAME C 70 210000044156300000001
    3 TDID C 4 AVOT
    4 TDSPRAS C 1 D
    5 TDTITLE C 50
    6 TDFORM C 16 SYSTEM
    7 TDSTYLE C 8
    8 TDVERSION N 5 00000
    9 TDFUSER C 12
    10 TDFRELES C 4
    11 TDFDATE D 8 00000000
    12 TDFTIME T 6 000000
    13 TDLUSER C 12
    14 TDLRELES C 4
    15 TDLDATE D 8 00000000
    16 TDLTIME T 6 000000
    17 TDLINESIZE N 3 079
    18 TDTXTLINES N 5 00007
    19 TDHYPHENAT C 1
    20 TDOSPRAS C 1
    21 TDTRANSTAT N 1 0
    22 TDMACODE1 C 16
    23 TDMACODE2 C 16
    24 TDREFOBJ C 10
    25 TDREFNAME C 70
    26 TDREFID C 4

  • 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

  • Update Long Text of Production Order

    Hi ABAP Gurus,
    We want to update some information in long text automatically while releasing production order.
    We try PPCO0007
    We found that we must update AUFK-LTEXT as 'E' then we can see long text via CO02, CO03.
    Without updating AUFK-LTEXT, even if the long text value saved in SXTL, but it can not be displayed via CO02, CO03.
    After saving the text using 'SAVE_TEXT' function module and commiting it we update the 'ltext' field in AUFK table.
    SELECT SINGLE * INTO wa_aufk FROM aufk WHERE aufnr EQ '000012345678'.
    wa_aufk-ltext = 'D'.
    MODIFY aufk FROM wa_aufk.
    However, it only works when we go to CO02 and press 'Save' button without changing anything.
    If we press 'release' button, AUFK-LTEXT will be overwritten by system. >_<
    What we expect system to do is that when we release production order, AUFK-LTEXT can be changed to 'E', so that we can display long text via CO02, CO03.
    Please help.
    Cheers,
    Qiang

    There is no standard SAP enhancement we can use for this purpose.
    We have developed another program to maintian the long text in production order.
    This call can be closed.
    Cheers,
    Qiang

  • Update Time confirmation and Long text of Work Order in single FM or BAPI

    Hi,
    I would like to know, which standard FM or BAPI will update the longtext along with the confirmation text while doing the time confirmation of a work order.
    I have tried with standard BAPI BAPI_ALM_CONF_CREATE for updating the time confirmation. This is updating the time and confirmation text properly but not the long text. I would like to know how can I update the long text while doing the time confirmation. Is there any other standard FM/BAPI will update both?
    Thanks in Advance,
    Mohan.

    There is no standard SAP enhancement we can use for this purpose.
    We have developed another program to maintian the long text in production order.
    This call can be closed.
    Cheers,
    Qiang

  • Is there a way to insert a clickable hyperlink in the long text of an order

    Is there a way to insert a clickable hyperlink in the long text of an order header instead of using the attachment option?
    Thank
    JAM
    Edited by: Jimmy Mendoza on Dec 6, 2010 8:48 PM

    hi jimmy,
    You can very well add hyper links in the long text ,the long text should be in word format,suppose you want to use www.google.com you can type this and when click on it,it will take you to the website.
    Regarding objects sap has not given this facility to add an attachment,for this you can use DMS functionality.

  • Printing Long Text of Production Order

    Dear all,
    Can we print the long text of Production Order using Co04N transaction? Please suggest.
    regards,
    Kumar

    Hi,
    Thanks for suggestion,,, awarded points.
    Thread closed
    regards,
    Kumar

  • Add new tab of long text to production order

    Hi all
    i need to add new tab of long text to production order, which will be blocked for changes.
    anyone can help with this?
    thanks.

    Yossi,
    The purpose of long text is so that business users can add additional information while processing the order so that everyone can check the text.
    Please tell us why do you want to block the production order text? Also why do you need a new tab for long text? and where do you want that information to be stored?
    -Swapnil

  • Reading long text for more records at a time

    Hi all,
    We have a requirement for which that data like textid textname textobject  and language  must  be taken in to an internal table and for each record in the internal table i  have to read the long text inorder to compare the long text for the given search text.
    If i use Read_text inside the loop and endloop it works but it may not be appropriate in performance point of view.
    Is there any function module which can read long texts for more records at a time.
    The long text data in STXL will be in raw data format right? is there any way to convert raw data to normal so that by hitting the STXL i can read the long text data for more than one record at a time.
    Thanks in advance
    sanju.

    HI Sanju,
    Below is a code snippet which describes reading a long text frm the screen and appending it into the internal table.This code is actually to read the text from the screen and inserting a record into STXl and STXH.
    From your query what i understood is that you are storing the long text from the screen into a internal table and so you not want to use the read_text FM due to performance issue.
    Since tdline(tline table) is 132 char long format i use this small logic to read the screen data and append it to my internal table.
    *Data Declarations
      DATA: lv_strlen TYPE i,
            lv_create TYPE boolean,
            lv_desc TYPE string.
      DATA: ls_text TYPE tline,
            ls_basic_text TYPE stxh.
      DATA: lt_text TYPE ztty_tline_tab.
      CONSTANTS:
       lc_tdid TYPE  thead-tdid VALUE 'Z001',
       lc_tdobject TYPE thead-tdobject VALUE 'Z_ALERTS'.
    *Appending the text to the internal table.
      lv_strlen = STRLEN( iv_alert_text-alert_text ).
      lv_desc = iv_alert_text-alert_text.
      IF lv_strlen < 132.
        ls_text-tdformat = '*'.
        ls_text-tdline = lv_desc.
        APPEND ls_text TO lt_text.
      ELSE.
    *logic to wrap text
        DO.
          ls_text-tdformat = '*'.
          IF STRLEN( lv_desc ) < 132.
            ls_text-tdformat = '*'.
            ls_text-tdline = lv_desc.
            APPEND ls_text TO lt_text.
            EXIT.
          ENDIF.
          IF lv_desc+132(1) <> ' '.
            CONCATENATE lv_desc(131) '-' INTO ls_text-tdline.
            lv_desc = lv_desc+131.
          ELSE.
            ls_text-tdformat = '*'.
            ls_text-tdline = lv_desc(132).
            lv_desc = lv_desc+132.
          ENDIF.
          APPEND ls_text TO lt_text.
        ENDDO.
      ENDIF.
    Please award graciously if found helpful.Please do ask me if i have not answered you properly.
    Thank you.
    Message was edited by:
            P M Harish

  • Post long text for document line item via FI-GL Inbound IDoc

    Hi guru,
    I am trying post extension ZFIDCP02 linked basic type FIDCCP02 and message type FIDCC2 IDoc in R/3 (4.6c) via IBM Websphere (Inbound IDoc),
    I am use inbound function module IDOC_INPUT_FIDCC2 and activate exit 008 (EXIT_SAPLF050_008) and exit 002 (EXIT_SAPLF050_002),
    In the extension ZFIDCP02 and under E1FISEG, I am add my segment  ZITEXT include field TDSPRAS, TDID, TDOBJECT, TDLINE.
    I am send  ZFIDCP02 IDoc via IBM Websphere no error  but all field TDSPRAS, TDID, TDOBJECT, TDLINE in my segment  ZITEXT not post in FI-GL.
    How can I  post long text for document line item (ZITEXT) in FI-GL ?.
    and I'm mean post ZITEXT to bank statement via IDOC.
    Please throw light on this  and  may be I  'm want solution or example ABAP code for exit 002 (EXIT_SAPLF050_002).
    Thanks in advance,
    Akkapong Pirachai
    CAT Telecom
    Edited by: Akkapong Pirachai on Aug 20, 2008 7:40 AM

    Close question because long time for answer.

  • How to add long text for existing static text in Adobe forms.

    Hi all,
    I have a requirement that I need to add  a long text for existing Static text in my adobe form
    1) Counter part inputs
    2) Mack Inputs.
    These two are static texts, I need to add the long text in the following manner.
    1)Counter Part Inputs(zds220)
    2)mack Inouts(zds340)
    Please suggest me how to do it.
    Thank You.
    Suneel.

    Hi Nitin Sikka,
    Thanks for your reply. I found solution for the above issue. I need to change the text to text field and  binding to that text field.
    Thank You,
    Suneel.

  • Long text for line item appears twice in my PO form...

    Hello Experts,
    I am wondering why my long text for my 1st line item is appearing twice. In my PO, I only
    maintained a long text for my 1st PO line item appeards twice. below is my code:
    /E          ITEM_LINE_1
    IZ           &EKPO-EBELP&,,&EKPO-TXZ01&
    IZ           ,,&EKPO-EMATN&,,&EKPO-MENGE&,,&EKPO-MEINS&,,&EKPO-UMREZ&,,&EKPO-NETPR&,,
    =           &EKPO-NETWR&
    /:           DEFINE &LV_TEXTNAME& = ''
    /:           PERFORM GET_LONGTEXT_ITEM IN PROGRAM ZMMRP0008
    /:           USING &EKPO-EBELN&
    /:           USING &EKPO-EBELP&
    /:           CHANGING &LV_TEXTNAME&
    /:           ENDPERFORM
    /:           INCLUDE &LV_TEXTNAME& OBJECT 'EKPO' ID 'F01'
    The element 'ITEM_LINE_1' is called per line item. So in my case, 3 times. The INCLUDE statement
    at the end of the element is for the longtext. I am now confused as to why it appears twice for the 1st line item.
    Thank you guys and take care!

    Hi,
    You can debug and check whats happening there.
    Regards,
    Ram

  • Default values for long text for mic in inspection plan

    hi,
    Some long text are coming default when i am creating inpection plan for mic.
    This is coming for only particular plant. For other plant it is not coming. Is there anywhere we can make it as default for a particualar line item . ie for particular characteristics i.e 10, 20 etc
    sathish. R

    Hi,
    I am not sure , whether you are mentioning about Long text for MIC or Default insp char number (10,20,30..) in the insp plan.
    If you are talking about Insp char number in the insp plan . you can specify the same in SPRO , QM->Q planning ->Insp planning -> General -> Maintain profiles for default values.
    Regards
    K.M.Arun

  • Long Text in Process Order

    Hi ,
    I want to add the long text in Process Order screen.
    I had seen the long text tab is in the production order screen(CO01) but i could not find the same in the process order screen(COR1).  Is there any customization or any user exit required to add the long text in the process order screen.
    Thanks & Regards,
    Jish.

    Hi
    Suzie
    U will find the (Create Long text ) in the  header of the Process order, NEAR Process order number and Header Material.
    Reg
    Madhu

Maybe you are looking for

  • Backing Up Mail to Time Machine?

    Time Machine has been backing up to an external hard drive (WD Passport) for a couple of weeks. I am now trying to find and old email I sent, via Time Machine. When I open Time Machine while in Mail, I only see today's date. Is there a way for me to

  • [SOLVED]Unable to boot into the kernel I compiled, kernel panic

    I try to compile a kernel myself and boot into it, and I use virtualbox to test it. (arch guest inside my arch host)  I first copy /proc/config.gz of my guest system to the linux source code directory, rename it to .config, and just compile it. After

  • Error package com.darwinsys.util does not exist

    Hi, i keep getting the following error: "error package com.darwinsys.util does not exist" its refering to one of the libraries ive placed in my code. Ive downloaded this library but i dont know where to install it. Can anyone help? its really urgent

  • Good receipt entry not possible

    hi sap guru, while entering good receipt, i am getting error of ACCOUNT DETERMINATION FOR ENTRY INT GBB___BSA 3000 not possible please throw some light thank in advance

  • Error 1611 Ipod Touch 2 Gen

    I have Error 1611 on my Ipod Touch 2 Gen. I am also stuck on Restore screen on my ipod. Please help!