cancel
Showing results for 
Search instead for 
Did you mean: 

USING DATE_CONVERT_TO_FACTORYDATE

Former Member
0 Kudos

i AM TRYING TO USE THE fm IN MY CODE BUT AND ALL THE EXAMPLES SHOW IT LIKE BELOW BUT WHEN i LOOK AT THE FM IN SE37 THE EXPORT AND INPORT SEEM FLIPPED. cAN SOMEBODY EXPALING

CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'

EXPORTING

date = p_paydate "Starting date

factory_calendar_id = 'GB'

IMPORTING

factorydate = gd_factorydat. "Factory calender date

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi LMM,

Quite simple actually...

When looking into your calling code (with code CALL FUCNTION ...)

the exporting params are passed from the calling program from to the function module. The calling program then imports the result from the function module.

Now when you go look into SE37 FM maintenance, the receiving code (with code FUNCTION ...)

the importing params are the ones it receives from the calling program and it subsequently exports the result back to this calling program.

Importing and exporting are switched because of switched viewpoints, one from calling end , one from receiving end.

Hope I was clear.

Please assign points if usefull.

Best regards,

Olav

Answers (3)

Answers (3)

Former Member
0 Kudos

helo,

iam currently using date_convert_to_factorydate Function Module which is not calculating the satudays & sundays.is there any alternative which checks saturdays & sundays with out changing this FM.plz kindly let me know.

With Regards,

Deepthi Dandibhotla.

Former Member
0 Kudos

Hi,

You are using the parameter 'FACTORYDATE' for the result of the conversion.

This is not needed. Use the export parameter (from the function module viewpoint) 'DATE' and you will be ok.

Please assign points if usefull.

Best regards,

Olav

Former Member
0 Kudos

Oh yes I rmeber that thanks! So I have another question for you. I am passing in a date form a query and converting this to a factorydate. I've tried to append this to e-t-range but it won't let me because it is a differnt format. Do I need to create a formula varialbe so i can pass this nubmer back in?