cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Function Module using Macro

Former Member
0 Kudos
264

Dear All,

I have a function module ZGET_DATA

Am passing date as input parameter.

So i have defined the macro as below:

ZGET_DATA(

BUCKET_BDATE(

Row:Forecast(From M05.2009)

)

)

When i debug the function module, i see it is not picking the date, can you please tell if the definition of macro is correct?

Thanks,

Santhana.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santhana,

Look for the date in VALUE_TAB table in your FM.

Regards,

Alexander

Former Member
0 Kudos

Hi Alexender,

Thanx for your reply. I have Checked the content of value_tab but the problem is the input parameter should appear in the string field of value_tab, instead its picking up some garbage value in the value field of value_tab and the string field is empty. As a result the function module is not returning any value.

This happens when I try to pass the input values using date function bucket_bdate. If I pass the date directly as '2009/05/01'. its working fine.

Please do let me know if any changes are required in the function module or in Macro to achive the correct result.

regards

santhana

Former Member
0 Kudos

Hi Vanthana,

The value in the value field is not garbage. Here is the SAP Help: "BUCKET_BDATE( X1 ; ... ; Xn ) ... This date is expressed as an integer with reference to the date 0001/01/01".

So just add this value to reference date.

Regards,

Alexander

Former Member
0 Kudos

You need to subtract 692797 number returned from the macro and you can 'date format' the result to see the date actaul date.

Manish

Former Member
0 Kudos

Hi Manish,

Thanks for the answer. It works now.

Answers (1)

Answers (1)

Former Member
0 Kudos

For the "Row:Forecast(From M05.2009)", did you have the datasource selected as Row attributes or Column attributes??

Former Member
0 Kudos

Hi Visu,

I have defined as column attributes.