07-10-2006 8:28 AM
Hi experts.
i'm trying to get the current date to field in my screen i'm wrote this code in the PBO MODULE
*----
MODULE set_Date OUTPUT.
DATA : LV_Curr_Date like ce3tamb-perbl,
LV_month(3),
LV_year(4).
LV_month = sy-datum+4(2).
concatenate '0' LV_month into LV_month.
LV_year = sy-datum(4).
concatenate LV_year LV_month into LV_Curr_Date.
S_PERBL-LOW = LV_Curr_Date.
ENDMODULE. " set_Date OUTPUT
*----
what strange is that in our dev-server its works fine but on the production it's not.
what i'm trying to do is to get the current month and year to the field S_PERBL-(Fiscal year/period block),so i'll use it for Variant to a job that will work everyday.
thanks in advance.
Gil.
07-10-2006 8:53 AM
Now that i'm thinking about it this PBO MODULE wont help me to the variant coz for example today the field get current month and year (007.2006) and after i save it to variant it'll be always (007.2006) and i want it to be dynamic.when i save the variant and want to set Dynamic date calculation to this field i see
"Dynamic date calculation write me - Not selected".
hope you can help me.
thanks.
07-10-2006 8:53 AM
Now that i'm thinking about it this PBO MODULE wont help me to the variant coz for example today the field get current month and year (007.2006) and after i save it to variant it'll be always (007.2006) and i want it to be dynamic.when i save the variant and want to set Dynamic date calculation to this field i see
"Dynamic date calculation write me - Not selected".
hope you can help me.
thanks.
07-10-2006 9:42 AM
Hi Gil!
You are a little bit confusing: you show a PBO (module pool) and talk about a report - to default values in a report, you should use event INITIALIZATION.
When you define the variant, just don't save anything for the field PERBL - there is a flag for such handling.
Is S_PERBL a range? If yes, then you have to default the internal table, not the header line. Add an 'APPEND s_perbl' after your value assignments. Also define fields SIGN = 'I' and OPTION = 'EQ'.
Regards,
Christian
07-10-2006 11:24 AM
Hi Christian!
Well the part of the INITIALIZATION event did help me.
but the part of the variant i didn't understand,
what i did is keep the PERBL field without value and when i save the variant i checked the "Save field without values" but it still no working.
thank you.
07-10-2006 12:05 PM
Hi Gil!
So one problem is solved: you can default the PERBL field in your report.
Then you had (correctly) the doubt, if this will help in case of a periodic job: the variant might be saved with '007.2006' and stay fixed.
Here the flag 'save field without values' should help: when the job starts, other fields than PERBL should come from the variant, the value of PERBL should be calculated in INITIALIZATION-event.
Do you have the append? What exactly is 'still not working'?
Regards,
Christian
P.S.: Just out of curiosity: how to get ONE point? I thought, smallest assigment is 2?
07-10-2006 12:43 PM
I have the append ,
the job stop after one sec. and i don't have any way to debug it or i do have??
when i debug it i see that the program don't do nothing
and it leaves the debuger after the first line whice is
REPORT Name.
strange!!!
Thanks!!!
P.S about my point i really don't know from were it come from .
maybe i ask question in a polite way
Message was edited by: Gil Hadida
07-10-2006 1:11 PM
I slove it.
Start-Of-Selection or else all the program will be under the INITIALIZATION.
Thank you.