Search

Loading
Showing posts with label ABAP. Show all posts
Showing posts with label ABAP. Show all posts

Monday, December 9, 2013

Open and display pdf file with SAP ABAP

The following ABAP Program open PDF file and display into SAP Screen :

Wednesday, January 30, 2013

Insert SAP CRM Product Relations with BAPI Fuction



The following simple code inserts SAP CRM Product Relations ( using BAPI Function ) :

Tuesday, January 29, 2013

Replace in ABAP Strings


Pattern-based replacement
1. REPLACE [{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF]
pattern
IN [section_of] dobj WITH new
[IN {BYTE|CHARACTER} MODE]
[{RESPECTING|IGNORING} CASE]
[REPLACEMENT COUNT rcnt]
{ {[REPLACEMENT OFFSET roff]
[REPLACEMENT LENGTH rlen]}
| [RESULTS result_tab|result_wa] }.
Position-based replacement
2. REPLACE SECTION [OFFSET off] [LENGTH len] OF dobj WITH new
[IN {BYTE|CHARACTER} MODE].

Thursday, January 17, 2013

Load budget in FM with BAPI_0050_CREATE


Load budget data in SAP FM with function  BAPI_0050_CREATE from text file :

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.