How to create long text in production order?

Hi,
i have found that i could only change long text in the
production order by 'SAVE_TEXT'.
but i want to create long text and any advice?

DATA:TEXT_HEADER LIKE THEAD.
DATA:TEXT_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
data: t_ponum  like BAPI_ORDER_KEY-ORDER_NUMBER.
t_ponum = '000040000068'.
TEXT_HEADER-TDID ='KOPF'.
TEXT_HEADER-TDOBJECT = 'AUFK'.
TEXT_HEADER-TDSPRAS = sy-LANGU .
CONCATENATE SY-MANDT t_ponum INTO TEXT_HEADER-TDNAME.
clear text_lines.
refresh text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = '12567'.
append text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = 'lg'.
append text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = 'prh'.
append text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = 'ueue'.
append text_lines.
CALL FUNCTION 'CREATE_TEXT'
  EXPORTING
    FID               = TEXT_HEADER-TDID
    FLANGUAGE         = sy-LANGU
    FNAME             = TEXT_HEADER-TDNAME
    FOBJECT           = TEXT_HEADER-TDOBJECT
                 SAVE_DIRECT       = 'X'
                 FFORMAT           = '*'
  TABLES
    FLINES            = text_lines
CALL FUNCTION 'SAVE_TEXT'
  EXPORTING
    CLIENT          = SY-MANDT
    HEADER          = TEXT_HEADER
    INSERT          = ' '
    SAVEMODE_DIRECT = 'X'
  TABLES
    LINES           = text_lines.
CALL FUNCTION 'COMMIT_TEXT'
  EXPORTING
    OBJECT          = TEXT_HEADER-TDOBJECT
    NAME            = TEXT_HEADER-TDNAME
    ID              = TEXT_HEADER-TDID
    LANGUAGE        = sy-LANGU
    SAVEMODE_DIRECT = 'X'.

