Dump in field symbol assigen

Hi ,
i try to do this statement and i have dump
BEGIN OF tt_agr ,
        agr_name TYPE agr_name,
        text TYPE agr_title,
       END OF tt_agr .
FIELD-SYMBOLS: <ls_retr_txt1> TYPE tt_agr.
LOOP AT lt_help ASSIGNING <ls_help_value>.
    SPLIT <ls_help_value> AT space INTO ls_agr-agr_name ls_agr-text.
    SHIFT ls_agr-text LEFT DELETING LEADING space.
    READ TABLE It_retr_roles ASSIGNING <ls_retr_txt1> WITH KEY agr_name = ls_agr-agr_name.
    IF sy-subrc = 0.
      <ls_retr_txt1>-text = ls_agr-text . "<- here the dump occuer
    ENDIF.
  ENDLOOP.
this is the dump analysis what i miss here ?
Error analysis
    A new value is to be assigned to the field "<LS_RETR_TXT1>", although this
     field is
    entirely or partly protected against changes.
    The following are protected from change:
    - Character literals or numerical literals.
    - CONSTANTS.
    - Parameters of the category IMPORTING REFERENCE in functions and
      methods.
    - untyped field symbols, that have not been assigned a field using
      ASSIGN.
    - TABLES parameters, if the actual parameter is protected against
      changes.
    - USING reference parameters and CHANGING parameters in FORMs,
      if the actual parameter is protected against changes.
    - Access using field symbols if the field assigned using ASSIGN is
      partly or completely protected (for example key components of internal
      table of the type SORTED or HASHED TABLE).
    - Access using field symbols if the field assigned using ASSIGN contains
      components of a secondary key that is currently in use in a
      higher-level LOOP statement.
    - Access using references if the field bound to the reference is
      (partly) protected against changes.
    - Write access from outside to READ-ONLY attributes.
    - Content of a shared objects area instance accessed using a shared lock
      (ATTACH_FOR_READ.
    - Rows or fields of a table that are currently being serialized by a
      Simple Transformation.
Regards
Joy

Hi,
if It_retr_roles is defined as CHANGING (which is against naming rules, should be Ct_retr_roles), then the table is defined as SORTED OR HASHED and field TEXT is part of the key. Key fields may never be changed.
You may build a new local internal table and replace the original at end of method.
Regards,
Clemens

Similar Messages

  • DATA_OFFSET_TOO_LARGE dump for field symbol assignment/offset

    Hi,
    I am getting a DATA_OFFSET_TOO_LARGE dump for field symbol assignment/offset.
    Dump says, 'In the running program "ZTEST", the field "<WA_FINAL>" of the type "u" and length 2174 was to be accessed with the offset 2204. However, subfield accesses with an offset specification that is not smaller than the field length are not permitted.'
    Here <WA_FINAL> have to be 'TYPE any' to avoid assignment conflicts later in the logic.
    It's basically dumping at <WA_FINAL>+V_LEN(V_OFF) = WA_DATA-FIELD1.
    Here V_LEN LIKE DD03L-LENG & V_OFF LIKE DD03L-LENG.
    Please suggest how to get rid of this dump.
    Regards,
    Ritesh.

    The dump is very clear, your field is smaller than the offset.
    The problem is most likely how you are calculating v_len and v_off.
    You could change that, but there is probably an easier and faster way to do what you are trying there. Is <wa_final> something like a line from a file or what?

  • Short dump GETWA_NOT_ASSIGNED - Field symbol FS_ENVDLIST not assigned

    Hi Experts,
    I need your help. Currently i am getting a short in CIC0 transaction.
    Please find steps executed which result in short dump.
    Search for a BP with BD display as the active tab. This search will be successful.
    Press u2018End Contactu2019 Now search for 2nd BP with BD display as the active tab.
    This will result in a dump.
    Now if I again execute the t-code CIC0 & enter the same BP it will be successful
    On debugging, I found out that the program cannot identify the data environment since the field symbol <fs_envdlist> does not get assigned when BD_DISPLAY tab is active.  But the program still continues to use this field symbol which results in a dump
    CRM Version - 4.0 - Patch level 10
    Please let me know if the below link is not accessible
    [http://imageshack.us/photo/my-images/685/page3uk.jpg/]
    [http://imageshack.us/photo/my-images/338/page2dr.jpg]
    [http://imageshack.us/photo/my-images/510/page1up.jpg/]
    [http://imageshack.us/photo/my-images/140/page4fa.jpg/]
    [http://imageshack.us/photo/my-images/845/screenshotsxq.jpg/]

    Hi Andrei,
    Thank you for the reply, but both this note are applicable to me
    1144076 u2013 Talks about dump when too many hits are returned - I do not have any such message
    996915 u2013 Talks about searching for the premise for a point of delivery without entering any search parameters - again in my scenario, input data is always provided.
    Is there any solution, i did get note 1254404 which is closest to my issue, but its valid from crm 5.0 and we are on CRM 4.0

  • Short dump  GETWA_NOT_ASSIGNED field symbol not been assigned

    Hi Gurus,
    I am calling a RFC  BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 from R/3 sytem to SCM 5.0.
    Acutally this FM BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 not available in R/3 system.
    So i am using scm destination and calling above FM directly from R/3 but i am getting the short dump
    in SCM system as GETWA_NOT_ASSIGNED field symbol not been assigned.
    Can you pls check and advise.
    Best Regards,
    Radhakrishna.

    Hi Radhakrishna,
            It looks like you have a discrepancy in the planning area with respect to keyfigure. Some thing like the key figure description is not synchronized between live cache and db.
    I suggest you log onto your SCM system, run the program /SAPAPO/TS_LCM_CONS_CHECK on your planning area with correct error option.
    Please let me know if this works.

  • How to revert back a SAP NOTE? Dump- Field symbol has not yet been assigned

    Hi Experts,
    We r getting dump(cause: Field symbol has not yet been assigned) in production for ABUMN tx, so, when debugged, it came to know that, the Field symbol is coming from REUSE_ALV_LIST_DISPLAY!!
    So, for some reason the system message text is not getting output in ALV-->Dump!!
    So, found a NOTE causing this problem!!
    So, pls. let me know that, How to revert back this/any SAP NOTE? pls. in detail steps wise!!
    thanq
    Edited by: Srinivas on Jan 24, 2008 4:32 PM

    Hi
    In SNOTE tcode,  select the Note that you implemented and click on 'RESET SAP Note Implementation'
    shylesh

  • Dynnamic Field Symbol returning short dump ASSIGN_TYPE_CONFLICT

    Hi everyone,
    I have a RFC FM and make a dynamic access via SYMBOL FIELD, declared as ANY TABLE. The problem is that sometimes I can get a structure instead of a table and then the error occurs. How do I handle this error if the check IS ASSIGN not work? How do I capture and return an error message?
    I tryed this:
      FIELD-SYMBOLS: <fs_tabela>  TYPE ANY TABLE.
         TRY.
                     ASSIGN (st_b2b_text-tabname) TO <fs_tabela>.   <<<<----
    DUMP HERE!
                  CATCH cx_root INTO v_erro.
                    v_text = v_erro->get_text( ).
                    MOVE v_text TO st_return-message.
                    APPEND st_return TO t_return.
                    PERFORM f_return_error_pi USING event.
          ENDTRY.
                IF <fs_tabela> IS ASSIGNED.
                  CONCATENATE 'S' st_b2b_text-tabname INTO vl_wkarea.
                  CONDENSE vl_wkarea NO-GAPS.
                  ASSIGN (vl_wkarea) TO <fs_wkarea>.
                  IF <fs_wkarea> IS ASSIGNED.
                    LOOP AT <fs_tabela> ASSIGNING <fs_wkarea>.
                      ASSIGN COMPONENT c_posnr
                      OF STRUCTURE <fs_wkarea> TO <fs_posnr>.
    Does anyone have any tips?
    Tnks,
    Marco Antonio
    from Brazil

    I solved with this test that I did:
    TABLES: vbak.
    TYPES: BEGIN OF ty_ctrlimo,
             equnr          TYPE equnr,
             anln1          TYPE anln1,
             anln2          TYPE anln2,
             aufnr          TYPE aufnr,
             bukrs          TYPE bukrs,
             zanln1_andam       TYPE anln1,
             zanln2_andam       TYPE anln2,
           END   OF ty_ctrlimo.
    DATA: estrutura TYPE ty_ctrlimo,
          tabela    TYPE STANDARD TABLE OF ty_ctrlimo
                         INITIAL SIZE 0 WITH HEADER LINE,
          tabela2   TYPE TABLE OF ty_ctrlimo,
          variavel  TYPE char30.
    DATA: is_tabela.
    Evento: START-OF-SELECTION                                       ***
    START-OF-SELECTION.
      BREAK-POINT.
      PERFORM f_check_is_tabela USING 'TABELA' CHANGING is_tabela.
      WRITE: / '1 ', 'TABELA =', is_tabela.
      SKIP 1.
      PERFORM f_check_is_tabela USING 'TABELA2' CHANGING is_tabela.
      WRITE: / '2 ', 'TABELA2 =', is_tabela.
      SKIP 1.
      PERFORM f_check_is_tabela USING 'ESTRUTURA' CHANGING is_tabela.
      WRITE: / '3 ', 'ESTRUTURA =', is_tabela.
      SKIP 1.
      PERFORM f_check_is_tabela USING 'VARIAVEL' CHANGING is_tabela.
      WRITE: / '4 ', 'VARIAVEL =', is_tabela.
      SKIP 1.
      PERFORM f_check_is_tabela USING 'VBAK' CHANGING is_tabela.
      WRITE: / '5 ', 'VBAK =', is_tabela.
      SKIP 1.
    *&      Form  F_CHECK_IS_TABELA
    FORM f_check_is_tabela  USING  value(p_nome_tabela_estrutura)
                         CHANGING  p_is_tabela.
      FIELD-SYMBOLS <check> TYPE ANY.
      DATA: lcls_strdscr  TYPE REF TO cl_abap_structdescr,
            lcls_typdscr  TYPE REF TO cl_abap_typedescr.
      CLEAR: p_is_tabela.
      ASSIGN (p_nome_tabela_estrutura) TO <check>.
      lcls_typdscr ?= cl_abap_structdescr=>describe_by_data( <check> ).
      IF lcls_typdscr->type_kind = cl_abap_structdescr=>typekind_table.
        p_is_tabela = cl_abap_structdescr=>true.
      ENDIF.
      WRITE: / 'tipo data: ', lcls_typdscr->type_kind.
    ENDFORM.                    " F_CHECK_IS_TABELA

  • Going for dump while using field symbols

    Hi all,
       I am using field symbols in my program. Program is going dump for some company codes and working fine for some company codes.
    I am confused. Please check this code where the error is shown.
    LOOP AT i_final ASSIGNING <fs_final>.
        AT NEW belnr.
         if  <fs_final>-wt_withcd  = 'SF' or  <fs_final>-wt_withcd  = 'XF' OR  <fs_final>-  wt_withcd  = 'WF'.
          MOVE <fs_final> TO wa_final1.
          g_qsatz = wa_final1-qsatz.
          APPEND wa_final1 TO i_final1.
          CLEAR wa_final1.
         ENDIF.
        ENDAT.
        READ TABLE i_final1 ASSIGNING <fs_final1> WITH KEY belnr = <fs_final>-belnr.
        IF <fs_final>-wt_withcd  = 'SF'.
          <fs_final1>-wt_withcd1 = <fs_final>-wt_withcd.
          <fs_final1>-wt_qbshb1  = <fs_final>-wt_qbshb.
          <fs_final1>-qsatz      = <fs_final1>-qsatz + <fs_final>-qsatz.
        ENDIF.
        IF <fs_final>-wt_withcd  = 'XF'.
          <fs_final1>-wt_withcd2 = <fs_final>-wt_withcd.
          <fs_final1>-wt_qbshb2  = <fs_final>-wt_qbshb.
          <fs_final1>-qsatz      = <fs_final1>-qsatz + <fs_final>-qsatz.
        ENDIF.
        IF <fs_final>-wt_withcd = 'WF'.
          <fs_final1>-wt_withcd = <fs_final>-wt_withcd.
          <fs_final1>-wt_qbshb  = <fs_final>-wt_qbshb.
          <fs_final1>-qsatz      = <fs_final1>-qsatz + <fs_final>-qsatz.
        ENDIF.
        AT END OF belnr.
          <fs_final1>-qsatz = <fs_final1>-qsatz - g_qsatz.
          clear g_qsatz.
        ENDAT.
      ENDLOOP.
    Please check the code and help me.
    Thanks in advance,
    Shalem

    HI Shalem
    Please check this code:
    LOOP AT i_final ASSIGNING <fs_final>.
      AT NEW belnr.
         if <fs_final>-wt_withcd = 'SF' or
            <fs_final>-wt_withcd = 'XF' OR
            <fs_final>- wt_withcd = 'WF'.
            MOVE <fs_final> TO wa_final1.
            g_qsatz = wa_final1-qsatz.
            APPEND wa_final1 TO i_final1.
            CLEAR wa_final1.
         ENDIF.
      ENDAT.
      READ TABLE i_final1 ASSIGNING <fs_final1> WITH KEY belnr = <fs_final>-belnr.
      IF sy-subrc EQ 0.
         CASE <fs_final>-wt_withcd.
         WHEN 'SF'.
              <fs_final1>-wt_withcd1 = <fs_final>-wt_withcd.
              <fs_final1>-wt_qbshb1 = <fs_final>-wt_qbshb.
         WHEN 'XF'.
              <fs_final1>-wt_withcd2 = <fs_final>-wt_withcd.
              <fs_final1>-wt_qbshb2 = <fs_final>-wt_qbshb.
         WHEN 'WF'.
              <fs_final1>-wt_withcd = <fs_final>-wt_withcd.
              <fs_final1>-wt_qbshb = <fs_final>-wt_qbshb.
         ENDCASE.
         <fs_final1>-qsatz = <fs_final1>-qsatz + <fs_final>-qsatz.
         AT END OF belnr.
            <fs_final1>-qsatz = <fs_final1>-qsatz - g_qsatz.
            clear g_qsatz.
         ENDAT.
      ENDIF.
    ENDLOOP.
    Kind Regards
    Eswar

  • Dump GETWA_NOT_ASSIGNED assigning a Field Symbol

    i have
    DATA: W_PROG3(30) VALUE '(SAPLV56U)I_XVTTK[]'.
    ASSIGN (W_PROG3) TO  is executed i got a dump.
    Only in this case i got a dump.
    I hope somebody could help me with this

    Hello,
    I have the same Problem with another Table.  To evaluate the Problem I wrote a little testprogram with the following code:
    *& Report  ZL_FROELICHM_TEST1                                          *
    report  ZL_FROELICHM_TEST1                      .
    data: VBSK_I like  VBSK.
    data: T_KOMDLGN  like KOMDLGN occurs 10 with header line,
          T_VBFS     type table of VBFS,
          T_VBLS     type table of VBLS.
    call function 'GN_DELIVERY_CREATE'
      exporting
        VBSK_I   = VBSK_I
      tables
        XKOMDLGN = T_KOMDLGN[]
        XVBFS    = T_VBFS
        XVBLS    = T_VBLS.
    perform ASSIGN.
    *&      Form  assign
          text
    -->  p1        text
    <--  p2        text
    form ASSIGN .
      data:           NAME_TAB1(30) type C value '(SAPLV50S)XKOMDLGN'.
                     KOMDLGN type table of KOMDLGN with header line.
      field-symbols:  .
      if SY-SUBRC = 0.
       KOMDLGN = <KOMDLGN>.
      endif.
    assign: (NAME_TAB1) to <KOMDLGN>.
    if SY-SUBRC = 0.
       KOMDLGN[] = <KOMDLGN>.
    endif.
    check not KOMDLGN[] is initial.
    endform.                    " assign
    If you call Funktion 'GN_DELIVERY_CREATE' then the ASSIGN dumps.  If you don't call it, then the ASSIGN gives you a returncode 4.  The funktion works within the GN_DELIVERY_CREATE, however, the relevant coding is in the Program SAPMV50A in the performroutine USEREXIT_REFRESH_DOCUMENT.  I get the dump when the exit is called by WS_DELIVERY_UPDATE, or RV_DELIVERY_CREATE.  These functions don't know the Table XKOMDLGN.
    So, if you find a solution to your problem, please let me know.  I think I have the same problem.
    Greetings,
    Maria Frölich.

  • Using field-symbols giving dump " the output area is too small.  "

    Hi All,
    Good Afternoon.
    I  am creating a report using field-symbols. The purpose is :
    "This development involves extracting all the fields and the entire data, of any SAP table, and download it as a ‘;’ seperator file."
    For this I wrote following code:
    *& Report  ZTOOL
    REPORT  ztool1.
    Tables***************************************
    DATA : i_tab TYPE TABLE OF dfies WITH HEADER LINE.
    Variables***************************************
    DATA dref TYPE REF TO data.
    FIELD-SYMBOLS <ft> TYPE ANY TABLE." with header line.
    FIELD-SYMBOLS <fs> TYPE ANY .
    DATA: w_heading(5000),
         w_line(5000).
    CONSTANTS  sep TYPE c VALUE ';'.
    Selection Screen*********************************
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS : p_tab LIKE dfies-tabname OBLIGATORY.
    PARAMETERS : p_file(100) TYPE c .
    PARAMETERS : p_lfile(100) TYPE c .
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      CALL FUNCTION 'GET_FIELDTAB'
       EXPORTING
         langu                     = sy-langu
      ONLY                      = ' '
         tabname                   = p_tab
      WITHTEXT                  = 'X'
    IMPORTING
      HEADER                    =
      RC                        =
        TABLES
          fieldtab                  = i_tab
    EXCEPTIONS
       internal_error            = 1
       no_texts_found            = 2
       table_has_no_fields       = 3
       table_not_activ           = 4
       OTHERS                    = 5
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
         SELECT * FROM (p_tab) INTO <fs> .       
         endselect.
         CREATE DATA dref TYPE STANDARD TABLE OF (p_tab).
           ENDSELECT.
          assign dref to <fs> casting.
         ASSIGN dref->* TO <ft>.
         SELECT & FROM (p_tab) INTO table <ft>.
         OPEN DATASET p_lfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT i_tab.
      IF sy-index = 1.
        w_heading = i_tab-fieldname.
      ELSE.
      CONCATENATE w_heading i_tab-fieldname INTO w_heading SEPARATED BY sep.
      ENDIF.
    ENDLOOP.
    TRANSFER w_heading TO p_lfile.
    LOOP AT <ft> into <ft>.
    clear w_line.
      LOOP AT i_tab.
             ASSIGN COMPONENT i_tab-fieldname OF STRUCTURE <ft> TO <fs>.
             IF sy-index = 1.
                  w_line = <fs> .
             ELSE.
                  CONCATENATE w_line <fs> into w_line SEPARATED BY sep.
             ENDIF.
      ENDLOOP.
      TRANSFER w_line TO p_file.
    ENDLOOP.
    The program is executed well till the statement :
    SELECT * FROM (p_tab) INTO <fs> .       
         endselect.
    But here it gives the following dump : 
    "Error analysis
        In an Open SQL select, the output area used t
        records must be at least as wide as the datab
        records are being read.
        In this particular case, the database table i
        but the output area is only 2 bytes wide."
    Can you please help me solve this problem.
    Thanks in advance.

    Hi Abhii,
    Both are having the same number of fields.
    The only problem is with the data and time (in my scenario). Here, actual length of date is 8 and maximum length is 10. and for time the actual length is 6 and maximum length is 8.
    So, my work area it is taking only the actual length but not the maximum length because of this it is going to dump.
    Can i have any thing which also considers the maximum length of any field at a domain level so that by work area bytes should match according to the db table byte length.
    Thanks
    rohith

  • UrGENT-DUMP while querying database table into itab(Assigned field Symbol)

    Hi,
    __I am getting a dump whose description is as follows__-
    "" In an SQL array select, the internal table used to hold the
    selected records must be at least as wide as the database table
    from which the records are being read.
    In this particular case, the database table is 820 bytes wide,
    but the internal table is only 814 bytes wide.""
    The following code had been written:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_tabl TYPE dd02l-tabname.                                      "Table Name
    SELECTION-SCREEN END OF BLOCK b1.
    FIELD-SYMBOLS: <fs_itab> TYPE STANDARD TABLE,
                   <fs_wa> TYPE ANY,
                   <fs_itab1> TYPE STANDARD TABLE,
                   <fs_wa1> TYPE ANY.
    FORM generate_internal_tab .
      DATA: o_itab TYPE REF TO data,
            o_wa TYPE REF TO data,
            o_itab1 TYPE REF TO data,
            o_wa1 TYPE REF TO data.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = p_tabl
        CHANGING
          ct_fieldcat            = it_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    *Create Dynamic Table for it_fcat
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = it_fcat
        IMPORTING
          ep_table                  = o_itab
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc EQ 0 OR o_itab IS NOT INITIAL.
        ASSIGN o_itab->* TO <fs_itab>.
        CREATE DATA o_wa LIKE LINE OF <fs_itab>.
        ASSIGN o_wa->* TO <fs_wa>.
      ENDIF.
    *Download the file to Application server
        SELECT *
          FROM (p_tabl)
          INTO TABLE <fs_itab>.
    So i am geting a dump in placing contents of table(p_tabl) into <fs_itab>.Should the type declarations be changed???
    Please give me an solution to resolve this dump.
    Thanks and regards-
    Sumita

    You are trying to put more fields in the internal table than what is declared presently for itab. Check if one of the fields is selected but not being passed on to a internal table field.

  • Dump due to field symbols

    Hi ABAPper,
    I am getting dump in this statement
    ASSIGN <fs1> TO <fs3> CASTING.
    field symbols are defined as
    data: <fs1>,
             <fs3> type c.
    How to correct this dump.
    Please reply soon.
    Regards,
    Rahul

    Filed symbols data nat defined with DATA.
    you have to define them with FIELD-SYMBOLS
    like
    FIELD-SYMBOLS: <fs1>,
    <fs3> type c.
    regards
    sateesh

  • Dump while printing ALV (field symbol not assigned)

    Dear experts,
    I am trying to print an ALV report which gives dump- \
    Field symbol has not yet been assigned.
    The current ABAP program "SAPLKKBL" had to be terminated because it has
    ome across a statement that unfortunately cannot be executed.
    I am not using any field symbols in report. The printer is also configured on my system.
    I searched the forums but didnt get a stisfactory answer.
    Regards,
    Sumit Nene.

    Hi suhas! the I ran the consistency check and it shows
    The field CELLCOLOR  does not exist in the output table (LAYOUT-CTAB_FNAME)
    Though I havent used it.
    @ neeraj--
    DATA : BEGIN OF ST_MUSTER,
           SNO TYPE I,
           DATE TYPE SY-DATUM,
           PERNR TYPE P0001-PERNR,
           NACHN LIKE PA0002-NACHN,
           PA TYPE PBTXT,
           SECTN LIKE P1000-STEXT,
    *       DEPT TYPE BTRTL,
           DEPTXT LIKE T001P-BTEXT,
           ABSTYP TYPE AWART,
           ABSDAYS LIKE PA2001-ABWTG,
           VORNA LIKE PA0002-VORNA,
           BEGDA LIKE PA0002-BEGDA,
           LEAVETYPE(5),
    " LEAVE TYPE FOR PARTICULAR DAY
      LT1(10),
      LT2(10),
      LT3(10),
      LT4(10),
      LT5(10),
      LT6(10),
      LT7(10),
      LT8(10),
      LT9(10),
      LT10(10),
      LT11(10),
      LT12(10),
      LT13(10),
      LT14(10),
      LT15(10),
      LT16(10),
      LT17(10),
      LT18(10),
      LT19(10),
      LT20(10),
      LT21(10),
      LT22(10),
      LT23(10),
      LT24(10),
      LT25(10),
      LT26(10),
      LT27(10),
      LT28(10),
      LT29(10),
      LT30(10),
      LT31(10),
    " TOTAL LEAVES OF SPECIFIC TYPE FOR A MONTH
    EL_T LIKE PA2001-ABWTG,  " EARNED LEAVE
    CL_T LIKE PA2001-ABWTG,  " CASUAL LEAVE
    SL_T LIKE PA2001-ABWTG,  " SICK LEAVE
    ML_T LIKE PA2001-ABWTG,  " MATERNITY LEAVE
    OD_T LIKE PA2001-ABWTG,  " OUTDOOR DUTY
    CO_T LIKE PA2001-ABWTG,  " COMP OFF
    WO_T LIKE PA2001-ABWTG,  " WEEKLY OFF
    PH_T LIKE PA2001-ABWTG,  " PUBLIC HOLIDAY
    PRE_T LIKE PA2001-ABWTG,  "  PRESENT DAYS
    LWP_T LIKE PA2001-ABWTG,  " UNPAID LEAVE
    TOT_T LIKE PA2001-ABWTG,  " TOTAL PAID LEAVE
    ABS_T LIKE PA2001-ABWTG,  " TOTAL PAID LEAVE
    V_GT LIKE PA2001-ABWTG," GRAND TOTAL OF ALL PAID LEAVES

  • Dynamic Field-Symbol assignment - Short Dump

    Create three programs as mentioned:
    REPORT  zforms.
    *&      Form  form_fs_assign
    *       text
    FORM form_fs_assign.
      FIELD-SYMBOLS <fs> TYPE table.
      DATA: fs_itab LIKE STANDARD TABLE OF tab_matnr WITH HEADER LINE.
      break-point.
      ASSIGN ('(ZPROGRAM1)ITAB[]') TO <fs>.
      IF sy-subrc EQ 0.
        fs_itab[] = <fs>[].
        LOOP AT fs_itab.
          WRITE / fs_itab-matnr.
        ENDLOOP.
      ELSE.
        Write:/ sy-repid, 'field-symbol not assigned'.
      ENDIF.
    ENDFORM.                    "form_fs_assign
    REPORT zprogram1.
    DATA: itab LIKE STANDARD TABLE OF tab_matnr WITH HEADER LINE.
    itab-matnr = '1111'.
    APPEND itab.
    itab-matnr = '2222'.
    APPEND itab.
    WRITE:/ sy-repid.
    PERFORM form_fs_assign IN PROGRAM zforms.
    SUBMIT zprogram2.
    REPORT zprogram2.
    break-point.
    *-- enter (ZPROGRAM1)ITAB[] in the variable and press enter
    * the yellow icon stating that it doesn't exist appears
    * but when the following form is called, it does checks
    * the <fs> assign and doesnt gives any runtime error
    * while in Pricing routine, the similar situation
    * does gives the error
    PERFORM form_fs_assign IN PROGRAM zforms.
    *Execute zprogram1 and debug, works fine..*
    *Execute zprogram2, (ZPROGRAM1)ITAB[] doesn't exist, still it doesn't leads to short dump*
    *BUT, a very similar situation in a Pricing Requirment Routine leads to a short dump:*
    *Runtime Error          GETWA_NOT_ASSIGNED*
    *ShrtText    Field symbol has not yet been assigned.*
    *Pricing Routine Code Snippet:*
    *-- {3. -
    determine qualifying prior invoices in memory----
    FIELD-SYMBOLS: <fs_vbrk> TYPE table.
                FIELD-SYMBOLS: <fs_vbpa> TYPE table.
                FIELD-SYMBOLS: <fs_komv> TYPE table.
                DATA g_it_vbrk LIKE STANDARD TABLE OF vbrkvb WITH HEADER LINE.
                DATA g_it_vbpa LIKE STANDARD TABLE OF vbpavb WITH HEADER LINE.
                DATA g_it_komv LIKE STANDARD TABLE OF konv WITH HEADER LINE.
                DATA: l_vbrk_lines TYPE i.
                ASSIGN ('(SAPLV60A)XVBRK[]') TO <fs_vbrk>. <- "Error occurs here
                ASSIGN ('(SAPLV60A)XVBPA[]') TO <fs_vbpa>.
                ASSIGN ('(SAPLV60A)XKOMV[]') TO <fs_komv>.
                g_it_vbrk[] = <fs_vbrk>.
                g_it_vbpa[] = <fs_vbpa>.
                g_it_komv[] = <fs_komv>.
                DESCRIBE TABLE g_it_vbrk LINES l_vbrk_lines.
                READ TABLE g_it_vbrk INDEX l_vbrk_lines.
    ** remember to make vkorg and vtweg check for vbrk invoices
                DELETE g_it_vbrk WHERE vbeln = g_it_vbrk-vbeln.
                DELETE g_it_vbpa WHERE vbeln = g_it_vbrk-vbeln OR parvw <> 'WE'.
                DELETE g_it_komv WHERE knumv = g_it_vbrk-vbeln OR kschl <> 'ZF02' OR kbetr = 0.

    Hello friends,
    Rich,
    The piece of code you suggested didn't work, and still led to the short dump.
    Naimesh,
    I agree that XVBRK is not declared globally, and if it is a Table, and declared as global work area using Tables, we could have used it directly using ASSIGN (VBRK)...
    But, since its not the case, I am not able to do so...
    Still, my requirement remains the same. I have to get the invoices created (in memory) but not saved during a collective billing run.
    And the required data is available in the (SAPLV60A)XVBRK internal table, from which I am able to retrieve it for the first time, but clicking on the conditions tab in the item details leads to this short dump, becs (SAPLV60A)XVBRK[] isn't available at that moment. Still, if it is not available I suppose it should just set the sy-subrc to 4 instead of ending into a short-dump.
    Jürgen Hartwig,
    I know ZPROGRAM 1 can't work in ZPROGRAM 2, but it doesnt leads to the short dump either, does it? But in case of pricing it gives the run time error, this is exception I want to handle!
    XVBRK is not declared globally, but since SAPLV60A calls a perform in SAPLV61A, it remains in the ABAP stack and we can access it using (SAPLV60A)XVBRK[] kind of assignment.
    When the same is called during Item Conditions display, its PBO is in the stack but not other forms (in which it might have defined).
    Rich, is there a way to get all the variables available in scope at any instance during runtime?
    Well, Jürgen, I though it Germany it was called "schmutzig zuweisen" :-)... by the way, the same method has been used at several places in standard SAP programs with the sy-subrc check.
    Reference Data:
    when the assignment happens successfully, the ABAP Stack looks similar to:
    Call | Program   | Subroutine
    10   | SAPLV61A  | some_subrountine
    09   | SAPLV61A  | some_subrountine
    08   | SAPLV61A  | some_subrountine
    07   | SAPLV60A  | some_subrountine
    06   | SAPLV60A  | some_subrountine
    05   | SAPLV60A  | some_subrountine
    04   | SAPLV60A  | some_subrountine
    03   | SAPLV60A  | some_subrountine
    02   | SAPLV60A  | some_XKOMV_AUBE..subrountine
    01   | SAPLV60A  | PAI_some_subrountine
    when the assignment doesnt happens, the ABAP Stack looks similar to:
    04   | SAPLV61A  | some_subrountine
    03   | SAPLV61A  | some_subrountine
    02   | SAPLV61A  | some_subrountine
    01   | SAPLV60A  | PBO_some_subrountine

  • Error while trying to run Bex Query -------- Field symbol is not assigned.

    Hello Every body,
    I am facing the following error after giving some value in Selection screen and trying to run the Bex Query
    ERROR : Field symbol is not assigned.
    Thanks in advance,
    Praveen

    can u plz give details of variables, what it is build on and the value u r inputing,
    also is thr any dump.
    double click on the error message it shows u. it will give u the detailed error message. post that too

  • Field symbol has not yet been assigned. ???

    Dear Experts ,
    W hen i tried to execute my program this error appears :
    Short text
        Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLSLVC" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        You attempted to access an unassigned field symbol
        (data segment 32821).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    and Here is my CODE :
    *& Report  ZPO
    Report  ZPO1.
    type-pools slis.
      PARAMETERS : PO_Doc like EKBE-EBELN DEFAULT '4800000007'.
      PARAMETERS : Plant TYPE WERKS DEFAULT '1000'.
      PARAMETERS : PO_ORG TYPE EKORG DEFAULT ''.
      data TtlS type mara-wesch .
      data TtlH type mara-wesch .
      data Ttl type mara-wesch .
      data ZEKBE type TABLE OF EKBE.
      data ZEKBER type EKBE.
      data ZEKPO type TABLE OF EKPO.
      data ZEKPOR type EKPO.
      data ZEKKOR TYPE EKKO.
      data ZNAME1F type LFA1-LIFNR.
      data ZWGBEZF TYPE T023T-WGBEZ.
      data i type n.
      data counter type n.
    types : begin of SBAGDS,
      Serial Type n, "Purchase Order
      EBELN like EKKO-EBELN, "Purchase Order
      MATNR like EKPO-MATNR, "Material
      TXZ01 like EKPO-TXZ01, "Short Text
      MATKL like EKPO-MATKL, "Material Group
      WGBEZ like T023T-WGBEZ, "Material Group Desc"
      SUBMI like EKKO-SUBMI, "GPM
      CHARG like EKBE-CHARG, "Batch
      LIFNR like EKKO-LIFNR, "Vendor
      NAME1 like LFA1-NAME1, "Vendor Name
      RECV like mara-wesch, "Received Quantity
      REVR like mara-wesch, "Reversed Quantity
      DELV like mara-wesch, "Delivered Quantity
    end of SBAGDS .
    DATA : BAGDS TYPE SBAGDS OCCURS 0 WITH HEADER LINE.
    data Struc like BAGDS.
    data: gr_table like BAGDS OCCURS 0 WITH HEADER LINE.
    data: gt_fieldcat type slis_t_fieldcat_alv, gt_outtab type SBAGDS occurs 0 with header line.
    INITIALIZATION.
    i = 0.
    counter = 0 .
    perform field_cat_init using gt_fieldcat[].
    FORM field_cat_init using rt_fieldcat type slis_t_fieldcat_alv.
    data: ls_fieldcat type slis_fieldcat_alv,
             pos type i value 1.
    clear LS_FIELDCAT.
    *Column 1
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'Serial'.
    ls_fieldcat-SELTEXT_L      = 'Serial'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 2
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'EBELN'.
    ls_fieldcat-SELTEXT_L      = 'Purchase Order'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 3
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'MATNR'.
    ls_fieldcat-SELTEXT_L      = 'Material'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 4
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'TXZ01'.
    ls_fieldcat-SELTEXT_L      = 'Short Text'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 5
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'MATKL'.
    ls_fieldcat-SELTEXT_L      = 'Material Group'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 6
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'WGBEZ'.
    ls_fieldcat-SELTEXT_L      = 'Material Group Desc'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 7
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'SUBMI'.
    ls_fieldcat-SELTEXT_L      = 'GPM'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 8
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'CHARG'.
    ls_fieldcat-SELTEXT_L      = 'Batch'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 9
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'LIFNR'.
    ls_fieldcat-SELTEXT_L      = 'Vendor'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 10
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'NAME1'.
    ls_fieldcat-SELTEXT_L      = 'Vendor Name'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 11
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'RECV'.
    ls_fieldcat-SELTEXT_L      = 'Received Quantity'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 12
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'REVR'.
    ls_fieldcat-SELTEXT_L      = 'Reversed Quantity'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 13
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'DELV'.
    ls_fieldcat-SELTEXT_L      = 'Delivered Quantity'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    endform.
    START-OF-SELECTION.
           select SINGLE * from EKKO into ZEKKOR where EBELN = PO_DOC.
           select SINGLE * from EKPO into ZEKPOR where EBELN = PO_DOC.
           select SINGLE NAME1 from LFA1 into ZNAME1F where LIFNR = ZEKKOR-LIFNR.
    *         ' Buliding Structure
              Struc-EBELN = ZEKPOR-EBELN.
              Struc-SUBMI = ZEKKOR-SUBMI.
              Struc-LIFNR = ZEKKOR-LIFNR.
              Struc-Name1 = ZNAME1F.
           select * from EKPO into TABLE ZEKPO where EBELN = PO_Doc and WERKS = plant.
           LOOP at ZEKPO into ZEKPOR.
               select SINGLE WGBEZ from T023T into ZWGBEZF  WHERE MATKL = ZEKPOR-MATKL .
               counter = counter + 1.
    *         ' Buliding Structure
              Struc-Serial = counter.
              Struc-MATNR = ZEKPOR-MATNR.
              Struc-TXZ01 = ZEKPOR-TXZ01.
              Struc-MATKL = ZEKPOR-MATKL.
              Struc-WGBEZ = ZWGBEZF.
    *          Calcualting Debit transactions from PO History
               select * from EKBE into table ZEKBE where EBELN = PO_Doc and MATNR = ZEKPOR-MATNR and  EBELP = ZEKPOR-EBELP and BWART NOT LIKE '' and SHKZG = 'S'.
               LOOP AT ZEKBE INTO ZEKBER.
                   TtlS = TtlS + ZEKBER-MENGE.
               ENDLOOP.
    *          ' Buliding Structure
               Struc-CHARG = ZEKBER-CHARG.
               Struc-RECV = TtlS.
               Ttl = TtlS.
               clear TtlS.
    *         Calcualting Credit transactions from PO History
             select * from EKBE into table ZEKBE where EBELN = PO_Doc and MATNR = ZEKPOR-MATNR and  EBELP = ZEKPOR-EBELP and BWART NOT LIKE '' and SHKZG = 'H'.
               LOOP AT ZEKBE INTO ZEKBER.
                   TtlH = TtlH + ZEKBER-MENGE.
               ENDLOOP.
    *          ' Buliding Structure
               Struc-REVR = TtlH.
    *          Calculating Total Delivered
               Ttl = Ttl - TtlH.
               clear TtlH.
    *          ' Buliding Structure
               Struc-DELV = Ttl.
               clear Ttl.
    *      Writtng ITAB
           APPEND Struc to BAGDS.
           ENDLOOP.
    *      Reading ITAB
    *       WRITE : / , 'ITAB Begin : '    .
    *       loop at  BAGDS into Struc.
    *         counter = counter + 1.
    *         write : /,'Serial : ',counter.
    *         write : / ,'PO : ',Struc-EBELN.
    *         write : / ,'Vendor : ',Struc-LIFNR.
    *         write : / ,'Vendor Name : ',Struc-NAME1.
    *         write : / ,'Material : ',Struc-MATNR.
    *         write : /,'Short Text: ',Struc-TXZ01.
    *         write : / ,'Model : ',Struc-MATKL.
    *         write : / ,'Model Desc : ',Struc-WGBEZ.
    *         write : /,'GPM : ',Struc-SUBMI.
    *         write : /,'Lot : ',Struc-CHARG.
    *         write : /,'Received : ',Struc-RECV.
    *         write : /,'Reversed : ',Struc-REVR.
    *         write : /,'Delivered : ',Struc-DELV,/,/,/.
    *       ENDLOOP.
    * Call ALV Grid Viewer
    *BREAK-POINT.
    gr_Table[] = BAGDS[].
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
                 I_STRUCTURE_NAME   = 'SBAGDS'
                 IT_FIELDCAT          = gt_fieldcat[]
            TABLES
                 T_OUTTAB                  = gr_Table.
    Please Advise
    Edited by: Sap Sap on Jul 27, 2009 12:18 PM
    Edited by: Sap Sap on Jul 27, 2009 12:22 PM
    Edited by: Sap Sap on Jul 27, 2009 12:22 PM

    Hi,
    The problem seems to be in your ALV grid display.
    The reason must be your field catalog.
    Just check your fieldcatalog.
    The value in the fieldname field of the fieldcatalog should be same as the fieldname in your internal table and should be in capital letters.
    Probably you must have mistyped some field.
    Kinldy check.
    Regards,
    Ankur Parab

Maybe you are looking for