Αναζήτηση

Monday, December 17, 2012

create simple ABAP class into abap program


The simple ABAP program writes to screen from simple ABAP class method:


program ztest_class.

*--------------------------------------------------------------------
*  www.developerpages.gr
*--------------------------------------------------------------------

class myfirstclass DEFINITION FINAL.
  PUBLIC SECTION.
    methods hello_world.
ENDCLASS.

CLASS myfirstclass implementation.
  METHOD hello_world.
    write :/ 'Hello world from simple ABAP class !'.
  ENDMETHOD.

ENDCLASS.

Tuesday, August 14, 2012

Create abap internal table dynamically

Then following simple program creates abap internel table dynamicaly , select 2 rows of any database table and display data to screen : 
http://developerpages.gr/index.php/desktop-development-2/abap/79-create-abap-internal-table-dynamically

Monday, July 2, 2012

Submit abap program and gets output from memory

The following program runs an abap program and gets the output list from memory into internal table :

program EXEC_CMD
report ztest_submit.
*&---------------------------------------------------------------------*
*&     www.developerpages.gr
*&
*&---------------------------------------------------------------------*


SUBMIT ZEXEC_CMD
*          with par1 = ''           " Parameters

Friday, June 22, 2012

Execute operating system commands with abap

The following example explain how to execute operating system commands with abap statements :
REPORT zexec_cmd.
*----------------------------------------------------------
*
*        www.developerpages.gr
*
*     execute operating system command
*----------------------------------------------------------

data : v_command(255).
DATA: BEGIN OF TABL OCCURS 0,
            LINE(255),
      END OF TABL.

Parse xml file with ABAP

Parse xml with abap using standard SAP classes and methonds:

Read first : http://developerpages.gr/index.php/en/desktop-development-2/abap/71-read-utf-8-xml-file-with-abap
and here the example program : 

Thursday, June 21, 2012

Read utf-8 xml file with abap

Read utf-8 xml file and store it in string variable :
--------------------------------------------------------------
www.developerpages.gr
*
* Read UTF-8 xml file
*
*--------------------------------------------------------------
report zread_xml.

data XML_STRING type STRING.
DATA line TYPE string.

Wednesday, June 13, 2012

Create SAP Customer Classification with BAPI function

The following code creates Sap Customer Classification using BAPI Function :

Tuesday, May 22, 2012

Create mysql database and tables with php

Create database and table(s) in MySQL Database with php code:

