on 08-19-2010 5:38 AM
Dear, Guys no matter which Table and Field I choose to attach to the characteristic the Data Type gets pulled automatically by the R/3 Abap repository and then conflicts with data type.
error=Data Format of Check table does not match data format of characteristic.
I even tried creating a new data type in CL02 031 as DATS but still the system once you enter a table and field picks the data type automatically and it chooses date for example and conflicts.
How can I get the the calendar to popup in my characteristics under the title Date______[ ]?
Hi Muhammad,
I assume you want to see a calendar in the F4-Help of a characteristic
value when valuating an object.
Unfortunately this functionality does not exist in Standard. But you
could use your own function modules for your F4-Help. In ct04 of the
relevant characteristic please push "other value check" and choose
Function module.
Create two function modules e.g. in your own function group:
Z_TEST_WERTHILFE (< this one in ct04 at the characteristic)
Z_TEST_WERTHILFE_F4
Quelltext: Z_TEST_WERTHILFE
*****************************************
FUNCTION Z_TEST_WERTHILFE.
*"
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(CHARACT_NO) TYPE CABN-ATINN
*" REFERENCE(CHARACT) TYPE CABN-ATNAM
*" REFERENCE(VALUE) TYPE CAWN-ATWRT
*" EXCEPTIONS
*" NOT_FOUND
*"
ENDFUNCTION.
***************************************************************
This function module doesn't do anything, but nevertheless needs to be
created.
Quelltext: Z_TEST_WERTHILFE_F4
*********************************************************
FUNCTION Z_TEST_WERTHILFE_F4. *
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(CHARACT_NO) TYPE CABN-ATINN
*" REFERENCE(CHARACT) TYPE CABN-ATNAM
*" REFERENCE(ADDITIONAL_VALUES) TYPE CABN-ATSON
*" REFERENCE(MULTIPLE_VALUES) TYPE RCTMV-ATLIS
*" REFERENCE(LANGUAGE) TYPE SY-LANGU
*" REFERENCE(DISPLAY_WITH_LANGUAGE)
*" TABLES
*" VALUES STRUCTURE RCTVALUES
*" EXCEPTIONS
*" NOT_FOUND
*"
data: datum like sy-datum,
datumtab like rctvalues.
CALL FUNCTION 'F4_DATE'
*EXPORTING
DATE_FOR_FIRST_MONTH = ' '
DISPLAY = ' '
FACTORY_CALENDAR_ID = ' '
GREGORIAN_CALENDAR_FLAG = ' '
HOLIDAY_CALENDAR_ID = ' '
PROGNAME_FOR_FIRST_MONTH = ' '
IMPORTING
SELECT_DATE = datum
SELECT_WEEK =
SELECT_WEEK_BEGIN =
SELECT_WEEK_END =
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
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
datumtab-value+4(4) = datum(4).
datumtab-value2(2) = datum4(2).
datumtab-value(2) = datum+6(2).
datumtab-status = 'I'.
append datumtab to values.
ENDFUNCTION.
*****************************************************************
More information please find in the online-documentation:
>Cross-Application Components
> Classification
>characteristics
> Maintaining Values
>Entering a Function Module
I hope I could help you with this information.
Best regards,
Christoph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chiris,
I follwed your steps and created 2 fms as ZTEST_DATE and ZTEST_DATE_F4.and here is my code for F4, when i use characteristics as CHAR data type in CT04 it returns the date, but when i use Characteristics as DATE Data type in CT04 it doesn't return any value , please let me know if i am missing somewhere.
FUNCTION Z_TEST_DATE_F4.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(CHARACT_NO) TYPE CABN-ATINN
*" REFERENCE(CHARACT) TYPE CABN-ATNAM
*" REFERENCE(ADDITIONAL_VALUES) TYPE CABN-ATSON
*" REFERENCE(MULTIPLE_VALUES) TYPE RCTMV-ATLIS
*" REFERENCE(LANGUAGE) TYPE SY-LANGU
*" REFERENCE(DISPLAY_WITH_LANGUAGE)
*" TABLES
*" VALUES STRUCTURE RCTVALUES
*" EXCEPTIONS
*" NOT_FOUND
*"----------------------------------------------------------------------
data: datum like sy-datum.
DATA:datumtab like rctvalues.
CALL FUNCTION 'F4_DATE'
*EXPORTING
* DATE_FOR_FIRST_MONTH = ' '
* DISPLAY = ' '
* FACTORY_CALENDAR_ID = ' '
* GREGORIAN_CALENDAR_FLAG = ' '
* HOLIDAY_CALENDAR_ID = ' '
* PROGNAME_FOR_FIRST_MONTH = ' '
IMPORTING
SELECT_DATE = datum
* SELECT_WEEK =
* SELECT_WEEK_BEGIN =
* SELECT_WEEK_END =
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 .
IF sy-subrc <> 0.
ENDIF.
datumtab-value+4(4) = datum(4).
datumtab-value(2) = datum+4(2).
datumtab-value+2(2) = datum+6(2).
datumtab-status = 'I'.
append datumtab to values.
ENDFUNCTION.
Hi,
To use this with a Date Format Field, you need to replace this code:
datumtab-value+4(4) = datum(4).
datumtab-value(2) = datum+4(2).
datumtab-value+2(2) = datum+6(2).
datumtab-status = 'I'.
append datumtab to values.
with the following:
datumtab-value = datum.
datumtab-status = 'I'.
append datumtab to values.
Solved!!!
Abap created a small program and I used that Function Module in the characteristic.
Regards,
Ali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.