2011 May 27 8:21 PM
Hi All,
I am getting the error:
"ME->GT_EMAIL_ATTACHMENT" IS NOT TYPE-COMPATIBLE WITH FORMAL PARAMETER "ET_EMAIL_ATTACHMENT"
and I can't see why, possibly another set of eyes can do so.
Definition:
DATA: gt_e070v TYPE tt_open_repairs,
gt_username TYPE tt_send_email,
gt_email_attachment TYPE STANDARD TABLE OF tt_formatted_message.
METHODS format_message
IMPORTING
it_e070v TYPE tt_open_repairs
EXPORTING
et_email_attachment TYPE tt_formatted_message
EXCEPTIONS
format_failed.
implementation:
*----------------------------------------------------------------------*
METHOD format_message.
DATA:
ls_e070v TYPE e070v,
ls_email_attachment LIKE LINE OF gt_email_attachment.
LOOP AT gt_e070v INTO ls_e070v.
MOVE-CORRESPONDING ls_e070v TO ls_email_attachment.
APPEND ls_email_attachment TO gt_email_attachment[].
ENDLOOP.
ENDMETHOD. "format_message
Method call:
*--Format the table so that it is more readable
CALL METHOD format_message
EXPORTING
it_e070v = gt_e070v
IMPORTING
et_email_attachment = gt_email_attachment
EXCEPTIONS
format_failed = 1.
Edited by: Keith Warnock on May 27, 2011 9:21 PM
Edited by: Keith Warnock on May 27, 2011 9:22 PM
2011 May 27 8:55 PM
Wel, I don't know what
APPEND ls_email_attachment TO gt_email_attachment[].will do. Try
APPEND ls_email_attachment TO gt_email_attachment.instead.
Rob
Hi All,
I am getting the error:
"ME->GT_EMAIL_ATTACHMENT" IS NOT TYPE-COMPATIBLE WITH FORMAL PARAMETER "ET_EMAIL_ATTACHMENT"
and I can't see why, possibly another set of eyes can do so.
Definition:
DATA: gt_e070v TYPE tt_open_repairs,
gt_username TYPE tt_send_email,
gt_email_attachment TYPE STANDARD TABLE OF tt_formatted_message.
METHODS format_message
IMPORTING
it_e070v TYPE tt_open_repairs
EXPORTING
et_email_attachment TYPE tt_formatted_message
EXCEPTIONS
format_failed.
implementation:
*----------------------------------------------------------------------*
METHOD format_message.
DATA:
ls_e070v TYPE e070v,
ls_email_attachment LIKE LINE OF gt_email_attachment.
LOOP AT gt_e070v INTO ls_e070v.
MOVE-CORRESPONDING ls_e070v TO ls_email_attachment.
APPEND ls_email_attachment TO gt_email_attachment[].
ENDLOOP.
ENDMETHOD. "format_message
Method call:
*--Format the table so that it is more readable
CALL METHOD format_message
EXPORTING
it_e070v = gt_e070v
IMPORTING
et_email_attachment = gt_email_attachment
EXCEPTIONS
format_failed = 1.
Edited by: Keith Warnock on May 27, 2011 9:21 PM
Edited by: Keith Warnock on May 27, 2011 9:22 PM
2011 May 27 8:55 PM
Wel, I don't know what
APPEND ls_email_attachment TO gt_email_attachment[].will do. Try
APPEND ls_email_attachment TO gt_email_attachment.instead.
Rob
2011 May 27 8:57 PM
hi Rob,
i had the no bracket there first and was still getting the same error. I put them in as a desperation move.
2011 May 27 9:01 PM
2011 May 27 9:05 PM
I don't have any error on syntax checks... I assume it if something wrong in my definition?
2011 May 27 9:08 PM
2011 May 27 10:17 PM
It's definitely not compatible. You have an EXPORTING parameter declared with type tt_formatted_message and the associated internal table declared with TYPE STANDARD TABLE OF tt_formatted_message. How is tt_formatted_message declared? That's the only thing missing from your post. It looks like you intend to pass a table so the definition of tt_formatted_message needs to be a table type (not a line type) and the associated definition of your internal table would use the same type (drop the STANDARD TABLE OF part).
2011 May 29 10:52 PM
Try..
DATA: gt_e070v TYPE tt_open_repairs,
gt_username TYPE tt_send_email,
gt_email_attachment TYPE tt_formatted_message.Cheers
Graham Robbo
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |