Problem related to field-Symbol?

HI All,
I am writting the below coding, Please tell me whether the Field Symbol will act as a table or not as I want to append a lot of data to field symbol. Please tell me is there any problem in the code.
LOOP AT lt_vepoequi_keys into ls_vepoequi_keys.
        READ TABLE lt_vekp ASSIGNING <ls_vekp_str> with key
          matnr = ls_vepoequi_keys-matnr.
        IF sy-subrc = 0.
          <ls_vekp_str>-stoff = ls_vepoequi_keys-stoff.
          <ls_vekp_str>-sonum = ls_vepoequi_keys-sonum.
          <ls_vekp_str>-lagkl = ls_vepoequi_keys-lagkl.
          <ls_vekp_str>-lagkt = ls_vepoequi_keys-lagkt.
endif.
endloop.

Hi Abhinav,
you have internal table (say it_employee) with fields name,age,senior_category.
now when you loop this internal table you will need workarea.
loop at it_employee into wa_employee.
                  if wa_employee-age > 60.
                        wa_employee-senior_category = 'YES'.
                  else.
                          wa_employee-senior_category = 'NO'.
                  endif.
                          modify it_employee from wa_employee. 
                 endloop.
now one use of Field-symbols is : when internal table is huge and when you loop with workarea and modify internal table each time, it takes time. So if we use Field-symbols performance would increase.
loop at it_employee assigning into <fs_employee>.
                  if <fs_employee>-age > 60.
                        <fs_employee>-senior_category = 'YES'.
                  else.
                          <fs_employee>-senior_category = 'NO'.
                  endif.
            endloop.
Now  you see in the above code, i have not used modify statement because when i loop internal table, the field symbol points directly to the memory of internal table.
So during loop if i assign any value to the field symbol then it directly changes the internal table value, so there wont be any need to use modify statement.
Hope you are clear with this example....
Regards
Sajid

