Display PO item text before save

Need to display item text of Purchase Order in print preview before the PO is saved.
How do I achieve this.
When PO is saved Iable to get the Item text using FM : Read_Text.
I have searched the thread mentioned solutions donot satisfy my requirement.

Hi,
Use the following sample code in ME_PROCESS_PO_CUST (BADI). for me it is working
  TYPES: BEGIN OF IT1," occurs 0 with header line,
          WORD1 TYPE C LENGTH 10 ,
          WORD2 TYPE C LENGTH 5,
         END OF IT1.
  DATA: IT2 TYPE IT1 ."occurs 0 with header line.
       IT2-WORD1 = '          '.
      IT2-WORD2 = ITM_DATA-EBELP.
      ST1 = IT2.
      TDNAME = ST1.
      OBJECT = 'EKPO'.
      ID = 'F01'.
      EN = 'EN'.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          CLIENT                  = SY-MANDT
          ID                      = ID
          LANGUAGE                = EN
          NAME                    = TDNAME "' 00010' "TDNAME
          OBJECT                  = OBJECT
        TABLES
          LINES                   = LINES1
        EXCEPTIONS
          ID                      = 1
          LANGUAGE                = 2
          NAME                    = 3
          NOT_FOUND               = 4
          OBJECT                  = 5
          REFERENCE_CHECK         = 6
          WRONG_ACCESS_TO_ARCHIVE = 7
          OTHERS                  = 8.
regards,
sathis

