Search

Loading

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.

data : my_hello TYPE REF TO myfirstclass.

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.

Tuesday, June 19, 2012

Create SAP Customer Classification with BAPI function

The following code creates Sap Customer Classification using BAPI Function :

Load image into abap internal table

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

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 :

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