//-----------------------
// www.developerpages.gr
//-----------------------
$con = mysql_connect("localhost","root","12345");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// Create database
if (mysql_query("CREATE DATABASE my_test_db",$con))
  {

Tuesday, May 15, 2012

open text file with abap

Open text file  with ABAP :
1. open with "open dataset ". can run in background mode
You can open up to 100 files per internal session. The actual maximum number of simultaneously open files may be less, depending on the platform.
Example :

Sunday, May 13, 2012

Java for Statement

java for Statement and enhanced for Statement :

/*
 * www.developerpages.gr
 * Java for Statement
 */
package forstatement;

public class ForStatement {

    public static void main(String[] args) {
        System.out.println("The for Statement");
        System.out.println("-----------------");     
        for (int i = 0; i<10;i++){
          System.out.println("Step : " + i );
     
        }

  
       // enhanced for statement
        System.out.println("enhanced for statement");    
        System.out.println("----------------------");
        int[] nums = {1,2,3,4,5,6,7,8,9,10};
        for (int item : nums){
          System.out.println("Step : " + item );
     
        }    
    
    }
}

the output is :

Saturday, May 12, 2012

jQuery Hello World example


Hello World with jQuery :


<html>
<head>

jQuery Hello World


<script type="text/javascript" src="jquery-1.4.2.js">

</head>

<script type="text/javascript">

$(document).ready(function(){
 $("#flag").html("Hello World !! (display due to jQuery)");
});

</script>
<body>
<font color=red>
Hello World !! (display due to HTML)
</font>
<font color=blue>
<div id="flag">
</div>
</font>
</body>
</html>

Original Article : http://developerpages.gr/index.php/el/scripting-2/jquery/34-jquery-hello-world-example

AJAX Example

AJAX Example :


<html>
<body>

<div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button type="button" onclick="loadXMLDoc()">Change Content</button>

</body>
</html>



Next, add a <script> tag to the page's head section. The script section contains the loadXMLDoc() function:

<head>
<script type="text/javascript">
function loadXMLDoc()
{
.... AJAX script goes here ...
}
</script>
</head>

VBScript "Hello World !"


Write   "Hello World !" with VBScript :

<html>
<body>
<script type="text/vbscript">
document.write("Hello World")
</script>
</body>
</html>

Original Article : http://developerpages.gr/index.php/el/scripting-2/vbscript/31-vbscript-hello-world

JavaScript simple example

Simple JavaScript Example :


<html>
<body>

<h1>Hello World ! </h1>

<script type="text/javascript">
document.write("<p>" + Date() + "</p>");
</script>

</body>
</html>



Stanford University Lectures for iPhone Application Development

19 Lectures from Stanford University for iphone Development

IPHONE app Hello World !

JSP Hello World !

Write "Hello World" with JSP

<HEAD>
<TITLE>hello jsp</TITLE>
<!-- the variable, message, is declared and initialized -->
<%!
String message = "Hello, World, from JSP";
%>
</HEAD>

<BODY>

<!-- the value of the variable, message, is inserted between h2 tags -->
<h2><font color="#AA0000"><%= message%></font></h2>

<h3><font color="#AA0000">
<!-- the java.util.Date method is executed and the result inserted between h3 tags -->
<%= new java.util.Date() %>
</font></h3>

</BODY>

</HTML>

Original Article : http://developerpages.gr/index.php/el/web-development-2/jsp/26-jsp-hello-world

ASP Hello World

Write "Hello World !" with ASP

<html>
<body>
<%
response.write("Hello World!")
%>
</body>
</html>

Original Article : http://developerpages.gr/index.php/el/web-development-2/asp/27-asp-hello-world

PHP "Hello World" Program

write "Hello World !" with PHP :

<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
echo "Hello World!";
?>
</body>
</html>

Original Article : http://developerpages.gr/index.php/el/web-development-2/php/25-php-hello-world-program

Visual Basic "Hello World" Program

Write "Hello World" with Visual Basic :


Module Module1
    Sub Main()
        Console.WriteLine("Hello World !")
    End Sub
End Module

Original Article : http://developerpages.gr/index.php/el/desktop-development-2/visual-basic/37-visual-basic-hello-world-program

ABAP "Hello World" program

Write "Hello World !' with ABAP :

*&---------------------------------------------------------------------*
*& Report ZHELLOWORLD
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT ZHELLOWORLD.


write :/ 'Hello World !'.

Original Article : http://developerpages.gr/index.php/el/desktop-development-2/abap/15-abap-hello-world-program

Δημιουργία Υλικού με BAPI Function

Μπορούμε να δημιουργήσουμε νέο υλικό στο R/3 με BAPI Functions είτε καλώντας τες εσωτερικά από το R/3  είτε καλώντας τες από άλλη εφαρμογή εξωτερικά από άλλο σύστημα αφού έχουμε πρώτα εξασφαλίσει στην σύνδεση του συστήματος με το R/3.


Για την δημιουργία υλικού στο SAP R/3 με BAPI functions xρησιμοποιούμε  :

Τι είναι το SAP CRM

To SAP CRM ( SAP Customer Relationship Management ) είναι μία λύση της SAP για διαχείρηση των πελατειακών σχέσεων των επιχειρήσεων. Ο λόγος που το αναφέρουμε είναι πως και εδώ όπως και στο SAP R/3 η γλώσσα προγραμματισμού είναι η ABAP.
Σχετικά μπορείτε να διαβάσετε στον σύνδεσμο http://www.sap.com/greece/solutions/business-suite/crm/index.epx

Original Article : http://developerpages.gr/index.php/el/desktop-development-2/abap/13-sap-crm

Τι είναι η γλώσσα ABAP

Η γλώσσα ABAP ( Advanced Business Application Programming ) είναι μία γλώσσα προγραμματισμού που δημιούργησε η SAP για να αναπτύξει εμπορικές εφαρμογές πάνω στην πλατφόρμα που έχει δημιουργήσει για μεγάλες ( κυρίως ) επιχειρήσεις, καθώς και να δώσει την δυνατότητα σε προγραμματιστές από όλο τον κόσμο να είτε να γράψουν τις δικές τους εφαρμογές είτε να γράφουν προγράμματα που θα τα ενσωματώνουν στις εφαρμογές που έχει αναπτύξει ήδη η εταιρία για τους πελάτες της.

Create Sales Order with BAPI Function

Create sales Order in SAP R/3 with BAPI funcion :


BAPI_SALESORDER_CREATEFROMDAT2 

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
ORDER_HEADER_IN =
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
* IMPORTING
* SALESDOCUMENT =
TABLES
* RETURN =
* ORDER_ITEMS_IN =
* ORDER_ITEMS_INX =
ORDER_PARTNERS =
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
.

Original Article : http://developerpages.gr/index.php/el/desktop-development-2/abap/16-bapi1

Create Purchase Order with BAPI Function

Create purchase order with BAPI Function :


BAPI_PO_CREATE

CALL FUNCTION 'BAPI_PO_CREATE'
EXPORTING
PO_HEADER =
* PO_HEADER_ADD_DATA =
* HEADER_ADD_DATA_RELEVANT =
* PO_ADDRESS =
* SKIP_ITEMS_WITH_ERROR = 'X'
* ITEM_ADD_DATA_RELEVANT =
* HEADER_TECH_FIELDS =
* IMPORTING
* PURCHASEORDER =
TABLES
PO_ITEMS =
* PO_ITEM_ADD_DATA =
PO_ITEM_SCHEDULES =
* PO_ITEM_ACCOUNT_ASSIGNMENT =
* PO_ITEM_TEXT =
* RETURN =
* PO_LIMITS =
* PO_CONTRACT_LIMITS =
* PO_SERVICES =
* PO_SRV_ACCASS_VALUES =
* PO_SERVICES_TEXT =
* PO_BUSINESS_PARTNER =
* EXTENSIONIN =
* POADDRDELIVERY =
.
Original Article : http://developerpages.gr/index.php/el/desktop-development-2/abap/18-delivery-bapi-function

Create Delivery with BAPI Function

Create  Delivery  with BAPI Function :

BAPI_OUTB_DELIVERY_CREATE_SLS
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_SLS'
* EXPORTING
* SHIP_POINT =
* DUE_DATE =
* DEBUG_FLG =
* NO_DEQUEUE = ' '
* IMPORTING
* DELIVERY =
* NUM_DELIVERIES =
TABLES
SALES_ORDER_ITEMS =
* SERIAL_NUMBERS =
* EXTENSION_IN =
* DELIVERIES =
* CREATED_ITEMS =
* EXTENSION_OUT =
* RETURN =
.

Original article : http://developerpages.gr/index.php/el/desktop-development-2/abap/18-delivery-bapi-function

C# "Hello World" Program

Γράφοντας "Hello World" με C#


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello World!");
        }
    }
}
Original Article : http://developerpages.gr/index.php/el/desktop-development-2/c-languages/8-c-hello-world-program

