Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

please advise

Former Member
0 Likes
313

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.

1 REPLY 1
Read only

Former Member
0 Likes
285

slove