Key/Text table - usage in an ABAP program

Hi Abapers!
I need help about usage of key and text tables.
I have created key and text table and now i want to use them in the abap program. My problem is, that i don't know how to properly read data into internal table from these two tables, so i can show these data in the table control. I also want to know how to save data from text boxes into key and text table (text boxes: txtid, txtlang, txttext).
Key Table:
name: ztbl1
fields: mandt, id
key fields: mandt, id
Text table:
name: ztbl2
fields: mandt, lang, id, text
key fields: mandt, lang, id
Tables are connected together as they should be.
And i don't want to use sm30 for editing table data.
Regards,
Egi

My Dear,
u are loosing the concept of Text table...
Text table are generally used for multi lingual F4 (i.e you enter vaious F4 list to be displayed for a perticular field when a user from differenct lang log on)
for eg...
in urr text table u have .. 2 key itemm
item_code     ||      lang     ||     text
10111         ||      E        ||     Eng_Chicken
10111         ||      D        ||     Chickeno (translation from eng to germen)
10111         ||        F      ||     Ghoose..
so when a user with logon lang as 'E' will log on and when he press F4 on item_code he ill see Eng_chicken
but when a user with logon lang as 'D' will log on and when he press F4 on item_code he ill see Chickeno not Eng_chicken..
i hope u understood the whole concept...
No rewards Plz...

