Saturday, 8 November 2014

PARAMETER IMPLEMENTATION



MONDAY, JANUARY 02, 2006

Parameters

Syntax
PARAMETERS name(length) [TYPE type or LIKE obj] DECIMALS d.
Examples
PARAMETERS: char1(20) TYPE C,
            date1 LIKE SY-DATUM,
            number1 TYPE P DECIMALS 2. 
Options
  • DEFAULT
    Example: 
    PARAMETERS p1(5) TYPE C DEFAULT ’we’.
  • MEMORY ID
    Example: 
    PARAMETERS p2(5) TYPE C MEMORY ID pid.
  • LOWER CASE
    Example:
    PARAMETERS f1(10) LOWER CASE.
  • VISIBLE LENGTH

Example:
PARAMETERS f1(10) TYPE C VISIBLE LENGTH 4.
  • OBLIGATORY
Example:
PARAMETERS f1(10) TYPE C OBLIGATORY.
  • MATCHCODE OBJECT
Example:
PARAMETERS p_belnr LIKE BKPF-BELNR MATCHCODE OBJECT zsh_f4_belnr.
  • VALUE CHECK
Example:
PARAMETERS p_belnr LIKE BKPF-BELNR OBLIGATORY VALUE CHECK.
  • AS CHECKBOX
Example:
PARAMETERS: c1 AS CHECKBOX DEFAULT ’X’.
  • RADIOBUTTON GROUP

Example:
PARAMETERS: r1 RADIOBUTTON GROUP rad1 DEFAULT ’X’,
            r2 RADIOBUTTON GROUP rad1,
            r3 RADIOBUTTON GROUP rad1.
  • NO-DISPLAY
Example:
PARAMETERS: f1(10) TYPE C NO-DISPLAY.
  • MODIF ID
Example: PARAMETERS: f1(10) MODIF ID GR1.

SUNDAY, JANUARY 01, 2006

Program Selections

When you want to create report in SAP, the selection screen will be displayed when we want to execute program. The syntax for create selections are compose of:

Data Declaration

In ABAP/4, we can declare data by command DATA.

Introduction

ABAP/4 (advanced business application program, 4th generation) is a language that we want to develop report or program in SAP system.
  1. Commenting
  2. Program Selections
  3. ABAP/4 Data Type

ABAP/4 Data Type

In ABAP/4, we can declare data by command DATA.
Type      Description  Initial Value C Character Space D Date ’00000000’
F Floating Point 0.0
I Integer 0
N Numeric Text ’0’
P Packed Decimal 0
T Time ’000000’
X Hexadecimals X00

SATURDAY, DECEMBER 31, 2005

Commenting

In ABAP/4, we have 2 formatting for comment:
  1. Line Comment: If you want to comment whole line, you can put * sign in front of the line.
    Example:
    * Comment Line
    WRITE: This is the example for commenting. 
  2. Partial Line Comment: If you want to comment partail of line, you can put " sign in front of the comment text
    Example:
    WRITE: This is the example for commenting.    "Comment Line

How to get windows filename

Method 1 
CALL FUNCTION ’KD_GET_FILENAME_ON_F4’ EXPORTING MASK = ’,*.txt,*.*’ STATIC = ’X’ CHANGING FILE_NAME = LV_FILE.
Method 2
     CALL FUNCTION ’F4_FILENAME’
       EXPORTING
         program_name  = syst-cprog
         dynpro_number = syst-dynnr
         field_name    = ’ ’
       IMPORTING
         file_name     = LV_FILE.

No comments:

Post a Comment