Field symbols and READ TABLE with system code 4

Hi,
I have a hashed table and I am using field symbols to point to it to retrieve the field content. I then use it in the READ TABLE statement in the following way:
Loop at x_data assign <fs>.
ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c1>.
ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c2>.
READ TABLE ZZZZ assign <fs> with table key a1 = <c1>
                                           a2 = <c2>.
If sy-subrc = 0.
endif.
I ran the debugger and I keep getting a 4. I am not able to get the value from a1 and a2 to see what it is and why it is causing a 4 sy-subrc. I know the value from the hashed table and the values c1 and c2 are the same, so the sy-subrc should be 0.
How would I read a hashed table using field symbols? I know that usig a standard table, I have to sort the table on the key fields() before I actually can do the READ TABLE using the binary search.
Please advise. Thanks
RT

Hai Rob
Go  through the following Code
Field-Symbols are place holders for existing fields.
A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.
Field-Symbols are like Pointers in Programming language ‘ C ‘.
Syntax check is not effective.
Syntax :
Data : v1(4) value ‘abcd’.
Field-symbols <fs>.
Assign v1 to <fs>.
Write:/ <fs>.
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
FIELD-SYMBOLS <FS> LIKE LINE OF ITAB.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
APPEND LINE TO ITAB.
ENDDO.
READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING <FS>.
<FS>-COL2 = 100.
READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING <FS>.
DELETE ITAB INDEX 3.
IF <FS> IS ASSIGNED.
WRITE '<FS> is assigned!'.
ENDIF.
LOOP AT ITAB ASSIGNING <FS>.
WRITE: / <FS>-COL1, <FS>-COL2.
ENDLOOP.
The output is:
1 1
2 100
4 16
Thanks & regards
Sreenivasulu P

