{"id":1062,"date":"2018-11-23T13:35:31","date_gmt":"2018-11-23T06:35:31","guid":{"rendered":"http:\/\/www.todsapon.com\/story\/?p=1062"},"modified":"2019-01-14T17:18:23","modified_gmt":"2019-01-14T10:18:23","slug":"abap-run-background-job_open","status":"publish","type":"post","link":"http:\/\/www.todsapon.com\/story\/programmer\/abap-run-background-job_open","title":{"rendered":"ABAP Code:\u0e2a\u0e31\u0e48\u0e07\u0e23\u0e31\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21 \u0e41\u0e1a\u0e1a background \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 function JOB_OPEN"},"content":{"rendered":"<div id=\"attachment_985\" style=\"width: 680px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/sap-abap.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-985\" class=\"size-full wp-image-985\" src=\"http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/sap-abap.jpg\" alt=\"ABAP \u0e2a\u0e31\u0e48\u0e07\u0e23\u0e31\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21 \u0e41\u0e1a\u0e1a background \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 function JOB_OPEN\" width=\"670\" height=\"320\" srcset=\"http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/sap-abap.jpg 670w, http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/sap-abap-300x143.jpg 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><p id=\"caption-attachment-985\" class=\"wp-caption-text\">ABAP \u0e2a\u0e31\u0e48\u0e07\u0e23\u0e31\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21 \u0e41\u0e1a\u0e1a background \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 function JOB_OPEN<\/p><\/div>\n<p>\u0e16\u0e49\u0e32\u0e21\u0e35\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e01\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e40\u0e27\u0e25\u0e32\u0e43\u0e19\u0e01\u0e32\u0e23\u0e23\u0e31\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e19\u0e32\u0e19 \u0e0b\u0e36\u0e48\u0e07\u0e40\u0e23\u0e32\u0e04\u0e34\u0e14\u0e27\u0e48\u0e32 Logi \u0e40\u0e23\u0e32\u0e40\u0e17\u0e1e\u0e41\u0e25\u0e49\u0e27\u0e41\u0e15\u0e48\u0e17\u0e35\u0e48\u0e21\u0e31\u0e19\u0e0a\u0e49\u0e32\u0e40\u0e1e\u0e23\u0e32\u0e30\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e21\u0e31\u0e19\u0e40\u0e22\u0e2d\u0e30 \u0e02\u0e22\u0e30\u0e21\u0e31\u0e19\u0e40\u0e22\u0e2d\u0e30 \u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e01\u0e49 Logi \u0e44\u0e14\u0e49 \u0e01\u0e47\u0e40\u0e25\u0e22\u0e04\u0e34\u0e14\u0e43\u0e2b\u0e49 \u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e21\u0e31\u0e19 Run background \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e08\u0e30\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e39 \u0e17\u0e33\u0e44\u0e07\u0e43\u0e2b\u0e49\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e21\u0e31\u0e19 Run backgroud \u0e01\u0e47\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49 <a href=\"http:\/\/www.todsapon.com\/story\/programmer\/abap-run-background-job_open\">function <strong>&#8216;JOB_OPEN&#8217;<\/strong> \u0e21\u0e32\u0e21\u0e32\u0e14\u0e39\u0e01\u0e31\u0e19 \u0e27\u0e48\u0e32 Work \u0e44\u0e2b\u0e21?<\/a><br \/>\n<!--more--><\/p>\n<p><strong>Concept \u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21<\/strong><br \/>\n&#8211; \u0e43\u0e2b\u0e49\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32\u0e08\u0e32\u0e01\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d \u0e04\u0e33\u0e19\u0e27\u0e13\u0e04\u0e48\u0e32\u0e08\u0e32\u0e01\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d \u0e2a\u0e48\u0e07\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e04\u0e33\u0e19\u0e27\u0e13\u0e44\u0e14\u0e49 \u0e44\u0e1b\u0e43\u0e2b\u0e49\u0e2d\u0e35\u0e01\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e2b\u0e19\u0e36\u0e48\u0e07 \u0e0b\u0e36\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e1b\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a Run Background<\/p>\n<p><strong>\u0e27\u0e34\u0e18\u0e35\u0e17\u0e33<br \/>\n<\/strong>\u0e1b\u0e25. \u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21 2 \u0e15\u0e31\u0e27 \u0e15\u0e31\u0e27\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e2a\u0e48\u0e07\u0e04\u0e48\u0e32(Program ZA) \u0e2d\u0e35\u0e01\u0e15\u0e31\u0e27\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32(Program ZB)<br \/>\n&#8211; \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d SELECTION-SCREEN (\u0e17\u0e35\u0e48 Program ZA)<br \/>\n<!--more--><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nparameters: p_number type i obligatory. \/\/ SELECTION-SCREEN\r\n<\/pre>\n<p>&#8211; \u0e19\u0e33\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e44\u0e1b\u0e04\u0e33\u0e19\u0e27\u0e13<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\np_number = p_number * 360.\r\n<\/pre>\n<p>-\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e43\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndata: number type tbtcjob-jobcount,\r\nname type tbtcjob-jobname value 'ZRUNBACKGROUND',\r\nprint_parameters type pri_params.\r\n\r\ndata: text type c length 10,\r\nrspar_tab type table of rsparams,\r\nrspar_line like line of rspar_tab,\r\nrange_tab like range of text,\r\nrange_line like line of range_tab.\r\n<\/pre>\n<p>&#8211; \u0e2a\u0e48\u0e07\u0e04\u0e48\u0e32\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e17\u0e35\u0e48\u0e04\u0e33\u0e19\u0e27\u0e13\u0e44\u0e14\u0e49 \u0e44\u0e1b\u0e43\u0e2b\u0e49 \u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e2d\u0e35\u0e01\u0e15\u0e31\u0e27\u0e17\u0e33\u0e15\u0e48\u0e2d\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a Run Background<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncall function 'JOB_OPEN'\r\nexporting\r\njobname\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = name\r\nimporting\r\njobcount\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = number\r\nexceptions\r\ncant_create_job\u00a0 = 1\r\ninvalid_job_data = 2\r\njobname_missing\u00a0 = 3\r\nothers\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 4.\r\nif sy-subrc = 0.\r\n\r\nsubmit ZB to sap-spool\u00a0 \/\/(\u0e2a\u0e48\u0e07\u0e04\u0e48\u0e32 Program ZB)\r\nspool parameters print_parameters\r\nwithout spool dynpro\r\nwith p2_number eq p_number\r\nuser sy-uname\r\nvia job name number number\r\nand return.\r\nif sy-subrc NE 0.\r\nwrite: \/ 'Bad job.'.\r\nelse.\r\nwrite: \/ 'Good Job. Please, Check T_CODE SM37.'.\r\nendif.\r\n\r\nif sy-subrc = 0.\r\n\r\ncall function 'JOB_CLOSE'\r\nexporting\r\njobcount\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = number\r\njobname\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = name\r\nstrtimmed\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 'X'\r\nexceptions\r\ncant_start_immediate = 1\r\ninvalid_startdate\u00a0\u00a0\u00a0 = 2\r\njobname_missing\u00a0\u00a0\u00a0\u00a0\u00a0 = 3\r\njob_close_failed\u00a0\u00a0\u00a0\u00a0 = 4\r\njob_nosteps\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 5\r\njob_notex\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 6\r\nlock_failed\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 7\r\nothers\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 8.\r\nif sy-subrc NE 0.\r\nendif.\r\n\r\nendif.\r\n\r\nendif.\r\n<\/pre>\n<p>\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e2a\u0e31\u0e48\u0e07\u0e23\u0e31\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48 T-CODE SM37<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e16\u0e49\u0e32\u0e21\u0e35\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e01\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e40\u0e27\u0e25\u0e32\u0e43\u0e19\u0e01\u0e32\u0e23\u0e23\u0e31\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e19\u0e32\u0e19 \u0e0b\u0e36\u0e48\u0e07\u0e40\u0e23\u0e32\u0e04\u0e34\u0e14\u0e27\u0e48\u0e32 Logi \u0e40\u0e23\u0e32\u0e40\u0e17\u0e1e\u0e41\u0e25\u0e49\u0e27\u0e41\u0e15\u0e48\u0e17\u0e35\u0e48\u0e21\u0e31\u0e19\u0e0a\u0e49\u0e32\u0e40\u0e1e\u0e23\u0e32\u0e30\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e21\u0e31\u0e19\u0e40\u0e22\u0e2d\u0e30 \u0e02\u0e22\u0e30\u0e21\u0e31\u0e19\u0e40\u0e22\u0e2d\u0e30 \u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e01\u0e49 Logi \u0e44\u0e14\u0e49 \u0e01\u0e47\u0e40\u0e25\u0e22\u0e04\u0e34\u0e14\u0e43\u0e2b\u0e49 \u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e21\u0e31\u0e19 Run background \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e08\u0e30\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e14\u0e39 \u0e17\u0e33\u0e44\u0e07\u0e43\u0e2b\u0e49\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e21\u0e31\u0e19 Run backgroud \u0e01\u0e47\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49 function &#8216;JOB_OPEN&#8217; \u0e21\u0e32\u0e21\u0e32\u0e14\u0e39\u0e01\u0e31\u0e19 \u0e27\u0e48\u0e32 Work \u0e44\u0e2b\u0e21?<\/p>\n","protected":false},"author":1,"featured_media":985,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_options":[]},"categories":[250,384,251],"tags":[331,256,312,254],"class_list":["post-1062","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programmer","category-archive-blog","category-sap-abap","tag-abap-code","tag-function","tag-job_open","tag-sap"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/sap-abap.jpg","jetpack_shortlink":"https:\/\/wp.me\/p5sZE6-h8","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts\/1062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/comments?post=1062"}],"version-history":[{"count":3,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts\/1062\/revisions"}],"predecessor-version":[{"id":1107,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts\/1062\/revisions\/1107"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/media\/985"}],"wp:attachment":[{"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/media?parent=1062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/categories?post=1062"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/tags?post=1062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}