Posts

Showing posts from 2017

Using Cursor in ABAP

Image
Declare the Cursor: ·           The cursor is declared by the DATA statement with keyword CURSOR. Open Cursor Statement: ·           Open cursor opens a database cursor for a specific selection, defined after FOR. ·           It links the cursor variable (cr_spfli) to the database cursor. ·           If the cursor variable is already opened then it cannot be reopened. ·           The statement takes the cursor position at the first row of the resulting set. ·           The select statement declared after FOR doesn’t enter any record into any table or work area. ·           Select single statement cannot be used here. ·       ...

Parameter as LIST BOX

Image
Dropdown list  is a user interface element which displays a list of values from which a user can select one value. Follow the below steps to create a dropdown list in SAP ABAP selection screen. First build the list in the  INITIALIZATION  event. Capture the value selected by the user from the list in the  AT  SELECTION-SCREEN  event or keep all selected value in  the   INITIALIZATION   event . Use the selected value for further processing. TYPE-POOLS :  VRM . DATA :  GV_PLIST  TYPE  VRM_ID ,         GT_PLIST  TYPE  VRM_VALUES ,         GS_PLIST  LIKE  LINE  OF  GT_PLIST . PARAMETERS :  P_STATUS  AS  LISTBOX VISIBLE LENGTH  25  OBLIGATORY . INITIALIZATION . *  Built Status Parameter   GV_PLIST   =  'P_STATUS' .   BUILT_...

Call ABAP Webdynpro Application from a R/3 Transaction

Image
Here we build the code in SE38 to call a Webdynpro ABAP application    'WDR_TEST_NAVIGATION'  from R/3. REPORT  ZWEBDYNPRO. ***data declarations DATA : gv_url_string  TYPE  string ,      gv_url_c ( 250 )  TYPE  c . CONSTANTS : gc_config      TYPE  string  VALUE  '?SAP-WD-CONFIGID=ZWD_APP_CONFIGURATION' ,           gc_login_auth  TYPE  string  VALUE  '?sap-system-login-basic_auth=X' ,           gc_client      TYPE  string  VALUE  '&sap-client=' ,           gc_lang        TYPE  string  VALUE  '&sap-language=' . ***Get the Url of Webdynpro Applicaion with HTTPS...

Convert Unexpexted an Ampersand Symbol in Standard Text

Image
In standard text conversion, we have situation sometimes, that we found some character are unnecessary displayed as our expectation.   The sample is, when we type '&' ( ampersand symbol ) in the text, but the result are so weird. <(><)> is appear, see below pic: The solution is to use below function after text we get detail standard text:     CALL  FUNCTION  'CONVERT_ITF_TO_ASCII'      EXPORTING       CODEPAGE           =  '0000'       FORMATWIDTH        =  128        LANGUAGE           =  SY - LANGU       TABLETYPE          =  'ASC'      IMPORTING  ...

Simple Reporting Using ALV ( ABAP List Viewer ) with Dinamic Structure

Image
This is the simple report using one of SAP reporting method, ALV ( ABAP List Viewer ) . There are  two types of output displayed after program executing. Grid and List. Here we created a grid report,displaying data from standard table or customized table. We able to define the table we need to display, and how many record we require to shown in report as below result. Here the code: REPORT  YLISTTABLE . * Type pools declaration for ALV TYPE-POOLS :  SLIS . * Declarations for ALV DATA :  G_DYNTABLE   TYPE  REF  TO  DATA ,       LT_FIELDCAT  TYPE  SLIS_T_FIELDCAT_ALV ,       IS_LAYOUT    TYPE  SLIS_LAYOUT_ALV . * Field symbols declarations for dynamic table FIELD-SYMBOLS  :  <FT_TABLE>  TYPE  STANDARD  TABLE . ...

ABAP Overview

Image
ABAP stands for Advanced Business Application Programming, a 4GL (4th generation) language. Currently it is positioned, along with Java, as the main language for SAP application server programming. Let's start with the high level architecture of SAP system. The 3-tier Client/Server architecture of a typical SAP system is depicted as follows. The  Presentation layer  consists of any input device that can be used to control SAP system. This could be a web browser, a mobile device and so on. All the central processing takes place in  Application server . The Application server is not just one system in itself, but it can be multiple instances of the processing system. The server communicates with the  Database layer  that is usually kept on a separate server, mainly for performance reasons and also for security. Communication happens between each layer of the system, from the Presentation layer to the Database and then back up the chain. Note...