C++ "Hello World" Program

Γράφοντας "Hello World" με C++

#include "stdafx.h"
#include "conio.h"
using namespace std;

void main(){
    cout << "Hello World" << endl;
    getch();
}

Original Article : http://developerpages.gr/index.php/el/desktop-development-2/c-languages/9-c-hello-world-program1

Πληροφορίες για C#

Πληροφορίες για την γλώσσα C# μπορείτε να διαβάσετε εδώ είτε να θέσετε ερωτήματα και να διαβάσετε απαντήσεις  στο  χώρο συζητήσεων που έχει δημιουργηθεί στο developerpages.gr κάνοντας κλικ εδώ

Προγραμματισμός με C++

Πληροφορίες  για προγραμματισμό με C++ μπορείτε να βρείτε στο site http://www.cplusplus.com/ είτε να θέσετε ερωτήματα και να διαβάσετε απαντήσεις  στο  χώρο συζητήσεων που έχει δημιουργηθεί στο developerpages.gr κάνοντας κλικ εδώ
Μπορείτε να κατεβάσετε δωρεάν εργαλεία για προγραμματισμό με C++ απο τα παρακάτω sites :

Java "Hello World " Program

Γράφοντας "Hello World !" με Java :


public class helloworld {

        public static void main(String args[])
        {
           System.out.println("Hello World!");
        }
}
Original article : http://developerpages.gr/index.php/el/desktop-development-2/java/6-java-hello-world-program

