cancel
Showing results for 
Search instead for 
Did you mean: 

Dump error in smartforms

Former Member
0 Kudos

HI Experts,

I have one doubts in smartforms, i m using two SELECT SINGLE statement first SELECT SINGLE is working properly, i m getting employee name but second SELECT SINGLE is provide dump error,

i m providing below my se38 code for ur help. Plz help me as soon as possible.

-


TABLES: PERNR, PA0000, PA0001, PA0006.

*INFOTYPES: 0000, 0001, 0006.

DATA: V_FORMNAME TYPE TDSFNAME VALUE 'ZWARN_LETTER',

v_fmname type rs38l_fnam.

SELECTION-SCREEN BEGIN OF BLOCK SAN WITH FRAME TITLE Title.

PARAMETERS: EMPNO TYPE PA0000-PERNR OBLIGATORY.

SELECTION-SCREEN END OF BLOCK SAN.

DATA: ENAME LIKE PA0001-ENAME, " EMPLOYEE NAME.

STRAS LIKE PA0006-STRAS,

ORT01 LIKE PA0006-ORT01,

ORT02 LIKE PA0006-ORT02,

PSTLZ LIKE PA0006-PSTLZ,

LOCAT LIKE PA0006-LOCAT.

DATA: BEGIN OF ITAB OCCURS 0,

ENAME LIKE PA0001-ENAME, " EMPLOYEE NAME.

STRAS LIKE PA0006-STRAS,

ORT01 LIKE PA0006-ORT01,

ORT02 LIKE PA0006-ORT02,

PSTLZ LIKE PA0006-PSTLZ,

LOCAT LIKE PA0006-LOCAT.

DATA: END OF ITAB.

*SELECT SINGLE PERNR INTO ITAB-EMPNO FROM PA0000 WHERE PERNR = EMPNO.

SELECT SINGLE ENAME INTO ITAB-ENAME FROM PA0001 WHERE PERNR = EMPNO.

SELECT SINGLE STRAS FROM PA0006 INTO (ITAB-STRAS) WHERE PERNR = EMPNO .

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = v_formname

IMPORTING

FM_NAME = v_fmname

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION V_FMNAME

EXPORTING

ENAME = ITAB-ENAME.

STRAS = ITAB-STRAS.

  • ORT01 = ITAB-ORT01.

  • ORT02 = ITAB-ORT02.

  • PSTLZ = ITAB-PSTLZ.

  • LOCAT = ITAB-LOCAT.

Regards,

Swapnika

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

This is where the problem is:

CALL FUNCTION V_FMNAME
EXPORTING
ENAME = ITAB-ENAME.
STRAS = ITAB-STRAS.

    * ORT01 = ITAB-ORT01.
    * ORT02 = ITAB-ORT02.
    * PSTLZ = ITAB-PSTLZ.
    * LOCAT = ITAB-LOCAT.

I would rather suggest you have a structure defined in the Tables tab in Form Interface and then pass on the data to it. So, put all the values into a table and pass it on to the smartform instead of doing it like this.

Vishwa.

Former Member
0 Kudos

hi,

Instead of

SELECT SINGLE STRAS FROM PA0006 INTO (ITAB-STRAS) WHERE PERNR = EMPNO .

Write this way...

SELECT SINGLE STRAS INTO ITAB-STRAS FROM PA0006 WHERE PERNR = EMPNO .

Former Member
0 Kudos

thx for reply, but i have already done like this, Avinash

Former Member
0 Kudos

HI,

In FM

CALL FUNCTION V_FMNAME

EXPORTING

ENAME = ITAB-ENAME.

STRAS = ITAB-STRAS.

ORT01 = ITAB-ORT01.

ORT02 = ITAB-ORT02.

PSTLZ = ITAB-PSTLZ.

LOCAT = ITAB-LOCAT.

Here ITAB is the Internal table. So we can't directly pass internal table values.

Try like this,

just change the declarations.

data : itab-ename type table value,

itab-stras type table value.

Select statements.

call FM

Former Member
0 Kudos

THX FRIEDS, MY PROBLEM IS SOLVED

Thanks alot to all of u.

Former Member
0 Kudos

Hi,

If u r using only one of the primary keys of table in the where condition then u should use

select.. UP to 1 rows

select single should be used only when u have all ur keys in where condition or else it may satisfy more than one record and may be thats the reason for dump.

кu03B1ятu03B9к

Former Member
0 Kudos

Thx for immediate reply, but i have used same coding in other normal SE38 report it provide exact and proper data. But in the smart form it gives error in function module.

regards,

swapnika

Former Member
0 Kudos

Can u provide us with text of the dump.