Reading Infotype 0028 Long Text

Hi Experts,
I have a BADI Implementation which is dealing with Infotype 0028 (Internal Medicine Service).
My problem is that, at the time my badi implementation is triggered, long text is not yet saved to cluster table PCL1. For this reason, my statement "IMPORT ptext FROM DATABASE pcl1(tx) ID lwa_key" wasn't able to retrieve the long text of infotype 0028. I thought that if I would be able read from the buffer/memory of long text, I can get the long text value even if it is not yet saved in the cluster table.
Is there a way that I could read the memory/buffer of long text?
If you know other approach on how to solve this problem, kindly advice me.
Thanks in advance guys.
Ferdy

Well, when i give it a little thought here it goes
1. Is there no parameter in BADI which is storing this long text?
2.If not then one of the way is by use of field symbol ,first you need to find it out in which
variable the long text is stored and then you need to assign the memory of the variable
to your field symbol memory
The above two are just some simple feasible ideas which can be worked on
Regards
Bhanu

Similar Messages

  • How to read Production Order Long Text data in ABAP program

    Hi friends,
      I have the issue in reading the ' Long Text '  tab view data of production order
    in CO03 transaction.Please can some body help me out to get this in ABAP program.
    Regards,
    Rajesh Akarte

    ok goto the long text, double click it, or use the small pencil, so that you proceed to the text editor.
    Once you are there, use the menu: goto->head
    a small popup will come up, stating the information you need.
    what you need is OBJECT, ID, Language and NAME.
    with those information you can feed the FM READ_TEXT.
    and woooohooo there you go

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

  • Printing long text

    Hi,
           i am trying to display purchase order, material and material long text, actually few of the materials long text contains more than 700 characters is it possible to display.
    i was trying to read the material  long text using  read_text function module but it returns long text in the table format, how can we display table data in the list column.
    regards,
    revoori

    data: l_v_text type char1024.
    "suppose the output of read_text is in it_text then
    loop at it_text in wa_text.
    concatenate l_v_text wa-text-tdline into l_v_text seperated by ` `.
    clear wa_text.
    endloop.
    кu03B1ятu03B9к

  • ABAP Function to read long texts in HR Infotypes

    Is there any standard ABAP function to read long texts in HR infotypes like ABAP function to read comments entered in infotype 19

    HI ,
    try this code
    tables pcl1.
    include rpc1tx00.  " This include is explained on web page above
    start-of-selection. 
    perform fill_key.  perform get_data.end-of-selection.
    form fill_key. 
      tx-key-pernr = p_pernr.
      tx-key-infty = p_infty.
      tx-key-subty = p_subty.
      tx-key-objps = p_objps. 
      tx-key-sprps = p_sprps.
      tx-key-endda = p_endda. 
    tx-key-begda = p_begda.
    tx-key-seqnr = p_seqnr.
    "OR
      SELECT * INTO CORRESPONDING FIELDS OF wa_p0219
       FROM pa0219
       WHERE pernr = p_pernr
         AND subty =  p_subtyp
         AND endda = '99991231'.
      ENDSELECT.
    MOVE-CORRESPONDING gs_p0219 TO tx-key.
        MOVE '0219' TO tx-key-infty.
         IF wa_p0219-itxex = 'X'.
           MOVE-CORRESPONDING wa_p0219 TO tx-key.
         endif.
    endif
    endform.                    " fill_key
    form get_data. 
          import ptext from database pcl1(tx) id tx-key.
           loop at ptext.            "ptext is defined in above include  
                   write: / ptext-line. 
          endloop.
    endform.  " get_data
    Prabhudas

  • How to read long text in Document line item

    Hi,
    How to read long text in FI Document line item.

    Use Read_text function module.
    you need to pass
    ID
    LANGUAGE
    NAME
    OBJECT   to the function moduel
    To find the Text id name language and object these are the following steps. Example: FB02
    1. goto FB02, Enter Document number
    2. from menuselect Goto>Header-->header Text..... New window will be displayed 
    3. select the Header Text. here you can see all the text. 
    4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper. 
    5. in the Next window you will find Text Name. Text ID, Language. etc...
    Regards,
    Lalit Mohan Gupta.

  • 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

  • Error while reading the Long text Using READ_TEXT

    Hi friends,
    Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT  I am getting the following error if the text is not there.
    OUT_PURCH_PO ID GRUN language EN not found.
    I should not get this error Instead I should get the blank value.
    OUT_PURCH_PO   -  my material name.
    Following is my code.
    IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.
       READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.
       WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.
         NAME = WA_EKPO-MATNR.
        CALL FUNCTION 'READ_TEXT'
           EXPORTING
             CLIENT            = SY-MANDT
             ID                =  ID
             LANGUAGE          =  SY-LANGU
             NAME              =  NAME 
             OBJECT            =  OBJECT
          IMPORTING
            HEADER            =  THEAD
           TABLES
             LINES             =  LTEXT.

    Hi,
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                      = id
        language                = sy-langu
        name                    = name
        object                  = object
      TABLES
        lines                   = ltext
      EXCEPTIONS                           " --> have this
        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.
    Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM

  • Reading long text from excel file to an internal table

    Hi
    Can any body tell me how to read long text from excel file to an internal table.
    When i am using this FM KCD_EXCEL_OLE_TO_INT_CONVERT then it is reading only 32 characters from each cell.
    But in my excel sheet in one of the cell has very long text which i need to upload into a internal table.
    may i know which FM or what logic i need to use for this problem.
    Regards

    Hi,
    Here is an example program.  It will upload an Excel file with two columns.  You could also assign the Excel structure dynamically, but I wanted to keep the example simple.  The main point is that the internal table (it_excel in this example) must match the Excel structure that you want to convert.
    Remember, this is just an example to help you figure out how to properly use the technique.  It will certainly need to be modified to fit your requirements, and as always there may be a better way to get the Excel converted... this is just one possibility that has worked for me in the past.
    *& Report  zexcel_upload_test                            *
    REPORT  zexcel_upload_test.
    TYPE-POOLS: truxs.
    TYPES: BEGIN OF ty_excel,
             col_a(10) TYPE n,
             col_b(35) TYPE c,
           END OF ty_excel.
    DATA: l_data_tab         TYPE TABLE OF string,
          l_text_data        TYPE truxs_t_text_data,
          l_gui_filename     TYPE string,
          it_excel           TYPE TABLE OF ty_excel.
    FIELD-SYMBOLS: <wa_excel>  TYPE ty_excel.
    PARAMETERS: p_file TYPE rlgrap-filename.
    * Pass the file name in the correct format
    l_gui_filename = p_file.
    * Upload data from PC
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename                = l_gui_filename
        filetype                = 'ASC'
        has_field_separator     = 'X'
      CHANGING
        data_tab                = l_data_tab
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        OTHERS                  = 17.
    IF sy-subrc <> 0.
    *   MESSAGE ...
      EXIT.
    ENDIF.
    * Convert from Excel into the appropriate itab
    l_text_data[] = l_data_tab[].
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
        i_field_seperator    = 'X'
        i_tab_raw_data       = l_text_data
        i_filename           = p_file
      TABLES
        i_tab_converted_data = it_excel
      EXCEPTIONS
        conversion_failed    = 1
        OTHERS               = 2.
    IF sy-subrc <> 0.
    *   MESSAGE ...
      EXIT.
    ENDIF.
    LOOP AT it_excel ASSIGNING <wa_excel>.
    *  Do something here...
    ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM filename_get CHANGING p_file.
    *       FORM filename_get                                             *
    FORM filename_get CHANGING p_in_file TYPE rlgrap-filename.
      DATA: l_in_file  TYPE string,
            l_filetab  TYPE filetable,
            wa_filetab TYPE LINE OF filetable,
            l_rc       TYPE i,
            l_action   TYPE i,
            l_init_dir TYPE string.
    * Set the initial directory to whatever you want it to be
      l_init_dir = 'C:\'.
    * Call the file open dialog without multiselect
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = 'Load file'
          default_extension       = '.XLS'
          default_filename        = l_in_file
          initial_directory       = l_init_dir
          multiselection          = 'X'
        CHANGING
          file_table              = l_filetab
          rc                      = l_rc
          user_action             = l_action
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          OTHERS                  = 4.
      IF sy-subrc <> 0.
        REFRESH l_filetab.
      ENDIF.
    * Read the selected filename
      READ TABLE l_filetab INTO wa_filetab INDEX 1.
      IF sy-subrc = 0.
        p_in_file = wa_filetab-filename.
      ENDIF.
    ENDFORM.                    " filename_get
    Regards,
    Jamie

  • Problem in Reading  Material Long text in Sapscript

    Dear firends,
    I have written  following code in sapscrit to fetch the longtext of the material
    INCLUDE &MARA-MATNR(K)& OBJECT MATERIAL ID GURN LANGUAGE &NAST-SPRAS&
    Test name - material no(MARA-MATNR)
    object - MATERIAL
    text id - GURN
    LANGUAGE - EN
    but i am not table read the longtext by using above code, when i see in debug mode  ,i am getting warning message
    "data is not available for materil 0000013,GURN,MATERIAL" like that.
    i don't find any problem in code , long text also availble for material 0000013.
    i don't where is the problem , please give me solve this issue.
    Regards,
    D.prabhu

    Hi
    You have to fetch this Long text of this Material using READ_TEXT fun module by passing the 4 parameters as mentioned by you  by writing some code in the program or by writing the external subroutine using PERFORM statement
    Only Application HEADER and ITEM texts can be included in script using the INCLUDE command
    So write the code for the Read _Text fun module and fetch it into Internal table lines and pass/print those to script
    pass the same 4 parameters
    Test name - material no(MARA-MATNR)
    object - MATERIAL
    text id - GURN
    LANGUAGE - EN
    see the sample code
    data:begin of it_stxh occurs 0,
            tdobject type tdobject,
            tdname type tdobname,
            tdid type tdid,
            tdspras type spras,
          end of it_stxh.
    types:begin of ty_lines.
            include structure tline.
    types:end of ty_lines.
    data:it_lines type standard table of ty_lines with header line.
    it_stxh-tdid = 'GRUN'.
    it_stxh-tdspras = 'E'.
    it_stxh-tdobject = itab-matnr.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        ID                            = it_stxh-tdid
        LANGUAGE                      = it_stxh-tdspras
        NAME                          = it_stxh-tdname
        OBJECT                        =  it_stxh-tdobject
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      TABLES
        LINES                         = it_lines
    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 eq  0.
    loop at it_lines.
    < Print these lines in script by passing to script>
    endloop.
    ENDIF.
    Regards
    Anji

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

  • Not able to read long text in MCI10001

    Hi gurus,
    I am using MCI10001 for IW21 tcode where I have to read long texts of maintenance line items under Maintenance Tasks tab.
    Long text is not getting created for line items at this exit. Please suggest me if any exits/BADIs available where I can read the same.
    Thanks in advance.
    Anees

    Hello,
    You need to set FM ‘SAVE_TEXT’.or  'CREATE_TEXT'
    tdformat = '>X'  <-- this format you can not set directly in editor
    CONCATENATE '*' tdline
             INTO tdline
             SEPARATED BY space.
    this will make text to be non editable.
    Thank you...

  • Reading Long Text from MM03

    I need to read a long text from MM03, view - Sales Text. I cannot use FM READ_TEXT as there is no header data available there.
    How do i do it?

    Amol,
    Sales Text CANNOT exist without the HEADER DATA.
    You have to use READ_TEXT with these paramters.
    Text Name       Material Number (NAME)
    Language        EN
    Text ID         0001 (ID)
    Text object     MVKE (OBJECT)
    regards,
    Ravi
    Note : Please close the thread if the issue is solved.
    Message was edited by: Ravikumar Allampallam

  • Custom Infotype with multiple long text fields

    Hi,
    We have a need to create a custom Infotype (in PA or PD) that will contain more than one long-text area.
    I've searched this forum and found that there are generally two approaches :
    1. use the HR clusters for long-text and setting the ITXEX field in PA
    2. using SAP standard text area (SO10) and functions such as READ_TEXT, SAVE_TEXT, etc.
    The problem with (1) is that it can only store one long-text.  We need to have many.  Please correct me if we can hold more than one long text in the cluster...?
    With regard to (2), I'm just not sure that this is the correct place to store the long text...?
    If I was to adopt option (2), could I just use the key of PA9nnn (ie: PAKEY) as the key/TDNAME for STXH?
    Are there any other methods to store long text?
    As well, is it possible to create a custom Infotype in PD?  Can we use PM01 to create PD infotypes?
    Thanks,
    Raj

    Raj
    Sorry I'm not much help on the two questions you have raised...you have probably already got answers by now anyway..however FYI check out link below for enhancing PD infotypes (use transaction PPCI).
    enhance infotypes

  • Definition of a "NOT RELEVANT GRANT" is missing. Read long text

    Dear All,
    Kindly suggest me how to post migo.
    During MIGO system throwing an error:
    Definition of a "NOT RELEVANT GRANT" is missing. Read long text
    Message no. GRANTMGMT408
    Regards
    Sanjeet

    Hi Sanjeet,
    It looks like your FI team has done config regarding Grands management and Funds Management.
    Plz consult with them...
    Check the SAP-Help for any doubts.
    SAP Library - Grants Management
    Plz check with transaction - "GMGRANTD" , if anything available.

Maybe you are looking for

  • Reading file from a folder : File dir = new File(URL+aFile_to_add);

    Hi, Trying to read files from a dir on my site using a JSP and bean. I've tried nearly every option for the filepath I can think of and it doesn't seem to be finding the file... Here's the bit: String URL = "images\\wedding_photos\\"; File dir = new

  • Disk repair utilities, etc.

    There seem to be mixed messages around here regarding running any sort of disk repair utilities on Pods. But since there are a couple of products on the market designed just for this purpose...might there be information that relates, a bit more defin

  • External LDAP for UCM

    Hi. Is it possible to use external LDAP server for my UCM server without using external LDAP server for my admin server? That is I have a domain with admin server and UCM server. My admin server doesn't have external LDAP. So is it possible to use ex

  • Handling Unit Number Range

    Hi All,   How to give external number range to a handling uni. The scenario is: In HU02 screen I am giving packaging material number, material number and quantity. Than when I press enter system automatically taking one number in the handling unit fi

  • Transfer requirement for STO

    Hi all , Can some one help me on this . In a scenario there are 2 plants one is Domestic and other is Export Oriented Units . I want to transfer the Raw materials from Domestic  and Export to each other using automated STO. What are the excise compli