{"id":1038,"date":"2018-11-22T16:55:14","date_gmt":"2018-11-22T09:55:14","guid":{"rendered":"http:\/\/www.todsapon.com\/story\/?p=1038"},"modified":"2020-10-16T14:08:10","modified_gmt":"2020-10-16T07:08:10","slug":"php-sap-via-rfc-web-services","status":"publish","type":"post","link":"https:\/\/www.todsapon.com\/story\/programmer\/php-sap-via-rfc-web-services","title":{"rendered":"\u0e43\u0e0a\u0e49 PHP \u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d SAP \u0e1c\u0e48\u0e32\u0e19 RFC \u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a Web Services"},"content":{"rendered":"<div id=\"attachment_970\" style=\"width: 680px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/programmer.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-970\" class=\"size-full wp-image-970\" src=\"http:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/programmer.jpg\" alt=\"\u0e43\u0e0a\u0e49 PHP \u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d SAP \u0e1c\u0e48\u0e32\u0e19 RFC \u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a Web Services\" width=\"670\" height=\"320\" srcset=\"https:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/programmer.jpg 670w, https:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/programmer-300x143.jpg 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><p id=\"caption-attachment-970\" class=\"wp-caption-text\">\u0e43\u0e0a\u0e49 PHP \u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d SAP \u0e1c\u0e48\u0e32\u0e19 RFC \u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a Web Services<\/p><\/div>\n<p>\u0e1e\u0e2d\u0e14\u0e35\u0e17\u0e35\u0e48\u0e17\u0e33\u0e07\u0e32\u0e19 \u0e21\u0e35\u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04 \u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49 PHP&nbsp;\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a SAP \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e44\u0e1b\u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07 SAP \u0e41\u0e25\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1a\u0e40\u0e14\u0e15\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e25\u0e07\u0e44\u0e1b\u0e43\u0e19 SAP&nbsp; <a href=\"http:\/\/www.todsapon.com\/story\/programmer\/php-sap-via-rfc-web-services\"><strong>\u0e01\u0e32\u0e23\u0e17\u0e35\u0e48\u0e08\u0e30\u0e43\u0e0a\u0e49 PHP \u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a SAP \u0e19\u0e31\u0e49\u0e19 \u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49 PHP Connector \u0e0b\u0e36\u0e48\u0e07\u0e1c\u0e21\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e43\u0e0a\u0e49 SAPRFC \u0e40\u0e1b\u0e47\u0e19\u0e15\u0e31\u0e27\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d<\/strong><\/a><\/p>\n<p><!--more--><\/p>\n<p><strong>\u0e2a\u0e34\u0e48\u0e07\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04\u0e19\u0e35\u0e49<br \/>\n<\/strong>1. &nbsp;Appserv &nbsp;(<a href=\"http:\/\/prdownloads.sourceforge.net\/appserv\/appserv-win32-2.5.10.exe?download\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Download Appserv-win32-2.5.10<\/a>)<br \/>\n2.&nbsp; RFC&nbsp; (<a href=\"http:\/\/downloads.sourceforge.net\/saprfc\/saprfc-1.4-5.2.0.Win32.zip\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Download saprfc-1.4-5.2.0.Win32.zip<\/a>)<br \/>\n3.&nbsp; Notepad++&nbsp; (<a href=\"http:\/\/sourceforge.net\/projects\/notepad-plus\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Download<\/a>)<br \/>\n4.&nbsp; SAP Gui<\/p>\n<p><strong>\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19<br \/>\n<\/strong>1. \u0e01\u0e48\u0e2d\u0e19\u0e2d\u0e37\u0e48\u0e19 \u0e01\u0e47\u0e25\u0e07&nbsp;SAP Gui&nbsp;\u0e41\u0e25\u0e30 Appserv (\u0e16\u0e49\u0e32\u0e21\u0e35 SAP Gui \u0e41\u0e25\u0e49\u0e27\u0e01\u0e47\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e25\u0e07)&nbsp;&nbsp;&nbsp; \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19 \u0e44\u0e1b\u0e2b\u0e32 LIBRFC32.dll<br \/>\n\u0e17\u0e35\u0e48&nbsp;&nbsp;&nbsp;C:\\WINDOWS\\system32&nbsp; \u0e40\u0e2d\u0e32\u0e21\u0e32\u0e43\u0e2a\u0e48\u0e43\u0e19 &nbsp;C:\\AppServ\\php5<br \/>\n2. \u0e43\u0e2b\u0e49\u0e44\u0e1b\u0e40\u0e2d\u0e32 php_saprfc.dll \u0e43\u0e19&nbsp; saprfc-1.4-5.2.0.Win32 \u0e40\u0e2d\u0e32\u0e21\u0e32\u0e43\u0e2a\u0e48\u0e43\u0e19 C:\\AppServ\\php5\\ext<br \/>\n3. \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e21\u0e32&nbsp;set code \u0e17\u0e35\u0e48 php.ini&nbsp;&nbsp;\u0e43\u0e19&nbsp;&nbsp;&nbsp;C:\\WINDOWS\\<br \/>\n3.1&nbsp;&nbsp;\u0e04\u0e49\u0e19\u0e2b\u0e32 short_open_tag = Off \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e04\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19 short_open_tag = On<br \/>\n3.2 &nbsp;\u0e04\u0e49\u0e19\u0e2b\u0e32 ;extension = php_xsl.dll \u0e40\u0e1e\u0e34\u0e48\u0e21 extension=php_saprfc.dll \u0e43\u0e15\u0e49\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14 ;extension = php_xsl.dll<br \/>\n3.3&nbsp; \u0e04\u0e49\u0e19\u0e2b\u0e32 extension_dir = &#8220;.\/ext&#8221; \u0e41\u0e25\u0e49\u0e27\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e40\u0e1b\u0e47\u0e19 extension_dir = &#8220;C:\\AppServ\\php5\\ext&#8221;<br \/>\n4. Restart Apache \u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e31\u0e19\u0e08\u0e1a\u0e01\u0e32\u0e23 Set PHP Connector<\/p>\n<p><strong>\u0e17\u0e14\u0e2a\u0e2d\u0e1a<br \/>\n<\/strong>1. \u0e2a\u0e23\u0e49\u0e32\u0e07 Folder&nbsp; phpsap \u0e21\u0e32\u0e44\u0e27\u0e49\u0e43\u0e19 C:\\AppServ\\www<br \/>\n2. \u0e19\u0e33 Folder saprfc (saprfc-1.4-5.2.0.Win32 Change name is saprfc) \u0e21\u0e32\u0e44\u0e27\u0e49\u0e43\u0e19 C:\\AppServ\\www\\phpsap<br \/>\n3. \u0e40\u0e1b\u0e34\u0e14 IE \u0e2a\u0e31\u0e48\u0e07\u0e23\u0e31\u0e19 <a href=\"http:\/\/localhost\/phpsap\/saprfc\/example_userlist.php\" rel=\"nofollow noopener\">http:\/\/localhost\/phpsap\/saprfc\/example_userlist.php<\/a><br \/>\n\u0e16\u0e49\u0e32 \u0e02\u0e36\u0e49\u0e19 \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e15\u0e32\u0e21\u0e02\u0e49\u0e32\u0e07\u0e25\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49<\/p>\n<blockquote><p>SAPRFC-Class: Get List of Users in SAP-System<br \/>\nErrors found during saprfc-Calls:saprfc::login()<br \/>\nOpen RFC connection with saprfc_open() failed with error:<br \/>\nRFC Error Info :<br \/>\nKey&nbsp;&nbsp;&nbsp;&nbsp; : rfc system error raised<br \/>\nStatus&nbsp; :<br \/>\nMessage : for more information: see tracefile dev_rfc<br \/>\nInternal:<br \/>\n\u0e41\u0e2a\u0e14\u0e07\u0e27\u0e48\u0e32 \u0e01\u0e32\u0e23 config \u0e19\u0e31\u0e49\u0e19\u0e43\u0e0a\u0e49\u0e01\u0e32\u0e23\u0e44\u0e14\u0e49\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e1e\u0e35\u0e22\u0e07\u0e41\u0e15\u0e48 \u0e04\u0e48\u0e32 login \u0e17\u0e35\u0e48\u0e2a\u0e48\u0e07\u0e43\u0e2b\u0e49 SAP \u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e43\u0e2b\u0e49\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e40\u0e0a\u0e47\u0e04 code \u0e17\u0e35\u0e48 example_userlist.php \u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/\/ Create saprfc-instance\n$sap = new saprfc(array(\n&quot;logindata&quot;=&amp;gt;array(\n&quot;ASHOST&quot;=&amp;gt;&quot;&quot;         \/\/ application server\n,&quot;SYSNR&quot;=&amp;gt;&quot;&quot;         \/\/ system number\n,&quot;CLIENT&quot;=&amp;gt;&quot;&quot;        \/\/ client\n,&quot;USER&quot;=&amp;gt;&quot;&quot;          \/\/ user\n,&quot;PASSWD&quot;=&amp;gt;&quot;&quot;        \/\/ password\n)\n,&quot;show_errors&quot;=&amp;gt;false    \/\/ let class printout errors\n,&quot;debug&quot;=&amp;gt;true)) ;       \/\/ detailed debugging information\n<\/pre>\n<p>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e41\u0e25\u0e49\u0e27 \u0e25\u0e2d\u0e07\u0e2a\u0e31\u0e48\u0e07\u0e23\u0e31\u0e19\u0e44\u0e2b\u0e21\u0e2d\u0e35\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07 \u0e08\u0e30\u0e1b\u0e23\u0e32\u0e01\u0e0f\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 \u0e0a\u0e37\u0e48\u0e2d SAP Name \u0e41\u0e25\u0e30 User Nummer<\/p>\n<blockquote><p>SAPRFC-Class: Get List of Users in SAP-System<br \/>\nSAP-Name User-Nummer<br \/>\nDEVSAP01 000000000001<br \/>\nDEVSAP02 000000000002<br \/>\nDEVSAP03 000000000003<br \/>\nDEVSAP04 000000000004<br \/>\nDEVSAP05 000000000005<\/p><\/blockquote>\n<p>\u0e16\u0e49\u0e32\u0e02\u0e36\u0e49\u0e19\u0e41\u0e1a\u0e1a\u0e02\u0e49\u0e32\u0e07\u0e1a\u0e19\u0e41\u0e2a\u0e14\u0e07\u0e27\u0e48\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d SAP \u0e44\u0e14\u0e49\u0e41\u0e25\u0e49\u0e27\u0e04\u0e23\u0e31\u0e1a<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u0e1e\u0e2d\u0e14\u0e35\u0e17\u0e35\u0e48\u0e17\u0e33\u0e07\u0e32\u0e19 \u0e21\u0e35\u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04 \u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49 PHP&nbsp;\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a SAP \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e44\u0e1b\u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07 SAP \u0e41\u0e25\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1a\u0e40\u0e14\u0e15\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e25\u0e07\u0e44\u0e1b\u0e43\u0e19 SAP&nbsp; \u0e01\u0e32\u0e23\u0e17\u0e35\u0e48\u0e08\u0e30\u0e43\u0e0a\u0e49 PHP \u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a SAP \u0e19\u0e31\u0e49\u0e19 \u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49 PHP Connector \u0e0b\u0e36\u0e48\u0e07\u0e1c\u0e21\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e43\u0e0a\u0e49 SAPRFC \u0e40\u0e1b\u0e47\u0e19\u0e15\u0e31\u0e27\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d<\/p>\n","protected":false},"author":1,"featured_media":970,"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],"tags":[178,301,254,302],"class_list":["post-1038","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programmer","category-archive-blog","tag-php","tag-rfc","tag-sap","tag-web-services"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.todsapon.com\/story\/wp-content\/uploads\/2018\/11\/programmer.jpg","jetpack_shortlink":"https:\/\/wp.me\/p5sZE6-gK","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts\/1038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/comments?post=1038"}],"version-history":[{"count":4,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts\/1038\/revisions"}],"predecessor-version":[{"id":1646,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/posts\/1038\/revisions\/1646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/media\/970"}],"wp:attachment":[{"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/media?parent=1038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/categories?post=1038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.todsapon.com\/story\/wp-json\/wp\/v2\/tags?post=1038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}