03-31-2008 9:40 AM
hi friends,
I have an a transaction code ZABW and a program under this transaction ZBW_SAM, now I want to create a function module, and i want to call the above program/report by the function module. is it possible? , if yes, guide me and give me suitable code.....
thanks in advance
03-31-2008 9:42 AM
03-31-2008 9:42 AM
03-31-2008 9:43 AM
03-31-2008 9:44 AM
Hi,
try this FM.
create a FM in SE37.
IN CODING write the code.
CALL TRANSACTION 'TCODE'.
Regards,
Morris Bond.
Reward Points if Helpful.
03-31-2008 9:45 AM
Hi,
Yes you can call report using
SUBMIT {rep|(name)} [selscreen_options]
[list_options]
[job_options]
[AND RETURN].
*reward points if useful
Thanks,
Suman
03-31-2008 9:47 AM
Hi,
whenever you want to run program there use below syntax.
Call program from FM
SUBMIT demo_program_submit_rep1 AND RETURN
OR
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.
03-31-2008 9:48 AM
U can use
Submit pogram name.
or u can include that program inside of ur functon module. But for this ur program should be include type.
or u can create one transaction for ur program and call that transaction inside of ur FM.
03-31-2008 10:04 AM
Hi Jaya,
Yes. It is possible to call ur custom program using SUBMIT statement.
1. If u have data to pass then build table type RSPARAMS and use below statement.
1. If u want to create variant to the program and use that. use the below statement .
data:
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
SUBMIT report1 WITH SELECTION-TABLE rspar_tab
AND RETURN.
Regards,
Venkat.O
SUBMIT report1 USING SELECTION-SET 'VAR1' "variant
AND RETURN.