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

Similar Messages

  • 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

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

  • 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

  • How to change the status of a production order

    Dear All,
    May i know how to change the status of a production order.I want to de-active the status like OPGN (Operation generated).This status is updated as there was no routing assigned to that particular production order during its creation
    Thanks and Regards,
    Varun Siddharth

    Dear,
    When you create a production order, an operation created by the system is generated automatically if no routing is used for the creation. As a result the order header receives the status HOGAN; the operation created automatically also has this status.
    If you delete the operation created automatically and then do not have the status HOGAN.
    To avoid this maintain the Routing for the material or delete the setting of default operation from OPJG.
    Regards,
    R.Brahmankar

  • 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 read the long text in Transaction Code : VA02 at runtime??????

    Hi,
    I am undable to find the long text in TC: VA02 at runtime. Actulally my requirement is like how to compare between the item level long text at runtime and existing long text for that item.
    If any body has soluntion, please provide me. I would really be  greatfull if any body provide the solution.
    Deepak Kumar
    E-Mail: [email protected]

    Hi Sudheer,
    Actually my requirement is to read the text at runtime. Example: If saved text is 'ABC' and it is changed by '123'. Now before saving changed text '123', I need to capture it so that I can compare it with saved text 'ABC' whether it is changed or not?
    Couuld you send me some sample code? I would appreciate if you reply at the earliest.
    Deepak Kumar.

  • How to retrieve the long texts from  purchase Info record (ME13)

    Hi,
    How do I retrieve the long texts data from the tab, Texts of the Purchase Info record(ME13).  I want to retrieve the current long texts data(long text1, long text2 long text3, long text4) for a given purchase info record. These long texts points to the structure BRM06I.
    So, now how do I fetch the data from the structure BRM06I. Is there any function module for the same..
    Thanks.

    Hello,
    Texts are stored in tables STXH & STXL (header and item). You can search these tables by selecting Text object = EINA and Text name = Info Rec #. The text ID's you will see are the ID for various texts maintained.
    Cheers !

  • How to make the LONG TEXT as mandatory

    Hi,
    In one tansaction, I need to make the LONG TEXT as mandatory.
    or
    I need to raise an Error message if the long text is empty.
    Thanks

    I want to make the long text mandatory in the transaction F-66.
    In this, long text field (text box) is not displaying directly for typing.
    We need to click on the button LONG TEXT, then text box is opening for typing.
    I need to make this as mandatory.
    Thanks

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

  • How to take annexture [ long text  ] in purchase order in smartforms

    hi all expert's
    [1] i printing P.O in smart form  ....
    can any body tell me how to take annexture [ long text  ] into P.O layout....text will be a page or more pages...
    [2] how to pass mumtiple line item on next susquent page  .....
    e.x suppose i having 10 line items for a P.O [ Purchase Order ]
    on page first it should display 5 lines and on 2nd page it should display 5 lines .....
    while i am printing it is showing all items on same page and breaking footer and printing on next line...
    kindly suggest me ...
    thanx in advance ...

    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

  • How to select the correct routing for production order?

    In table PLPO i have 4 different group numbers for a particular routing. I'm wondering how a production order, created in CO01, selects which one to use. Our base quantity is dz/hr. When I create an order for a particular material, it shows up as 290 as the base quantity. The group 1 is 400dz/hr, not 200. Why does the order choose this group number and not the group number 1.
       Here is a screen from PLPO table.
       Here is a screen showing the material master.
       This is an image of the order details within the created order.

    PLPO contains operations
    The planselection would be based on PLKO entries.
    Please check online help to first get a better understanding on how routings are selected.
    Routing Selection - Production Orders (PP-SFC) - SAP Library   
    Automatically Selecting a Routing - Production Orders (PP-SFC) - SAP Library
    Definition of Base Quantity for Operation:
    "Quantity of the material to be produced to which the standard values of the
    operation refer"

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

Maybe you are looking for

  • Blank reports

    Hi, I am calling reports from forms. The application used to work perfectly fine. Then one day, my PC (WIN2000) was kind of slow, so I run Disk Cleanup and Disk Defragmenter. Then now, I can't even run my report.. my forms seems works ok. but when I

  • Dynamic Creation of .txt file

    hi Friends , I want to create .txt file from oracle database information on apache tomcat server side. or create .txt file when user give some input according to that data should be retrival from oracle table.

  • How to change a selected cell background color in JTable?

    Hi all, I am trying to change the background color of a selected cell by clicking on that particular cell. DefaultTableCellRenderer class provides setBackground(Color c) to change the background color of unselected cells. Is there a way to change a s

  • JSP + MYSQL question: input form value into a SQL table

    Hello, I am writing some JSP code to read input information from a input form to write this information into a SQL field. My problems are: - how can i pass the input form information to other jsp file ? (like Getproperty of something like this) - how

  • Subcontract PO - suppress components.

    Hello All, Is there a way to suppress components from printing on a subcontract PO ouput (NEU)?   Our company creates subcontract PO with 250 components.  We would like to stop printing the components when PO's are printed.   I could not see anything