2009 Mar 04 4:41 AM
i have defined a table ZIT_ERROR_TAB which i defined in se11. but when i check the synatx of the program. it gives me
SYNTAX ERROR
Program ZGET_WORKLIST_ALL_USERS
"ZIT_ERROR_TAB" must be a flat structure. you cannot use internal
tabkes, strings, references, or structures as components.
REPORT ZGET_WORKLIST_ALL_USERS.
TABLES ZIT_ERROR_TAB.
DATA: lt_user TYPE zuser_tt,
ls_user TYPE zuser_sty.
pls let me know why iam getting this error
2009 Mar 04 5:03 AM
Hi,
You can use TABLE statement to declare a workarea only for DataBase Objects like tables and views.
Kindly make sure that the ZIT_ERROR_TAB is a DB table and is active.
Rajat
Hello,
Can you details on your table declaration.??
Is it defined as table type..?
Also in your program how you are using your table declaration.?
Regards,
Sameer
2009 Mar 04 4:44 AM
Hello,
Can you details on your table declaration.??
Is it defined as table type..?
Also in your program how you are using your table declaration.?
Regards,
Sameer
2009 Mar 04 4:51 AM
hi,
till now i haven't used the table i have just defined it in my program.
TABLES ZIT_ERROR_TAB.
also this table i have defined in se11 (this is a z Transp. Table)
2009 Mar 04 4:59 AM
HI,
ZIT_ERROR_TAB should be declared in the database as table/structure not in the program.
If you have this in the Database then check the spelling.
2009 Mar 04 5:03 AM
2009 Mar 04 4:56 AM
2009 Mar 04 5:02 AM
&----
*& Report ZGET_WORKLIST_ALL_USERS
*&
&----
*&
*&
&----
REPORT ZGET_WORKLIST_ALL_USERS.
TABLES ZIT_ERROR_TAB.
*DATA ZIT_ERROR_TAB TYPE STANDARD TABLE OF ZIT_ERROR_TAB.
*
*DATA WA_ZIT_ERROR_TAB TYPE LINE OF ZIT_ERROR_TAB.
DATA: lt_user TYPE zuser_tt,
ls_user TYPE zuser_sty.
DATA: lt_worklist TYPE uwlitemlist,
lt_messages TYPE TABLE OF swr_messag,
lt_mess_struct TYPE TABLE OF swr_mstruc.
DATA: CREATED_TIME(22) type c,
it_error_tab TYPE STRING,
wa_lt_worklist like line of lt_worklist,
go_sys_exception TYPE REF TO cx_ai_system_fault,
employee_data TYPE REF TO ZPI_CO_SI_EP003_ACTION_ITEM_MA,
output type ZPI_MT_EP003_ACTION_ITEM,
employee_rec type ZPI_DT_EP003_ACTION_ITEM_SUMMA,
employee type ZPI_DT_EP003_ACTION_ITEM_S_TAB,
n type i.
n = 1.
SELECT bname FROM usr02 INTO TABLE lt_user.
SORT lt_user.
DELETE ADJACENT DUPLICATES FROM lt_user.
LOOP AT lt_user INTO ls_user.
CLEAR lt_worklist.
CLEAR lt_messages.
CLEAR lt_mess_struct.
CALL FUNCTION 'SWN_UWL_GET_WORKLIST'
EXPORTING
user = ls_user-bname
LANGUAGE = SY-LANGU
TRANSLATE_WI_TEXT = ' '
IM_TASK_FILTER =
IM_STATUS_FILTER =
IM_ITEM_TYPE_FILTER =
IMPORTING
RETURN_CODE =
worklist = lt_worklist
DEADLINE_ITEMS =
TABLES
message_lines = lt_messages
message_struct = lt_mess_struct.
loop at lt_worklist into wa_lt_worklist.
employee_rec-USER_ID = wa_lt_worklist-USER_ID.
employee_rec-SUBJECT = wa_lt_worklist-SUBJECT.
CREATED_TIME = wa_lt_worklist-CREATED_TIME.
employee_rec-CREATED_TIME = CREATED_TIME+0(14).
employee_rec-FORWARDED_BY = wa_lt_worklist-FORWARDED_BY.
employee_rec-IDENTITY_NUMBER = n.
append employee_rec to employee.
output-MT_EP003_ACTION_ITEM-SUMMARY_EMAIL_ACTION_ITEM = employee.
clear employee_rec.
n = n + 1.
endloop.
ENDLOOP.
TRY.
CREATE OBJECT employee_data.
call method employee_data->UPLOAD_ACTION_ITEM
EXPORTING
OUTPUT = output.
commit work.
CATCH cx_ai_system_fault INTO go_sys_exception.
*it_error_tab-message = go_sys_exception->errortext.
it_error_tab = go_sys_exception->errortext.
*it_error_tab-code = go_sys_exception-code.
ENDTRY.
*WRITE it_error_tab.
2009 Mar 04 5:03 AM
Hi,
You can use TABLE statement to declare a workarea only for DataBase Objects like tables and views.
Kindly make sure that the ZIT_ERROR_TAB is a DB table and is active.
Rajat
2009 Mar 04 5:05 AM
Hi,
In ur table(ZIT_ERROR_TAB) Some component data type may be string.Then it will give that particular error.
Thanks,
Nithya
2009 Mar 04 9:26 AM
2009 Mar 04 5:16 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |