‎2009 Apr 16 7:26 PM
HI guru,
i want to execute T-CODE through abap subroutine on specific time every day.simply, i have verious T-CODE with me for extraction data from R/3 with following selection criteria.every day we r doing manually execution of tcode then filling all section as,
company code--4432,
material type- erse, etc.
i want automation in extraction ..
guru will u please simplify me is it possible and send me details solution.
Edited by: Ganesh Bhosale on Apr 16, 2009 8:26 PM
‎2009 Apr 16 7:34 PM
Hi Ganesh,
SET PARAMETER ID 'KUN' FIELD w_companycode. "Get the parameter-id for the company code,material type by pressingF1 help at the field in the transaction.
SET PARAMETER ID 'MAT' FIELD w_material.
CALL TRANSACTION 'XD02' AND SKIP FIRST SCREEN. "XD02 is t-code pass your cutom t-code
Regrads,
Prabhudas
‎2009 Apr 16 7:38 PM
I agree,
but i want to execute it on specific time for every day...is it possible through sys-date and sys-time.
‎2009 Apr 16 8:15 PM
Hi,
Scheduled run of an ABAP prog is only possible via Background Jobs.
Create a Background job and schedule it for time.
You cannot achieve this via ABAP Prog.
‎2009 Apr 16 7:39 PM
Hi Ganesh,
go to->t-code-->go to menu -->system -->status--> check the program name--and follow the below steps..
* Calling pgm name for t-code to execute..
SUBMIT rswiwils "rswiwils is pgm name enter your t-code program name here
WITH werks = w_company code
WITH matnr = w_matnr
AND RETURN.
Regards,
Prabhudas
‎2009 Apr 16 7:47 PM
Hi Ganesh,
create variant for the t-code program and write below code in the program instead of calling the Submit report or call transaction..
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
AUTHCKNAM = SY-UNAME " Runtime authorizations
" user
JOBCOUNT = JOBNUMBER " Value from JOB_OPEN
JOBNAME = JOBNAME " Value from JOB_OPEN
REPORT = 'REPORT' " Report to be run
VARIANT = 'VARIANT' " Variant to use with
" report
PRIPARAMS = USER_PRINT_PARAMS " User printing options
ARCPARAMS = USER_ARC_PARAMS " User archiving options
" Both sets of options
" come from
" GET_PRINT_PARAMETERS
EXCEPTIONS
BAD_PRIPARAMS = 01
INVALID_JOBDATA = 02
JOBNAME_MISSING = 03
JOB_NOTEX = 04
JOB_SUBMIT_FAILED = 05
LOCK_FAILED = 06
PROGRAM_MISSING = 07
PROG_ABAP_AND_EXTPG_SET = 08
OTHERS = 99.
IF SY-SUBRC > 0.
<Error processing>
ENDIF.
check this link.
http://help.sap.com/saphelp_46c/helpdata/en/fa/096ee5543b11d1898e0000e8322d00/frameset.htm
Regards,
Prabhudas
Edited by: Prabhu Das on Apr 17, 2009 12:21 AM
‎2009 Jun 05 4:57 PM