‎2006 Jul 17 3:26 PM
hi folks,
I am impelementing a method using one of the parameters, which is a internal table taken as an import parameter.
I am using the field symbols to <b>modify</b> the table data but it is not working.
method IF_EX_PT_ABS_ATT_COUNTRY~CALCULATE_COUNTRY.
The method CALCULATE_COUNTRY has a parameter
TIMES_PER_DAY Importing TYPE PTM_TIMES_PER_DAY.
This is the table tha t retrieves the data for the Absence infotype 2001 for an employee and has the field
ABRST value populated.
I need to clear the value for this field and update the table 'TIMES_PER_DAY' before it populates the infotype record.
Hence I am writing the code in its method by calling the parameter.
here is the piece of code....
FIELD-SYMBOLS: <F1> TYPE PTM_TIMES_PER_DAY.
loop at times_per_day into <F1> where datum eq begda.
clear <F1>-abrst.
ASSIGN <F1> to times_per_day. ****ERROR
endloop.
endmethod.
I know the error is because trying to assign the <F1> field symbol to internal table.
But how can I do that ultimately I need to update the internal table 'times_per_day '
ALSO TRIED THIS....
data: w_tab type PTM_TIMES_PER_DAY.
loop at times_per_day into w_tab where datum eq begda.
CLEAR w_tab-abrst.
modify times_per_day from w_tab transporting abrst.
endloop.
It gave an error saying the table 'times_per_day' cannot be changed.
I hope you got what I am trying to achieve here... any leads or guidelines will be really helpful,
Thanks
Vinu
‎2006 Jul 17 3:31 PM
Is this table part of the IMPORT PARAMETERS list. If that is the case you cannot change the table.
It should be in the EXPORTING parametes to change.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 Jul 17 3:33 PM
We cannot change importing parameters. We can only do it when it is in changing / exporting parameters.
Regards,
ravi
‎2006 Jul 17 4:09 PM
Yes, I got it, there is an exporting parameter, there is nothing in that table. as and when I enter the records for 2001, it is this table that gets populated.
Waht can i do here?
Thanks for your reply.
Vinu