Similar Messages

  • How to copy long text from production order to automatically created P.R

    Hello experts,
    I want to add some text to the long text , in the production order and save it.
    There is an external process in our routing, in which when the order is saved and released, there is a P.R created automatically.
    My requirement :-  The text in the long text tab of the Production order should flow to one of the text types {Item text} in the P.R item created.
    I checked in SPRO [ IMG-> MM->Purchasing -> P.R-Texts for PR-> define copying rules].
    For text type ,  'Item text' already has  the text linkages : Order/network, with source texts "component text' and 'transaction text'.
    However, the text being maintained in the order is not flowing on its own anywhere into the P.R created.
    Is there any other config that needs to be done to achieve this?
    Regards
    P.R

    Hi, A production order long text exists at a header level and a Purchase req gets triggered at an operation level of a production order during external processing.
      So if you expect a mapping of a header text to operation level text, it should not be definitely possible in the SAP standard. (May be an enhancement would still work but you need to decide on it).
    If you maintain a long text at the same operation where you trigger a pur.req (a text on your own or via a standard text key-CA10 tcode), you would see that populated, at the item-level text tab of the generated pur req automatically, as a standard behaviour.
    Hope you would go with the standard system behaviour.

  • 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

  • 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

  • How to create Long Text in Module Pool Program

    Hi all,
    I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
    Thanks & Regards
    Nirmal

    Hai ,
    here you have to use custom control, for this
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    1)  Create custom control in your screen
    2)   CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',   "--> (this is custom control name in screen)
                       editor    EXPORTING parent = container.
    3)  CALL METHOD editor->get_text_as_stream  "This method reads data from custom control , inserts into itab 'text_tab' 
             IMPORTING       
              text = text_tab.                                       "
          READ TABLE text_tab  INTO line INDEX 1. read the text into wa 'line'
    if you want more clarity , see  'ABAPDOCU' >ABAP USER DIALOGS>    COMPLEXSCREEN ELEMENTS-->  DEMO CUSTOM_CONTROL

  • Getting a runtime error in reading long text from production order

    Hi all,
    I am trying to read production order long text and the code is not showing any syntax error but if i execute it i am getting a runtime error as "Text object aufk is not available".
    But i did check for the text object , text id enties in TTXOB and TTXID tables. Also i am able to see the relevant text in tables STXH and STXL, dont know why i am getting this runtime error and unable to debug.
    I tried a lot searching in forums, but they all ask me to write the code in the way i did, so dont know what is the problem.
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                                =  'kopf'
                  LANGUAGE                 =  sy-langu
                  NAME                          = l_name
                  OBJECT                       = 'aufk'
                TABLES
                  LINES                         =  ilines
              write : ilines.
    Regards
    Jessica

    Hey Vijay,
    Thanks for you reply, It worked, i am not getting the runtime error, but also not getting the output.
    am i missing anywrite statements?
    Please check the code and suggest changes if required. i want to see the long text in the production order in the output. should i say write: ilines.?
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                            = 'KOPF'
                  LANGUAGE                      =  sy-langu
                  NAME                          = l_name
                  OBJECT                        = 'AUFK'
                TABLES
                  LINES                         =  ilines
                 write : ilines.
    Regards,
    Jessica.

  • Long text in production order

    Hi All,
    I have enter some text in all my production order. Based on that txt can i pulled the orders in the report(in std report). Is there any report like this.
    Thanks and Regard,
    D.Dutta

    Hi,
    Check in COOIS report by adding executing at header level & adding the header text field.
    If this does not give you the desired result, then you can get the same from STXH table.
    pass the field value as below:
    TDOBJECT = AUFK
    TDID = KOPF
    TDSPRAS = EN
    TDNAME = (client nos + 12 digit order nos)
    The same can also be read from the FM - READ_TEXT.
    Hope the above answers your query.
    If helpful award points
    Regards,
    Vivek

  • How to create long text in selectio texts.

    Hi,
    In Selectio ntexts its allowing me to create upto some 35 charcters. If i want to write more than that, what is the procedure.
    Thanks in advance
    Eswar

    Hi Eswar,
    Defin a text and asign to your selection parameters. Text will allow you up to 132 CH.
    Ex:
    SELECTION-SCREEN BEGIN OF BLOCK SEL01 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(48) TEXT-007.
    SELECTION-SCREEN POSITION 49.
    SELECT-OPTIONS : S_PROD FOR AUFK-AUFNR   NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    Lanka

  • 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

  • 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 activate Long Text of Order Header in IW31/32

    Hi Expert,
    I have one reqm. like want to upload Long Text in Order Header.
    I have used FM 'Create_Text', its working f9 i.e. creating Long Text for Order Header but not displaying it
    in IW32/33 transaction. Entry for Long Text is available in Table STXL and STXH.
    Please advice me how to activate that Header Long Text which I uploaded earlier.
    Thanks,
    Jay.

    Hi Madhukar,
    Yes I am passing everything correctly, as I am getting Long Text record created in Table STXL & STXH, but not able to see in IW32/33 at the header long text.
    So this is my doubt like how 2 update or activate long text of Order Header?
    Thanks,
    Jay.

  • 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.

  • 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

  • SubReport Data in a Main Report Yet Again

    I have been trying and reading posts all day. 1. The shared variable formula used in the main report will show any/correct value only if its placed atleast 1 section below the one where the sub report exists. (I've Done This) 2.The formula that is us

  • Vga bios recovery

    having used msi live update and flashed the vga bios  an error occured as a consequence the card wil no longer display !! is their a flash recovery tool?  is it possible to recover without using second pci gfx? if anyone can elp i would be most grate

  • How to define Scope of an item

    Complete nooblet question: So, I'm about to pull my hair out. Is there any simple little string of AS I can implement to maybe allow me to use Trace() to display the exact scope/path for an object in a Flash animation?

  • OS X Finder Issue

    Hi, Hi, My boss has handed me his iMac G5 to find out what is going on with it. Basically this is what is happening. When you boot up normally the computer gets as far as loading up finder, stays there for a second and then goes to the blue screen wi

  • Highlighting the current page in a Spry Menu Bar

    Hello, I'm trying to get my spry nav bar to show the page that the viewer is currently on (ie if they were on the 'services' page, the 'services' button would be highlighted) But it's more complex than I thought and I seem to have lost my way. Can so