SAP R/3

PHP SAPRFC: Learning by Example

After the hobby goodies of Craig has been published last week, you might be interesting to try programming SAP in PHP using SAPRFC. Are you ABAPer? Are you Javaer? Are you PHPer? In the world of SAP, ABAPers are the must to customize SAP R/3. To develop a web application, ABAP/4 is not the best choice. Java and PHP are better. Anyway, from the past 4 years, SAP has officially supported Java interfacing to SAP R/3 through JCo. So some ABAPers have moved themselves to Java. At least they know how to program a Java-based web application using SAP NetWeaver Developer Studio.

Updated SAP RFC for Perl, Python, and Ruby

Beware! SAP RFC for various scripting languages has been released new version.

Scripting the SAP

SAP is one of the most biggest player in ERP market. It has its own language called ABAP/4. Since naturally, SAP R/3, the main product line, is 3-tier architecture, says database, server, and client, you it also has its own client aka SAP GUI. However, the world has changed to web so SAP pushed lots of effort to provide programming interface in popular languages; Java and .NET. IMHO, Java and .NET are only suitable for large enterprise and they absolutely consume resources. You need big machine to run Java and .NET. By the way, the user’s requirements are many more simpler. They just want a simple web interface to back-office data, some of them are in DBMS and some of them are in SAP R/3. SAP Enterprise Portal is too big for this situation. PHP is just enough.

An Installation Guide on Sneak Preview SAP NetWeaver 2004s Full ABAP Edition

I wrote A Visual Installation Guide on Sneak Preview SAP NetWeaver 04 ABAP Edition. By now, there is the newer version so it should be updated to match the new instalation wizard. Anyway, the new version is very similar to the old one. There is no noticable difference during installation. I will just let you know about my machine.

An Uninstallation Guide on Sneak Preview SAP NetWeaver 2004s Full ABAP Edition

In some cases, you might want to completely uninstall the Sneak Preview SAP NetWeaver 2004s Full ABAP Edition. Yes, it is possible. Below is my procedure that you may follow. Note that I will not touch default unless it is necessary so please leave them untouch if I don’t explicitly specify new values.

  1. Open folder \SAPNW2004sSneakPreviewABAP\Installation_Master
  2. Run UNINSTSAP.BAT
  3. Specify Profile Directory to C:\usr\sap\NSP\SYS\profile and press Next button

ABAP/4 Example Code: How to generate graph 3D by ABAP/4

We can generate graph 3D by applying function module ’GRAPH_3D’.

Example

DATA: BEGIN OF itab OCCURS 0,
        text(20) TYPE C,
        value1 TYPE i,
        value2 TYPE i,
        value3 TYPE i,
      END OF itab.
START-OF-SELECTION.
  itab-text = ’COL1’.
  itab-value1 = ’20’.
  itab-value2 = ’5’.
  itab-value3 = ’10’.
  APPEND itab.


itab-text = ’COL2’.
  itab-value1 = ’5’.
  itab-value2 = ’15’.
  itab-value3 = ’30’.
  APPEND itab.

itab-text = ’COL3’.
  itab-value1 = ’80’.
  itab-value2 = ’50’.
  itab-value3 = ’40’.
  APPEND itab.

itab-text = ’COL4’.
  itab-value1 = ’35’.
  itab-value2 = ’15’.
  itab-value3 = ’5’.
  APPEND itab.


CALL FUNCTION ’GRAPH_3D’
    EXPORTING
*     AUTO_CMD_1         = ’ ’
*     AUTO_CMD_2         = ’ ’
*     DIM1               = ’ ’
*     DIM2               = ’ ’
*     TYPE               = ’ ’
*     DISPLAY_TYPE       = ’ ’
*     INBUF              = ’ ’
*     INFORM             = ’ ’
*     MAIL_ALLOW         = ’ ’
*     PWDID              = ’ ’
*     SET_FOCUS          = ’x’
*     SO_CONTENTS        = ’ ’
*     SO_RECEIVER        = ’ ’
*     SO_SEND            = ’ ’
*     SO_TITLE           = ’ ’
*     STAT               = ’ ’
*     SUPER              = ’ ’
*     TIMER              = ’ ’
      TITL               = ’Testing graph 3D’
*     VALT               = ’ ’
*     WDID               = ’ ’
*     WINID              = ’ ’
*     WINPOS             = ’ ’
*     WINSZX             = ’50’
*     WINSZY             = ’50’
*     X_OPT              = ’ ’
*     NOTIFY             = ’ ’
*   IMPORTING
*     B_KEY              =
*     B_TYP              =
*     CUA_ID             =
*     MOD_COL            =
*     MOD_ROW            =
*     MOD_VAL            =
*     M_TYP              =
*     RBUFF              =
*     RWNID              =
    TABLES
      DATA               = itab
            .