Similar Messages

  • Table Name where the ABAP program names get stored

    Can any 1 tell me the table name where the ABAP programs get stored

    try TRDIR,TRDIRT,TADIR
    regards
    shiba dutta

  • Export Tables (SE11 stuff) and ABAP program (SE80 stuff), HOW TO ?

    Hi,
    I'm working with the VMWare version (SAP NetWeaver 70 - Java and ABAP VMware Trial) and I'm having quite some fun creating my first application (following instructions in a book I have).
    For now I'm rather impressed with SAP, and I don't really understand why people pester so much about it. From what I can see for now I'll have my app up in no time. Also I didn't realise that SAP was quite "open" in fact, I was suprised for example to be able to run the debugger "/h" on "SE11" for example, and thus view the SAP source code. Is this also possible on SAP ERP Financials/HCM/Operations transactions ?
    OK... I'll confirm all this when I have more experience and my application is actually working, but this is the mood of the week (after a hard WE trying to get NW working).
    However, Heres's my question *************
    Now I've done some work (created tables with SE11 and ABAP programs with SE80), how can I export this work (to some files) so that if my vmware screws up I can import it back in ?
    Another situation : How do I put my work in someone elses NetWeaver (or SAP for that matter) ?
    Thanks for some replies.
    Angela

    Hi,
    Thanks. Indeed, when I create my SE11 or SE80 stuff, I keep choosing "local objects".
    I don't fully understand what you're saying though.
    Do you say that when I've finished my project I can export all my "local objects" to a file or something and import them back in later (or on another NetWeaver)? How do I go about that ? With a transport request ?
    Or are you saying that instead of choosing "local objects" I should pick the other option, then what happens ? In my book they always say to use local objects.
    About SE80, my book mentions the "export to file" button, but if I've created tens or hundreds of files, this seems a little cumbersome.
    I'm asking this because my book doesn't seem to address this topic.
    Angela

  • Regarding text attachment in Email in ABAP program

    Hello...
    Need your expertise in one of the issues. Requirement is seems to be simple
    but i am stuck up at this moment. i have refereed SDN with Several code but
    some point its not giving the proper solution. So its a request to you please
    do not provide any SDN link for reference as i am very much tried all of them.
    please share piece of code.
    Requirement : Need to develope one ABAP program, Email text attachment with Header line.thought its
    very simple but still facing difficulties.
    i have tried many code either its showing Data in single line without new line , in one of the Codes
    data is coming in successive line but there is lot of spacing within Words means all alphabates are tab
    separated. coud you please provide ,me the proper solution for this.
    in  one of the codes is working fine for excel but when Txt extension done data is not coming in successive line all
    data is coming in single line.
    Ex. Text file should contain 1 head and 4 colunns and Data size 50..
    Thanks
    Nishi

    Hi,
    Another option....
    Some sample code using cl_bcs .
    Note the use of cl_abap_char_utilities=>cr_lf .
    FORM mail_1_prep_10
    USING
        it_data         TYPE table
      CHANGING
        ob_document_bcs TYPE REF TO cl_document_bcs .
      DATA: txt_line TYPE string .
      DATA: txt_data TYPE string .
    * Create some text data .
      DO 20 TIMES .
        txt_line = '' .
        DO 10 TIMES .
          CONCATENATE txt_line '|' 'some data 01' '|'   INTO txt_line .
        ENDDO .
        CONCATENATE txt_line cl_abap_char_utilities=>cr_lf INTO txt_line .
        CONCATENATE txt_data txt_line INTO txt_data .
      ENDDO .
    * Mail stuf....
      DATA: it_solix TYPE solix_tab .
      CALL METHOD cl_bcs_convert=>string_to_solix
        EXPORTING
          iv_string = txt_data
        IMPORTING
          et_solix  = it_solix.
      DATA: attachment_subject TYPE so_obj_des .
      DATA: attachment_type TYPE so_obj_tp .
      attachment_subject = 'Some text data' .
      attachment_type = 'txt' .
      TRY.
          CALL METHOD ob_document_bcs->add_attachment
            EXPORTING
              i_attachment_type    = attachment_type
              i_attachment_subject = attachment_subject
              i_att_content_hex    = it_solix.
        CATCH cx_document_bcs .
      ENDTRY.
    ENDFORM .                    "mail_1_prep_10
    regards.
    This is how I see it in my mail :

  • Regarding COLLECT stmt usage in an ABAP Program.

    Hi All,
    Could anyone please explain if the COLLECT statement really hampers the performance of the program, to a large extent.
    If it is so, please explain how the performance can be improved with out using the same.
    Thanks & Regards,
    Goutham.

    COLLECT allows you to create unique or summarized datasets. The system first tries to find a table entry corresponding to the table key. (See also Defining Keys for Internal Tables). The key values are taken either from the header line of the internal table itab, or from the explicitly-specified work area wa. The line type of itab must be flat - that is, it cannot itself contain any internal tables. All the components that do not belong to the key must be numeric types ( ABAP Numeric Types).
    Notes
    COLLECT allows you to create a unique or summarized dataset, and you should only use it when this is necessary. If neither of these characteristics are required, or where the nature of the table in the application means that it is impossible for duplicate entries to occur, you should use INSERT [wa INTO] TABLE itab instead of COLLECT. If you do need the table to be unique or summarized, COLLECT is the most efficient way to achieve it.
    If you use COLLECT with a work area, the work area must be compatible with the line type of the internal table.
    If you edit a standard table using COLLECT, you should only use the COLLECT or MODIFY ... TRANSPORTING f1 f2 ... statements (where none of f1, f2, ... may be in the key). Only then can you be sure that:
    -The internal table actually is unique or summarized
    -COLLECT runs efficiently. The check whether the dataset
    already contains an entry with the same key has a constant
    search time (hash procedure).
    If you use any other table modification statements, the check for entries in the dataset with the same key can only run using a linear search (and will accordingly take longer). You can use the function module ABL_TABLE_HASH_STATE to test whether the COLLECT has a constant or linear search time for a given standard table.
    Example
    Summarized sales figures by company:
    TYPES: BEGIN OF COMPANY,
            NAME(20) TYPE C,
            SALES    TYPE I,
          END OF COMPANY.
    DATA: COMP    TYPE COMPANY,
          COMPTAB TYPE HASHED TABLE OF COMPANY
                                    WITH UNIQUE KEY NAME.
    COMP-NAME = 'Duck'.  COMP-SALES = 10. COLLECT COMP INTO COMPTAB.
    COMP-NAME = 'Tiger'. COMP-SALES = 20. COLLECT COMP INTO COMPTAB.
    COMP-NAME = 'Duck'.  COMP-SALES = 30. COLLECT COMP INTO COMPTAB.
    Table COMPTAB now has the following contents:
              NAME    | SALES
              Duck    |   40
              Tiger   |   20

  • How to convert a Word document to text or html in an ABAP program

    Hi,
    At my client's site, for the recruitment system, they have the word processing system set to RTF, instead of SAP Script. This means that all the correspondence is in Word format. A standard SAP program takes the word letter, loads word, does the mail merge with the applicant's info and then sends the document to a printer.
    The program name is RPAPRT05. The program creates a document proxy (interface I_OI_DOCUMENT_PROXY) and manipulates the document using the methods of the interface.
    Now what we want to do is to instead of sending the document to a printer, we want to email the document contents to the applicant. But I don't know how to get the content from the Word document into text or html format so that I can make an email from it.
    I know I can send an email with the word document as an attachment, but we'd prefer not to do that.
    I would appreciate any help very much.
    Thanks

    Ok, here's what I ended up doing:
    First of, in order to call FM 'CONVERT_RTF_TO_ITF' you need the RTF document in a table with line length 156. The document is returned from FM 'DP_CREATE_URL' in a table with line length 132. So first I convert the table:
        Transform data table from 132 character lines to
        256 character lines
          LOOP AT data_table INTO dataline.
            IF newrow = 'X'.
            Add row to new table
              APPEND INITIAL LINE TO xdatatab ASSIGNING .
              newrow = space.
            ENDIF.
          Convert the raw line of old table to characters
            ASSIGN dataline TO .
          Check line lengths to determine how to add the
          next line of old table
            newlinelen = STRLEN( newline ).
            ADD addspaces TO newlinelen.
            linepos = linemax - newlinelen.
            IF linepos > datalen.
            Enough space available in new table line for all of old table line
              newline+newlinelen = oldline.
              oldlinelen = STRLEN( oldline ).
              addspaces = datalen - oldlinelen.
              CONTINUE.
            ELSE.
            Fill up new table line
              newline+newlinelen(linepos) = oldline(linepos).
              ASSIGN newline TO .
              newrow = 'X'.
            Save the remainder of old table to the new table line
              IF linepos < datalen.
                oldlinelen = STRLEN( oldline ).
                addspaces = datalen - oldlinelen.
                CLEAR newline.
                newline = oldline+linepos.
              ELSE.
                CLEAR newline.
              ENDIF.
            ENDIF.
          ENDLOOP.
        Write the last line to the table
          IF newrow = 'X'.
            APPEND INITIAL LINE TO xdatatab ASSIGNING .
    Next I call FM 'CONVERT_RTF_TO_ITF' to get the document in SAPScript format:
        Convert the RTF format to SAPScript
          CALL FUNCTION 'CONVERT_RTF_TO_ITF'
            EXPORTING
              header            = dochead
              x_datatab         = xdatatab
              x_size            = xsize
            IMPORTING
              with_tab_e        = withtab
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              missing_size      = 2
              OTHERS            = 4.
    This returns the document still containing the mail merge fields which needs to be filled in:
          LOOP AT itf_table INTO itf_line.
            WHILE itf_line CS '«'.
              startpos = sy-fdpos + 1.
              IF itf_line CS '»'.
                tokenlength = sy-fdpos - startpos.
              ENDIF.
              token = itf_line+startpos(tokenlength).
              REPLACE '_' IN token WITH '-'.
              ASSIGN (token) TO .
              ENDIF.
              MODIFY itf_table FROM itf_line.
            ENDWHILE.
          ENDLOOP.
    And finally I use FM 'CONVERT_ITF_TO_ASCII' to convert the SAPScript to text. I set the line lengths to 60, since that's a good length to format emails to.
        Convert document to 60 char wide ascii document for emailing
          CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
            EXPORTING
              formatwidth       = 60
            IMPORTING
              c_datatab         = asciidoctab
              x_size            = documentsize
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              OTHERS            = 2.
    And then the text document gets passed to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as the email body.

  • Getting memory usage details in ABAP program

    Hello,
    Is there any method to get the memory used by the program and control the program like restricting the memory usage to some limit or any other control measures which can be taken in the program itself if the memory usage by the program exceeds a maximum limit. Or kindly let me know where i can find the details.

    Hi,
    > Is there any method to get the memory used by the program
    investigate the methods of class cl_abap_memory_utilities (e.g. GET_TOTAL_USED_SIZE)
    >and control the program like restricting the memory usage to some limit
    report rsmemory can change the systemwide quotas
    >or any other control measures which can be taken in the program itself if the memory
    >usage by the program exceeds a maximum limit
    needs to be implemented manually if neede program specific...
    Kind regards,
    Hermann

  • How can i find item category usage in abap program

    HI, EXPERTS
    I HEARD USAGE MAINTAINED IN ABAP PROGRAM .
    ANY ONE KNOW WHERE I CAN FIND ABAP PROGRAM FOR ITEM CATEGORY USAGE??
    THANKS.^
    Edited by: jong seok Lee on Feb 2, 2010 10:01 AM

    Hi,
    Item Category Usage: An item categories usage is defined by SAP when creating a sales order, The system determines for example, that the usage refers to a text item as oppossed to a deliverable item when you enter text in the order item rather than  a material number. Based on this usage, the system will use the item category determination to propose an item category.
    You can also find the usage in Custoemer material info record (T.Code VD51), if you want to determine any customer specific item category you may use the usage field in Custoemr master info record.
    You can devlop an user exit to determine the item category based upon usage field as well.
    regrads
    Vivek.

  • Reg:Abap program table name

    Hi friends,
    Which table contains all the abap programs ?
    Thanks and Regards
    V.Raja sekaran

    Hi V,
    Or you can use this transparent table : D010SINF
    Thanks
    william wilstroth

  • Re-use of ABAP Program ID from SAP Application in BODS 4.0

    Objective:
    1. We have used ABAP Program ID in DataStage 7.5. For example, ZDSYE001
    2. The above ABAP Program ID is residing in SAP Application Server.
    3. Now we need to use the same ABAP Program ID [ZDSYE001] in SAP BODS 4.0
    =====================================================================
    ISSUE/ERROR:
    1. In SAP BODS 4.0, we create a Datastore for SAP Application with all the configuration details.
    2. We are able to view external metadata for tables but not for ABAP Program ID.
    3. For ABAP Program ID, we are getting below error while using Extractor Object in Datastore to get the ABAP program ID:
    Cannot import the extractor<name=ZDSYE001>
    Error creating RFC Fuction<Z_AW_EXTRACTOR_IMPORT>:<RFC_ABAP_EXTRACTION-Exception Key:FU_NOT_FOUND,SYS-MSGTY:E,SY-MSGID:FL,SY-MSGNO: 046)>.Notify Customer Support (BODI-1116153)
    =======================================================================
    Please provide your inputs ASAP

    Hi,
    Please check this wiki pages for more information on how to solve your issue:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/ReleasingExtractorsforusebytheODP+API
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=217449812
    Hope it helps,
    Pedro

  • Problem in Text Table

    Hi,
    I have created a Custom table and Text table, implemented foreign key relationship from text table to Custom table. Then i have created a view, added records to view. when i logged in as language ENGLISH or German, in SE16 it is showing only in english.
    Please tell me how to get different languages.
    Custom table Fields:
    Mandt(Key)
    Business ProcessMandt(Key)
    Text Table Fields:
    MandtMandt(Key)
    SPRAS
    Business ProcessMandt(Key)
    Thanks & regards,
    NarsiReddy.

    Hi Glen Anthony,
    But in SE16 the names of fields are not displaying when i logged in as DE.

  • Synchronizing Two Custom Z Tables Using Abap Program

    Hi,
        My requirement is Synchronizing two custom z tables using abap program me.
    I have vendors in two tables, i have to select the common vendors from first which are existing in second  table also.
    In first table each vendor can have more than one supplier types in one field only. In second table these supplier types are divided into
    different fields.
         My requirement is I have to check supplier types in first table and i have to pass X to corresponding supplier types in second table vendor.
    I have to pass X value for each depending in Second table depending upon supplier type in first table.
    . How to do it can any one suggest with code.
    Thanks in Advance,
    Vivek
    <subject edited by moderator>
    Message was edited by: Manish Kumar

    Hi,
    Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
    For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
    Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
    Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
    If the key of Table2 is vendor no & vendor type, then do a read table for the key.
    The logic in pseudo-code:
    Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
         extract the vendor types in to itab Table1New.
         Select the vendor & types from Table2 by using the for all entries option (better performance).
         loop at Table1New
              check in Table2:
                   if the unique key is vendor no: check all fields for the vendor type from Table1New
                   if the unique key combo is vendor no & type: check by using a read table.
              If not found => add entry to Table2
         endloop.
    endselect Table1 (when using package size)
    I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
    Good luck!
    Best regards,
    Zhou

  • How to get the decision key in abap program

    Hi guys.
    I have a user decision workflow that have two options: Accept or Reject. This options has some type of id, right? Like '0001', '0002', right?
    How i get this ids decisions through a abap program.
    I need to know this because i have to pass this id to a Z Function Model.
    Thanks!

    The result is found in the workitem container in the '_RESULT' or '_WI_RESULT' elements, you can use the SAP_WAPI_READ_CONTAINER function module to read the data (read the element from the simple container returned table).
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
      EXPORTING
        workitem_id                    = im_wi_id
      TABLES
        simple_container             = lt_container
    READ TABLE lt_container WITH KEY element = '_WI_RESULT' into ls_container.
    If you what to get the possible decisions description you can use the SAP_WAPI_DECISION_READ function module,
    CALL FUNCTION 'SAP_WAPI_DECISION_READ'
    EXPORTING
    workitem_id  = im_wi_id
    TABLES
    alternatives = lt_alts.

  • How to write a program to read any texts in any ABAP program?

    Hi Experts,
    How can I write a program to read specific coding section or any texts in any ABAP program?
    For example, I want to wirte a program to count how many 'LOOP' and 'ENDLOOP' are in any other program.
    Thanks!
    Best regards,
    Hao

    Hi,
    Follow the given below URL for the program to read another Program into an internal Table.
    http://abap4.tripod.com/Upload_and_Download_ABAP_Source_Code.html
    Once the Code is there in the Internal Table , you can do the necessary string search.

  • Updating Q and P table of master data using ABAP program

    Hi All
    I have a requirement to update Q and P table(non key and non date fields) of master data using an ABAP program.
    Is this something recommended?
    Will there be any issues if I do that?
    Thanks
    Deepak

    Thanks Vikram. Ok. My look up is on some other master data Q table and that is the reason why I asked about ABAP custom program.
    Look like I will have to do the following approach.
    Load the required supporting master data to BW.
    Execute Attribute change run process for those master data objects.
    Load the actual master data and look up on supporting master data.
    Execute attribute change run process.
    This process takes me long time and I am trying to reduce the overall execution time. let me know if you have some good suggestions.
    Thanks
    Deepak

