2008 Jan 11 5:52 AM
I_ITAB is same structure as a standard table.
LOOP AT i_itab INTO wa_itab.
wa_itab-flag = 'X'.
MODIFY i_ITAB FROM wa_itab.
CLEAR wa_itab.
ENDLOOP.
if CB_TESTMODE is uncheck
It update the standard table by using a FM importing table i_ITAB same structure as standard table
a report is display containing lines that have been updated and
also for which an error has occur
else. "run in only test mode
a report is display containing lines that have been updated and
also for which an error has occur
endif.
how can i cater for the error message since my table I_ITAB can only contain structure as standard tabl;e
i was thinking of declaring a new table with same structure i_itab but with additional field error status (I_ITAB_STATUS)
LOOP AT i_itab INTO wa_itab.
wa_itab-flag = 'X'.
MODIFY i_ITAB FROM wa_itab.
if sy-subrc EQ 0
update table i_ITAB_STATUS with msg successful.
else
update table i_ITAB_STATUS with msg unsuccessful.
endif
CLEAR wa_itab.
ENDLOOP.
if CB_TESTMODE is uncheck
It update the standard table by using a FM importing table i_ITAB same structure as standard table
a report is display with internal table I_ITAB_STATUS (contain both successful and unsuccessful record)
else. "run in only test mode
a report is display with internal table I_ITAB_STATUS (contain both successful and unsuccessful record)
endif.
I_ITAB is same structure as a standard table.
LOOP AT i_itab INTO wa_itab.
wa_itab-flag = 'X'.
MODIFY i_ITAB FROM wa_itab.
CLEAR wa_itab.
ENDLOOP.
if CB_TESTMODE is uncheck
It update the standard table by using a FM importing table i_ITAB same structure as standard table
a report is display containing lines that have been updated and
also for which an error has occur
else. "run in only test mode
a report is display containing lines that have been updated and
also for which an error has occur
endif.
how can i cater for the error message since my table I_ITAB can only contain structure as standard tabl;e
i was thinking of declaring a new table with same structure i_itab but with additional field error status (I_ITAB_STATUS)
LOOP AT i_itab INTO wa_itab.
wa_itab-flag = 'X'.
MODIFY i_ITAB FROM wa_itab.
if sy-subrc EQ 0
update table i_ITAB_STATUS with msg successful.
else
update table i_ITAB_STATUS with msg unsuccessful.
endif
CLEAR wa_itab.
ENDLOOP.
if CB_TESTMODE is uncheck
It update the standard table by using a FM importing table i_ITAB same structure as standard table
a report is display with internal table I_ITAB_STATUS (contain both successful and unsuccessful record)
else. "run in only test mode
a report is display with internal table I_ITAB_STATUS (contain both successful and unsuccessful record)
endif.
2008 Oct 06 7:01 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |