cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete rows from an internal table for some specific condition

former_member308418
Participant
0 Kudos

Hello Experts,

Good Day,

I am designing a smartform in which i have to show some fileds in my internal table. But there is a condition that if some fileds come on my header data , those fields will not show in my internal table. But rest of the fields will show in internal table.

For example i am showing a field TVTBT-TEBEZ in my internal table.

now for some condition some of the values will not be shown in internal table (based on TETXT)

If TETXT = '0009' & '0001' the fields will not come in internal table but these fields will come in header data.

Plz tell me how to do it.

Thanks,

Tripod.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member217544
Active Contributor
0 Kudos

Hi Tripod,

In table main area, create a program lines node and write the required logic to clear out the fields atht you dont want to display on screen:

For example



if wa-TETXT = '0009'
or wa-TETXT = '0001'.

clear TVTBT-TEBEZ. " clear all the fields that you dont need to display in output.

endif.

Hope this helps.

Regards,

Swarna Munukoti.

former_member308418
Participant
0 Kudos

Hi All,

Thanks for all your help. The problem is now solved.

Tripod.

Former Member
0 Kudos

hi,

FOR SINGLE ROW SELECTION

if field_name EQ 'condition_value' .

DELETE itab FROM workarea .

ENDIF.

FOR MULTIPLE ROW SELECTION

LOOP AT itab WHERE field_name EQ 'condition_value' .

DELETE itab

ENDLOOP.

regards

Santosh

former_member205763
Active Contributor
0 Kudos

DELETE <itab> WHERE <condition>.

For further information hit an F1 on delete and do search the forum next time before posting a question as most of the time u'll easily find answers during search itself.