Skip to Content
author's profile photo Former Member
Former Member

Smartform problem : Plz look into my code plz

Hello Korolev & Others

I hav following scenario with dump error . plz look into this , throw some light on this .

===================

Form Interface:(Table)

T_ITEM TYPE ZSD_TABL_LITEM( it’s a table type of ZSD_STRUCT_LITEM)

( T_ITEM is to pass some multiple records to layout )

Global Defin: (table)

WA_ITEM TYPE ZSD_STRUCT_LITEM(it’s a structure)

I m using a TABLE node in layout main window .

T_ITEM INTO WA_ITEM (under DATA tab)

ERROR:

An exception occurred. This exception will be dealt with in more detail

below. The exception, assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was not caught, which led to a runtime error. The reason for this exception is:

The system tried to pass internal table "T_ITEM" to the formal parameter "T_ITEM", but a type conflict occurred between the formal and the actual parameter.

The condition selected below has been violated:

(" ") The access types defined for the tables are incompatible.

The following hierarchy shows the compatibility rules:

ANY_TABLE

/ \

/ \

INDEX_TABLE HASHED_TABLE

/ \

/ \

STANDARD_TABLE SORTED_TABLE

A concrete access type is only compatible with types higher

in the hierarchy. For example, STANDARD_TABLE is compatible

with INDEX_TABLE and ANY_TABLE, but not with HASHED_TABLE.

("X") The line types of the tables are incompatible.

("X") The table keys of the tables are not identical.

(" ") One of the tables has a UNIQUE key, but the other has a

NON-UNIQUE key.

Thnx

Moni

My CODEs:

REPORT ZSD_REP_MULTI_PRINT.

TABLES :

vbak,

vbap,

vbpa,

vbfa,

VBRK,

VBRP,

LIKP,

LIPS,

KONV,

objk,

tvko,

ser01,

sadr,

equi,

makt,

mast,

t005t,

kna1,

t001w,

T001,

ADRC,

sscrfields,

zpp_plcmi, "Packing list history For Conf: Item data

zplh, "PACKING LIST HISTORY : HEADER DATA

zpli. "PACKING LIST HISTORY : ITEM DATA

DATA: FM_NAME TYPE RS38L_FNAM,

T_ITEM TYPE ZSD_TABL_LITEM OCCURS 0 ,

WA_ITEM TYPE ZSD_STRUCT_LITEM,

T_ADRS LIKE ZSD_STRUCT_ADRS OCCURS 0 WITH HEADER LINE,

MSLINES LIKE TLINE OCCURS 1 WITH HEADER LINE,

TIDNO LIKE STXL-TDID,

TNAME LIKE STXL-TDNAME,

TOBJT LIKE STXL-TDOBJECT,

SSORD LIKE VBAK-VBELN.

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.

PARAMETERS: P_DELNO LIKE LIKP-VBELN OBLIGATORY,

P_INVNO LIKE VBRK-VBELN OBLIGATORY,

P_DATE LIKE SY-DATUM.

SELECTION-SCREEN END OF BLOCK blk1.

AT SELECTION-SCREEN.

T_ADRS-INVNO = P_INVNO.

T_ADRS-INVDAT = P_DATE.

SELECT SINGLE VBELV INTO VBFA-VBELV

FROM VBFA

WHERE VBELN = P_DELNO

AND VBTYP_N = 'J' .

SSORD = VBFA-VBELV.

*Exporter's Address

SELECT SINGLE BUKRS_VF INTO VBAK-BUKRS_VF

FROM VBAK

WHERE VBELN = VBFA-VBELV.

SELECT SINGLE ADRNR

INTO T001-ADRNR

FROM T001

WHERE BUKRS = VBAK-BUKRS_VF.

SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY

INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,

T_ADRS-POST_CODE1, ADRC-COUNTRY)

FROM ADRC

WHERE ADDRNUMBER EQ T001-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-COUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

**BUYERS NO & DATE

*

  • SELECT SINGLE BSTNK BSTDK INTO (T_ADRS-BSTNK,T_ADRS-BSTDK)

  • FROM VBAK

  • WHERE VBELN = VBFA-VBELV.

*Consignee Address & Buyer Other Than Consignee

SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)

FROM LIKP WHERE VBELN = P_DELNO.

IF LIKP-KUNNR = LIKP-KUNAG.

SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR

INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,

T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,

T_ADRS-CTELF1, KNA1-ADRNR)

