cancel
Showing results for 
Search instead for 
Did you mean: 

Characteristic date - calendar

Former Member
0 Kudos

Hi,

I created a characteristic date (date format). I would like to have a calendar assigned to that characteristic.

I can I do it?

Thanx

MRPINK

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member

On TA CT04 'Values' Tab (even in ECC 5.00) there is a pushbutton 'Other Value Check'. You can enter your custom F4 help FM name. Signature definition can be obtained by pressing F1 there. Caution! There should be two function modules, one with _F4 suffix, one without (later one is for input validation purposes).

Examples :

FUNCTION Z_STG_CHARNAME_VALUES.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(CHARACT_NO) LIKE CABN-ATINN

*" VALUE(CHARACT) LIKE CABN-ATNAM OPTIONAL

*" VALUE(VALUE) LIKE CAWN-ATWRT OPTIONAL

*" EXPORTING

*" REFERENCE(VALUE_NEUT) LIKE CAWN-ATWRT

*" TABLES

*" VALUES STRUCTURE RCTVALUES OPTIONAL

*"----


ENDFUNCTION.

FUNCTION z_STG_CHARNAME_values_f4.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(CHARACT_NO) LIKE CABN-ATINN

*" VALUE(CHARACT) LIKE CABN-ATNAM OPTIONAL

*" VALUE(DISPLAY) TYPE C DEFAULT SPACE

*" VALUE(ADDITIONAL_VALUES) LIKE CABN-ATSON OPTIONAL

*" VALUE(MULTIPLE_VALUES) LIKE RCTMV-ATLIS OPTIONAL

*" VALUE(LANGUAGE) LIKE SY-LANGU OPTIONAL

*" VALUE(DISPLAY_WITH_LANGUAGE) OPTIONAL

*" TABLES

*" VALUES STRUCTURE RCTVALUES

*"----


DATA: l_date TYPE WORKFLDS-GKDAY.

CALL FUNCTION 'F4_DATE'

IMPORTING

select_date = l_date

EXCEPTIONS

calendar_buffer_not_loadable = 1

date_after_range = 2

date_before_range = 3

date_invalid = 4

factory_calendar_not_found = 5

holiday_calendar_not_found = 6

parameter_conflict = 7

OTHERS = 8.

CHECK sy-subrc EQ 0 AND

l_date IS NOT INITIAL.

write l_date to values-value.

values-status = 'I'.

APPEND values.

ENDFUNCTION.

Former Member
0 Kudos

Hi

I used this code in my program but it giving me syntax error Field values-value is unknown.

Pls resolve this error , why it giving me this syntax error..

Thanks in advance

Sumit

Edited by: SumitLakhanpal on Nov 18, 2011 6:24 AM

jennifer_kramer2
Participant
0 Kudos

Works beautifully, Janos!  Thanks so much!!

I realize this post is really old - So, I am sure Sumit already resolved, but for future folks.... 

The only change I made was to the F4 function module and made the field CHARACT_NO optional. 

The other thing to clearly specify is that you need to put the Function module without the F4 suffix (in other words, the function module without any code) in the characteristic definition.  (Click on the "Values" tab.  Click the button:  "Other Value Check".  Select the radio button "Function Module".  And there - enter the function module name without the F4 suffix.   So, in Janos example -  Z_STG_CHARNAME_VALUES. 

Former Member
0 Kudos

Hello,

I am able to add a function module for Check Values within a charactaristic, however, I am wondering if you could provide a little more detail on where to add the Z* modules.....seeing as how the first does not have any code, how will it call the other module containing F4_DATE? I have attmepted to simply input F4_DATE FM into the FM Check Value with no luck. Any more detail is greatly appreciated. Thanks!

Former Member
0 Kudos

Hi VMK

As mentioned by you created 2 function modules i.e. zdms_data and zdms_date_f4.

Following are my queries:

1. What exactly you mean when you say use function module F4_date in zdms_date_f4?

2. You have mentioned, in characteristic use check values with function module; In characteristic there is no option for check value with function module. We are using Ecc 5.0

Regards

Atul

Former Member
0 Kudos

Hi MRPINK,

It is possible to have a calender F4 help in characteristic field.

Please follow the following steps:

1. create a function module ZDMS_DATE.

*"----


""Local Interface:

*" IMPORTING

*" REFERENCE(CHARACT_NO) TYPE CABN-ATINN

*" REFERENCE(CHARACT) TYPE CABN-ATNAM

*" REFERENCE(VALUE) TYPE CAWN-ATWRT

*" EXCEPTIONS

*" NOT_FOUND

*"----


No Code required in this function module.

2.create a function module ZDMS_DATE_F4

*"----


""Local Interface:

*" IMPORTING

*" REFERENCE(CHARACT_NO) LIKE CABN-ATINN OPTIONAL

*" REFERENCE(CHARACT) LIKE CABN-ATNAM OPTIONAL

*" REFERENCE(DISPLAY) OPTIONAL

*" REFERENCE(ADDITIONAL_VALUES) LIKE CABN-ATSON OPTIONAL

*" REFERENCE(MULTIPLE_VALUES) LIKE RCTMV-ATLIS OPTIONAL

*" REFERENCE(LANGUAGE) LIKE SY-LANGU OPTIONAL

*" REFERENCE(DISPLAY_WITH_LANGUAGE) OPTIONAL

*" TABLES

*" VALUES STRUCTURE RCTVALUES OPTIONAL

*"----


Use the function Module F4_DATE in this .

3. In your characteristic use check values with function module and mention the ZDMS_DATE function module.

Hope this information is useful to you.

Warm Regards,

VMK.

Edited by: vivek mohankumar on Nov 20, 2009 12:09 PM