SAP Community
Products and Technology
Additional Blogs by SAP
Tasting the mix of PHP and SAP - Volume 7
Additional Blogs by SAP
All community
This category
Blog
Knowledge base
Users
Managed tags
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Tasting the mix of PHP and SAP - Volume 7
former_member18
2779
Active Contributor
Options
Subscribe to RSS Feed
Mark as New
Mark as Read
Bookmark
Subscribe
Printer Friendly Page
Report Inappropriate Content
08-30-2006
3:09 PM
0
Kudos
After two "Tasting the mix of Ruby and SAP" blogs...I found some time for a new "PHP" blog. body {background} #login {background} if(isset($_POST['LOG_IN']) || isset($_GET['LOG_IN']) ) { if(!isset($_SESSION["Server"])) { $_SESSION["Server"] = $_POST["Server"]; $_SESSION["Sysnum"] = $_POST["Sysnum"]; $_SESSION["Client"] = $_POST["Client"]; $_SESSION["User"] = $_POST["User"]; $_SESSION["Pass"] = $_POST["Pass"]; } $Login = new Login(); $Log_Me = $Login->Log_In($_SESSION["Server"],$_SESSION["Sysnum"],$_SESSION["Client"], $_SESSION["User"],$_SESSION["Pass"]); $RFC_Me = $Login->RFC_Connection($Log_Me); $Program = $_SESSION["Program"]; $Program = str_replace(" "," ",$Program); $Program = str_replace(" '","'",$Program); $Prog_Name = $_SESSION["Prog_Name"]; $Mode = $_SESSION["Mode"]; if($Mode == "") { $Mode = "F"; } ECHO "fce,"PROGRAM"); foreach($Program_Lines as $Line) { $Line = trim($Line); $Line = str_replace(" "," ",$Line); $PROGRAM = array("LINE"=>$Line); saprfc_table_append ($this->fce,"PROGRAM",$PROGRAM); } $rfc_rc = ""; $rfc_rc = saprfc_call_and_receive ($this->fce); if ($rfc_rc != SAPRFC_OK) { if ($rfc == SAPRFC_EXCEPTION ) echo ("Exception raised: ".saprfc_exception($this->fce)); else echo ("Call error: ".saprfc_error($this->fce)); exit; } $Error = saprfc_export ($this->fce,"ERRORMESSAGE"); if($Error == "") { $Writes_Row = saprfc_table_rows ($this->fce,"WRITES"); for($i=1; $i<=$Writes_Row ;$i++) { $Write_Line = saprfc_table_read ($this->fce,"WRITES",$i); $Program_Line[$i] = $Write_Line['ZEILE']; ECHO $Program_Line[$i]; ECHO " "; } } else { ECHO $Error; } ECHO " "; PRINT(""); PRINT(" "); PRINT(" "); PRINT(" "); ECHO " "; } } ?> With our class up and running, we can write the pseudo Development Environment.
Development.php body {background:#F5F9FF} #login {background} if(isset($_POST["PROGNAME"])) { $SE38 = new SE38(); $Login = new Login(); $Log_Me = $Login->Log_In($_SESSION["Server"],$_SESSION["Sysnum"],$_SESSION["Client"], $_SESSION["User"],$_SESSION["Pass"]); $RFC_Me = $Login->RFC_Connection($Log_Me); $SE38->Show_Program($_POST["MODE"],$_POST["PROGNAME"],$_POST["PROGRAM"],$RFC_Me); } else { echo " h2. You must enter the program name! "; ECHO " "; PRINT(""); PRINT(" "); PRINT(" "); PRINT(" "); ECHO " "; } ?> Now, were done...Let's the result of running our little program.
abap
alvaro tejadagalindo3
beyond sap
emerging technologies
PHP
Retagging Required
scripting languages
11 Comments
Labels in this area
Business Trends
1
Event Information
1
Expert Insights
1
Related Content
Managing PFAS with SAP: Regulations and Business Challenges
in
Product Lifecycle Management Blogs by Members
yesterday
SAP Sales Cloud – Principais características
in
CRM and CX Blogs by Members
Tuesday
Sales Rebates in S/4HANA How to change the Standard Pricing Procedures:A10005、A10006?
in
Enterprise Resource Planning Q&A
Tuesday
Power of E-commerce Subscription Models in Increasing Conversions and Boosting Average Order Value
in
CRM and CX Blogs by SAP
Tuesday
First Half 2024 Release: What’s New in SAP SuccessFactors HCM
in
Human Capital Management Blogs by SAP
Tuesday
Popular Blog Posts
Now live: 2014 SAP HANA and SAP HANA Cloud Applications Challenge voting
My Personal Ux, Fiori, Portal and Cloud Cheat Sheet
Web Dynpro ABAP Demonstration Videos