2009 Feb 10 1:20 PM
HI All,
I am writing the coding in user exit.
I want to use the statement ON CHANGE OF .But this statement is obsolete statement.IT is not supporting in my code.It is not showing any systax error but it is not working properly.
What els ei can use for the statement ON CHANGE OF.
Thanks,
2009 Feb 10 1:41 PM
Hi,
I am not looping the any import parameters of exit.
In the Exit i have 2 internal table with the fields
I have
Example.
Loop at itab into wa_itab.
Reading the table itab1 into wa_itab1 .
g_filed1 = wa_itab1-field1.
On CHNAGE OF wa_itab1-field1.
g_field1 = g_field1 + 1.
endon.
endloop.
This is i have.
But here on change of is not working.
Thanks,
HI All,
I am writing the coding in user exit.
I want to use the statement ON CHANGE OF .But this statement is obsolete statement.IT is not supporting in my code.It is not showing any systax error but it is not working properly.
What els ei can use for the statement ON CHANGE OF.
Thanks,
2009 Feb 10 1:22 PM
2009 Feb 10 1:23 PM
NO,
I can'use if statement.I have to use if the wa value changes only i need to add the two values:
Thanks
2009 Feb 10 1:34 PM
Hi,
R u looping on any table parameter in user exit.
For example or assume if you are getting PO items in say it_items.
loop at it_items into wa.
if sy-tabix eq 1 or wa-ebeln ne gv_ebeln.
******************************
for same ebeln 's this logic will not be executed.
executed only when ebeln changes.
******************************
endif.
gv_ebeln = wa-ebeln.
endloop.
If this does not meet ur requirement, clearly explain the same.
Regards,
Dwaraka.S
Edited by: Dwarakanath Sankarayogi on Feb 10, 2009 2:34 PM
2009 Feb 10 1:41 PM
Hi,
I am not looping the any import parameters of exit.
In the Exit i have 2 internal table with the fields
I have
Example.
Loop at itab into wa_itab.
Reading the table itab1 into wa_itab1 .
g_filed1 = wa_itab1-field1.
On CHNAGE OF wa_itab1-field1.
g_field1 = g_field1 + 1.
endon.
endloop.
This is i have.
But here on change of is not working.
Thanks,
2009 Feb 10 1:51 PM
Hi,
Here ON CHANGE works for the loop at ITAB (to check for any field value change in ITAB) but not for ITAB1
go through the F1 help for ON CHANGE OF
In your logic u can use ON CHANGE OF if u are using LOOP AT ITAB1.
Modify the statements and try the below logic.
data gv_temp type sytabix value 1.
Loop at itab into wa_itab.
Reading the table itab1 into wa_itab1 .
if gv_temp = 1 or g_field1 ne wa_itab1-field1.
g_field1 = g_field1 + 1.
endif.
g_filed1 = wa_itab1-field1.
endloop.
Regards,
Dwaraka.S
2009 Feb 10 2:07 PM
Hi Tarangini,
Try it this way:
data:
w_index type i value 1,
w_lines type i.
describe table itab lines w_lines.
while w_index le w_lines.
read table itab into wa_itab index w_index.
*Loop at itab into wa_itab.
* Reading the table itab1 into wa_itab1 .
loop at itab1 into wa_itab1.
g_filed1 = wa_itab1-field1.
at new field1.
g_field1 = g_field1 + 1.
endat.
endloop.
w_index = w_index + 1.
endwhile.
With luck,
Pritam.