How to set a program into backgroud job
hi experts,i want to set a program into backgroud job.
the original code like this:
...some statements...
PERFORM FRM_SEND_MAIL USING WA_YA_LX.
...some statements...
i want to set 'PERFORM FRM_SEND_MAIL USING WA_YA_LX.' into background job.
is that code like this?
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = WA_TBTCJOB-JOBNAME
JOBCLASS = 'A'
IMPORTING
JOBCOUNT = WA_TBTCJOB-JOBCOUNT.
PERFORM FRM_SEND_MAIL USING WA_YA_LX.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = WA_TBTCJOB-JOBCOUNT
JOBNAME = WA_TBTCJOB-JOBNAME
SDLSTRTDT = SY-DATUM
SDLSTRTTM = WA_TBTCJOB-SDLSTRTTM .
hunger for you advice,thanks a lot.
See the following simple prog to schedule in background.
You cannot schedule the subroutine i.e perform to run in background job. Instead write the subroutine in another program.
to pass any value to that program, declare selection screen parameter and pass the value from the first one using submit.
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.
write:/ 'error in opening a job'.
endif.
Insert process into job
SUBMIT ZSDQ_BCK_TEST
and return
with p_type = 'F' "Selection screen Parameter
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
WRITE:/ 'ERROR PROCESSING JOB'.
endif.
Close job
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 = sdlstrtdt
*sdlstrttm = sdlstrttm
strtimmed = 'X'
*targetsystem = host
RECIPIENT_OBJ = RECIPIENT_OBJ
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.
***This is the second program which will run in background
REPORT ZSDQ_BCK_TEST .
TYPES: BEGIN OF TY_ADRC,
HOUSE_NUM1 LIKE ADRC-HOUSE_NUM1,
NAME3 LIKE ADRC-NAME3,
NAME4 LIKE ADRC-NAME4,
LOCATION LIKE ADRC-LOCATION,
END OF TY_ADRC.
DATA: IT_ADRC TYPE STANDARD TABLE OF TY_ADRC WITH HEADER LINE.
Parameters: p_type type c.
START-OF-SELECTION.
SELECT HOUSE_NUM1
NAME3
NAME4
LOCATION
UP TO 40000 rows
FROM ADRC
INTO TABLE IT_ADRC.
WHERE ADDRNUMBER = '0000022423'.
IF SY-SUBRC = 0.
LOOP AT IT_ADRC.
WRITE:/ IT_ADRC-HOUSE_NUM1, IT_ADRC-NAME3.
ENDLOOP.
write:/ p_type.
ENDIF.
Similar Messages
-
How to set default programs???
How to set default programs?
An example: when I click on a .doc it opens in TextEdit, but I want it to open with NeoOffice (to make that happen now requires right-click>open with>NeoOffice)
How can I set NeoOffice as the default program for .doc, .xls, .ppt?
And set default programs for other files?
Thanks.redaple
Select a .doc and go File -> Get Info
In the resulting window you'll see a pane called Open With... Select your preference from the Drop Down. To make the new app default for all these types, click 'Change All...'
Regards
TD -
How to set Maximum Character into OAMessageTextInputBean?
Hi,
Can anyone please show me how to set a maximum characters into an OAMessageTextInputBean programatically?
Thank you.
JonTextInputBean.setMaximumLength(11);
-
How to set up Dynamic Variants for job which is based on Pay Period
Hi,
We need to set up dynamic variant for payroll interface. This interface is based on Pay periods and that is why we need to use different variant for each month. Letus know how to set up dynamic variant which will take care of Pay PeriodsHi, Thnx for reply.
We are not changing the control records, current period will be some old period in system.
payroll is not processed in SAP, -
How do you add programs into your subscription
I started using the Creative Cloud because I need Acrobat for some PDF management, but in the future, I might need to add one more program into my account, Photoshop. Not any other program, just Photoshop. Is there an easy (and affordable) way for me to add a program into an existing account? Thank you in advance.
Cloud Plans https://creative.adobe.com/plans
-and subscription terms http://www.adobe.com/misc/subscription_terms.html
-check the photography special -
How to trigger program into batch job
Hi
We are getting performance issue on below case.
We are uploading some data from portal and that is triggering a method of class which is in WebDynpro.
This program took all the resources and CPU utilization was 100%. Because of this production system went down.
From Basis monitoring we understand this program running in fore ground (DIA mode).
I want to check how this program triggered as a fore ground from portal and need information/steps how to configured this into background to resolve my issue.
A <urgency removed> reply is very much helpful.
Thanks,
Umashankar.
Edited by: Thomas Zloch on Mar 1, 2010 4:45 PMDear Peter,
Thanks for your update.
I checked SM50 for my user ID but i couldn't find from where it is triggering from portal to SAP ABAP.
It is running in 'DIA' Dialog mode.
Can you please let me know how to check stak list.
Thanks,
Umashankar. -
How to run the program in background job,program should run in 3 days.
Dear Gurus,
i have a program , that program should run approximately 3 days to get the result.
i scheduled this program as a background job.
how can i run sto5 t-code for this same program.
i that case how we can trace the output.
Experts please help me out.
Thank u very much.
Regards
sudheerHello Sudheer,
The trace can be set on background jobs by using ST12 transaction. Please make sure that the trace is activated for only few minutes in production environment.
Contact your basis team to activate trace on background job and the transaction used is ST12.
Thanks -
How to set default program for pdf files
I was wondering if anyone knows how to change the default program for opening a file type. For example I would like to set Adobe Acrobat as my default program for opening pdf files instead of preview
thanksHi and Welcome to Apple Discussions
Control-click a pdf file and choose "Get Info". In the Info window choose which application to open the file with and then click on the "change all" button. Voila!
Matthew Whiting -
How to set workflow fall into error.
Dear Expert,
I have a background step to generate and send out email. My problem is sometimes the email address will be blank. How can i do to set the workflow to error when it encounter this situation. I want to have this because when the workflow got stuck, i can manually go and replace the email address container and restart the workflow step so that the user will not miss the email part.
Anyone can guide me on this?
Thanks.
Regards,
Bryan.Now here the condition is if the email id is not found you want to set the running step into error state right?
try to do like this
1. Set a flag as Email_Not_Found if this flag is set to X then pass the same value back to workflow conatiner and in the workflow tempalte define a condition step by using the same flag, if it is X then you raise a exception, Or you can simply loggically delete the workflow instance ,
2. If it is not X then the current running step should pass X back to workflow container and it should get completed successfully....
3. Here Instaead of raise exception, my advise is to simply Cancel the workitem by using the Process Control step, check the above mentioned article for more information about Process control step.... -
How to convert ABAP Programs into Chinese
I have an ABAP program but the interface is in English. I want to translate all into Chinese Characters. How can I do it? Thanks in advance.
Hi Gautham,
Can you please explain further sir. It's like this, for example I have a parameter named p_bukrs. And in the selection text screen (Goto -> Text Elements -> Selection Texts), I put the a decription on it named 'Company Code'. How can I convert this one? Thanks a lot. -
How to schedule JAVA program as scheduled Job on portal 7.0 server ?
Hi,
Can you let me know on how do we schedule JAVA program as a scheduled job to run daily on portal 7.0 server ?
Thanks,
Vinit PugaliyaAm not clear on that,
check this
https://ecohub.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/abb91c2a-0b01-0010-6ca6-9f0f62268454 [original link is broken]
Am also new and now going through Job scheduler.
Will let u know if i get to knwo any thing more abt same.
Regards,
Ravi -
How to set a value into ogc:PropertyName
Hello, I am trying to set a text value into the net.opengis.ogc.PropertyTypeName field. I have used XMLBeans to generate java classes for schemas in net.opengis.ogc. I am now trying to use the Java classes to create xml documents. I cannot figure out how to add a text value to the PropertyTypeField of a spatial operator. Please let me know...Thank you.
I think, "visibility = false" is a rendered element, which is not display to the user (like a HiddenField). You should find the element in your HTML-code of your browser. A "rendered = false" element should be not rendered into HTML and not to find in the HTML-code.
Regards
Majo -
How to set a value into a component visibility with expression builder?
Hello,
I want to set true/false value into a adf component visibility according to a bean object's value. if the object value is null then visibility value will be false, else visibility is true.
How can I do that without an extra variable definition in the backing bean?
Thanks, AliI think, "visibility = false" is a rendered element, which is not display to the user (like a HiddenField). You should find the element in your HTML-code of your browser. A "rendered = false" element should be not rendered into HTML and not to find in the HTML-code.
Regards
Majo -
How to Set Default Value into a Tabular Form Element
Hi,
Hoping someone can assist with my Tabular Form query.
I am using Oracle ApEx v3.0.1
I was wondering how one can set a default value to one of my tabular form columns within Oracle ApEx v3.0.1 as I cannot see how to do it?
Thanks.Hi Tony
can you pl. help me how you resolve this? I have one tabular form and I am trying to set default value as :APP_USER, I type this in default value but somehow it is not displaying this value.
thanks
Dax -
ALV - How to set selected rows into internal table
Hi all,
I am tying to set with an 'X' flag the selected rows in my ALV using an internal table that contains all rows showed.
More exactly I have tried to follow these steps.
1) I have added the filed SEL (type SEL) to my ALV structure zrt_bo_slabsend and I defined my internal table in this way
DATA: gt_report TYPE STANDARD TABLE OF zrt_bo_slabsend,
gw_report TYPE zrt_bo_slabsend.
2) I have set gw_layo-box_fname = 'SEL' to gw_layo (ALV layout)
Pressing the "delete button" that I have insert on the top of the ALV, I intercept correctly my user command and I call a form (named "delete_lines") where I have this abap code
FORM delete_lines.
DATA: l_subrc LIKE sy-subrc,
lw_grid_settings LIKE lvc_s_glay.
gw_layo-box_fname = 'SEL'.
"set field name to store row selection
gw_layo-edit = 'X'. "makes whole ALV table editable
gw_layo-zebra = 'X'.
gv_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY_LVC'
exporting
i_callback_program = gv_repid
i_callback_pf_status_set = gc_status
i_callback_user_command = gc_user_command
is_layout_lvc = gw_layo
it_fieldcat_lvc = gw_fkat
i_grid_settings = lw_grid_settings
i_save = 'X'
is_variant = variant
it_events = gt_events
TABLES
t_outtab = gt_report
EXCEPTIONS
program_error = 1
OTHERS = 2.
LOOP AT gt_report ASSIGNING <report> WHERE SEL = 'X'.
DELETE gt_report.
ENDLOOP.
ENDFORM.
I'd like to select many rows in my ALV report, than by pressing the delete button I'd like to see a refresh of my ALV, without the selected rows. I want to save it only at the end of my action, only by pressing the save button.
Any suggestion about the abap code will be well appreciated.
Thanks in advance for your kind help.
Regards.
GiovanniHi Giovanni,
I am using the method:-
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
I_CALLBACK_PROGRAM = gd_REPID
I_CALLBACK_PF_STATUS_SET = 'UDIT'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
I_GRID_TITLE = 'Mainatin cell entry'
* I_GRID_SETTINGS =
IS_LAYOUT_LVC = GS_LAYOUT
IT_FIELDCAT_LVC = I_FIELDCAT[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS_LVC =
* IT_SORT_LVC =
* IT_FILTER_LVC =
* IT_HYPERLINK =
* IS_SEL_HIDE =
I_DEFAULT = 'X'
* I_SAVE = 'X'
* IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
* IS_PRINT_LVC =
* IS_REPREP_ID_LVC =
I_SCREEN_START_COLUMN = 30
I_SCREEN_START_LINE = 14
I_SCREEN_END_COLUMN = 120
I_SCREEN_END_LINE = 25
* IT_EXCEPT_QINFO_LVC =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_ZCP_DEMAND_SYS1
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I have made five buttons on my toolbar (add, delete, save, back, exit).
Kindly tell me how can I catch the sy-ucomm of these buttons.
NOTE: this FM is written inside an user-exit, so I cannot make forms.
Thanks in advance.
Maybe you are looking for
-
Internet working but can't access AirPort for configuration changes
I have an AirPort Express and it connects to the internet properly through my cable modem -- solid green light and all -- and allows my PC to surf wirelessly. Sounds pretty good, but... For some reason I can't access the AirPort Express to change any
-
Link ArchiveLink Document (outb. invoice) with inb. invoice
Between the companies in our group we are having an ALE-handling for the invoicing process, incoming invoices are posted via IDoc. Actually it is possible to create in the SD-invoice the generated message as a pdf-Document on the external storage sys
-
"App store" not showing up in main menu
When I click menu, there is no option for me to go to the app store, how do i get it back so it shows on the main menu?
-
i tried to update my iphone 3gs and it couldnt update and now i try to restore it and it says it couldnt error 1015 so how i can fix this please.
-
IPod Turning self on by itself
My iPhone has started turning itself on randomly. I'll find a song, or audio book playing away during the night, after work etc. I make sure I've shut it down and the 'gremlins' come in and turn it back on. Not necessarily on what I was listening to