cancel
Showing results for 
Search instead for 
Did you mean: 

call function in abap routine of infopackage

Former Member
0 Kudos

Experts,

Good day. I have a problem concerning the data to be imported in my ods.I can't find a similar thread corcerning my problem. My ‘File date’ field should contain only 2 years and 3months data of recent data. I'm using a call function fima_date_create to filter values of zfile_date.

CALL FUNCTION 'FIMA_DATE_CREATE'

EXPORTING

I_DATE = sy-datum

I_FLG_END_OF_MONTH = ' '

I_YEARS = 2-

I_MONTHS = 3-

I_DAYS = 0

I_CALENDAR_DAYS = 0

I_SET_LAST_DAY_OF_MONTH = ' '

IMPORTING

E_DATE =

E_FLG_END_OF_MONTH =

E_DAYS_OF_I_DATE =

The sy-datum becomes the “High” value and the date generated by this FM will be the “low” value. I already tested this function module and it is what i want. How Should I write the ABAP code for this in the abap routine for my infopackage? Or what steps do I need to take.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

When you choose the option to write a routine for one of the characteristics in the infopackage selections, you get a window to write your code with some prewritten code as below. Modify it as shown below, for your requirement.

data: l_idx like sy-tabix.

read table l_t_range with key

fieldname = 'CALDAY'.

l_idx = sy-tabix.

*....

  • START of YOUR CODE

<----


Required logic -


>

L_T_RANGE-LOW = <lower limit of range>.

L_T_RANGE-HIGH = <upper limit of range>.

L_T_RANGE-SIGN = 'I'.

L_T_RANGE-OPTION = 'BT'.

  • END of YOUR CODE

modify l_t_range index l_idx.

p_subrc = 0.

Hope this helps.

Answers (0)