Hi,
Below is my code.
LOOP AT <t_dyntable_ord> ASSIGNING <t_line_tmp>." WHERE check EQ 'X'.
ASSIGN COMPONENT 1 OF STRUCTURE <t_line_tmp> to <tmp>.
if <tmp> = 'X'.
lv_counter = lv_counter + 1.
" LOOP AT it_index_rows INTO wa_index_rows.
ASSIGN COMPONENT 2 OF STRUCTURE <t_line_tmp> to <mat>.
SET PARAMETER ID 'MAT' FIELD <mat>.
"READ TABLE it_prd_pld INTO wa_prd_pld WITH KEY
SET PARAMETER ID 'WRK' FIELD p_werks.
CALL TRANSACTION 'MD02' AND SKIP FIRST SCREEN.
endif.
ENDLOOP.
Can we have a condition while looping the dynamic internal table?
In the above code where condition is not working for me.
I solved the problem by inserting if condition ->
ASSIGN COMPONENT 1 OF STRUCTURE <t_line_tmp> to <tmp>.
if <tmp> = 'X'.
but this will cause the performance problem.
Please sujjest.
Regards,
Prathap