on 12-30-2008 6:32 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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к
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.