How to capture Purchase order text from MM02

Hi Friends ,
i have a requirement like i have  to capture the purchase order text from MM02
from one program.
Pls give helpful code .
Thanks & Regards
Jagadeeshwar.Bachu

hi
check this code
Hi,
declare the paramters like:
To fetch Long Text lines for READ_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for Read_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras. " Language
Constants
CONSTANTS:
Object ID for Long Text of Sales Item Text
c_best TYPE thead-tdid value 'Z026', ID
c_object TYPE thead-tdobject . " Object
Object will be VBBK, and the Object name will be the concatenation of Sales order and Item No(for Item texts) and only Sales order for Header texts.
Language will be default sy-Langu.
In the loop of Sales orders call this fun module and use by passing all the above 4 paramters ID,OBJECT,NAME and LANG.
You double click on that text
GOTO -> header you will know the all above paramters.
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters ‘*’ or ‘,’.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
regards
siva

Similar Messages

  • How to capture purchase order text view in mm01

    Hello All,
    Im doing recording for one material type in BDC but im not able to capture purchase order text view while creating material.
    Its not getting recorded only pls guide bcoz i have to enter purchase and sales text for new materials.
    Regards,
    Sunny

    Hi Sunny,
    I have a different sugesstion. Never use BDC if u have BAPI available for the same functionality.
    use this BAPI BAPI_MATERIAL_SAVEDATA for material creation. Even u can create the po texts here. Check the parameters MATERIALLONGTEXT and EXTENSIONIN. in FM documentation. It is pretty clear.
    Different long texts (basic data texts, purchase order texts, internal comments, sales texts, material memos) can be created for a material. This requires the fields APPLOBJECT, TEXT_NAME, TEXT_ID, and LANGU or LANGU_ISO in table parameter MATERIALLONGTEXT to contain entries. Depending on the content of field TEXT_ID, the field TEXT_NAME must have the following structure:
    The material number is transferred first. If it has fewer than 18 characters, the remaining characters must be filled with blanks. If it is a material memo (LTXT), the plant key must also be transferred from character 19 onwards; in the case of a sales text (0001), this must be the sales organization and distribution channel. The combinations allowed for the four different fields are indicated in the following table:
    APPLOBJECT TEXT_NAME  TEXT_ID    LANGU
    MATERIAL Matl no. (18 char.)  BEST, GRUN, or IVER  Language
    MDTXT Matl no. (18 char.)  LTXT    Language
    Plant
    MVKE Matl no. (18 char.)  0001    Language
    Sales organization and
    distribution channel
    Thanks,
    Vinod.

  • How to Display  'purchase order text' in MM03 using report program

    Hi Friends,
    Can anybody suggest me how to display 'purchase order text' in MM03 using report program.
    'Purchase order text' tab displays purchase long text of particular material .
    I coded as:
          SET PARAMETER ID 'MXX' FIELD 'E'.
          SET PARAMETER ID 'MAT' FIELD k_final-matnr.
          SET PARAMETER ID 'WRK' FIELD k_final-werks.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    It displays Purchasing tab other than Purchase Order Text tab of MM03.
    Please suggest me how can i solve this.
    Is there any parameter id to set values for Purchase Order text tab

    >
    Madhu Mano Chitra wrote:
    > I want how to navigate to MM03 'Purchase Order text'  tab/ view using ABAP code.
    > could any suggest me
    You can call a transaction and pass it a BDC table that tells it where you want it to go.  You have to work out for yourself what to put into the BDC table.  The code below works for tcode CATSSHOW.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
       CLEAR bdcdata_wa.
        bdcdata_wa-program  = 'CATSSHOW'.
        bdcdata_wa-dynpro   = '1000'.
        bdcdata_wa-dynbegin = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'SO_STATU-LOW'.
        bdcdata_wa-fval = '20'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'ANDZEIT'.
        bdcdata_wa-fval = SPACE.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'PAST'.
        bdcdata_wa-fval = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        IF p_selscr = SPACE.
           CLEAR bdcdata_wa.
           bdcdata_wa-fnam = 'BDC_OKCODE'.
           bdcdata_wa-fval = '=ONLI'.
           APPEND bdcdata_wa TO bdcdata_tab.
        ENDIF.
        opt-dismode = 'E'.
        opt-defsize = 'X'.
    CALL TRANSACTION 'CAPP' USING bdcdata_tab OPTIONS FROM opt.

  • Create list of materials with its purchase order texts from material master

    Dear all
    Simple question I do wanna ask.
    Just need to get out a list with my materials with its purchase order texts from the material master.
    As I do know that PO text is not stored on a table, it might be difficult to get it out from the system.
    Does anyone of you know how to retrieve it simply?
    Regards
    François

    Check this link Material Master Purchase Order Text.

  • Mm2 remove purchase order text from central data M_MATE_MAN

    Hi,
    we restricted the material master data in mm01/mm02 with the authorisation object M_MATE_MAN to activity 03. This setting meets our requirements to 99%!
    We saw in sap note 545380 that the purchase order text is a central text.
    Surprisingly the sales text is created with reference to the sales organization. Is there a similar purchase order text which can be created on the level of the purchase organization and language?
    Or can we use an user exit or something else to allow maintenance and exclude the purchase order text from the M_MATE_MAN authorisation check?
    Thank you in advance for your help!
    Best regards,
    Frank

    Hi,
    have you tried to invalidate item instead of account assignment? You can get a reference to item with method GET_ITEM. I can see only one class which implements interface IF_PURCHASE_ORDER_ACCOUNT_MM. It is CL_PO_ACCOUNTING_HANDLE_MM and this class has no code for this method.
    Cheers

  • How to get purchase order number from delivery number?

    hi all,
    how to get purchase order number and item if i have only delivery.
    and in same way how to get po number and item if i know only batch number.
    kindly give me some solution i need this urgently.
    thanks in advance.

    Check the logic below:
    * Selecting the Sales Documents from VBFA for corresponding Invoice
        SELECT vbelv
                     posnv
          FROM vbfa
          INTO TABLE gt_itab3
         WHERE vbeln EQ gt_itab5-vbeln
           AND posnn EQ gt_itab5-posnr
           AND vbtyp_n EQ 'J'.
        IF sy-subrc EQ zero.
          SORT gt_itab3 BY vbelv posnv.
        ENDIF.
      ENDIF.
      IF NOT gt_itab3 IS INITIAL.
    * Selecting the Purchase Orders from VBFA for corresponding Sales Documents
        SELECT vbeln
               posnn
          FROM vbfa
          INTO TABLE gt_itab4
       FOR ALL ENTRIES IN gt_itab3
         WHERE vbelv EQ gt_itab3-vbelv
           AND posnv EQ gt_itab3-posnv
           AND vbtyp_n EQ 'V'.
        IF sy-subrc EQ 0.
          SORT gt_itab4 BY vbeln posnn.
        ENDIF.
      ENDIF.
    Batch number will be there in delivery item.
    Regards
    Kannaiah

  • HOW to retrieve PURCHASE ORDER DATA from archieve file and print a report

    Dear all
    1) I have retrieve purchase order data from archived files.
    2)  print purchase order data and created pdf file.
    VIJ.............
    Moderator message - Please ask a specific question - post locked
    Edited by: Rob Burbank on Apr 28, 2009 12:00 PM

    Dear all
    1) I have retrieve purchase order data from archived files.
    2)  print purchase order data and created pdf file.
    VIJ.............
    Moderator message - Please ask a specific question - post locked
    Edited by: Rob Burbank on Apr 28, 2009 12:00 PM

  • How to Make Purchase Order TEXTS Mandatory

    Hi.........
                 I want to make some Purchase Order texts mandatory(for ex Header text) so that i should appear in PO Print and user should not be able to proceed unless he make an entry.
                                            Please help me out......
    Thanks

    Hi,
    In spro>mm>pur>po>define screen layout select filed selection AKTH Create for ref.data item make it
    required entry
    BR
    Diwakar

  • How to export purchase order dtd from SRM 5.5

    In earlier versions of SRM one could export an XML DTD based on the corresponding IDoc. However, in 5.5 there is no purchase order IDoc.
    I need to send a vendor the DTD for the XML purchase order we are going to send to them electronically.
    Where can I find and download the XML DTD for purchase orders in SRM 5.5?

    Stuart,
    we were doing this to transmit XML orders to a Market Place but we had to use our PI server.
    If you have no PI server then I am not sure the option exists.
    If you have a PI server, I suggest you ask the PI person as I know nothing about PI.  The config for XML output in SRM is in SPRO > SRM Server > Cross Application Basic Settings > Set Output actions and Output Format
    Regards
    Allen

  • How to pull out Purchase Order text in ME11/ME12/ME13

    Hi,
    Kindly let me know how to extract Purchase Order text from TEXT tab in ME13.
    I have got Info Record note but I am unable to get Purchase Order text.
    I am using the following FM which is given below.It seems error.
    Please kindly let me know how to do this.
    CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  client                  = sy-mandt
                  id                      = 'BT'
                  language                = sy-langu
                  name                    = g_tdname
                  object                  = 'EINE'
             TABLES
                  lines                   = ig_read1
             EXCEPTIONS
    Thanks,
    Bala Raja

    Your need to use READ_TEXT FM Properly:
    text name -> you need to concatenate info record ,plant '0'  purchase org
    language : EN
    text id BT
    Object EINE
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = 'BT'
    language = sy-langu
    name = g_tdname
    object = 'EINE'
    TABLES
    lines = ig_read1
    EXCEPTIONS
    Thanks
    Seshu

  • LSMW  MM02 -  CHANGE PURCHASE ORDER TEXT

    I need to change the purchase order text  in mm02  using the LSMW. 
    Can you help me?

    LSMW has a standard direct input for long texts, hence it is not necessary to do a recording.
    help.sap.com gives real good help for loading loading long texts with LSMW, further has this been discussed many many times here in MM  and in the data migration forum.
    try to search a bit, you dont really need more than the words you already have used on the subject to get a good variety of answers

  • Updating Material master purchase order text -LSMW

    Dear Experts
    How can update Purchase order Text  through LSMW, while am doing recording system is not recording this field from material master
    Regards
    Ajeesh.s

    Dear Expert
    Please throw some light on this issue
    Regards
    Ajeesh.s

  • Purchase order texts.

    Hi,
    what are the purpose of Basic data text (view "Basic data 1"), Purchase order text (view "Purchase order text" ), from the menu Edit, Long Text, Create Text?
    Best regards

    Basic data text:
    You can use this text as you like, for example, to store additional, general information on the material
    If a text  has not yet been maintained, the system creates a blank text in the logon language. If you want to create a text in another language, choose Create text and specify the language in the dialog box that appears. Then enter your text as required. For more word-processing functions, choose Editor to enter your text in SAPscript. For information on how to use SAPscript, see the SAP library documentation .
    Purchase order text:
    A purchase order text is a text describing the material in more detail. This text is subsequently copied to purchasing documents (such as purchase requisitions or purchase orders) automatically, where you can change it if necessary. It is valid for all organizational levels, not for a specific plant. You can enter a purchase order text in the material master record in as many languages as you like, though only one text is allowed per language

  • Purchase Order text

    Hi,
    What is the use of maintaining Purchase order text while maintaining the material master.
    I had maintained some text in the material master ( Purchase order text view ) in MM01
    But while creation of PO, i am unable to  see the text getting copied in to the item text of the PO.
    Please expedite.
    RitiG

    Hi,
    The Purchase order text is exactly that, it is text that can be copied to the Purchase order. But it does not (and should not) replace the item text.
    But if you want the Purchase order text to be printed on the PO in the item text area then this is possible, the program that controls the PO printing can be told to use the Purchase order text from the Material in the PO item text instead. But the display on ME23N etc. would still show the item text even though the PO is showing the Purchase Order text from the material master.
    So for printing only, it can be done but it can't be done (without user exit etc.) within the PO record itself.
    Steve B

  • View "Purchase Order Text" in Material Master

    Hi,
    I need replicated text of  view "Purchase Order Text" in ECC to Material Master in SRM.
    Or When We create a shopping cart in the way in which the text replicated "Purchase Order Text" from the the Material Master(ECC).
    Regards
    Angie

    For Purchase Order text in Material Master:
      use this code for Purchase Order text,
    DATA:  l_lsize(3)  TYPE n VALUE '132'.
      DATA:   lwa_tline     TYPE tline,
                lwa_thead     TYPE thead,
                lwa_valid     TYPE ty_input(flat file data),
                lwa_temp      TYPE ty_input.
      DATA: lit_tline TYPE STANDARD TABLE OF tline.
      lwa_thead-tdobject   = 'MATERIAL'.
      lwa_thead-tdid       = 'BEST'.
      lwa_thead-tdspras    = 'E'.
      lwa_thead-tdlinesize = l_lsize.
      LOOP AT pu_it_valid INTO lwa_valid.
        lwa_temp = lwa_valid.
        AT NEW matnr.
          CLEAR: lwa_thead-tdname,
                 lwa_tline-tdformat.
          lwa_thead-tdname     = lwa_temp-matnr.
        ENDAT.
        IF lwa_tline-tdformat IS INITIAL.
          lwa_tline-tdformat = ' \ '.
        ELSE.
          lwa_tline-tdformat = '='.
        ENDIF.
        CLEAR lwa_tline-tdline.
        lwa_tline-tdline = lwa_valid-text_line.
        APPEND lwa_tline TO lit_tline.
        AT END OF matnr.
          CALL FUNCTION 'SAVE_TEXT'
            EXPORTING
              client          = sy-mandt
              header          = lwa_thead
              insert          = c_x
              savemode_direct = c_x
            TABLES
              lines           = lit_tline
            EXCEPTIONS
              id              = 1
              language        = 2
              name            = 3
              object          = 4
              OTHERS          = 5.
          IF sy-subrc = 0.
            REFRESH lit_tline.
          ENDIF.
        ENDAT.
        CLEAR: lwa_temp,
               lwa_valid.
      ENDLOOP.

Maybe you are looking for