Download Java SE ans IDE's

Ακολουθούν links από τα οποία μπορείτε να κατεβάσετε την Java καθώς και περιβάλλοντα ανάπτυξης
Μπορείτε να κατεβάσετε την Java SE από εδώ
και το eclipse IDE από εδώ
είτε Java SE μαζί με το IDE NetBeans από εδώ

Original Article : http://developerpages.gr/index.php/el/desktop-development-2/java/7-download-java-se-ans-ide-s

How to get List of Java Threads

The following code returns a list of Java Threads :
package ListThreads;

import java.util.Set;

public class ListOfThreads {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Set threadSet = Thread.getAllStackTraces().keySet();
Thread[] threadArray = threadSet.toArray(new Thread[threadSet.size()]);
for(int i=0;i
System.out.println(threadArray[i].getName().toString());
}
}
}
Original Article : http://developerpages.gr/index.php/el/desktop-development-2/java/47-how-to-get-list-of-java-threads

Select data from mysql database with PHP

How to select data from mysql database with php :
1. Make connection to mysql
2. Execute query
3. Write results to page
Example :

<?php
$con = mysql_connect("localhost","root","12345");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("test_db", $con);

$result = mysql_query("SELECT * from example_table");


echo "<table border='1'>

<tr>
<th>id</th>
<th>Firstname</th>
<th>Lastname</th>
</tr>";

while($row = mysql_fetch_array($result))
{
echo "";
echo "" . $row['id'] . "";
echo "" . $row['FirstName'] . "";
echo "" . $row['LastName'] . "";
echo "";
}

mysql_close($con);
?>
and the output is :

Original Article : http://developerpages.gr/index.php/el/web-development-2/php/64-select-data-from-mysql-database-with-php

Thursday, May 3, 2012

Write data to text file with Java

Create text file and write data with java :
/*
* www.developerpages.gr
* Create text file and write data
*/
package writetofile;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.logging.Level;
import java.util.logging.Logger;


public class WriteToFile {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

FileWriter outFile;
try {
outFile = new FileWriter("test.txt");
PrintWriter out = new PrintWriter(outFile);
out.println("www.developerpages.gr");
out.println("---------------------");
out.println("write Test data into text file ");
out.close();
} catch (IOException ex) {
Logger.getLogger(WriteToFile.class.getName()).log(Level.SEVERE, null, ex);
}

}
}
Original Article : http://developerpages.gr/index.php/el/desktop-development-2/java/54-write-data-to-text-file-with-java

Read data from text file with java

Read data from text file with java and write to screen :
* www.Developerpages.gr
* Read data from text file
*/
package readfromfile;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;


public class ReadFromFile {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String fileLine;

try {
FileReader inputFile = new FileReader("test.txt");
BufferedReader bufReader = new BufferedReader(inputFile);
try {
while (( fileLine = bufReader.readLine()) != null){
System.out.println(fileLine);
}
} catch (IOException ex) {
Logger.getLogger(ReadFromFile.class.getName()).log(Level.SEVERE, null, ex);
}

} catch (FileNotFoundException ex) {
Logger.getLogger(ReadFromFile.class.getName()).log(Level.SEVERE, null, ex);
}


}
}

file test.txt :
www.developerpages.gr
---------------------
Read Test data from text file
Run program :

Original article :  http://developerpages.gr/index.php/el/desktop-development-2/java/55-read-data-from-text-file-with-java

Load image into abap internal table

The following code load image file into abap internal table :
REPORT zload_photo.

parameters : p_file(255).

DATA: BEGIN OF i_photo OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA: END OF i_photo.

if p_file <> ''.

OPEN DATASET p_file FOR INPUT IN BINARY MODE.
IF sy-subrc <> 0.
write :/ 'file ', p_file, ' Cannot open !'.
else.
DO.
CLEAR i_photo.
READ DATASET p_file INTO i_photo.
IF sy-subrc EQ 0.
APPEND i_photo.
ELSE.
APPEND i_photo. "<---------- force to append last row
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET p_file.
endif.
endif.
Original Article : http://developerpages.gr/index.php/el/desktop-development-2/abap/61-load-image-into-abap-internal-table