Maybe you are looking for

  • Unable to move pictures into albums via iPhone

    the past few months i have not been able to move pictures from my camera roll into albums via my iphone...the albums show up, but they are not selectable. i have restored my phone, purchaced OS Lion, and have all my software up to date, and still not

  • Using bind in CATSEARCH structured query

    We used to bind the whole query string inside CATSEARCH, like this: AND CATSEARCH(a.title, 'test', :s_query) > 0 and bind s_query to 'id = 1234', and so on. However, it looks like the statement cache does not like this kind of query, and will cache a

  • Code page conversion for chinese characters

    Hi, we receive an XML via JMS sender adapter where the code page in the Sending MQ system is cp850. One tag we receive contain chinese characters but are encoded as below <FAPIAO><Title>马么</Title><Remark>*æ¤,波特肉*</Rem

  • Premiere Pro freezing when exporting begins

    I am currently trying to figure out why my video exporting fails to begin. I am using windows 8.1 64 bit and trying to export out a .mov file. Whenever I go to export, the export fails to start and just sits at 0% the entire time, even went out for 3

  • The photoshop library operation failed because quicktime is not installed on this computer

    I'm getting this when importing a Photoshop Timeline Animation into After Effects. "The photoshop library operation failed because quicktime is not installed on this computer" I have all updates to date. Any clues?