Similar Messages

  • Problem in assigning field symbol to a nested internal table

    Hi All,
    I have searched the forum but could not find a solution to this problem. I have a requirement where I need to define an internal table within an internal table, so I have used pointer within the outer internal table(itab2) which point to the inner table. However, I am facing problem while assigning the pointer.
    data: begin of struct1 occurs 0,
            fld3(10) type C,
           end of struct1.
    data: begin of itab2 occurs 0,
            fld1(10) type C,
            fld2(10) type C,
            p_inner like ref to struct1,
          end of itab2.
    field-symbols <inner_table> type any.
    I want to assign "itab2->p_inner->* " to "<inner_table>".
    However, the following statement is Not working:
    assign itab2->p_inner->* to <inner_table>.
    I want to fill the values within fields fld1, fld2 and fld3 and append it in itab2.
    The final table should be like:
    ITAB2:
    fld1    fld2    fld3
    aa      bb      cc
                     dd
                     ee
    11      22      33
                     44
                     55
    I have tried many other ways too but could not suceed, please help.
    Thanks,
    Vishal.

    Thanks Matt,
    But how do I append the values within this internal table ??
    When I am using the following code:
    ls_wa-fld3 = 'A'.
    ls_wa-t_in-fld1 = 'B'.
    ls_wa-t_in-fld2 = 'C'.
    ls_wa-t_in-fld1 = 'D'.
    ls_wa-t_in-fld2 = 'E'.
    append ls_wa to lt_tab.
    Its giving an error that:
    The data object "LS_WA" does not have a component called "T_IN-FLD1".
    I wanted the values to be appended in the following way in lt_tab:
    fld3     fld1     fld2
    A     B     C
         D     E
    Please help.

  • Problem with slis_t_specialcol_alv Field Symbol Assignment

    I have created a dynamic internal table (runtime determined number of columns) to contain data to be displayed in an ALV. I’ve also made ensured that the last column of the dynamic itab is of type <b>'slis_t_specialcol_alv'</b> and named <b>‘CINFO’</b> to contain color information for that particular row. In the code below the dynamic itab is pointed to by field symbol <dyn_table> while the work area for it would be <dyn_wa>.
    Somewhere down the line I attempt to assign the ‘CINFO’ component of the current row of the itab to a field symbol called <fs_cinfo> typed as ‘slist_t_specialcol_alv’ (Same as CINFO).
    I used the code:
    ASSIGN COMPONENT 'CINFO' OF STRUCTURE <dyn_wa> TO <fs_cinfo>.
    This gives me the runtime error:
    <i>Type conflict in the ASSIGN statement in the program "ZHRR001_TEMMATRIX".
    You attempted to assign a field to a typed field symbol,
    but the field does not have the required type.    </i>     
    I am unsure why this happens as both the component CINFO and FS <fs_cinfo> are of type slist_t_specialcol_alv.
    For some odd reason though during debugging, I took a look at the <dyn_wa> structure and the component type of CINFO was displayed as “C”???
    Here is the relevant portion of code (creation of dynamic itab and attempting to assign <fs_cinfo>)
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>.
    FIELD-SYMBOLS: <fs_cinfo> TYPE slist_t_specialcol_alv.
    DATA: lw_cinfo TYPE slis_specialcol_alv.
    DATA:          li_fldcat TYPE lvc_t_fcat,
                   lw_fldcat TYPE lvc_s_fcat.
    *Create internal table fields (they will be called Field1, Field2, etc)
    *Last column will be named 'CINFO' to contain row color information
    DO l_alvcolumncount TIMES.
      index = sy-index.
      IF index <> l_alvcolumncount.
        CLEAR lw_fldcat.
        CONCATENATE 'Field' index INTO lw_fldcat-fieldname .
        CONDENSE lw_fldcat-fieldname NO-GAPS.
        lw_fldcat-datatype = 'STRING'.
    *    lw_fldcat-intlen = 5.
        APPEND lw_fldcat TO li_fldcat .
      ELSE.
        CLEAR lw_fldcat.
        lw_fldcat-fieldname = 'CINFO'.
        CONDENSE lw_fldcat-fieldname NO-GAPS.
        lw_fldcat-datatype = 'slis_t_specialcol_alv'.
        APPEND lw_fldcat TO li_fldcat.
      ENDIF.
    ENDDO.
    * Create dynamic internal table and assign to FS
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = li_fldcat
      IMPORTING
        ep_table        = new_table.
    ASSIGN new_table->* TO <dyn_table>.
    *Create dynamic work area and assign to FS
    CREATE DATA new_line LIKE LINE OF <dyn_table>.
    ASSIGN new_line->* TO <dyn_wa>.
      ASSIGN COMPONENT 'CINFO' OF STRUCTURE <dyn_wa> TO <fs_cinfo>.
    * Color this cell
      lw_cinfo-fieldname = fieldname.
      lw_cinfo-color-col = 6.
      APPEND lw_cinfo TO <fs_cinfo>.
    Message was edited by: Sow Yong Wong

    Hello Sow
    There is a big problem in the program: you are mixing types used for FM-based ALV (SLIS_...) and ABAP-OO based ALV (LVC_...).
    For ABAP-OO based row colouring you have to define your itab like this:
    TYPES: ty_s_outtab.
      INCLUDE TYPE kna1. " just an example
    TYPES: rowcolor(4)  TYPE c.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab TYPE STANDARD TABLE of ty_s_outtab
                       WITH DEFAULT KEY.
    In the layout (LVC_S_LAYO) you have to set <b>ls_layout-info_fname = 'ROWCOLOR'</b>.
    ROWCOLOR has to be filled according to <b>Cxyz</b> whereas
    - x = color
    - y = inverse on/off
    - z = intensified on/off
    For documentation please refer to <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">An Easy Reference to ALV Grid Control</a>
    Regards
      Uwe

  • 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

  • Problem in using Field Symbols in HIDE statement

    Hi All,
    I am working in an Upgrade project ( from 4.6B to ECC 5.0 ). In a program I found few warnings on HIDE statement because they have used Field Symbols in HIDE statement.
    The warning is " HIDE on a field symbol is dangerous, but the formal parameter "" is not ".
    and the piece of code is
    SET EXTENDED CHECK OFF.
    HIDE: flg_pick_up, <s1>, <s2>, <s3>, <s4>, <s5>, z_feld_ind.
    CLEAR flg_pick_up.
    SET EXTENDED CHECK ON.
    all the field symbols are of type ANY. SO can any one help in removing those warnings.
    Please reply me as soon as possible.
    With Regards,
    Amarnath Singanamala

    Hi amarnath,
    1. Why do u want to remove
       the warning ?
    2. This warning (and not an error)
       is a GENUINE warning,
      which the system wants the user to make aware of.
    3. By doing some xyz,
      even if u may be able to hide the warning,
      the warning may be hidden (for display purpose only),
      but,
      the warning will still be there inside the system.
    4. I think u should ignore the warning,
      (if there are no other repurcussions).
    regards,
    amit m.

  • Problem in accessing field symbols passed as parameters to subroutine

    Hi,
    I have different internal tables/structures,i am populating those tables dynamically using field symbols. If i put that logic in perform, i am getting error while accessing the field symbol insdie the form.
    For ex: My code looks like below.
    tab1 is my int table, fs1 is my work area,
    declared <fs1> as
    data:  <fs1>  type fs1.  <fs1> is my structure type.
    perform populate tables tab1
                              using <fs1>
                                       fs1.
    form populate tables p_tab
                         using p_fs
                                  p_wa.
    assign  p_wa to p_fs.
    endform.
    i am getting the error in the assign stmt
    logic without form...endform is
    assign fs1 to <fs1>
    logic was working fine wihtout perform.
    Regards,
    sowjanya

    Hi Sowjanya,
    Try this one, Hope it will solve your issue
    REPORT  ztest_fs_create.
    DATA: gt_final TYPE STANDARD TABLE OF pernr_d,
          wa_final TYPE pernr_d.
    NODES pernr.
    TABLES pa0001.
    FIELD-SYMBOLS: <tab> TYPE pernr-pernr.
    GET pernr.
      ASSIGN pernr-pernr TO <tab>.
      PERFORM get_pernr USING <tab>.
    END-OF-SELECTION.
      LOOP AT gt_final INTO wa_final.
        WRITE:/1 wa_final.
      ENDLOOP.
    *&      Form  gt_pernr
          text
         -->P_TAB      text
    FORM get_pernr USING p_tab TYPE any.
      APPEND p_tab TO gt_final.
    ENDFORM.                    "gt_pernr
    Cheers
    Pavan

  • Problem with DESCRIBE field-symbol statement?

    Hi
    I havw written following querry but it's showing error. My doubt is there any resctriction field symbols in DESCRIBE query.
    i wrote
    describe field <a> type typ  length in character mode.
    Is that syntax correct?

    When you use the Describe statement with the field symbols, it will do the describe on the field which was assigned to it.
    Like:
    FIELD-SYMBOLS: <fs> TYPE ANY.
    DATA: l_char TYPE char10.
    l_char = 'TEST'.
    ASSIGN l_char TO <fs>.
    DATA: l_len TYPE i.
    DESCRIBE FIELD <fs> LENGTH l_len IN CHARACTER MODE.
    write: / '<fs>:', <fs>.
    WRITE: / 'Length', l_len.
    Here descirbe gives the property of the L_CHAR because it was assigned to field symbol <FS>.
    Regards,
    Naimesh Patel

  • Problem with the field-symbols

    Hi all,
            i am unable to delete the  data in the internal table.
            i am sending the code.
          BEGIN OF t_oprtn,
           budat LIKE afru-budat,
           vornr LIKE afru-vornr,
           grund LIKE afru-grund,
           gmein LIKE afru-gmein,
           gmnga LIKE afru-gmnga,
           expfl(1),
           END OF t_oprtn,
    FIELD-SYMBOLS: <fs_collect>         TYPE STANDARD TABLE.
    FIELD-SYMBOLS: <fs_wa_collect>      TYPE ANY.
        CREATE DATA i_collect TYPE STANDARD TABLE OF t_oprtn
                              WITH DEFAULT KEY.
        CREATE DATA wa_collect TYPE t_oprtn.
      ASSIGN i_collect->*       TO <fs_collect>.
      ASSIGN wa_collect->*      TO <fs_wa_collect>.
      SELECT abudat avornr agrund  aarbid astokz darbpl a~aufnr
             bplnbez cmaktx agmnga agmein
             INTO TABLE i_final
             FROM afru AS a INNER JOIN afko AS b
                                       ON aaufnr = baufnr
                            INNER JOIN makt AS c
                                       ON bplnbez = cmatnr
                            INNER JOIN crhd AS d
                                       ON aarbid = dobjid
             WHERE a~budat IN s_budat
    LOOP AT i_final INTO wa_final.
      MOVE-CORRESPONDING wa_final TO <fs_wa_collect>.
        COLLECT <fs_wa_collect> INTO <fs_collect>.
      ENDLOOP
    how to write a delete statement for -  <fs_collect>.
    Plz tell me the delete statement where GMNGA is '0'.   " GMNGA IS A CONFIRM QUANTITY.
    Plz reply its urgent.
    Edited by: hari prasad on May 30, 2008 1:15 PM
    Edited by: hari prasad on May 30, 2008 1:20 PM

    Try:
    field-symbols: <f_temp> type any.
    loop at <fs_collect> assigning <fs_wa_collect>.
       assign component 'GMNGA' of structure <fs_wa_collect> to <f_temp>.
    if <f_temp> is initial.
       delete <fs_collect>.
    endif.
    endloop.
    regards,
    S. Chandramouli.
    Edited by: Chandramouli Subburathinam on May 30, 2008 5:08 PM

  • Problem Related to Fields of MIGO?

    Hi,
    I want tht the fields in quantity field to be in change mode as they are now coming in display mode. plz tell me how can i do tht.

    Hi All,
    As one of you gave the solution of my problem as to go in SHD0. will u plz tell me the complete process of tht  so tht I can achive my target. or if there is any another way of solving it thn, do tell me.
    I again tell u what my problem is : As while doing GR, if u see on the item details  below there is a Quantity tab. On clicking it u will find various fields related to Quantity. Now In My case some fields are not in change mode these  are Qty in SKU, Quantity Ordered And Quantity Received. So I want These fields in display mode. and also there is one more problem tht if I receive more Quantity thn ordered thn it will not allow me to add extra. for Example if I have ordered 10 No of goods and I got 15 thn I can Only enter upto 10 or less but not 15. so plz tell me how can I Overcome Both These Problems

  • Problem with field symbol

    Hi!
    I have a problem with a field-symbol like this:
    DATA: gt_coep_ext TYPE kaep_t_coep_ext.
    field-symbols <gt_data> type table.
    ASSIGN gt_coep_ext TO <gt_pos_data>
    This field symbol is used in the FM REUSE_ALV_GRID_DISPLAY as output table. I need add two fields in this <gt_data>. Is there any way to add new fields in the <gt_data> structure.
    Thanks!!

    Create your one Fieldcat
    Global data declaration  ***
    TYPE-POOLS: SLIS.
    <types: ... .                    " user definded types>
    DATA:   GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:   G_REPID LIKE SY-REPID.
    DATA:   GT_OUTTAB TYPE <UD_STRUCT>  OCCURS 0 WITH HEADER LINE.
    <data:  ... .                    " user specific data>
    Initialization field catalog  ***
    INITIALIZATION.
      G_REPID = SY-REPID.
      PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
    Data selection  ***
    START-OF-SELECTION.
      PERFORM SELECT_DATA TABLES GT_OUTTAB.
    Display list  ***
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM = G_REPID
                IT_FIELDCAT        = GT_FIELDCAT[]
           TABLES
                T_OUTTAB           = GT_OUTTAB.
    FORMS  ***
    FORM FIELDCAT_INIT USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
         DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
         DATA: POS TYPE I VALUE 1.
    Initialize keyfield(s)
    CLEAR LS_FIELDCAT.
    LS_FIELDCAT-COL_POS       =   POS.
    LS_FIELDCAT-FIELDNAME     =   <GT_OUTTAB_FIELD_NAME>.
    LS_FIELDCAT-REF_FIELDNAME =   <DDIC_REF_FIELD_NAME>.
    LS_FIELDCAT-REF_TABNAME   =   <DDIC_REF_TABLE_NAME>.
    LS_FIELDCAT-KEY           =   'X'.      " sets key field
       APPEND LS_FIELDCAT TO RT_FIELDCAT.
    Initialize normal field(s)
    POS = POS + 1.
    clear ls_fieldcat.
    ls_fieldcat-col_pos       =   pos.
    LS_FIELDCAT-FIELDNAME     =   <GT_OUTTAB_FIELD_NAME>.
    LS_FIELDCAT-REF_FIELDNAME =   <DDIC_REF_FIELD_NAME>.
    LS_FIELDCAT-REF_TABNAME   =   <DDIC_REF_TABLE_NAME>.
       APPEND LS_FIELDCAT TO RT_FIELDCAT.
    Initialize hidden field(s)
    POS = POS + 1.
    clear ls_fieldcat.
    ls_fieldcat-col_pos       =   pos.
    LS_FIELDCAT-FIELDNAME     =   <GT_OUTTAB_FIELD_NAME>.
    LS_FIELDCAT-REF_FIELDNAME =   <DDIC_REF_FIELD_NAME>.
    LS_FIELDCAT-REF_TABNAME   =   <DDIC_REF_TABLE_NAME>.
    LS_FIELDCAT-NO_OUT        =   'X'.      " sets hidden field
       APPEND LS_FIELDCAT TO RT_FIELDCAT.
    ENDFORM.    " fieldcat_init
    FORM SELECT_DATA TABLES RT_OUTTAB LIKE GT_OUTTAB[].
    <user specific data selection>
    ENDFORM.  " select_data

  • Problem trying to create FIELD SYMBOLS in BADI.

    Hi guys!
    I'm trying to create a Field Symbol in method CHECK of BADI me_process_req_cust (well, I'm working on a Z implementation).
    The problem is that I'm trying to create a FIELD SYMBOL and when I check the syntaxsis, I receive the next error:
    Clase ZCL_IM_MM_PURREQ_UPDATE,Método IF_EX_ME_PROCESS_REQ_CUST~CHECK
    Names may only consist of the characters "A-Z", "0-9" and "_". In
    addition, they may not begin with a number.
    This is the code:
            FIELD-SYMBOLS: <sy-mereq> TYPE mereq3328-afnam.
    Any idea????
    Thanks in advance!
    Bet

    Hi Silveria,
    The problem lies in
    FIELD-SYMBOLS: <sy-mereq> TYPE mereq3328-afnam.
    instead of that it should be something like this
    FIELD-SYMBOLS: <sy_mereq> TYPE mereq3328-afnam.
    With your code you will be getting a syntax error saying sy-mereq is not defined,as it will be looking for the mereq in the system fields.
    Regards
    Abhinab Mishra

  • Problem with some bold symbols.

    Hello,
    My problem related with some symbols in Bold .
    After upgrading Adobe Reader to 9, I got some problems with my PDF Files.
    Look at this picture :
    http://img501.imageshack.us/img501/7828/bugoc9.png
    Notes :
    1- I was using Adobe Reader 5.0 and I didn't get this problem.
    2- I tried Foxit Reader and I didn't get the problem too.
    3- All needed fonts are embedded to PDF Files.

    Please post a link to a questionable file.
    If you are sure you have a bug:
    Mike

  • Problem with some bolded symbols

    Hello,
    My problem related with some symbols in Bold .
    After upgrading Adobe Reader to 9, I got some problems with my PDF Files.
    Look at this picture :
    http://img501.imageshack.us/img501/7828/bugoc9.png
    Notes :
    1- I was using Adobe Reader 5.0 and I didn't get this problem.
    2- I tried Foxit Reader and I didn't get the problem too.
    3- All needed fonts are embedded to PDF Files.

    Is it possible that you have the "use local fonts for viewing" option
    enabled in one version and not the other? In version 8 the setting is found
    in "Edit/Preferences/Page Display/Rendering".
    Alternatively, you could look at the file properties to see whether the
    north arrow symbol font is actually embedded. If it isn't, then you will not
    see it whenever "use local fonts" is disabled (or when a user does not have
    the same font installed on their own computer).

  • Problem with field symbols in ecc 6.0

    i have the following  code  written in 4.6 version   now i am executing the old report   in 6.0  but  i am facing with some unicode error.
      FIELD-SYMBOLS:
        <line_of_bs_table> LIKE tbl1024,
       READ TABLE bs_table INDEX row_bst ASSIGNING  <line_of_bs_table> .
        buffer_bsbuffer_ptr(aux) =  <line_of_bs_table> >col_bst.
    tb1024 is standard sap structure  for storing buffer contents
    i have the following error in ecc 6.0
    structure type   '<line_of_bs_table> >+col_bst'  does not start with a charecter type  field in unicode programs in such cases
    offset/ length declarations are not allowed.
    can any one tell how can a field symbol  structure is changed  to charecter  type.

    Hi elinuk,
    you have already posted this thread in the ABAP general forum under problem in field symbols in ecc6.0 and I think that this forum is more related to this issue than the DMS forum. So please close this thread and investigate this issue further in the ABAP general forum.
    Best regards,
    Christoph

  • Problem with field-symbol values not updating

    H i ,
          I have following piece of code :
    Assigning Dynamic Table to Field Symbol
        ASSIGN ist_dyn_table->* TO <gs_dyn_table>.
    *   Creating Structure for dynamic table
        CREATE DATA gs_dyn_line LIKE LINE OF <gs_dyn_table>.
    *   Creating line type for the Dynamic Values
        ASSIGN gs_dyn_line->* TO <gs_line>.
    *   Populating values in the dynamic table
        LOOP AT ist_pwcl_main INTO wa_pwcl_main.
          ASSIGN COMPONENT gc_fld_werks OF STRUCTURE <gs_line> TO <gs_field>.
       1   IF sy-subrc EQ 0.
       2        <gs_field> = wa_pwcl_main-werks.
       3      ENDIF.
       5  IF <gs_field> IS ASSIGNED.
       6     <gs_field> = wa_pwcl_main-vbeln.
          ENDIF.
      7 IF <gs_field> IS ASSIGNED.
      8  <gs_field> =  wa_pwcl_main-posnr.
          ENDIF.
       IF <gs_field> IS ASSIGNED.
            <gs_field> = wa_pwcl_main-quant.
          ENDIF.
    on debugging  at line 2 <gs_filed> contains the value of werks .
    but at line 6 <gs_field> contains value of vbeln as 0 and at 8 of posnr as 0 .
    What can be the problem ? Other values are getting assigned properly .
    Plz help ...
    Regards .

    Hi,
    Assigning Dynamic Table to Field Symbol
        ASSIGN ist_dyn_table->* TO <gs_dyn_table>.
      Creating Structure for dynamic table
        CREATE DATA gs_dyn_line LIKE LINE OF <gs_dyn_table>.
      Creating line type for the Dynamic Values
        ASSIGN gs_dyn_line->* TO <gs_line>.
      Populating values in the dynamic table
        LOOP AT ist_pwcl_main INTO wa_pwcl_main.
          ASSIGN COMPONENT gc_fld_werks OF STRUCTURE <gs_line> TO <gs_field>.
       1   IF sy-subrc EQ 0.
       2        <gs_field> = wa_pwcl_main-werks.
       3      ENDIF.
       5  IF <gs_field> IS ASSIGNED.
       6     <gs_field> = wa_pwcl_main-vbeln.
          ENDIF.
      7 IF <gs_field> IS ASSIGNED.
      8  <gs_field> =  wa_pwcl_main-posnr.
          ENDIF.
       IF <gs_field> IS ASSIGNED.
            <gs_field> = wa_pwcl_main-quant.
          ENDIF.
    Based on your coding above, <gs_field> has been assigned with data type 'WERKS' (i'd assume component gc_fld_werks found from structure <gs_line> is a plant typed), which is a CHAR(4) data type.
    Meaning, if <gs_field> is assigned with Plant type value, e.g. <gs_field> = '1000', field symbol <gs_field> will contain 4 character only.
    At line 6, if wa_pwcl_main-vbeln = '0000201000', <gs_field> is only capturing '0000' only. This is also happened to line 8.
    However, it looks like that <gs_field> is getting over-write if ASSIGNED statement returns SY-SUBRC = 0.
    Hope this helps.
    Regards,
    Patrick

Maybe you are looking for