FROM KNA1

WHERE KUNNR = LIKP-KUNNR.

SELECT SINGLE COUNTRY INTO ADRC-COUNTRY

FROM ADRC

WHERE ADDRNUMBER EQ KNA1-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-CCOUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

T_ADRS-ONAME1 = T_ADRS-CNAME1 .

T_ADRS-ONAME2 = T_ADRS-CNAME2 .

T_ADRS-OSTREET = T_ADRS-CSTREET .

T_ADRS-OCITY = T_ADRS-CCITY.

T_ADRS-OPCODE = T_ADRS-CPCODE .

T_ADRS-OREGIO = T_ADRS-CREGIO.

T_ADRS-OTELF1 = T_ADRS-CTELF1 .

T_ADRS-OCOUNTRY = T_ADRS-CCOUNTRY.

ELSE.

SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR

INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,

T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,

T_ADRS-CTELF1, KNA1-ADRNR)

FROM KNA1

WHERE KUNNR = LIKP-KUNNR.

SELECT SINGLE COUNTRY INTO ADRC-COUNTRY

FROM ADRC

WHERE ADDRNUMBER EQ KNA1-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-CCOUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

*Buyer Other than Consignee

SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR

INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,

T_ADRS-OCITY, T_ADRS-OPCODE, T_ADRS-OREGIO,

T_ADRS-OTELF1, KNA1-ADRNR)

FROM KNA1

WHERE KUNNR = LIKP-KUNAG.

SELECT SINGLE COUNTRY INTO ADRC-COUNTRY

FROM ADRC

WHERE ADDRNUMBER EQ KNA1-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-OCOUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

ENDIF.

*Other's Ref

TIDNO = 'Z071'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-OREF = mslines-tdline(25).

EXIT.

ENDLOOP.

*Buyer's Order No Ref

TIDNO = 'Z023'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-BUYER = mslines-tdline(25).

EXIT.

ENDLOOP.

*Exporter Ref

TIDNO = 'Z072'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-XPREF = mslines-tdline(25).

EXIT.

ENDLOOP.

*Pre-Carraige By

TIDNO = 'Z074'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PCRG = mslines-tdline(25).

EXIT.

ENDLOOP.

*Place Of reciept by Pre-Carraige

TIDNO = 'Z073'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PLPCRG = mslines-tdline(25).

EXIT.

ENDLOOP.

*Vessel/Flight No

TIDNO = 'Z075'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-VFNO = mslines-tdline(25).

EXIT.

ENDLOOP.

*Port Of Loading

TIDNO = 'Z077'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PLOAD = mslines-tdline(25).

EXIT.

ENDLOOP.

*Port Of Discharge

TIDNO = 'Z076'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PDISG = mslines-tdline(25).

EXIT.

ENDLOOP.

*Final Destination

TIDNO = 'Z070'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-FDEST = mslines-tdline(25).

EXIT.

ENDLOOP.

*Terms Of Delivery & Payment

TIDNO = 'Z080'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-TERMS = mslines-tdline(50).

EXIT.

ENDLOOP.

APPEND T_ADRS.

START-OF-SELECTION.

  • SELECT SINGLE VBELV INTO VBFA-VBELV

  • FROM VBFA

  • WHERE VBELN = P_DELNO

  • AND VBTYP_N = 'J' .

*

  • SELECT * INTO TABLE T_ITEM

  • FROM VBAP

  • WHERE VBELN = VBFA-VBELV

  • ORDER BY POSNR.

*

  • LOOP AT T_ITEM.

*

  • UPRIC = T_ITEM-KZWI1 / T_ITEM-LFIMG.

  • T_ITEM-KZWI1 = UPRIC.

  • T_ITEM-KZWI2 = UPRIC * T_ITEM-LFIMG.

*

  • MODIFY T_ITEM.

  • ENDLOOP.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'Z_SD_REP_MULTI_PRINT'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

  • 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 '/1BCDWB/SF00000032'

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

T_ADRS = T_ADRS

T_ITEM = T_ITEM

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

FORM FINDTEXT.

REFRESH mslines.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = tidno

language = sy-langu

name = tname

object = tobjt

TABLES

lines = mslines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

DELETE mslines WHERE tdline IS INITIAL.

ENDFORM. "FINDTEXT

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Feb 11, 2005 at 02:33 PM

    In layout, is the T_ITEM type the same as the T_ITEM from the program?

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.