‎2007 May 23 10:51 AM
Hi,
i'm creating a Function module in SE37 and i would like to have a default value for my IMPORT parameter (import tab) which is a date that should be set to the actual date - 3 days.
I can't specify sy-datum - 3 and it does not recognize any variable i declare in the source tab.
Is there a way to do this ?
‎2007 May 23 10:54 AM
Hi,
in your FM , check if your parameter is empty, if it is assign actual date - 3 in in before processing!
Regards,
Sooness.
‎2007 May 23 10:54 AM
Hi,
in your FM , check if your parameter is empty, if it is assign actual date - 3 in in before processing!
Regards,
Sooness.
‎2007 May 23 10:55 AM
Hi Tomislav,
Instead of trying to do it in IMPORT tab why don't you set the imported DATE field in the SOURCE CODE of function module. There it will recognise sy-datum and you can very well write.
date = sy-datum - 3.
Award points if found useful.
Regards
Indrajit.
‎2007 May 23 10:57 AM
Hi,
You can check for the field, if its is blank then assign the default date in source code before processing.
Thanks
Sandeep
Reward if helpful
‎2007 May 23 12:21 PM
Thanks for your answers.
I'm not sure it answers my question : i want the default value to be visible when i test it (i'm going to use this fm with a web service from another app so the fact that the default value is visible is important so it can be changed if not corresmonding to the user needs) and if i just affect a value in my source code, it changes the value of the parameter but this is not visible at selection screen
‎2007 May 23 12:26 PM
Hello,
Did you try calculating the value of your parameter before calling the FM (ie date - 3 if the value is empty) and displaying it directly before the call so the user can still change it?
‎2007 May 23 12:56 PM
Hello Walter,
i'm not sure i can do this because i'm going to create a web service with this function module so if i set my value in a program before i assume it won't be set (and as far as i know, i can't generate a webservice from a program but only from a FM...).
Anyway, i'm going to try your way, thanks a lot