Skip to Content
avatar image
Former Member

Dump error in smartforms

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 30, 2008 at 06:38 AM

    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к

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 30, 2008 at 06:39 AM

    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 .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 30, 2008 at 06:58 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded