2006 Feb 22 3:07 AM
Hi Experts,
Can we go for mutiple selection in our own Function Module? How we can go for mutiple selection in our own Function Module? Anyone help me.
Example:
we have to give multiple input values for company code when we execute the function module .
suppose import parameter are
company code 3000
4000
5000
6000
plant 3215
matnr 100002992
i have to select the records based on this multiple company codes.Here i want multiple selection for company code.
2006 Feb 22 7:49 AM
Hi again,
1. Simple.
2.
REPORT abc.
PARAMETERS : a(30) TYPE c DEFAULT '1012345'.
PARAMETERS : num TYPE i DEFAULT 5.
DATA : l TYPE i.
DATA : pos TYPE i.
l = STRLEN( a ).
pos = l - num .
WRITE 😕 a+pos(num).
regards,
amit m.
2006 Feb 22 3:10 AM
Hi,
You can use the Tables parameter & pass mutiple values to the function module.
Regards,
Suresh Datti
2006 Feb 22 3:14 AM
Hi ,
I agree with Suresh.
It is my mistake I thought you are using standard function.
Lanka
Message was edited by: Lanka Murthy
Message was edited by: Lanka Murthy
2006 Feb 22 3:37 AM
Hi Suresh,
can you explain me detaily with example?
Hi Lanka,
i want multiple selection for TCode. i can define TCode as a parameter. but i cant pass it to Function module.because there is no import parameter for Tcode in that function module(CHANGEDOCUMENT_READ_HEADERS).
Thats the problem.
Can anyone help me how to do?
Thanks
Silviya T
2006 Feb 22 3:40 AM
Silviya,
AREN'T YOU TALKING ABOUT YOUR own FUNCTION MODULE? You have control over the parameters. In SE37 define them on the tabs provided.
2006 Feb 22 3:41 AM
Hi Silvia,
As you mentioned it was a custom function module, create a Tables parameter with TSTC as the ref structure. You can then pass multiple values by filling each Tcode in the TCODE field of this table.
Regards,
Suresh Datti
2006 Feb 22 3:43 AM
Hi ,
Earlier I thought that you are using standard function.
It is a own Function Module. Then define a table parameter using T/code SE37 --> as TSTC reference to TSTC.
Then you can add multiple T/codes to this table.
Lanka
2006 Feb 22 4:43 AM
Hi Experts,
There is one input parameter No.of.days.
if we input 3 as a no.of.days.
it should calculate
date = sy-datum - 3.
output should be
sy-datum : 22.02.2006
date: 19.02.2006.
how we can get this format?
2006 Feb 22 4:48 AM
Hi Silvia,
Was your earlier question resolved? Anyway, you can use the following code for the latest Question..
parameters: p_days type i.
data: p_date type sy-datum
p_date = sy-datum - p_days.
write: / sy-datum mm/dd/yyyy, p_date mm/dd/yyyy.
Regards,
Suresh Datti
P.S. Pl reward helpful answers
2006 Feb 22 4:49 AM
hi,
you can do this..
data : dat1 like sy-datum ,dat2 like sy-datum.
parameters : p type p.
dat1 = sy-datum.
p = dat1.
p = p - 3.
dat2 = p.
write : / sy-datum , dat2.regards
satesh
2006 Feb 22 4:49 AM
Hi silviya,
1. U already have the answer.
2.
REPORT abc.
PARAMETERS : d TYPE sy-datum DEFAULT sy-datum.
DATA : mydate TYPE sy-datum.
mydate = d - 3.
WRITE mydate.
regards,
amit m.
2006 Feb 22 4:49 AM
HI silviya
you can use the functional module
RP_CALC_DATE_IN_INTERVAL which is used for Add/subtract years/months/days from a date
regards
kishore
2006 Feb 22 7:27 AM
Hi experts,
I have one input parameter as size in selection screen.when we input as 5 in size.
suppose 'A' has value 1012345
value B should be last 5 digit of value A according to the size value (5) in selection screen.
B should be 12345.
how can we do?
Thanks,
Silviya T
2006 Feb 22 4:37 AM
Hi sivliya,
1. What is ur exact requirement ?
What i understand is :
-
2. There is a normal report,
and it has a parameter / select-option for TCODE.
3. Now the user enter some data in this
parametert / select -option for tcode
and u want to pass these values
to your FM ?
regards,
amit m.
2006 Feb 22 7:49 AM
Hi again,
1. Simple.
2.
REPORT abc.
PARAMETERS : a(30) TYPE c DEFAULT '1012345'.
PARAMETERS : num TYPE i DEFAULT 5.
DATA : l TYPE i.
DATA : pos TYPE i.
l = STRLEN( a ).
pos = l - num .
WRITE 😕 a+pos(num).
regards,
amit m.