Short Dump in table maintenance events

Dear Experts,
I am getting a short dump when i am trying to maintain my Z table. the error is "The statement "MOVE src TO dst" requires that the operands "dst" and "src" are convertible. Since this statement is in a Unicode program, the special conversion rules for Unicode programs apply. In this case, these rules were violated.
the actual short dump is appearing at Move total to fs_zsdslsbud.
ZSDSLSBUD table has a NUMC, 4 char  field but in total internal table it is appearing as 0000####. I guess this is the error. I tried to replicate the same code where there are only char type fields and i dont have any issues with below code.
My Z table also have a currency field. How to handle the unicode conversion in this case? can i use Try and Catch statements. A piece of code would be appriciated.
Thanks in advance.
FORM f_trigger_before_save.
  DATA: wf_index TYPE sy-tabix. "Index to note the lines found
  DATA: BEGIN OF fs_zsdslsbud.
          INCLUDE STRUCTURE zsdslsbud.
          INCLUDE STRUCTURE vimtbflags.
  DATA: END OF fs_zsdslsbud.
  LOOP AT total.
    IF <action> = neuer_eintrag .
      READ TABLE extract WITH KEY <vim_xtotal_key>.
      IF sy-subrc EQ 0.
        wf_index = sy-tabix.
      ELSE.
        CLEAR wf_index.
      ENDIF.
*      (make desired changes to the line total)
      MOVE total TO fs_zsdslsbud.
      fs_zsdslsbud-ernam = sy-uname.
      fs_zsdslsbud-erdat = sy-datum.
      fs_zsdslsbud-erzet = sy-uzeit.
      total = fs_zsdslsbud.
      MODIFY total.
      CHECK wf_index GT 0.
      extract = total.
      MODIFY extract INDEX wf_index.
    ELSEIF <action> = aendern.
      READ TABLE extract WITH KEY <vim_xtotal_key>.
      IF sy-subrc EQ 0.
        wf_index = sy-tabix.
      ELSE.
        CLEAR wf_index.
      ENDIF.
*      (make desired changes to the line total)
      MOVE total TO fs_zsdslsbud.
      fs_zsdslsbud-aenam = sy-uname.
      fs_zsdslsbud-aedat = sy-datum.
      fs_zsdslsbud-aezet = sy-uzeit.
      total = fs_zsdslsbud.
      MODIFY total.
      CHECK wf_index GT 0.
      extract = total.
      MODIFY extract INDEX wf_index.
    ENDIF.
  ENDLOOP.
  sy-subrc = 0.
ENDFORM.                    "f_trigger_before_save
Thanks,
Rajesh.

Hi,
Use this FM instead of Move statement.. In Unicode environments the left and right operands should be of same data type. to over come this you can use the below FM
   CALL FUNCTION 'HR_99S_COPY_STRUC1_STRUC2'
          EXPORTING
              P_STRUCT1       = total
         IMPORTING
             P_STRUCT2       = fs_zsdslsbud.

