‎2021 Jan 11 6:32 AM
There's a field called 'ZYEAR_MONTH' on selection screen, and its type is S031-Spmon, because I'd like to lay this files out as 'MM.YYYY',
1)confused about which type of 'ZYEAR_MONTH' should be.
2)and in the SQL , I'd select ~ from MSEG where BUDAT_MKPF In @S_ZYEAR, but there issues an error : the type of 'MSEG-Budat_MkPF' and the type of 'S_ZYEAR' is not compatible.
How to deal with it?
Thank you.
‎2021 Jan 11 7:01 AM
It is difficult to help you, as we do not know your requierment.
for the S_YEAR, you have to create a ranges and use the value of S_YEAR to convert it in S_BUDAT. The convertion could be difficult, it depends if you allow the Intervals & the Extension
‎2021 Jan 11 7:24 AM
Hello,
parameters: p_lfmon like mbewh-lfmon. " Month
parameters: p_lfgja like mbewh-lfgja. " Year
BUDAT_MKPF - not possible to pass only month & year (MM.YYYY), in that case
apply along with date example if the month is October and the year is 2020-->
01.10.2020 to 30.10.2020.
Thanks
Sathish Kumar Sidhaiyan
‎2021 Jan 11 7:41 AM
Hi, Competely understand your suggeation, as what I'm confused about,
I wonder if it's possible to select~ where month of MSEG-BUDAT_MKPF = @S_ZYAER ?
Thank you!
‎2021 Jan 11 7:50 AM
and I don't know how to show the field ZYEAR_MONTH as the format 'MM.YYYY'. Is the type wrong?
‎2021 Jan 11 10:43 AM
‎2021 Jan 11 7:34 AM
Hi, thanks for your answering.
Is it possible to convert 'YYYYMM' to 'MM.YYYY'?
‎2021 Jan 11 7:37 AM
You should check if there is conversion exit function based on period.
I know this kind of field exist in CO (and CO-PA)
‎2021 Jan 11 7:45 AM
OK, and may I ask if it's possible to select~ where the month of MSEG-BUDAT_MKPF = @S_ZYEAR?
(the type of S_ZYEAR type char7)
‎2021 Jan 11 10:38 AM
you cannot filter date field as MM.YYYY. So only said if you know month and year specify 01 to 31st along with month and year. this is only the possible way.
Otherwise raise OSS note to SAP.
Thanks
Sathish Kumar Sidhaiyan
‎2021 Jan 12 5:34 AM
Thanks for your answering!
As your suggestion , if I convert the S_ZYEAR to a RANGE type, what should I fill into the LOW value and the HIGH value ?
‎2021 Jan 11 2:40 PM
Check for the many data elements associated to a domain with a type of ACCP and carrying a conversion exit similar to BCVMN (convert according to user settings as MM.YYYY)
But you won't be able to use it in the WHERE clause on a database table without such field, you must convert it to a selection of year GYEAR and period POPER or to a range of posting dates BUDAT with a FM such as FIRST/LAST_DAY_IN_PERIOD_GET.
NB: You will require the Fiscal Year Variant associated to the company code for any special period.