Similar Messages

  • Re: field symbols and interna table

    hi,
    here is field symbol which is table type
    FIELD-SYMBOLS: <gt_pos_data> TYPE table.
    there is one internal table it_data.
    how can  move <gt_pos_data> to it_data.
    please help me.
    rgds

    Hi
    You can assign field wise:
    like
    <gt_pos_data>- field to  to it_data-field.
    Field Symbols
    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
    Field symbols provide greater flexibility when you address data objects:
    If you want to process sections of fields, you can specify the offset and length of the field dynamically.
    You can assign one field symbol to another, which allows you to address parts of fields.
    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    You can also force a field symbol to take different technical attributes from those of the field assigned to it.
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    check the below links u will get the answers for your questions
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
    Syntax Diagram
    FIELD-SYMBOLS
    Basic form
    FIELD-SYMBOLS <fs>.
    Extras:
    1. ... TYPE type
    2. ... TYPE REF TO cif
    3. ... TYPE REF TO DATA
    4. ... TYPE LINE OF type
    5. ... LIKE s
    6. ... LIKE LINE OF s
    7. ... TYPE tabkind
    8. ... STRUCTURE s DEFAULT wa
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
    Effect
    This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
    You can only use one of the additions.
    Example
    Output aircraft type from the table SFLIGHT using a field symbol:
    FIELD-SYMBOLS <PT> TYPE ANY.
    DATA SFLIGHT_WA TYPE SFLIGHT.
    ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
    WRITE <PT>.
    Addition 1
    ... TYPE type
    Addition 2
    ... TYPE REF TO cif
    Addition 3
    ... TYPE REF TO DATA
    Addition 4
    ... TYPE LINE OF type
    Addition 5
    ... LIKE s
    Addition 6
    ... LIKE LINE OF s
    Addition 7
    ... TYPE tabkind
    Effect
    You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
    This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
    Effect
    Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
    The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
    Example
    Address components of the flight bookings table SBOOK using a field symbol:
    DATA SBOOK_WA LIKE SBOOK.
    FIELD-SYMBOLS <SB> STRUCTURE SBOOK
    DEFAULT SBOOK_WA.
    WRITE: <SB>-BOOKID, <SB>-FLDATE.
    Related
    ASSIGN, DATA
    Additional help
    Declaring Field Symbols
    Reward points if useful
    Regards
    Anji

  • Field-symbols and internal table

    Hello,
    How do I declare a field-symbol as an intenal table?
    I have a internal table declared, but i need to declare a field symbols as my internal table´s type. How do I do it?
    What I wrote was this:
    DATA: BEGIN OF IT_INTE OCCURS 0,
               FIELD(3) TYPE C,
           END OF IT_INTE.
    FIELD-SYMBOLS:  isn´t defined as an internal table, how do I fix it.
    Thanks!!!
    Gabriel.

    It is very much possible to have a field symbol point to a internal table.  Here is some sample code.
    report  zrich_0001.
    data: begin of itab1 occurs 0,
          fld1(10) type c,
          fld3(10) type c,
          fld5(10) type c,
          end of itab1.
    data: wa1 like line of itab1.
    field-symbols: <fs_table> type table.
    field-symbols: <fs_wa>.
    field-SYMBOLS: <fs_field>.
    * Setup the data
    itab1-fld1 = '0000000001'.
    itab1-fld3 = '0000000002'.
    itab1-fld5 = '0000000003'.
    append itab1.
    itab1-fld1 = '0000000004'.
    itab1-fld3 = '0000000005'.
    itab1-fld5 = '0000000006'.
    append itab1.
    assign itab1[] to <fs_table>.
    assign wa1     to <fs_wa>.
    loop at <fs_table> into <fs_wa>.
    * Write out each field of the line
      do.
           assign COMPONENT sy-index of structure <fs_wa> to <fs_field>.
        if sy-subrc <> 0.
          exit.
          endif.
          write:/ <fs_field>.
      enddo.
      skip 2.
    endloop.
    Regards,
    Rich Heilman

  • FIELD SYMBOL and INTERNAL TABLE

    Hi friends !
    How can i move internal table data to field symbol with a similar structure or diferent strucuture with more some fields  ?
    Thanks.

    Hi Fabrício
    Here is an example containing usage of field symbol as alias of an internal table.
    DATA lv_itab_name(30) TYPE c .
    FIELD-SYMBOLS: <table> TYPE table ,
                   <line> TYPE ANY ,
                   <fvalue> TYPE ANY.
    lv_itab_name = 'GT_ITAB[]' .
    ASSIGN (lv_itab_name) TO <table> .
    IF sy-subrc = 0 .
      LOOP AT <table> ASSIGNING <line> .
        DO .
          ASSIGN COMPONENT sy-index OF STRUCTURE <line> TO <fvalue> .
          IF sy-subrc NE 0 .
            EXIT .
          ENDIF .
          target_field = <fvalue> .
        ENDDO .
      ENDLOOP .
    ENDIF .
    If you know names of the fields, for each field you want to transfer, you can use
    ASSIGN COMPONENT '<field_name>' OF STRUCTURE <line> TO <fvalue> .
    Hope this helps...
    *--Serdar [[ BC ] | https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk sag jiw=]

  • I am stuck in FIELD-SYMBOLS and dynamic tables.

    Hi guys,
                I am trying to create dynamic table. My requirement is as follows--
    I have to display grid layout report in depending on given input.
    In input i have fields for DC and STORE.
    In output i have to display columns depending on number of DC and STORE paased in input.
    For example if in input, i have 2 DCs DC01 and DC02 and in STs i have say 1 input - ST01
    then in outpt grid report there will be 3 columns.
    So my columns to be displayed depends on number of input values given while running it.
    I am trying to use dynamic table.
    My output report contains fields from different table...so i cant use
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE
    instead i m trying to use
    FIELD-SYMBOLS: <DYN_TABLE> LIKE T_ARTMAS  "T_ARTMAS is declared as types : begin of....end of .... .
    but it is giviing an error in following form
    FORM CREATE_DYNAMIC_ITAB.
    Create dynamic internal table and assign to FS
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IFC
        IMPORTING
          EP_TABLE        = DY_TABLE.
      ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    Create dynamic work area and assign to FS
      CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>........error on this line.
      ASSIGN DY_LINE->* TO <DYN_WA>.
    ENDFORM.                    "create_dynamic_itab
    saying "<DYN_TABLE>" is not an internal table - the "OCCURS n" specification is missing.          
    Kindly help me...
    thx in advance...

    Hi
    .FIELD-SYMBOLS: <DYN_TABLE> LIKE T_ARTMAS "T_ARTMAS is declared as types : begin of....end of .... .
    but it is giviing an error in following form.....
    Just as Sasha wrote, the problem could be you've defined a flat structure and u need a table, but now just a little a question: why do u want to use a dynamic table but your field-symbol is like a certain type?
    That means u know how the table is so u don't need to use a dynamic table, your issue seems not to make sense.
    Max

  • Passing content of field symbol to internal table

    Hi experts,
    I need to pass the content of a field symbol to a internal table. Below is the following structure of the field symbol and internal table. But I'm encountering a short dump:
    TYPES: BEGIN OF fint_frange,
            fieldname    LIKE rsdstabs-prim_fname,
            fieldtype(1) TYPE c,
            selopt_t     TYPE fint_selopt_t,
           END OF fint_frange.
    TYPES: fint_frange_t TYPE fint_frange OCCURS 10.
    CONSTANTS: lc_save_selections(31) TYPE c VALUE '(RFINTITAR)GT_SAVE_SELECTIONS[]',
    FIELD-SYMBOLS: <fs_save_selections> TYPE STANDARD TABLE.
    ASSIGN (lc_save_selections) TO <fs_save_selections>.
    i_save_selections[] = <fs_save_selections>.
    Short dump: You attempted to move one data object to another.
    This is not possible here because the internal tables concerned
    are neither compatible nor convertible.
    Thanks in advance.

    Hi,
    what is ur internal table structure?
    if structure of both field symbol and internal table is not same,
    u can not put equal betwwen them.
    ur  <fs_save_selections> is having one constanat value lc_save_selections.
    and ur assaigning that to an internal table with some structure ......
    so structure is not same for both..........check it once.
    Regards,
    kk.

  • Are field symbols and Dynamic internal tables consistant?

    Hi,
    Are field symbols and Dynamic internal tables
    always consistent?
    In my program I m creating a dynamic itab and assignig values to it using <FS>, sometimes the program fails to execute assign <Fs> statement...
    this happens once in 3 to 4 runs
    any solution...
    I have proper clear and refresh statements in program.
    Thanks,
    Hardik

    Anurag,
    Thanks for a quick reply. Here I am sending a small piece of my code.
    MOVE-CORRESPONDING OUTTAB TO DYNTAB.
          CLEAR IT_UDATE.
          CLEAR : T_KBETR .
          READ TABLE IT_UDATE WITH KEY UDATE = OUTTAB-UDATE.
          CONCATENATE 'DYNTAB-KBETR' IT_UDATE-CO_POS INTO T_KBETR.
          ASSIGN (T_KBETR) TO <FS> .
          SUBRC5 = SY-SUBRC .
          IF SUBRC5 = 0 .
              <FS> =  OUTTAB-KBETR .
          ENDIF .
    read statement will always return CO_POS .
    while debuging this code a few times
    <b>ASSIGN (T_KBETR) TO <FS> .</b>
    returns sy-subrc = 4
    and that was leading the program to short dump earlier.
    now, as I have a check DYNTAB-KBETR holds no value on display.
    this happens very few times. (most of the times report is displaying desired output)
    Thanks,
    Hardik

  • FIELD-SYMBOLS and table ?

    Hi all,
    in my programm i must check in differents tables some values. Tables are parameters of my program.
    So i thought that i could use field-symbols for access to the table but it's not work for me.
    Just a example, i've 2 tables to check : HRP1002 and HRP1003.
    I can't do that :
    FIELD-SYMBOLS <fs> STANDARD TABLE.
    ASSIGN 'HRP1002' TO <fs>.
    ASSIGN line is in error because no compatible type.
    How can i do this ?
    Regards

    Try this code...
    tables: rsrd1.
    DATA: LineType TYPE string,
          ItabRef  TYPE REF TO DATA,
          lineRef  TYPE REF TO DATA.
    FIELD-SYMBOLS: <fs>  TYPE STANDARD TABLE,
                   <fs1> type any.
    parameter tbl like RSRD1-TBMA_VAL.
    linetype = tbl.
    CREATE DATA ItabRef TYPE STANDARD TABLE OF (LineType).
    ASSIGN ItabRef->* to <fs> .
    create data lineref like line of <fs>.
    assign lineref->* to <fs1>.
    SELECT * FROM (tbl) INTO <fs1>.
    write <fs1>.
    endselect.
    SELECT * FROM (tbl) INTO table <fs>.

  • Difference between Field symbols and work area for Internal tables

    Hi,
    In ECC versions we all know that we need to declare the internal tables without headerline, and for handling the internal tables we need to use exclusive work areas.
    Currently i have an issue that we have been asked to use field symbols instead of work areas...can any one help me how to use the field symbols and also let me know how it will improve the performance of the program..
    Thanks and Regards,
    Kathir

    Hi
    DATA: WA TYPE ITAB.
    LOOP AT ITAB INTO WA.
    IF WA-FIELD = .....
    ENDIF.
    ENDLOOP.[(code]
    FIELD-SYMBOLS <WA> TYPE ANY.
    LOOP AT ITAB ASSIGNING <WA>.
    ENDLOOP.
    Now the problem is you can't know the name of the fields of the table at runtime, so you can't write:
    IF <WA>-FIELD = .....
    ENDIF.
    Anyway you can create a field-symbols strcturated like the table:
    [code]FIELD-SYMBOLS <WA> TYPE ITAB.
    LOOP AT ITAB ASSIGNING <WA>.
      IF <WA>-FIELD = .....
      ENDIF.
    ENDLOOP.
    I don't know which are the differences for the performance between to use a field-symbol and to use a structure as work-area.
    The differnce between the field-symbols and work-area is the field-symbol is assigned directly to the record, so u don't need to do a MODIFY statament to change something:
    LOOP AT ITAB INTO WA.
      WA-FIELD =
      MODIFY ITAB FROM WA.
    ENDLOOP.
    LOOP AT ITAB ASSIGNING <WA>.
      <WA>-FIELD =
    ENDLOOP.
    These two pieces of abap code do the same action, so probably the field-symbol improve the performance because it do an access directly to the record without to use an external structure as workarea.
    Max

  • Replacemnt for read table with key binary search

    as read table with
    READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
               WITH KEY gs_FS_EINA_KEY  BINARY SEARCH.
    the statement read tabel with key is absolute in ecc 6 so how to replace it .

    Hi subratt,
    internal tables with header lines are obsolete and in oo context (CLASS / METHOD code) forbidden.
    OK, you'd better use SORTED TABLE and FIELD-SYMBOLS to gt optimal code::
    READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
    WITH KEY gs_FS_EINA_KEY BINARY SEARCH.
    may be replaced with
    DATA:
      gt_INT_CURR_VALUE_SORTED LIKE SORTED TABLE OF  gs_int_curr_value
        WITH [NON-]UNIQUE KEY <fields of  gs_FS_EINA_KEY>.
    FIELD-SYMBOLS:
      <nt_curr_value> LIKE gs_int_curr_value.
    gt_INT_CURR_VALUE_SORTED = gt_INT_CURR_VALUE.
      READ TABLE gt_INT_CURR_VALUE_SORTED ASSIGNING <nt_curr_value>
        WITH TABLE KEY <key1> = gs_FS_EINA_KEY-<key1> ..  <keyn> = gs_FS_EINA_KEY-<keyn>.
    Regards,
    Clemens

  • Performance syntax loop at  and read table

    in the routine , for reading one line in a internal table  , the syntaxe
      loop at  xxx where   and read tabl exxx   with key     XXXX
    has a great difference on performance or not?

    Loop at statement is used only for processing multiple records.Read table is used for reading a particluar record of an internal table.If you just need to check whether record exists in internal table, use can sort and use binary search with TRANSPORTING NO FIELDS addition. Also, try to use field symbols so that performance is increased.

  • Problem after assigning  field-symbol in read statement...

    Hello Experts,
    I want to use a universal field-symbol in reading my internal tables so
    I can avoid declaring multiple work areas. Here is my code:
    FIELD-SYMBOLS: <fs_any> type any.
    READ TABLE lt_orderadm_h INDEX 1 ASSIGNING <fs_any>.
    Now when I try to insert this code:
    IF NOT <fs_any>-object_id IS INITIAL.
    ENDIF.
    It says that <fs_any> has no structure and therefore no component called object_id.
    I think that I need to use assign component for this but I don't know the code.
    Thank you guys and take care!

    Hi
    DATA : WA_ITORDERADM_H LIKE LINE OF IT_ORDERADM_H.
    **Try to assign the work area rather type any**
    FIELD-SYMBOLS: <fs_any> type WA_ITORDERADM_H.
    READ TABLE lt_orderadm_h INDEX 1 ASSIGNING <fs_any>.
    Now when I try to insert this code:
    IF NOT <fs_any>-object_id IS INITIAL.
    ENDIF.
    Check this program
    This works for me
    Simple program.
    TYPES: BEGIN OF NAME,
    NEXTNAME(10),
    FIRSTNAME(10),
    LASTNAME(10),
    END OF NAME.
    FIELD-SYMBOLS <F> TYPE NAME.
    DATA: LINE(30).
    LINE = 'JOHN SMITH SHRI'.
    ASSIGN LINE TO <F> CASTING.
    WRITE: / 'Lastname:', <F>-LASTNAME,
    'Firstname:', <F>-FIRSTNAME,
    'Nextname :', <F>-NEXTNAME
    Award points if helpful
    Thanks
    VENKI

  • No Update FMIOI and KBLP tables with purchase order

    Hello,
    We have un serious problem : No Update FMIOI and KBLP tables with purchase order
    System :  SAP ERP 6.0 /7.0 - EHP 4
    Note 965633 was read.
    1) First case: The purchase order 4510000673 does not reduce the funds reservation.
    Purchase order 4510000673 should consume the funds reservation 1200000193 because all post of the PO charge the funds reservation 1200000193.But the consumption history of the funds reservation 1200000193 donu2019t show this consumption.
    In table FMIOI, we do not have lines with amount type 0200 (reduction) but whe have the lines with the post of PO with amount type (0100).  The Purchase order 4510000673 should consume the funds reservation 1200000193.
    In table KBLP, the fields are :
    Total amount (LC) - HWGES  = 53.409,40
    Amount used u2013 WTABB = 0,00
    Reduction amount u2013 HWABB = 0,00
    Open amount u2013 CWTFREE =    53.409,40
    Reduced amount u2013 WTABG = 0,00
    Reduced amount u2013HWABG = 0,00
    To solve the problem, we executed the transactions : FM4N et FMN5 and the program RFFMRC20 but no result.
    2) Second case : Delete a item of a purchase order does not release the budget
    The single item of the purchase order 4510000597 is deleted but in the display of consumption History of the funds reservation 1200000137, the amount of the purchase order is not to zero.
    To solve the problem, we executed the transactions : FM4N et FMN5 and the program RFFMRC20 but no result.
    Somebody already had a similar problem ?
    Thank you
    Fabian

    Hello Fabian
    There are two known notes dealing with missing update on reference Earmarked Funds, I am listing them for future references:
    1376800  Earmarked funds: Incorrect open amount         
    1438487  RFFMRC20: Missing KBLE records are ignored     
    These notes correct some errors within the Standard.
    However, in your scenario, problem has to do with an incorrect execution of a Commit work inside a customer user-exit. After elimination of this commit work, new Po's are working correctly.
    Remaining task is the correction of old PO's. Manual correction via small changes with ME22N (for instance, adding a '.' to the line item text/s) will force the correct update and fix your database
    If you agree, we can close this thread (?)
    Kind regards
    Mar

  • Use of T168F and T168 Tables in System

    Hi everybody
    I'm making a development, the purpose is to assign the Release Strategy to RFQ's when the user sets the Unit Prices for Items in transactión ME47.
    This action is executed in SAPMM06E in Routine strategie_ermitteln calling FM ME_REL_STRATEGIE_EKKO, but before the call there is a check at routine begin: t160-vorga NE vorga-angb (vorga-angb is a constant 'AG').
    t160-vorga has the 'A' value for ME41 (creating RFQ), then in this transaction the Strategy is assigned.
    But in ME47, t160-vorga has the 'AG' value, then the FM is not called.
    I solved this making t160-vorga = 'A' (only in memory) in EXIT_SAPMM06E_017, and the Release Strategy is assigned ok.
    But, when the user modificates a price using a button, the program makes a validation in Routine FCODE, checking that the value of t160-vorga exists in T168F and T168 tables with field fcode = 'KO'.  Because i modified the value from AG to A, this record does not exist and the program set an error. But, if i don't modify the t160-vorga, the Release is not assigned because the check in Routine strategie_ermitteln.
    So , i'm thinking in change my development, calling myself the FM  ME_REL_STRATEGIE_EKKO in EXIT_SAPMM06E_012 when action Save, but i dont' like this solution because i would need to copy not only the FM call, but else all the code involved in fill the parameters.
    So, i think other solution is to create the record for vorga = 'A', fcode = 'KO'  in T168F and T168 tables.
    If somebody can helpe, my doubts are:
    1. what implicates this record creation in these tables T168/T168F, that is, wich is the usage of these tables in the system ??     
    2. Where can i see the meaning of t168-vorga values (AG, A, K, F etc.)  ??
    3. In wich transaction can i create records to these tables ??
    4. Could be any problem if i add that records to these tables ??
    Any help will be apreciated !!
    (Excuse the long Topic text)
    Thanks
    Frank

    Hi Frank,
    2. Look the table T167T (to find this, I was going into the SE11, Data element: VORGA, : table, ...)
    3. The table T167T could be updated with the SM30/SM31 transaction. But you have a warning message.
    4. See the message, in the previous answer
    Rgd
    Frédéric

  • Difference between Field symbols and field group

    Hi experts,
    Can you please advice me what is the difference between field symbols and field groups.
    Thanks in advance,
    Logu.

    Field symbols: are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    A field group combines several existing fields together under one name
    like
    FIELD-GROUPS: fg.
    then you can use one insert statement to insert values in fields of field-group.
    INSERT f1 f2 ... INTO fg.
    Field symbols
    If u have experience with 'C', then understand this to be similar to a pointer.
    It is used to reference another variable dynamically. So this field symbol will simply point to some other variable. and this pointer can be changed at runtime.
    FIELD-SYMBOLS <FS>.
    DATA FIELD VALUE 'X'.
    ASSIGN FIELD TO <FS>.
    WRITE <FS>.
    Field symbols: are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field Groups:
    A field group is a user-defined grouping of characteristics and basic key figures from the EC-EIS or EC-BP field catalog.
    Use
    The field catalog contains the fields that are used in the aspects. As the number of fields grows, the field catalog becomes very large and unclear. To simplify maintenance of the aspects, you can group fields in a field group. You can group the fields as you wish, for example, by subject area or responsibility area. A field may be included in several field groups.
    When maintaining the data structure of an aspect, you can select the field group that contains the relevant characteristics and basic key figures. This way you limit the number of fields offered.
    example :
    DATA: BEGIN OF SPTAB OCCURS 0,
    line(1000), " or type string
    END OF SPTAB.
    DATA: IDX LIKE SY-INDEX.
    field-symbols <FS1>.
    split tb_sip AT ';' INTO table sptab.
    LOOP AT SPTAB.
    IDX = IDX + 1.
    ASSIGN COMPONENT IDX OF STRUCTURE tb_detsip TO <FS1>.
    If sy-subrc = 0.
    <FS1> = SPTAB-line.
    Endif.
    Endloop.
    append tb_detsip.
    clear idx.
    Field Groups / Extracts
    http://help.sap.com/saphelp_46c/helpdata/EN/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
    Field Symbols
    http://help.sap.com/saphelp_46c/helpdata/EN/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
    Reward points if useful.

Maybe you are looking for