Skip to Content

26 Comments

You must be Logged on to comment or reply to a post.

  1. Marilyn Pratt
    Hi Alvaro,
    Thanks for breathing life back into this subject.  Back when we set up the PHP forum last year we were interested to see what lively conversations would evolve. The likes of Jason Simnmons, Craig Cmehil, John Astill, Gregor Wolf,  Anton Wenzelhuemer and others kept conversation flowing for a while there, but without more interaction from the community the subject got real quiet.
    Thanks for bringing it back to life with your PHP forum posts and this weblog!

    Marilyn

    (0) 
    1. Alvaro Tejada Galindo Post author
      Thanks for your kind words Marilyn. And special thanks to Craig, who offer me trust and friedship. I’m sure that with the help of Craig, John and Jason we can make the PHP-SAP community user grow on every day.

      Greetings,

      Blag.

      (0) 
  2. Former Member
    Estoy bastante interesado en el tema de conectar php y sap, pero tengo un gran problema, desde la empresa en la que trabajo todas las conexiones requieren la cadena SAProuter y claro esto no lo cotempla aún el RFC.

    Mi pregunta es si hay algún sap de prueba que pueda instalar y hacer mis pequeños pinos o si sabes conectar php y sap habiendo una cadena Saprouter por el medio.

    Muchas gracias por todo y mut interesante este artículo.

    (0) 
    1. Alvaro Tejada Galindo Post author
      Hola:

      Bueno, lo que puedes hacer es conseguir el minisap, instalar el apache, el php y el saprfc. Es lo que yo hice en mi casa, para poder escribir este weblog.

      What is MiniSap?

      —————————————————-

      Hi:

      Well, what you can do is get the MiniSap, install the apache web server, php and the saprfc.
      That’s what i do in my house in orden to write this weblog.

      What is MiniSap?

      Greetings,

      Blag.

      (0) 
      1. Former Member
        Esto es lo que buscaba el minisap. Muchas gracias;
        Ya tenia instalado el apache, el php y el saprfc.

        He estado investigando más y hay unos atributos para la conexión pero no consigo que fuincione. Ahora pruebo con el minisap.

        Muchas gracias por todo.

        (0) 
  3. Just installed Apache and PHP a few weeks ago; now I can put it to use. I hate Java, too; all those tedious little bits and beans that have to be identified, arranged and assembled just in order to “get the job done”… bah.
    (0) 
    1. Alvaro Tejada Galindo Post author
      Remember that this is just a test app. I made it in order to show some of the PHP/SAP functionallity. You must encrypt the send data and decrypt the recieved data, i don’t think that saprfc_open handle it. But as my blog says, this is not intended to be use on a productive system, so i just want to add some basic functionallity…If you want extra stuff, you can coded yourself -;) Or you can check the forums -:)

      Greetings,

      Blag.

      (0) 
  4. Hans-Joerg Alles
    Hello,
    but that’s exactly the problem, why we only have examples and no productive usable solutions. Until now, i didn’t find any code to catch the login data and decrypt it.

    Hans

    (0) 
    1. Alvaro Tejada Galindo Post author
      Well…we only have test app and productive usability for a couple of reasons…First, most of the RFC are not release for customer use (Ask SAP why), and second because SAPRFC is still under development (At least i think it is).

      The main porpuse of my blogs is to show what you can do, and what you’re going to able to do in the future.

      Anyway…i think that Craig or Marilyn can give you better answers.

      Greetings,

      Blag.

      (0) 
    2. Former Member
      Well done. Been keeping one eye on the PHP/SAP front…I agree it is much easier to use. PHP definitely have it’s own niche area.

      For the issue of security you can implement SSL which, if I remember correctly in my old webmaster days, it decrypes every thing so you dont have to worry about clear text for the id and password being passed via the web.

      (0) 
    3. Craig Cmehil
      I think the reason we have only examples is because many people haven’t taken PHP/SAP to the next level, or in my case weren’t allowed to blog about everything.

      SAPRFC, is as “Blag” states under development but only because PHP is under development so you can really use it in a productive environment if you want, or using PHP together with Web Services.

      Bottom line is that you can use it in a productive environment together with SSL for login encryption or even SSO and with real productive solutions. I’ll see if I might be able track down some higher end solutions to share here on SDN.

      Craig

      (0) 
  5. Former Member
    Hola Alvaro,

    Te Quiero hacer una consulta referente a una conexion de SAP con PHP, yo estoy haciendo mi aplicacion BSP, luego esta pagina sera colgada en internet, pero esta pagina esta hecha en php, quiero saber si existe una conexion PHP con SAP, ademas para poder enviarle los datos de user y pass(de sap dado que te los pide la aplicacion bsp cuando corre) para entrar al BSP.

    porfavor quisiera que me ayudes con este tema. si tuvieras un ejemplito seria chevere.

    (0) 
  6. Former Member
    Hi there,

    Probably nobody will answer to this, but… I’d like to have a shot.

    I’m working in a very very very big company and bureaucracy is making anything impossible. The fact, is that I have SAP in my computer installed and it works pretty good, the problem is that I dont have the server address and the other parameters I need in order to connect to SAP through SAP-RFC via PHP.

    Is there any way to find out the characteristics of a connection that already happens in my computer?

    Thank you very much in advance.

    Greetings.

    (0) 
    1. Alvaro Tejada Galindo Post author
      Of course this is alive…a little bit old but I’m still here -;)
      If you have SAP on your computer…and you have SAPGui…then you have all the information you need…just go to your SAPGui, select the system you used to log-in and press “Change Item”…there you’re going to see the Application Server, System Number and System ID.
      If you have any further questions please let me know.

      Greetings,
      Blag.

      (0) 
      1. Former Member
        Hey Mr Tejada, thank you for the fast answer hehe.

        It seems we could speak in spanish but let’s not make a language mess here.

        Well, next problem, I’m just a poor spanish guy working in germany, and all the ******* software is -of course- in german. And SAP is not the exception.

        I can not find the “Change Item” I guess is the button under the “Log on” button (or however it’s written in English), but it looks more like an “add system” button.

        There is on the left of Systems another thing like “connections”, but then again, no info is available. I guess these people are hiding as much as they can.

        Once I’m logged onto the system ,is it possible to get the data I need?

        I’m just a php developer, and this stuff of SAP is being a pain in the *** hehe.

        By the way, I’m pretty sure you know it, but it is not a good practice to write plain HTML code through PHP =)

        Thank you very much! y un saludo!

        (0) 
        1. Alvaro Tejada Galindo Post author
          Yes, I speak Spanish…but here we have to use only English…and please don’t use curse words…it’s completely forbidden here…
          I don’t know if there’s a way to get that info from SAP, but you should try looking for a file called SAPLogon.ini or something like that…it should contain the information.
          Or maybe you can download and install the NetWeaver Community Edition…it’s under Downloads…that’s why I use at home for all my personal projects…
          About passing plain HTML to PHP…I know that, but I’m just lazy -;)

          Greetings,
          Blag.

          (0) 
          1. Former Member
            Perfect!

            I found the file .ini and it seems there’s all I need. It’s a bit strange that the server is not and IP or something like this, but just IDS_LAN. Anyway, I’m going to try. Hey, and I’m sorry for the rude words =)

            Thank you very much!

            Spanish regards from Germany.
            Bor

            (0) 
          2. Former Member
            Hi there again,

            I tried to get as many data as possible from the .ini file you told me.

            There are several Items, so I looked for the one with the name of server I wanna connect, in my case: Item2… so going up and down I got these values:

            [Router],[Router2],[RouterChoice],[Server],[Database],[System],[Description],[Address],[MSSysName], [MSSrvName],[SessManKey],[SncName],[SncChoice], [CodepageIndex],[Origin],[MSSrvPort],[LowSpeedConnection],[Utf8Off]. Many of them are just empty or equal to 0.

            Ok, so we get back to the php file and try to fill the login array. This is my guess:

            $LOGIN =  array (    “ASHOST” => [Server],
                                  “SYSNR” => [System],
                                  “CLIENT” => “001”,
                                  “USER” => “blablabla”,
                                  “PASSWD” => “1234”,
                                  “GWHOST” =>[Address],
                                  “GWSERV” =>””,
                                  “MSHOST” =>””,
                                  “R3NAME” =>””,
                                  “GROUP” =>””,
                                  “LANG” =>”EN”,
                                  //”TRACE” =>””
                 );

            But it doesnt work. It gives me the following:

            ############

            Warning: RFC Error Info : Group : 101 Key : RFC_ERROR_PROGRAM Message : Open file ‘C:\WINNT\sapmsg.ini’ failed in C:\xammpOLD\htdocs\SAPphpO\index.php on line 25
            Failed to connect to the SAP serverRFC Error Info : Key : RFC_IO5 Status : CODE=CM_PRODUCT_SPECIFIC_ERROR STATUS=??? DATA=??? ID=??? Message : Open file ‘C:\WINNT\sapmsg.ini’ failed Internal: IO HANDLE=20 DRV=EXT LINE=589 CODE=5

            ###########

            I checked for the file sapmsg.ini and it does not exist.

            Could you give me a hand? =)

            Thanks a lot in advance, at least now I see it tries to connect.

            Greetings.

            (0) 
            1. Alvaro Tejada Galindo Post author
              I would need to check my NSP when I get home to analyze the ini file…will reply you tonight or tomorrow…but better send me an email…you can find it on my business card.

              Greetings,
              Blag.

              (0) 

Leave a Reply