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

F4 help for DATE Characteristics using FM

Former Member
0 Likes
1,256

Hi,

I am looking for a F4 help for a characteristics , I use "Other Value Check" under VALUES Tab and called a FM called "Z_TEST_DATE" and one more FM for "Z_TEST_DATE_F4" for Possible Entries .

I kept Break Point in FM "Z_TEST_DATE_F4" and it stops there it gives POPUP using "F4_DATE"  i select a value and append back to VALUES table.

but i am not getting the value back to characteristics ..while i check the same code for anyother characteristics with Character data type(in CT04) it works fine.but for characteristics with DATE data type it is not setting the value back to assignment screen.I have converted my date to local system date also .

Characteristics created is VP_DATE ( DATE TYPE) .

my code in "_F4" is

data: datum like sy-datum,

       datumtab like rctvalues,

       lv_num              TYPE cuov_01-atflv,

       ivali TYPE API_VAL_I OCCURS 0 WITH HEADER LINE.

break 78848.

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-value(2= datum+4(2).

datumtab-value+2(2)    = datum+6(2).

datumtab-status = 'I'.

append datumtab to values.


Please help if anyone is familiar with this issue...thank you soo much in advance.

Gayathri.

Hi,

I am looking for a F4 help for a characteristics , I use "Other Value Check" under VALUES Tab and called a FM called "Z_TEST_DATE" and one more FM for "Z_TEST_DATE_F4" for Possible Entries .

I kept Break Point in FM "Z_TEST_DATE_F4" and it stops there it gives POPUP using "F4_DATE"  i select a value and append back to VALUES table.

but i am not getting the value back to characteristics ..while i check the same code for anyother characteristics with Character data type(in CT04) it works fine.but for characteristics with DATE data type it is not setting the value back to assignment screen.I have converted my date to local system date also .

Characteristics created is VP_DATE ( DATE TYPE) .

my code in "_F4" is

data: datum like sy-datum,

       datumtab like rctvalues,

       lv_num              TYPE cuov_01-atflv,

       ivali TYPE API_VAL_I OCCURS 0 WITH HEADER LINE.

break 78848.

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-value(2= datum+4(2).

datumtab-value+2(2)    = datum+6(2).

datumtab-status = 'I'.

append datumtab to values.


Please help if anyone is familiar with this issue...thank you soo much in advance.

Gayathri.

2 REPLIES 2
Read only

Former Member
0 Likes
881

Hi Gayathri,

Please declare SELECT_DATE variable of type WORKFLDS-GKDAY.

You should always declare the variables of type mentioned in the Function module.

Thanks & Regards,

Ramya

Read only

0 Likes
881

Ramya,

Thanks for the reply , But still value is not going back to characteristics value assignment screen .

and my z_test_date fm has nothing inside other than this

FUNCTION Z_TEST_DATE.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     REFERENCE(CHARACT_NO) TYPE  CABN-ATINN

*"     REFERENCE(CHARACT) TYPE  CABN-ATNAM

*"     REFERENCE(VALUE) TYPE  CAWN-ATWRT

*"  EXCEPTIONS

*"      NOT_FOUND

*"----------------------------------------------------------------------

ENDFUNCTION.