Dump GETWA_NOT_ASSIGNED while assigning value to a field symbol

LOOP AT <table> INTO <struct>.
    CLEAR l_uom.
    lf_fieldname = '<struct>-UOM'.
    ASSIGN (lf_fieldname) TO <uom>.
    l_uom  = <uom> .
ENDLOOP.

I need to put the contents of lf_fieldname into <uom>.......when lf_fieldname is <struct>-UOM.....
so
assign lf_fieldname to <uom> is of no use...........and hence v use
assign (lf_fieldname) to <uom>
my problem is since i dont knw till the run time if UOM field is present in the table or not, and whn it's not, no mem_area is referenced in the bkgrnd and hence i get an error...........i need to knw if v have a provision to chk if (lf_fieldname) has ne value or not....
Please help....:)
Regards,
Aparna.

Similar Messages

  • Assigning a value to a field-symbol (workarea of type any)

    Dear forumers,
    I'm having a bit of difficulty in assigning a value to a field-symbol (it should be treated as a workarea of type any), but I'm given a syntax error instead:-
    The data object "<LFS_WORKAREA>" has no structure and therefore no component called "LFMON".
    What could have gone wrong and how may I resolve this (I must have missed something out)? I will still need <LFS_WORKAREA> to be defined as TYPE ANY.
    Please help. I'd appreciate any inputs at all. Thanks.
    *&      Form  FORMAT_POST_PERIOD
    *       Subroutine to format the posting period data
    *      --> PI_MBEW     Material valuation data (internal table)
    FORM format_post_period  CHANGING    pi_mbew TYPE ANY TABLE.
    " Create local field symbols
      FIELD-SYMBOLS:
      <lfs_workarea> TYPE ANY,
      <lfs_lfmon>    TYPE ckmlcr-poper.
    " Create local variables
      DATA: lv_index TYPE sy-tabix.
      DATA: lv_lfmon TYPE ckmlcr-poper.
    " Format posting periods
      LOOP AT pi_mbew ASSIGNING <lfs_workarea>.
        lv_index = sy-tabix.
        ASSIGN COMPONENT 'LFMON' OF STRUCTURE <lfs_workarea> TO <lfs_lfmon>.
        PERFORM convert_lfmon USING    <lfs_lfmon>
                              CHANGING lv_lfmon.
        MOVE lv_lfmon TO <lfs_workarea>-lfmon.   " the syntax error occurs here  :(
        MODIFY pi_mbew FROM <lfs_workarea>
          INDEX lv_index
          TRANSPORTING lfmon.
        CLEAR: <lfs_workarea>,
               <lfs_lfmon>
               lv_lfmon,
               lv_index.
      ENDLOOP.
    ENDFORM.                    " FORMAT_POST_PERIOD

    Most of us aren't in it for the points in any case...
    For your solution you've redundant code:
    *&      Form  FORMAT_POST_PERIOD
    *       Subroutine to format the posting period data
    *      --> PI_MBEW     Material valuation data (internal table)
    FORM format_post_period  CHANGING    pi_mbew TYPE ANY TABLE.
      FIELD-SYMBOLS:
      <lfs_workarea> TYPE ANY,
      <lfs_lfmon>    TYPE ckmlcr-poper.
      DATA: lv_lfmon TYPE ckmlcr-poper.
    *  DATA: lo_workarea TYPE REF TO data.   "<--Not needed, because the LOOP AT ASSIGNING below does the work
    *  CREATE DATA lo_workarea LIKE LINE OF pi_mbew.
    *  ASSIGN lo_workarea->* TO <lfs_workarea>.
      LOOP AT pi_mbew ASSIGNING <lfs_workarea>.
        ASSIGN COMPONENT 'LFMON' OF STRUCTURE <lfs_workarea> TO <lfs_lfmon>.
        PERFORM convert_lfmon USING    <lfs_lfmon>
                              CHANGING lv_lfmon.
        <lfs_lfmon> = lv_lfmon.
        CLEAR lv_lfmon.
      ENDLOOP.
    ENDFORM.                    " FORMAT_POST_PERIOD
    Here's a couple of more efficient solutions, using LOOP AT INTO.
    FORM format_post_period  CHANGING    pi_mbew TYPE INDEX TABLE. " <-- Table type a little more specific
                                                                   "<--now you can use index operations
      FIELD-SYMBOLS:
      <lfs_workarea> TYPE ANY,
      <lfs_lfmon>    TYPE ckmlcr-poper.
      DATA: lv_lfmon TYPE ckmlcr-poper,
            lv_index TYPE sytabix.
      DATA: lo_workarea TYPE REF TO data.
      CREATE DATA lo_workarea LIKE LINE OF pi_mbew.
      ASSIGN lo_workarea->* TO <lfs_workarea>.
    ASSIGN COMPONENT 'LFMON' OF STRUCTURE <lfs_workarea> TO <lfs_lfmon>.
      LOOP AT pi_mbew INTO <lfs_workarea>.
        lv_index = sy-tabix.    
        PERFORM convert_lfmon USING    <lfs_lfmon>
                              CHANGING lv_lfmon.
        <lfs_lfmon> = lv_lfmon.
        MODIFY pi_mbew FROM <lfs_workarea>
           INDEX lv_index. " <--INDEX TABLE, so this is permitted.
        CLEAR lv_lfmon.
      ENDLOOP.
    ENDFORM.                    " FORMAT_POST_PERIOD

  • How to update the value inside a field symbol ?

    ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO <fs_field>.
    <fs_field> = itab_stpo-menge.
    COLLECT <fs_line> INTO <fs_table>.
    .processing some code......
    ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO  <fs_field>.
    <fs_field> = ( itab_stpo-menge * itab_plpo-vgw03 ).
    COLLECT <fs_line> INTO <fs_table>.
    Hi, guys,
    May i know is there a way to update the value in inside a field symbol?
    I feel hard to figure out the way to solve this situation. Kindly give me some help or perhaos tell me other altenative way to do it also can.
    Thanks in advance.
    Edited by: Jiansi Lim on Apr 25, 2008 8:09 PM

    hi check this...
    For a structured data object s, you can use the statement
    ASSIGN COMPONENT comp OF STRUCTURE s TO FS.
    Here the comp is the component name or its index number in the structure.
    Find the following sample code -
    DATA: BEGIN OF LINE,
    COL1 TYPE I VALUE '11',
    COL2 TYPE I VALUE '22',
    COL3 TYPE I VALUE '33',
    END OF LINE.
    DATA COMP(5) VALUE 'COL3'.
    FIELD-SYMBOLS: <F1>, <F2>, <F3>.
    ASSIGN LINE TO <F1>.
    ASSIGN COMP TO <F2>.
    DO 3 TIMES.
    ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
    WRITE <F3>.
    ENDDO.
    ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
    WRITE / <F3>.
    The output is:
    11 22 33
    33
    I need to update one field in Internal table
    regards,
    venkat

  • Move values of one field symbol to other field symbol of different structur

    Hi all,
    i need to move values of one field symbol to other field symbol of different structure.
    I need to perform operations like MOVE-CORRESPONDING on two field symbols of different structure.
    How can i achieve this?
    field symbol 1 have 2 field and field symbol2 have 4 fields....
    Best Regards,
    Vijay.

    Hi,
    You can use -
    MOVE-CORRESPONDING <struct1> to <struc2>.
    In this case it will move the contents of the components from struct1 to struct2 that has identical names.
    You can refer this link also-
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3260358411d1829f0000e829fbfe/content.htm
    Regards,
    Sujit

  • Problem coming  while assigning  values to a particular field.

    Hi,
    I was taking MEINS data from the table ESLL  to the output.
    But as per user request some logic was to be added befor the output comes.
    Earlier i was looping in the internal table of ESLL n giving it to the o/p final table, now i changed it as follows.
         wa_final-meins = it_esll2-meins.    -R002
    ***********Start of + R002 *********
          IF it_esll2-meins = 'LE'.
            wa_final-meins = 'PU'.
          ELSEIF  it_esll2-meins = 'TAG' .
            wa_final-meins = 'DAY'.
          ELSEIF it_esll2-meins = '10'.
            wa_final-meins = 'D'.
          ELSEIF it_esll2-meins = 'STD'.
            wa_final-meins = 'HR'.
          ELSEIF it_esll2-meins = 'HAR'. 'PU' 'DAY'
            wa_final-meins = 'HA'.
          ELSE.
            wa_final-meins = it_esll2-meins.
          ENDIF.
    ***********End  of + R002 *********
    Now  the o/p comes ok,but while they trying to download to excel those o/ps which is  assinged the values like  'PU'  ' DAY '   ' D'  etc its coming as star.
    So i anticipate that its becoz i a trying to assign   character to the field MEINS  (wa_final-meins = it_esll2-meins.) which is of type ' UNIT '.
    So what to do to solve this.
    Pleae reply with your valuble suggestions.
    Regards,
    Nitin

    Hi,
    You will have to make use of the conversion exits function modules before comparing.
    CONVERSION_EXIT_CUNIT_OUTPUT
    CONVERSION_EXIT_CUNIT_INPUT
    Regards,
    Ankur Parab

  • DUMP GETWA_NOT_ASSIGNED by ASSIGN FS dynamically

    I got a DUMP  GETWA_NOT_ASSIGNED, which is triggered by the ASSIGN statement. I once raised this problem. The code is as:
    data: name3(21) value '(SAPLMBWL)IMSEG-ABLAD'.
    assign (name3) to <f>.
    here, IMSEG seems to be a interface of some FM. At last time, I was suggested to transfer the name3 to upper case. It works. But in some condition, it will also raise a DUMP. So I am thinking about there should be some other problem.
    In the DUMP text, I found this in ERROR analysis:
    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.
    I checked the loaded program in debug mode, the program SAPLMBWL is not in the loaded list. But the program can run 2 times for the ASSIGN statement, At the first time, it works fine without any problem. But at the 2nd time, it raise the DUMP.
    I think it has sth to do with the memory or objects in runtime. Is there any way to check (SAPLMBWL)IMSEG-ABLAD before the ASSIGN statement?
    How to check the active calls list mentioned in the ERROR analysis and what can be done for it? Any check?
    thanks for help.

    I had a similar problem and the SYSTEM_CALLSTACK fm seems to work perfectly.  The "TRY ... CATCH ... ENDTRY or CATCH SYSTEM-EXCEPTIONS " option dosen't seem to work because GETWA_NOT_ASSIGNED doesn't seem to be a catchable runtime error.
    Here is the code:
        IF komk-vbtyp = 'M'.
          IF ( preisfindungsart = 'A' OR preisfindungsart = 'C' ) AND (
             komk-kappl EQ 'V').
            CALL FUNCTION 'SYSTEM_CALLSTACK'
             IMPORTING
               CALLSTACK          = lt_callstack
               ET_CALLSTACK       = lt_sys_callstack.
            loop at lt_callstack assigning <ls_sys_callstack>
                                 where MAINPROGRAM = 'SAPLV60A'
                                   and BLOCKTYPE   = 'FUNCTION'.
              "See if this function calls the XVBFS global parameter and field-symbol
              select single * from FUPARAREF into ls_FUPARAREF
                                             where FUNCNAME  = <ls_sys_callstack>-BLOCKNAME
                                               and R3STATE   = 'A'      "Active
                                               and PARAMETER = 'XVBFS'  "Global parameter / field symbol
                                               and PARAMTYPE = 'T'.     "Table
              if sy-subrc = 0.
                lv_can_add_to_log = abap_true.
                exit.
              endif.
            endloop.
            if lv_can_add_to_log = abap_true.
              PERFORM vbfs_hinzufuegen_allg(saplv60a) USING
                    komk-belnr komp-kposn 'ZVSD' 'E' '002'
                    lo_rfc_result-tran_id sy-datum sy-uzeit space .
              komp-prsok = space.
            ELSE.
              MESSAGE ID 'ZVSD' TYPE 'E' NUMBER '002' WITH
              lo_rfc_result-tran_id  sy-datum sy-uzeit.
            endif.
          endif.
        endif.
    Edited by: Jake Taber on Apr 24, 2011 4:34 AM
    Edited by: Jake Taber on Apr 24, 2011 4:35 AM

  • Dump "GETWA_NOT_ASSIGNED" while implementing Remodeling

    Hello Everyone,
    i am trying to add an infoobject 0calweek with constant value using remodeling. while implementing this scenario i encountered with a short dump "GETWA_NOT_ASSIGNED" could anybody suggest any fix to this issue.
    Thanks and Regards,
    Ajay.D

    thanks

  • BCD_FIELD_OVERFLOW  error while assigning value to dynamic work area

    Hi guys,
                I am trying following code --it uses dynamic table concept.
           LABSTD2 TYPE P DECIMALS  1,
           LABST_2 TYPE P DECIMALS   1,
           LABST_12 TYPE P DECIMALS 1,
           T_ARTMAS-LABST_12 = T_ARTMAS-LABSTD1 + T_ARTMAS-LABSTD2.
           ASSIGN COMPONENT 'LABST_12' OF STRUCTURE <DYN_WA> TO <DYN_FIELD>.
           <DYN_FIELD> = T_ARTMAS-LABST_12.
    Value in T_ARTMAS-LABST_12 in debug was 14690.0....still it gave following error-----
    Runtime Error       BCD_FIELD_OVERFLOW
    Except.                CX_SY_CONVERSION_OVERFLOW
    Even i changed decleartion as follows
    LABST_12 TYPE P lenght 10 DECIMALS 1,
    Still it is giving same problem ...
    Kindly help.

    Hi, I think it has nothing to do with an overflow but something with the code. Try this simple (rather stupied) code:
    TYPES: BEGIN OF ty_line,
            fld1      TYPE p DECIMALS 1,
            fld2      TYPE p DECIMALS 1,
            fld3      TYPE p DECIMALS 1,
          END OF ty_line.
    DATA lv_rec       TYPE ty_line.
    DATA lv_count(1)  TYPE n.
    DATA lv_fld1      TYPE p DECIMALS 1.
    DATA lv_fld2      TYPE p DECIMALS 1.
    DATA lv_fld3      TYPE p DECIMALS 1.
    DATA lv_field     TYPE string.
    FIELD-SYMBOLS: <fs_fld> TYPE any.
    BREAK-POINT.
    lv_fld1 = 15211444 / 10.
    lv_fld2 = 54879072 / 10.
    lv_fld3 = lv_fld1 + lv_fld2.
    DO 3 TIMES.
      lv_count = lv_count + 1.
      CLEAR lv_field.
      CONCATENATE 'lv_rec-fld' lv_count INTO lv_field.
      CONDENSE lv_field NO-GAPS.
      ASSIGN (lv_field) TO <fs_fld>.
      <fs_fld> = lv_fld3.
    ENDDO.
    BREAK-POINT.
    Succes.

  • Dump :GETWA_NOT_ASSIGNED, while using  fm REUSE_ALV_GRID_DISPLAY

    Hi Experts,
    In the report I am using LDB pnp and outputting results with ALV,
    I am using the FM REUSE_ALV_GRID_DISPLAY,
    And I am getting the dump GETWA_NOT_ASSIGNED.
    The dump I am getting when the FM is executed.
    Thanks in Advance.
    Regards,
    IFF

    Hi,
    i faced the same problem some days ago.
    jst cleck your fieldcat.
    check fields names passed to fieldcat and should be in '  ' and in capital.
    This shd solve your problem
    Thanks & regards

  • Assigning values to 2 fields using sql statement

    db11g , apex 4.0 and firefox 24 ,
    hi all ,
    i am trying to follow this tutorial to assign values to 2 items on a page using sql statement ,
    and i am using the same sql statement the tutorial uses
    select d.loc location, count(e.empno) num_employees from dept d, emp e where d.deptno = e.deptno(+) and d.deptno = :P3_DEPTNO group by d.loc -- btw , what does the "+" sign mean?
    after the e.deptno in the where condition .
    but i am facing this error
    1 error has occurred
    Wrong number of columns selected in the SQL query. See Help of attribute for details.
    and it does not work with two columns in the select statement under any conditions , i tried to remove the group function and the group clause ,
    it does not work unless i use only one column in the select statement ??
    thanks

    Pars
    And how exactly is this rewrite of the sql statement resolving the OP's issue.
    You are still using more than 1 column which will still result in the error message:
    Wrong number of columns selected in the SQL query.
    As mentioned in my earlier post APEX 4.0 (the version the OP is using) does not handle a sql statement with multiple columns for the dynamic action Set Value.
    Which means the fastest  and simplest solution is splitting up the dynamic action in multiple Set Value actions.
    Using this plugin or upgrade to a newer apex version would also be a possibility.
    Nicolette

  • Issue while moving from string to field symbol -- waiting for help

    Hi Abap Experts,
    At present I got stucked here at client place. Please help me . Thanks in advance.
    I have a structure in field symbol. I also have data in the string (rec ty )
    I need to move it to corresponding fields in the field symbol. While moving, it is giving a dump.
    data:linetype type string,
    struc type ref to DATA.
    field-symbols: <fs> type any.
    linetype = i_strucname.
    " Get internal table and attach the field-symbol
    CREATE DATA struc type standard table OF (linetype).
    ASSIGN struc->* TO <fs>.
    <fs> = string. (dump is occuring here)

    Hi,
    My code:
    data:linetype type string,
    struc type ref to DATA.
    field-symbols: <fs> type any ,
    <f1> type any .
    linetype = i_strucname (Z structure)
    " Get internal table and attach the field-symbol
    CREATE DATA struc type standard table OF (linetype).
    ASSIGN struc->* TO <fs>.
    I need to populate the Z structure at runtime with the appropriate field values from the string.
    for example:
    input: abc \ \xyz
    structure: first ffield length 10,   " MY Z STRUCTURE
                   second field length 5
                    third field length 10.
    output: abc        xyz         
    I get the structures dynamically.

  • Assign Type conflict with field symbols

    I have two tables tab1 & tab2, want to assign field values from tab1 to tab2 suing field symbols. Deatils are :
    TYPES: BEGIN OF ty_tab1,
        item1   TYPE char20,
        item2   TYPE char20,
        val1 type i,
        val2 type i,
    END OF ty_tab1,
    BEGIN OF ty_tab2,
        item1 TYPE char20,
        item2 TYPE char20,
    END OF ty_tab2.
    DATA: it_tab1 TYPE TABLE OF ty_tab1,
                it_tab2 TYPE TABLE OF ty_tab2.
      FIELD-SYMBOLS <fs_tab1> TYPE ty_tab1.
                     <fs_tab2t> type ty_tab2.
      LOOP AT it_tab1 assigning <fs_tab1>.
        READ TABLE it_tab2  assigning <fs_tab2> WITH KEY item1 = <fs_tab1>-item1
                                                                                    item2 = <fs_tab1>-item2.
        IF sy-subrc EQ 0.
          ASSIGN COMPONENT 'ITEM1' OF STRUCTURE <fs_tab1> TO <fs_tab2>.
         ASSIGN COMPONENT 'ITEM2' OF STRUCTURE <fs_tab1> TO <fs_tab2>.
        endif.
    endloop.
    Getting error msg
    You attempted to assign a field to a typed field symbol, but the field does not have the required type.         
    whats the reason of error.
    Edited by: Matt on May 27, 2011 8:59 AM - added  tags

    Taken from example dump
    A new value is to be assigned to the field "...", although this field is
    entirely or partly protected against changes.
    The following are protected against changes:
    - Character literals or numeric literals
    - Constants (CONSTANTS)
    - Parameters of the category IMPORTING REFERENCE for functions and
    methods
    - Untyped field symbols not yet assigned a field using ASSIGN
    - TABLES parameters if the actual parameter is protected against changes
    - USING reference parameters and CHANGING parameters for FORMs, if the
    actual parameter is protected against changes and
    - Accesses using field symbols if the field assigned using ASSIGN is
    protected (or partially protected, e.g. key components of an internal
    table with the type SORTED or HASHED TABLE) against changes
    - Accesses using references, if the field bound to the reference is
    protected (or partially protected) against changes
    - External write accesses to READ-ONLY attributes,
    - Content of a shared object area instance accessed using a shared lock
    (ATTACH_FOR_READ).
    You likely fall in one of these cases. Check each and if still unsure please share your code so we can reproduce the error.
    Regards
    Marcin

  • Error in assigning *VBAP to a field-symbol...

    Hello Experts,
    I am currently writing my code in a given user-exit in VA01. My problem is,
    I want to assign the value '*VBAP' to a given field-symbol which has a type of
    ANY. The problem is, it says that the value must be a C,N. etc.
    Hope you can help me guys. Thank you and take care!

    can you please paste the piece of code here ...

  • How to dynamically assign type to a field-symbol?

    Hi,
    I have two fields in one table, one for field name and one for table name.  These can be fields in different
    tables. I need to fetch value of this field in that table. So the type of this variable can change dynamically.
    I am trying to assign type of this field dynamically to a field-symbol. I have to use this field symbol in a
    select statement.  Currently it is showing a dumb, as the field type is dec7.  For some other types it is
    working fine.
    Regards,
    Sunil

    Hi all,
    I have the same problem.
    I tried with your helps but i can't fix them.
    A message is raised "Field <fs_bet> unknown" when i used code below
    FIELD-SYMBOLS: <fs_bet> TYPE any.
    DATA: c_bet TYPE string.
    DATA it_0008 type STANDARD TABLE OF pa0008 WITH HEADER LINE.
    DO 40 TIMES.
      CONCATENATE 'BET0' index into c_bet.
      ASSIGN (c_bet) to <fs_bet> CASTING TYPE pad_amt7s  .
      select * from pa0008 into it_0008
         where <fs_bet> = '1000'
         and pernr = 32.
         append it_0008.
      ENDSELECT.
    ENDDO.
    Please help me to solve it.
    Thanks so much,
    Sophie Tran

  • Modifying value of dynamic field-symbol

    I have a requirement in which i need to access columns of a dynamic internal table , manipulate and update back to the dynamic internal table
    Names of the columns are also not fixed. This i am determing at the runtime.
    Following is the code used :
    Loop at <dyn_table> assigning <dyn_wa>.
    lv_field = p_fields " This is the field i am taking from the selection screen which needds to be manipulated.
    ASSIGN COMPONENT lv_field OF STRUCTURE <dyn_wa> TO <fs_value>.
    refresh itab.
    split <fs_value> at ',' into table itab.
    loop at itab.
    assign other fields of the source package to new splited table.
    ASSIGN <dyn_wa> TO <dyn_wa1>.
    I have to assign the valuein itab to the third field in field symbols.
    ( so the code would be added here)*******************
    append <dyn_wa1> to <dyn_table1>.
    endloop.
    endloop.
    Kindly suggest some solution for this above requiremnt.
    Regards,
    Amruta

    Hello,
    Just try to use the below codes in appropriate place and let me know if further issues..
    LOOP AT itab.
      ASSIGN COMPONENT 3 OF STRUCTURE <dyn_wa1> to <fs_value>.
      CLEAR : <fs_value>.
      <fs_value> = itab-field name.
      APPEND <dyn_wa1> TO <dyn_table1>.
    ENDLOOP.
    Thanks!

Maybe you are looking for

  • Simplified Queue functions

    The one problem with using the Queue functions is that they are all primitives. With that in mind MK and myself developed a Queue handler API that incorporates the primitive functions - as well as more advanced functions into a polymorphic VI. We hop

  • Color Banding and Color Loss during playback

    I'm experiencing weird behavior with Premiere Pro CS6. As you can see in the above images I'm experiencing banding whenever Full resolution is selected for either playback or paused. If 1/2 or lower is selected then the image looks fine (albeit not f

  • Problem while importing files in premiere CS 5.5

    Hi, We tried to import a 25 minutes video file (format Quicktime, codec H.264) in premiere CS 5.5. The process stops after importing just a couple images (between 2 and 100). The same happend with other files formate. Do anyone have an idea where the

  • Ipad1 programs are not openning

    after sync and tranfered pictures from computer to my ipad, all the purchesed programs are not openning any more, and it shows as opened in the background, but actually it just blinking !!!

  • How to enable save and archieve button in smartform output?

    How to enable save and archieve button in smartform output?