Can a transaction be called in background dynamically using ABAP program??
Hi Experts,
Can a transaction be called in background dynamically using ABAP program without BDC???
Regards,
Mansi.
u can create job dynamically through programming..Try this sample code..
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
Insert process into job
SUBMIT zreport and return << Here it is a static call but u can make it dynamic
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
Regards,
JOy.
Similar Messages
-
HOW CAN I ADD NEW WORKSHEET(TAB) TO EXCEL USING ABAP pROGRAM?
i want to add new tabs to my excel file using abap.... can someone help me on this?
hi,
PERFORM add_worksheet USING 'Test 1'.
*& Form ADD_WORKSHEET
FORM add_worksheet USING i_name.
Add new worksheet
IF g_first_ws <> 'N'.
g_first_ws = 'N'.
GET PROPERTY OF g_excel 'ACTIVESHEET' = g_worksheet.
ELSE.
CALL METHOD OF g_worksheets 'Add' = g_worksheet.
ENDIF.
SET PROPERTY OF g_worksheet 'NAME' = i_name.
g_row = 1.
g_col = 1.
ENDFORM. " ADD_WORKSHEET -
Any idea why I can only hear a caller when I'm using speaker phone?
Does anyone know why I can only hear a caller when I am using speaker phone?
Hi goodferg,
The troubleshooting steps below may help you with the sound issue you are having with your iPhone 4:
iPhone: Can't hear through the receiver or speakers
Resolution
Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
Make sure the Ring/Silent switch is not switched to silent.
While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (chooseSettings > General > Bluetooth).
Restart the iPhone.
If restarting the iPhone doesn't resolve the issue, try restoring the device.
If the issue persists, go to the Service Answer Center - iPhone for information on service.
Hope this helps!
- Judy -
Is it possible to call ms-dos command in abap program?
Hi,
is it possible to call ms-dos command in abap program?
Thanks.Hi Cemil,
You probably have your answer here:
[Re: DOS/Windows command in app server;
You create your external command with SM69 (you can test it with SM49).
Then you call this command with function module "SXPG_COMMAND_EXECUTE".
(See function group SXPT for all the calls to external commands).
Regards,
Thomas -
Calling two smartforms in one Abap program
Hi ABAPers,
Can anybody know how to call 2 smartforms in 1 abap program?actually i used the FM SSF_FUNCTION_MODULE_NAME...and two smart forms are called...but my main problem is...the first smartforms is called and the print dialog box appeared...once i click the button back ...the second smartforms is called and print dialog box appeared again..
I want to correct this...i want this to be happen once i click the print button...the two smart forms will be combined in a one printing...meaning the first page is the first smartforms and the next page will be the second smart forms...no matter how many pages will be the first smartforms...the second smartforms will concatenate or will append to the last page of the first smartforms..how can i do this?
Please help...this is my sample code..kindly correct the error.
Will reward points...
suppressing the dialog box****************************
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = space.
cparam-getotf = 'X'.
Call the First Smartforms *******************
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSF_CHEQUE'
IMPORTING
fm_name = ly_formname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION ly_formname
EXPORTING
prepared_by = p_prepb
approved_by = p_apprb
TABLES
it_cheque = it_final
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Call the Second Smartforms *******************
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSF_TSHEET'
IMPORTING
fm_name = ly_formname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION ly_formname
EXPORTING
prepared_by = p_prepb
approved_by = p_apprb
TABLES
it_cheque = it_final
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Thanks in advance
aVaDuDzhi,
i never used these function but i've found this link.
[http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450]
[http://help.sap.com/saphelp_nw2004s/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm]
[http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
[SMartform printing;
hope that is useful.
bye
Marco
Edited by: nicolai marco on Jan 14, 2008 12:36 AM -
How can we post data from CRM to SAP using ABAP proxies???
Hi ,
Can anyone hep me to create interface for the following scenario How can we post data from CRM to SAP using ABAP proxies???, can I find any document ???????
Thanks in advance
AndyAndy,
Please look at these weblogs.
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
/people/ravikumar.allampallam/blog/2005/03/03/creating-purchase-order-idoc-through-xi
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
These should give a good idea about implementing Proxies.
Regards,
Ravi -
Possible to generate graphics dynamically using ABAP?
Hello friends,
It is possible to generate graphics dynamically using ABAP as programming language? In the same line like SVG (Scalable Vector Graphics) or ChartDirector?
Output of this abap program should be a picture.
DanielHi Daniel,
Have a look at URL
http://help.sap.com/saphelp_nw04/helpdata/en/0c/5c55a8d0a611d2963100a0c9308b1f/content.htm
Also have a look at SGRB Package/deveoplment class.
Thanks
Lakshman
Message was edited by: Lakshman Tandra -
How to Move file / call UNIX command using ABAP Program
Hi, ABAP Guru.
I need to Cut & Paste file (Move file from one location to another location) on Network Shared Drive using ABAP program.
But I can't figured out how to do this and what ABAP Command / FM / Method (and maybe UNIX command) that being used.
Please give me the advice.
Best regard and Thank you all.
Nattapash C.all methods for your requirements should be in class CL_GUI_FRONTEND_SERVICES
-
Create a Job for a transaction dynamically through ABAP program.
Hello Experts,
Can a job be created for a transaction dynamically, say for example i have a parameter on selection screen which will take the name of the transaction and then i have to create a job to run that transcation.
Plz provide sample code.
Regards,
Mansi.hiii
yes you can call transaction like that..take tcode in that parameter then you can use it in your program with statement like
call transaction (variable)..in background process.
regards
twinkal -
How to trigger an existing background job in ABAP program?which fm?
Hi experts,
how to trigger an existing background job( defined in SM36 ) in ABAP program?which fm?
seems that FM 'JOB_OPEN' / 'JOB_SUBMIT' / 'JOB_CLOSE' can only create a new job.Hi,
now my requirement is that sap has generated one job automatically, and then i will have a job name
'XXX'. and then i want to schedule the job in abap program,. which function module could i use ?
my expected fm is that the system will trigger the job after i give the job name and start condition.
i have tried job_open, but it seems just to create a new job. any advice ? -
Schedule/Execute POWL Query in Background or via ABAP Program
Hi all,
I would like to know if there is any chance/possibilities to schedule/execute the POWL Query for example the Query ID
"SAPSSRM_R_CENTRALCONFIRM_01_01" Confirmations Pending in the background to output report.
Or perhaps there is anyway I can make use of the logic within the Query ID above in an ABAP program?
The main reason is that I need create a Confirmations Pending report and sent out to relevant SC Creator and the quickest way is to make use of the existing query of above.
Many thanks and regards,
Hon LeongHi Hon Leong,
please first check POWL - Web Dynpro ABAP - SCN Wiki to understand, how POWL works.
You need to find a Feeder Class of your query and execude GET_OBJECTS Method to get the result list.
For example you can check report POWL_WLOAD or function module POWL_QUERY_REFRESH.
Regards
Konstantin -
Call a unix script from ABAP program
Can anybody help me on how to call a unix script from an ABAP program
Regards
AnjaliHi try the below code
parameters : p_sfile(60) lower case
"File to be moved
"Eg : /home/in/SFILE1.txt
p_dfile(60) lower case.
"File's Destination
"Eg: /home/archive/SFILE1.txt
data : t_btcxpm
like btcxpm occurs 0,
p_addparam
like sxpgcolist-parameters.
concatenate
'/home/ABAP/scripts/Archive_file.sh'
p_sfile
p_dfile
into p_addparam separated by space.
refresh t_btcxpm. clear t_btcxpm.
call function 'SXPG_CALL_SYSTEM'
exporting
commandname = 'ZSHELL'
additional_parameters = p_addparam
tables
exec_protocol = t_btcxpm
exceptions
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
others = 12.
if sy-subrc = 0.
write : /
'File',p_sfile,'moved to',p_dfile.
else.
write : / 'Error Occured'.
endif. -
Restrict background Jobs thro' ABAP Program
Hello,
While I was working in one of the customer place , they restricted the background jobs thro' one ABAP program for customer reports . Unfortunately , I don't have the source code with me. As you are all aware that users fires the background jobs for different periods so that he/she can submit the reports to the higher up in time.
Scenario : I have 10 application servers and each application has 20 work processes ( 12-Dialog,4-Background,3-spool,1-Gateway). I would like to restrict 1 background process/per appl server for customer reports(Y OR Z programs) during the business hours .
It would be great help to Basis Consultants , if you can contribute to restrict the background jobs .
Thanks
Regards,
S.SrinivasanHi Daniel,
The program MEREP_DISTRIBUTOR(Client Data Distributor) determines delta data independent of a download request from the client.This is mainly used to reduce the load on the server and scheduling of this program is part of "SAP MI Administration" which is generally performed as part of OR after MI Post Installation steps that recommends you to Schedule Background Jobs for Generic and Smart Sync which you wanted to confirm in your post.So the programs
(1)WAF_MW_MAPPING
(2)WAF_DEPLOYMENT_FROM_ROLES &
(3)MEREP_RETRY_BP
are good enough for scheduling Generic & Smart Sync(in your case for MAM).Apart from these you may have to check up the Handler Settings that is mentioned in my previous post.
Hope this helps.
Thanks
Gisk -
Calling Business objects Methods from ABAP program
Hi All,
Can anyone please tell me the procedure to call methods of business object(Ex: BKPF) from an ABAP program. My requirement is to check the existence of a object key by using the method EXISTENCE CHECK from BKPF. Please helpHere is an example from the SAP documentation.
[http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/content.htm]
Cheers
Graham Robbo -
Calling external web service from ABAP Program
Hi All,
Can somebody point me to the documentation where how to call an external (3rd party) web service from ABAP program is explained?
Thanks & Regards,
-Smitawhich version of R/3 you are using. if you are on was 6.40 its very simple, there are delivered tools to generate client proxy for consuming webservice. if you are on wa 6.20 you can use cl_http_client to achieve the same. check out the following weblogs.
/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap
/people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
Regards
Raja
Maybe you are looking for
-
Cannot Complete KB2919355 Update, Error Code : 0xc0000001
Hello, I encountered the MS KB2919355 update problem last year, and did not succeed in installing this update. I returned to the problem a few days ago and made some progress, however full installation is still elusive. I have a HP m7-J010DX notebo
-
Need help with WinXP 64 and raid please...
First off let me just say that for the past week or two I've been lurking on this forum while building my first 64 bit pc and I just want to say that all of your advice, suggestions, tips, and workarounds have proven to be invaluable. A sincere, hear
-
Sony EX500- Should I get the extended warranty?
I purchased the Sony Ex500 as a floor item. I use the TV for many hours everyday, but money is very tight so would like to avoid getting the warranty if possible. I was wondering if anyone has past experience or knowledge about this TV and if it has
-
PLD additional columns in VAT report
Dear experts, I need to create a print layout of VAT report in PLD with columns of BP's address. Do you have an idea how it can be done? Kind regards, Bartosz
-
Dreamweaver CS3 Split View Issue
Hello All, I just got the new dreamweaver CS3 and when working in split view nothing is refreshing correctly. What I mean is, if I click on some text in the design portion of dreamweaver to try and change the font, css assignment, or whatever I canno