Similar Messages

  • Prin preview of item text before saving PO

    Hello,
    when I create a PO I can use the print preview of the PO before actually creating/saving the PO. However if I do this I can't see the item text. The item text is only visible in the print preview after the PO is saved.
    Do you know if it is possible to change this so I can see the item text before saving in teh print preview?
    Thanks
    Sofia

    You need to take ABAPer help and see the Print pre-view parameters maintained for the Script/Smartform for the PO Output Type you are using..
    If possible try to include the Item text into those parameters..
    As far as I know only for MEDRUCK script, we can see the print pre-view..

  • Need to display Line item text in PO form...

    Hi,
    I could see some posts already in this regard but could not follow it and hence posting my query.
    In the defaut MEDRUCK PO form I could see that the line item text is displayed with the following statement.
    &TTXIT-TDTEXT&
    INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE &EKKO-SPRAS& PARAGRAPH IX
    I have my customized version of MEDRUCK and in that I want to include the same. How do I achieve this ??
    I tried to include the above statements as it is, but it did not work. The same is the case with my header text requirement. Its corresponding statements in MEDRUCK are
    &TTXIT-TDTEXT&
    INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID&  LANGUAGE &EKKO-SPRAS&
    What could be wrong ??
    Please help.
    thanks

    May be you are using these statements in wrong text elements in PO sapscript.
    Keep in mind that &T166P-TXNAM&, &T166P-TDOBJECT&, &T166P-TDID&.... are variables and there values are filled by sapscript calling program.
    Now it is possible that in your case you are putting this include statement in wrong text element. To check this you can print the variables just before include statement to make sure that values are correctly populated such as
    &TTXIT-TDTEXT&
    Printing Values: &T166P-TXNAM&, &T166P-TDOBJECT&, &T166P-TDID&
    INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE &EKKO-SPRAS& PARAGRAPH IX
    If the values are not populated, you may want to populate these manually by calling an abap routine before include statement and in that abap routine you can populate values for TDOBJECT, ID, and other relevant fields.
    Hope this is helpful to you.

  • To display line item text in FBL3N as it is displayed in FBL1N

    Hi Experts,
    Though the subject line presumes it to be a redundantly asked question but I could not comprehend the exact solution of this. So posting my entire scenario in a hope to get an effective response.
    Scenario: -
    We are not able to see the text when we run GL account balances. The text is maintained in the field text (in Basic data) and PO text (in fields PO Reference) . Now when you use transaction FBL1N to see vendor Open items, you can see the text (line item text) but the same is not seen when we run FBL3N (GL Account Line Items).
    In Technical (simpler) terms: -
    When we display an invoice using MIR4 say invoice number is 123456 (Vendor - 4567, GL account - 78946) , we can see line item text maintained there in field "Text" in Basic data tab. Now run transaction FBL1N for vendor 4567, text (BSEG-SGTXT)  is displayed in line item text. But when we run FBL3N text (BSEG-SGTXT) is not seen.
    How to display the line item text in FBL3N as well ?? In my initial manouver of SDN forum, i found solutions like BTE and pointers to substitutions. Kindly let me know a probable solution.
    Thanks a lot in advance.
    ~
    Shreya

    Hi,
    program RFITEMGL calls fm FI_ITEMS_DISPLAY thus:
      call function 'FI_ITEMS_DISPLAY'
        exporting
          caller_repid  = c_repid_gl
          acctype       = c_koart_gl
          x_opvw        = x_gl_opvw
          x_change      = x_change
          i_u_save      = gd_alvsave
          is_u_variant  = gs_variant
          it_u_fieldcat = gt_fieldcat[]
          it_kontab     = it_accts[]
          it_slbtab     = it_comps[]
          it_t001       = it_h_t001[]
          it_skat       = it_h_skat[]
          it_skb1       = it_h_skb1[]
          x_grid        = x_grid
          x_inet        = pa_inet
        tables
          it_items      = it_pos.
    where c_koart_gl     like bseg-koart  value 'S'.
    BSEG-SGTXT has value when BSEG-KOART = 'K' and this might be the reason why it is not displayed.
    It seems the report only displays records with BSEG-KOART = 'S'.
    Best regards.

  • Report to display PO item text

    Hi All.
    We are maintaing material PO text at Purchse order item level, i wiould like to knowis there any standred report which display these text .
    please reply ASAP.
    Regards,
    Amit Ranjan

    Hi,
    As per my understanding there is no standard report which will give the material PO text anongwith  Purchse order item level details.
    I think you have to go for dovelopment.
    Regards,
    manish

  • Display 'item text' and 'material PO text' in a purchase order ?

    hello,
    i am creating a purchase order and i have inputted the 'item text' and 'material PO text' in the ITEM TEXT of the ITEM DETAILS section. I have a smart forms where i am displaying the purchase order by displaying fields from various tables like ekko,ekpo,t024,eket etc ..
    I want ti display the 'item text' and the 'material PO text' on the smartform but i cant find the table or the fields which keep these values(text) ??
    help me on this one ? thanks for yur time...

    c the example below:
    PERFORM read_text USING g_transp 'Z010'.
    FORM read_text USING l_text l_id.
      DATA : lt_text TYPE TABLE OF tline WITH HEADER LINE.
      DATA : l_name LIKE thead-tdname.
      CLEAR l_name.
      l_name = g_delivery.
      CLEAR lt_text.
      REFRESH lt_text.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
      CLIENT                        = SY-MANDT
          id                            = l_id
          language                      = sy-langu
          name                          = l_name
          object                        = 'VBBK'
        TABLES
          lines                         = lt_text
       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.
      CLEAR l_text.
      LOOP AT lt_text.
        CONCATENATE l_text lt_text-tdline INTO l_text.
      ENDLOOP.
    ENDFORM.                    "read_text

  • PO item text not displaying in ME23n

    Hello,
    There is a PO which was created manually in which the Item text does not display from ME23n. In the display, the item text has a tick next to it but the display window shows nothing. However, the output message is having the item text in it.
    Has any one encountered a problem like this?
    Some additional points in this regard:
    - PO created with refernce to a PR
    - The item text was manually entered in the PR and it is displaying correctly there.
    - The PR and PO could have been created with a different log-in language
    Appreciate a response.
    Thanks
    Nazeer

    Hi Antony,
    Thanks for your reply, but what you say is not correct.
    Item text, or for that matter any text, is not language dependent. I have tested this out by creating a PR in DE and the PO in EN. The text in both (PR or PO) displays correctly when you log in with either DE or EN.
    Thanks
    Nazeer

  • Display header text and item text in smartform

    Hi all,
    I have to display header text and item text of PO in smartform BBP_SUSPO.
    So how to do that.. I have to use 'read_text' Fm or directly i can get values from any table ???
    Thanks in  advance.
    Regards,
    Anagha Deshmukh

    Hi Amit,
    I have used inculde text that is avalable in smartforms to display header & Item text in this way
    For header :
    Text Name         Header guid
    Text Object       BBP_PD
    Text ID           HTXT
    Language          EN
    For Item:
    Text Name         Item Guid
    Text Object       BBP_PD
    Text ID              ITXT
    Language          SY-LANGU
    U can used this attributes in read_text function mdule also.
    Thanks & Regards,
    Anagha Deshmukh

  • Create New Filed in Line Item Text Tab

    Hi Experts,
    How Can I create a new filed in Quotation > Line Item > Text Tab ?
    Tks. & Brgds.
    Ripon

    Hi,
    Hope your requirement is to add one u2018Text typeu2019 in the line item of the sales order.  Say you want to add u2018ITEM DETAILS_SOURCEu2019 in the line item text of sales order. Follow the steps given below.
    1.     SPRO >> SD >> Basic function >> Text Control. Click u2018Text Controlu2019
    2.     Click on u2018Define Text Typeu2019
    3.     Select u2018Sales Documentu2019 and then u2018Itemu2019
    4.     Click on u2018Changeu2019; select the Text procedure u2018Sales itemu2019 and click on u2018Text IDu2019
    5.     The text object is VBBP; Create a new u2018Text  IDu2019; Go for a  new entry and enter the sequence number (higher than the existing one); enter TEXT id as u2018ITEM DETAILS_SOURCEu2019; save
    6.     Now the new text id will be displayed at item text if you create a sales document that includes inquiry, quotation and sales order.
    Hope this will be useful to you.
    Regards,     
    K Bharathi

  • Item text in Purchasing order

    Hi all,
      I have developed a smart form for Purchase order in that i am displaying header and item texts by passing text name, text object, text ID and language to include text.
    My problem is when i am looking in print privew for just creating document (Which is not saved yet so then document number is not generated) then header text is commping perfectly(I am passing the document number to Text name but presently it is initial but it is comming perfectly) but item text is not comming (I am passing the concatinated value of document number and item number to text name).
    Please suggest me how to display newly creating purchase documents item texts(No yet saved purchase orders).
    If it is not possible why the header text is comming perfectly???
    Thanks in advance,
    Mahi.

    Hi kesav,
      The text is not storing in STXH table because the document is not saved yet and the purchase document number is not generated yet. In the STXH table Text Name(Document number) is the key field so the text is not storing in that table.
    My problem is not solved yet any body please suggest me how to display the item text in pring privew.
    If it is not possible to display the text with out saving the PO why the header test is coming fine???
    Mahi

  • Component Item text is not copying to PR (Item Text) if the PR is frm MD51

    Hi All,
    I am facing one problem in PR Item text.
    The issue is,when we attach a component to network activity,we have an option to maintain item text for the component.If the procurement type is PR+Reservation,we'll get PR no from CJ20N.System is displaying the item text in PR item detail "item text" tab.
    But if the component has procurement type isReservation for WBS Element & it has procurement indicator "F",then we'll run MRP for getting a PR no.This PR is not displaying the Item text in PR "Item text" tab.
    It has one configuration setting in MM i.e SPro>MM>Purchasing>PR>Texts for Purchase Requisitions.
    I have checked the config & its fine.
    So,if we are creating the PR for projects from MD51,then system is not displaying Item text in PR.
    If anybody came across this issue help me..
    Thanks a lot.
    suresh

    I am alsw waiting for a reply for the above question.
    guys,.....help me out
    anyone wants me, more explanation for the problem?
    regards
    surya
    Edited by: suryapampana on Dec 21, 2009 11:41 AM

  • Printing item text smartforms

    Hai friends,
    In my invoice i have 7 line items and some materials are "Duty Paid". For this they are maintaining a text in "Item Text" tab in VF01 transaction for each materials.
    I have to print the text one by one in the footer.
    How can i do this. How to display the item text.
    Thanks.

    Hi,
    Use the Function module READ_TEXT to read the item texts and print them in the footer.
    You need to pass paramters to FM Read_text. Go to VF03. go to item texts. Highlight any item texts and click on the display button below. It will take you to the text editor. On that screen Go to-> Header will show the following details.
    Text Name       1203832486000140                     
    Language        EN                                   
    Text ID         0002 Item note                       
    Text Object     VBBP       Sales     Item texts      
    Pass the same values to the fields of READ_TEXT FM.
    TEXTNAME would be the concatenation of salesorder and line item.
    Thanks,
    Vamshi.

  • Item text -break up.

    Dear all,
                   im displaying free item texts and header texts in my script.i have taken a variable g_fim(1000) of type c,and passing the free text from READ_TEXT FM to this variable G_FIM. and iam able to display.
    But my concern is i want to display it line by line,i mean the user enters the text in four lines,but im getting it displayed in a single line. i want the text to b displayed as the user enters.

    There are probably several ways to accomplish, but I recently utilized the following to break up a string of unknown length (I imposed a max length of 65,535 characters, as you can see in the code).
    types: begin of gtyp_txt,
              line(132),
            end of gtyp_txt.
    lv_text_length = 76.  "type I this is the length utilized in SAP editor in the screen
    perform text_word_break  using lv_longtext  "string field
                                                         lv_text_length.
    form text_word_break using in_string type string
                               out_len   type i.
    data: lt_text_tab    type table of gtyp_txt,
            lv_len         type i,
            lv_copy(65535) type c.
      lv_len = strlen( in_string ).
      if lv_len > 65535.
        lv_copy = in_string(65535).
      else.
        lv_copy = in_string(lv_len).
      endif.
      call function 'RKD_WORD_WRAP'
        exporting
          textline  = lv_copy
          delimiter = space
          outputlen = out_len
        tables
          out_lines = lt_text_tab
        exceptions
          others    = 0.
      if lines( lt_text_tab ) gt 0.
        append lines of lt_text_tab to gt_text_tab. 
      endif.
    endform.

  • Item text needed in Smartform for Purchase Order

    Dear Friends
    i am creaing a smartform form for a Purchase Order , where i am to show item text , & material po text
    also but i am not getting how to show them , i have tried with Function Module Read_ text but if for any item text is not maintained it throw a error     text xxxxxxxxxx code f01 not found in language en .
    kindly somebody help me with the elaborated steps
    regards
    digvijay rai

    Requirement : Need to display the item text in the scripts Tcode me23n.
    problem: the below subroutine program which i wrote reads the entire paragraph but when the values transfered to the script, the script variable accepts only one line. can you please help to pass  the entire value to scripts.
    Actual output
    th respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the exchoose warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.D
    Displayed  output
          th respect to the materials. The only warranties for SAP Group products and s
    code written in scripts :
    DEFINE &VALUE& TYPE STRING(500)
    PERFORM ITEMTEXT IN PROGRAM ZDISPLAYINGITEMTEXT
    USING &EKKO-EBELN&
    USING &EKPO-EBELP&
    CHANGING &VALUE&
    ENDPERFORM
    Item Text : &VALUE&
    REPORT  ZDISPLAYINGITEMTEXT.
    DATA : name type thead-tdname,
           p_ebeln TYPE ekko-ebeln,            "  Purchase order Number
           p_ebelp TYPE ekpo-ebelp.
    types :strin(450).
    data : p_valu type strin.
       data : p_valu1 type strin.
    data: lines type table of tline with header line.
       data: IT_LINE LIKE STANDARD TABLE OF itcsy INITIAL SIZE 0 WITH HEADER LINE,
    IT_TEXT1 LIKE STANDARD TABLE OF itcsy INITIAL SIZE 0 WITH HEADER LINE,
    W_LINE LIKE IT_LINE.
    Types : stri(450).
    data f_name type stri.
    FORM itemtext TABLES i_intab STRUCTURE itcsy
                           i_outab STRUCTURE itcsy.
    *BREAK-POINT.
        READ TABLE i_intab INDEX 1.
      MOVE i_intab-value TO p_ebeln.
      READ TABLE i_intab INDEX 2.
      MOVE i_intab-value TO  p_ebelp.
    *parameters: p_ebeln type ekko-ebeln,
               p_ebelp type ekpo-ebelp.
    concatenate p_ebeln p_ebelp into name.
    call function 'READ_TEXT'
         exporting
              id                      = 'F01'
              language                = sy-langu
              name                    = name
              object                  = 'EKPO'
         tables
              lines                   = lines
         exceptions
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              others                  = 8.
    loop at lines.  "   INTO w_line.
    BREAK-POINT.
    *move w_line to it_text1.
    *append it_text1.
    *write:/ it_line.
    *p_valu = f_name.
    *p_valu1 = w_line.
    concatenate p_valu lines-tdline into p_valu.
    *p_valu = f_name.
    endloop.
    message p_valu type 'I'.
    READ TABLE i_outab INDEX 1.
        MOVE p_valu TO i_outab-value.
        MODIFY i_outab INDEX sy-tabix.
    *loop at lines.
    write:/ f_name.
    *endloop.
    *READ TABLE i_outab INDEX 1.
       MOVE lines TO i_outab-value.
       MODIFY i_outab INDEX sy-tabix.
    endform.

  • To save PO item text at the time of creation

    Hello Friends,
    I have a requirement to save PO item text while creating from ME21N....
    I need to display the Material Classification(particular characteristics) data in the po Item text..
    I have done my coding in the particular User exit....
    i am getting the material classification data and passing it to SAVE_TEXT function Module and after that doing COMMIT_TEXT.....
    Code running fine without any error but not saving the text to PO item text....
    We have code for PO Header text in the same user exit and its working fine.... Can you please focus on this and let me know any way to proceed....
    CALL FUNCTION 'INIT_TEXT'
            EXPORTING
              id       = 'F08'
              language = 'E'
              name     = fname            - PO NUM
              object   = 'EKPO'
            IMPORTING
              header   = head
            TABLES
              lines    = in_text1
            EXCEPTIONS
              id       = 1
              language = 2.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CALL FUNCTION 'SAVE_TEXT'
            EXPORTING
              header    = head
            IMPORTING
              newheader = head
            TABLES
              lines     = in_text         - HAVING CLASS DATA TO BE DISPLAYED
            EXCEPTIONS
              id        = 1
              language  = 2
              name      = 3
              object    = 4
              OTHERS    = 5.
          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.
      ENDLOOP.
        CALL FUNCTION 'COMMIT_TEXT'
        EXPORTING
          keep = 'X'.
    Waiting for you reply...
    Regards,
    SAM

    Hello
    Use
    CALL FUNCTION 'COMMIT_TEXT'
    EXPORTING
    SAVEMODE_DIRECT = 'X'.
    instead
    CALL FUNCTION 'COMMIT_TEXT'
    EXPORTING
    keep = 'X'.

Maybe you are looking for