Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error message from specifications

Former Member
0 Likes
2,131

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.

11 REPLIES 11
Read only

FredericGirod
Active Contributor
0 Likes
2,056

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

Read only

former_member717457
Participant
0 Likes
2,056

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

Read only

0 Likes
2,056

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!

Read only

0 Likes
2,056

and I don't know how to show the field ZYEAR_MONTH as the format 'MM.YYYY'. Is the type wrong?

Read only

0 Likes
2,056

WRITE |{ zyear_month+4(2) }.{ zyear_month+0(4) }|.

Read only

Former Member
0 Likes
2,056

Hi, thanks for your answering.

Is it possible to convert 'YYYYMM' to 'MM.YYYY'?

Read only

FredericGirod
Active Contributor
0 Likes
2,056

You should check if there is conversion exit function based on period.

I know this kind of field exist in CO (and CO-PA)

Read only

Former Member
0 Likes
2,056

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)

Read only

former_member717457
Participant
0 Likes
2,056

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

Read only

0 Likes
2,056

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 ?

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,056

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.