Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dump in function module

Former Member
0 Likes
414

I get following dump while execution zfunction module z_ushrm_kronos_accrual_overrid

. The message says the table zglhrmm_trans_v doesn't exist in the database whereas when I check in se11 and se16 , the table does exist with  meaningful content.

*************************

piece of code in FM throwing error is:

 

EXEC SQL.

SELECT *

INTO :zglhrmm_trans_v

FROM zglhrmm_trans_v

WHERE trans_num = :trans_num

AND UPPER(in_val_01) = :zinVAL01

Help would be appreciated..

********************************

Dump:

Runtime Errors         DBIF_DSQL2_SQL_ERROR
Except.                CX_SY_NATIVE_SQL_ERROR
Date and Time          02.06.2012 16:47:09
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Short text                                                                                        |
|    An SQL error occurred when executing Native SQL.                                              |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|What happened?                                                                                    |
|    The error 102 occurred in the current database connection "DEFAULT".                          |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Missing RAISING Clause in Interface                                                               |
|    Program                                 SAPLZGLHRM_TRANS                                      |
|    Include                                 LZGLHRM_TRANSU43                                      |
|    Row                                     1                                                     |
|    Module type                             (FUNCTION)                                            |
|    Module Name                             Z_USHRM_KRONOS_ACCRUAL_OVERRID                        |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Trigger Location of Exception                                                                     |
|    Program                                 SAPLZGLHRM_TRANS                                      |
|    Include                                 LZGLHRM_TRANSU43                                      |
|    Row                                     33                                                    |
|    Module type                             (FUNCTION)                                            |
|    Module Name                             Z_USHRM_KRONOS_ACCRUAL_OVERRID                        |
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------
|Source Code Extract                                                                               |
----------------------------------------------------------------------------------------------------
|Line |SourceCde                                                                                   |
----------------------------------------------------------------------------------------------------
|    3|*"*"Local Interface:                                                                        |
|    4|*"  IMPORTING                                                                               |
|    5|*"     REFERENCE(JOBNAME) TYPE  BTCJOB OPTIONAL                                             |
|    6|*"     REFERENCE(TRANS_NUM) TYPE  ZTRANS_NUM OPTIONAL                                       |
|    7|*"     REFERENCE(GROUP_NUM) TYPE  ZGROUP_NUM OPTIONAL                                       |
|    8|*"  CHANGING                                                                                |
|    9|*"     REFERENCE(EMP_DEMO) TYPE  ZGL_HRM_S_EMPLOYEE_DEMO_INFO OPTIONAL                      |
|   10|*"     REFERENCE(DEPENDENT) TYPE  ZGL_HRM_S_DEPENDENT_INFO OPTIONAL                         |
|   11|*"     REFERENCE(BEN_PLAN) TYPE  ZGL_HRM_S_PLAN_RECORD OPTIONAL                             |
|   12|*"     REFERENCE(PAY_DEDUCT) TYPE  ZGL_HRM_S_PAYROLL_DEDUCT OPTIONAL                        |
|   13|*"  EXCEPTIONS                                                                              |
|   14|*"      CONVERSION_ERROR                                                                    |
|   15|*"      SPECIAL_CONVERSION                                                                  |
|   16|*"----------------------------------------------------------------------                    |
|   17|                                                                                            |
|   18|*Override Accrual Profile                                                                   |
|   19|*HDEK907991                                                                                 |
|   20|  data: zrehiredt(8) type c value '20101231'.  "rehire of 12/31/2010                        |
|   21|  data: zinVAL01(40) type c .  "rehire of 12/31/2010                                        |
|   22|                                                                                            |
|   23|*  clear EMP_DEMO-ZTRANSVAL02.                                                              |
|   24|  if EMP_DEMO-dat05 > zrehiredt.                                                            |
|   25|  else.                                                                                     |
|   26|    zinVAL01 = EMP_DEMO-ZTRANSVAL02.                                                        |
|   27|    translate zinVAL01 TO UPPER CASE.                                                       |
|   28|*    select  single * from zglhrmm_trans_v                                                  |
|   29|*             where trans_num eq trans_num and                                              |
|   30|*                   ( in_VAL_01 eq zinVAL01 or                                              |
|   31|*                     in_VAL_01 eq EMP_DEMO-ZTRANSVAL02 ).                                  |
|   32|    EXEC SQL.                                                                               |
|>>>>>|       SELECT *                                                                             |
|   34|         INTO :zglhrmm_trans_v                                                              |
|   35|         FROM zglhrmm_trans_v                                                               |
|   36|       WHERE trans_num = :trans_num                                                         |
|   37|         AND UPPER(in_val_01) = :zinVAL01.                                                  |
|   38|    ENDEXEC.                                                                                |
|   39|    if sy-subrc eq 0.                                                                       |
|   40|*out_val_01 into EMP_DEMO-ZTRANSVAL02                                                       |
|   41|      if not EMP_DEMO-dat02 is initial.             "Adj Serv Dt is blank                   |
|   42|        if EMP_DEMO-dat02 < zglhrmm_trans_v-in_val_02.  "Adj Serv Dt < Val in table         |
|   43|          EMP_DEMO-ZTRANSVAL02 = zglhrmm_trans_v-out_val_01.                                |
|   44|        endif.                                                                              |
|   45|      else.                                              "Adj Serv Dt is blank use Orig Hire|
|   46|        if not EMP_DEMO-dat01 is initial.    "If Orig Hire date is not initial check for ove|
|   47|          if EMP_DEMO-dat01 < zglhrmm_trans_v-in_val_02.  "Orig Hire Dt < Val in table      |
|   48|            EMP_DEMO-ZTRANSVAL02 = zglhrmm_trans_v-out_val_01.                              |
|   49|          endif.                                                                            |
|   50|        endif.                                                                              |
|   51|      endif.                                                                                |
|   52|    endif.                                                                                  |
----------------------------------------------------------------------------------------------------

ENDEXEC.

*****************************

1 REPLY 1
Read only

venkateswaran_k
Active Contributor
0 Likes
336

Hi

First of all, what is the necessity to write Native SQL when you are managing the table using SE11 or SE16.

Anyways, ...

The Error is due to following situation.

Check the T-Code DBCON and verify the connection is perfect and test it whether you are able to connect successfully.

The Dump error clearly menthon that the connection to your database is not successfull.

Since connection thpe is Default,  check what is your database, connection type, userid and password etc...

check with your db admin or basis inorder to get the connection detail.

Plase aware if it is useful

Regards,

Venkat