Similar Messages

  • Short dump in table maintenance genarator

    hi all,
    in SM30  i gave my table name and clicked on maintain  it is going to short dump?
    what may be the reason?
    regards,
    siri.

    hi,
    I feel that while regeneratng table maintainence after deletion you have to come out of that completely(till SE11) and then press table maintianence generator and create... hope you might have not done the same and so is the result of that dump as the changes were not reflected..
    Regards,
    Santosh

  • Table maintenance events

    Hello,
    Does anyone has a code example of table maintenance events?
    I have a custom table ( zitab ) , with a maintenance view in SM30. I would like to use the table maintenance events for some authorisation check before the data is displayed, then, depending on the authorisation, display what the user is authorised to see. After data input, perform validation, if errors occur, inform the user what the problem is, if not, save in tha z table.
    Can this be done in sm30 or I need to write a new program?
    Thank you!

    Can someone please explain me why I have this short dump (before save event)?
    Error analysis
        The statement
          "MOVE src TO dst"
        requires the operands "dst" and "src" to be comvertible.
        Since this statement occurs in a Unicode program, the special
        convertibility rules for Unicode programs apply. In this case, the
        following rules have been broken:
    Source Code Extract
    Line  SourceCde
        1 ----
        2 ***INCLUDE LYTableF04 .
        3 ----
        4
        5 form before_save.
        6
        7 DATA: l_field_is_blank.
        8   DATA: BEGIN OF s_ytable.
        9           INCLUDE STRUCTURE ytable.
       10           INCLUDE STRUCTURE vimtbflags.
       11   DATA: END OF s_ytable.
       12
       13   LOOP AT total.
       14     CLEAR s_ytable.
    >>>>>     MOVE total TO s_table.
       16
       17   ENDLOOP.
       18
       19 endform.
    In all examples that i read on this forum this code works, I don't know why it fails for me.

  • How to use the table maintenance events for validating the input entries..?

    Hi,
    I have created a Z table with 6 fields in which all are KEY fields. All are of CHAR type. I have created the Table Maintenance Generator for the same. While maintaining the entries in the table, even though I maintain a blank entry for a field it is saving the entry. But, I don't want that way. All the fields are mandatory in my table. One should enter all the fields. Otherwise it should not allow to save the entry. So, I think it can be done using the Table Maintenance Events. can someone tell me how to use the Table Maintenance Events. and which event to use for my reuqirement and what is the logic to be written.
    Or Is there any other way to solve my problem.
    Please share your inputs. Thanks in advance.
    Best regards,
    paddu.

    In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events.In the EVENTS screen, press new Entries, there give 01(Before Saving the Data in the Database) and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write ur code.
    Here is documentation for Event 01(Before Saving the Data in the Database )
    Event 01: Before Saving the Data in the Database
    Use
    This event occurs before new, changed or deleted entries are written to the database. Other activities can be performed, for example:
    hidden entry processing
    fill hidden fields
    flag data to be written to hidden tables after the database change.
    To have the changes saved by the central maintenance dialog routines, SY-SUBRC must be set to 0 at the end of the routine.
    Realization
    This event has no standard routine. The following global data is available for the realization of the user routine:
    internal table TOTAL
    field symbols
    field symbols <ACTION> and <ACTION_TEXT>
    <STATUS>-UPD_FLAG
    If internal table data are to be changed before saving, t he changes should be made in both the internal table TOTAL and in the internal table EXTRACT.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    Regards,
    Joy.

  • Issuing an Error in Table Maintenance Event

    Hi,
    How can I issue an error in the table maintenance event without exiting the screen.
    When an event is triggered (Before Save), it will perform a check in the data changed or created. It will issue an error when the changes are not correct. But when I press enter or click on the check button, it will exit the table maintenance screen.
    What do I have to do in order to issue an error but will still go back to the table maintenance view.
    Making the message as information or type I, will not work because it will still save.

    Hi,
    I came to the same problem, maybe this will help someone.
    You can move check into view cluster event.
    1. load the view
         PERFORM vcl_set_table_access_for_obj
              USING 'view'
              CHANGING error_flag.
    2. assing to structure
         LOOP AT <vcl_total> INTO ls_view
    3. perform check, set VCL_STOP which will stop saving and will display message
         VCL_STOP = 'X'.
         MESSAGE ....

  • Problem with table maintenance event

    Hi Experts,
    In the table maintenance event 05 for a ztable, I have written logic to validate if few key fields and non key fields are not initial.
    If they are initial,need to throw an error message and it has to stay in the same screen.But right now it grays out the non key field.
    Tried the combination of events 01 and 05 it grays out the key field.
    Please let me know if there are any ways to achieve this without making modifications in the PBO or PAI of the ztable.
    Regards,
    Sridevi

    I have this exact problem, why is this thread 'closed'? Is there an answer provided somewhere?
    I have found a topic which shows an information message, which claims that the data is not saved.
    But it does save the data if you use an information message and blocks non-key fields when using an error message
    so this problem is still open for me.
    Does anybody have a solution?
    Ah an answer was indeed provided in another topic:
    Issuing an Error in Table Maintenance Event
    Edited by: Arno ter Horst on May 5, 2011 4:12 PM

  • Extended Table Maintenance Events

    Can any give me information regarding Extended Table Maintenance Events .
    Thanks,
    zia

    Hi,
    Check out these links...
    /people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance
    maintenance view event
    check this thread also..
    Re: Maintenance View Events
    Rgds,
    Prakashsingh

  • Table maintenance events DUMP

    Hello GURU's
    i have a requirement to update the table tab1 entries into another table tab2 with user and date.
    In detail, wen a user enter some thing in table tab1, the
    table one shouls have these entries and also these entries should be updated in another table tab2 with two extra field user and date.
    I have create a 01 maintenance event for tab1 'before save',
    but I have this following dump. am doing this for the First time please suggest.
    Short text
        Dynpro does not exist
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLYTEMP" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        The system attempted to use dynpro 0003 in program "SAPLYTEMP".
        This dynpro does not exist.
    Trigger Location of Runtime Error
        Program                                 SAPLYTEMP
        Include                                 LSVIMFX2
        Row                                     1.023
        Module type                             (FORM)
        Module Name                             PROCESS_DETAIL_SCREEN
    Source Code Extract
    ENDFORM.                    "naechster
    *&      Form  SET_MARK_ONLY
          Sets status flag if entry with index p_index is marked.
         -->P_index  EXTRACT-index
    FORM set_mark_only USING    p_index LIKE sy-tabix.
      DATA: rc LIKE sy-subrc.
      PERFORM check_marked USING p_index
                           CHANGING rc.
      IF rc = 0.
        <status>-mark_only = 'X'.
      ENDIF.
    ENDFORM.                               " SET_MARK_ONLY
          FORM PROCESS_DETAIL_SCREEN                                    *
    process detail screen call                                          *
    ---> MODE - C -> call mode (CALL SCREEN), S -> set mode (SET SCREEN)*
    FORM process_detail_screen USING value(mode) TYPE c.
      DATA: modulpool LIKE trdir-name,                          "#EC *
            no_input_happened(1) TYPE c,
            state_action(1) TYPE c.
      IF detail NE '0000'.
        IF mode EQ 'S'.
          SET SCREEN detail.
    >>>>   LEAVE SCREEN.
        ELSE.
          PERFORM vim_imp_call_screen USING detail.
        ENDIF.
          FORM VORIGER                                                  *
          NEXTLINE:   Index of current entry in table EXTRACT
          FIRSTLINE:  EXTRACT-index of first line shown on list screen
          L:          Line number of list screen, where entry was chosen
                      via F2
          LOOPLINES:  Number of step loop lines in list screen
    FORM voriger.
      DATA: rc LIKE sy-subrc, n TYPE i.

    Hi,
    Use this FM instead of Move statement.. In Unicode environments the left and right operands should be of same data type. to over come this you can use the below FM
       CALL FUNCTION 'HR_99S_COPY_STRUC1_STRUC2'
              EXPORTING
                  P_STRUCT1       = total
             IMPORTING
                 P_STRUCT2       = fs_zsdslsbud.

  • ABAP Table Maintenance Events

    Hello All ,
    I have created the Table Maintenance with Events .
    When the user enter the sales order number  & item in the Txn code screen of the table  .The Event  05  triggers & pulls out information for Sales Order Customer ,Material ,Plant  & show it in the  screen .
    There are two more fields for user input Valid to & Valid from , the user now fills in these fields & then press Save button in the screen .
    Now He gets the Short dump related to duplicate entries .
    I checked the standard code & it  is trying to enter data into the Internal table
    MOD_ELEM_TAB  & since already the same entry exsist in this table so program dumps out .
    Kindly suggest the way to solve this issue .
    Best regards,
    Anurag Goel .

    Check with table primary keys and if you are creating same data again and again,
    then you will get short dump..
    so keep the validation like if record already exits then give message.
    else you want to create same data again and again then create one more field and it is like count (keep as primary key ).
    Reward Points if it is helpful
    thanks
    Seshu

  • Short dump-internal table size issue

    Hi,
    I get the following message in the short dump analysis for a report.
    No storage space available for extending table "IT_920".
    You attempted to extend an internal table, but the required space was not available.
    Error Analysis:
    The internal table "IT_920" could not be enlarged further.             
    To extend the internal table, 9696 bytes of storage space was          
    needed, but none was available. At this point, the table "IT_920" has  
    1008240 entries.
    Its an old report and I saw the internal table declaration using the "OCCURS" clause in the internal table declaration.
    begin of itab occurs 100.
    end of itab.
    I tried the option of changing to "OCCURS 0", still issue persists.
    Any help would be highly appretiated
    CM

    Hello CMV,
    This is basic problem with SAP internal tables. For every internal table memory is alocated ( Max..256K)...once you cross the memory size/limit of the internal table it resuls in short dump.
    Only way to overcome this problem is handle limited number of records at a time.. 
    Please refer following sample code which will help you to avoid short dump while processing large number of records....
      SORT TAB_RESULT.
      DESCRIBE TABLE TAB_RESULT LINES W_RECORDS.
      W_LOW      = 1.
      W_UP       = 1000.
    *Spliting the records from tab_result1 by pakage of 1000 at a time
    *to avoid short dump in case of more records
      WHILE W_LOW <= W_RECORDS.
        R_PKUNWE-SIGN = 'I'.
        R_PKUNWE-OPTION = 'EQ'.
        R_WERKS-SIGN = 'I'.
        R_WERKS-OPTION = 'EQ'.
        LOOP AT TAB_RESULT FROM W_LOW TO W_UP.
          MOVE TAB_RESULT-PKUNWE TO R_PKUNWE-LOW.
          MOVE TAB_RESULT-WERKS  TO  R_WERKS-LOW.
          APPEND R_PKUNWE.
          APPEND R_WERKS.
        ENDLOOP.
    *fetch sold to party
         SELECT KUNNR NAME1
           FROM KNA1
           APPENDING CORRESPONDING FIELDS OF TABLE TAB_KNA1
           WHERE KUNNR IN R_PKUNWE.
    *fetch plant
      SELECT WERKS NAME1
             FROM T001W
             APPENDING CORRESPONDING FIELDS OF TABLE TAB_T001W
             WHERE WERKS IN R_WERKS.
       REFRESH: R_PKUNWE,
                R_WERKS.
        W_LOW = W_LOW + 1000.
        W_UP  = W_UP  + 1000.
      ENDWHILE.
    Hope this will help you to solve problem.
    Cheers,
    Nilesh

  • Table Maintenance events and field focus

    Hi all,
    In event 01(save data) of table maintenance, I have the code to ensure some fields are not left blank:
    When testing the creation of table records in SM31, it gives me the error msg successfully, but after that greys out all fields in that row except the primary keys.
    - My primary keys are already filled.
    - The mandatory field that must be filled is not filled yet, but is greyed out after the error message is given.
    How can I avoid this and set focus on the mandatory non-key field?
    My code as follows:
    ***INCLUDE LZBUSICONNF03 .
    FORM CHECKMANDATORYFIELDS.
      IF ZPWHPO_INC-HPO_NAME IS INITIAL.
    *   Enter company code
        MESSAGE e100(ZBUSICONN_MSGCLASS).
      ENDIF.
    * Validation of COMPANY_CODE
    *  IF TABLEN-company_code IS INITIAL.
    ENDFORM.

    Hello,
    To check on not key fields, you can modify the "Maintenance screens". There you can use the logic as in any other dialog program and add you own check in a PAI module.
    Rgds,
    JP

  • Extended Table Maintenance Events - 22

    Dear Friends,
       I'm trying out writing the Event 22 - Go to Long Text Maintenance for Other Languages. I have written the code in the particular interface format:
    FORM xxxxxxx USING M_MODE
    CHANGING TEXT_WA MODIF.
       After activating also it is not appearing in the table maintenance. Please suggest something.
    Regards,
    Deva.

    Hi Divya,
    whenever you attatch event in the table maintenace, you have to take care of the  following points :
    1. The table and the function group should be activated.
    2. The form routine name should be the same what you entered in the column against the event number under the form routine ( t-code : se55).
    I did attatch the event no. 22 and it is activated ..and i can see in my table maintenance.
    Regards,
    Kunal.

  • Extended Table Maintenance Events 05: Original line when copy entry?

    Hello,
    in the Extended Table Maintenance <b>Events 05</b> I want to <b>copy</b> my own tables. For that I need to know not only the newly created line, but also the original line which was the template for the copy.
    I know this line is contained in table EXTRACT, but how do I identify it?
    Is there an index pointing to the "old" line inside EXTRACT?
    Is there a work area containing the old line?
    I thought workarea EXTRACT contains the old line and <TABLE1> the new line, but debugging proofed that both are the same.
    Any idea?
    Best regards,
    Cedric

    Any body can help me?

  • Error in table maintenance event after save

    Hi,
    I would like to issue an error in table maintenace event without exiting the screen.
    When I am going to save in table maintenace then i am getting error but at the same time it is exiting table maintenace screen. I want to stay on the same screen but only want to give error message. Please can you help me in this ?
    Below is the code I have written in event:
        DATA lwa_row TYPE ztemp.
      LOOP AT total.
        clear lwa_row.
        if <vim_total_struc> is ASSIGNED.
          MOVE-CORRESPONDING <vim_total_struc> to lwa_row.
        endif.
        if <action> NE 'D' and <action> is NOT INITIAL and <action> NE 'X'.
          if lwa_row-hkont = ''.
            MESSAGE 'Please enter GL?' TYPE 'E'.
            vim_abort_saving = 'X'.
          ELSEIF lwa_row-ind = ''.
            MESSAGE 'Please enter indicator?' TYPE 'E'.
            vim_abort_saving = 'X'.
          endif.
        endif.
      ENDLOOP.
    Many Thanks.

    Hi,
    What`s event you are using, '01' ?
    And change your code to this: 'MESSAGE 'Please enter indicator?' TYPE 'S' DISPLAY LIKE 'E'.'?
    regards,
    Archer

  • Table Maintenance Events - "Event 02 After Saving the Data in the Database"

    Hi,
    Can we identify the record marked for deletion in the "Event 02 After Saving the Data in the Database" ?
    Thanks & Regards,
    Esha Raj

    Look at online documentation :
    - [Event 02: After Saving the Data in the Database|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . - [Internal Table TOTAL|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . - [Field Symbols <ACTION> and <ACTION_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . . - [Constants for Field Symbols <ACTION>, <ACTION_TEXT>, <XACT> and <XACT_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    Regards,
    Raymond

Maybe you are looking for

  • MB5B report divison-wise

    Hi Friends, I want to spool the MB5B report division-wise.  At present, there is no option to print this report divison-wise. Kindly guide me as to how to modify the existing MB5B report to get the report by division-wise. TIA. Regards, Mark K

  • How can I see the last logon of one user?

    Hi experts! I need to check the last logon of one user. How can I check that? Thanks a lot!

  • My Experience Getting a New Hard Drive

    I'm just posting this to provide some info to others who may be in the same position I was. I have the original 17" Macbook Pro. Came with around a 95 gig HD and I'd run that up to about 75-80 gigs used. It was time to get a bigger drive but I didn't

  • Location info lost between iPhone and iPhoto

    On my iPhone, i go to photos -> places, and i get a map showing where my photos were taken. I import them into iPhoto, and go to "places", and I get a blank map and a message telling me how to add the location, or to "import photos with GPS informati

  • Profit Center wise Vendor/Customer Master

    Hi We have many vendors and customer who are available to various plants. In our system, various plants have been created as profit centers. How can we have masters extended for every profit centers. Regards Vaibhav