Tuesday, April 30, 2013

ABAP Program with Editable ALV Grid Contents

Using ALV Grid is always beneficial in terms operations and activities we can perform on the data. It even allow us to download data in various formats. But when compared to Table Control, its main disadvantage is, un-editable / read-only data.


Here is a simple program to make certain cells of an ALV grid control editable.
Editable Table Grid
Editable Table Grid

In present context the VBRK details are displayed where the KALSM is editable only where Sales Organization(VKORG) is ’0300′.
Note: Please do the following before executing the program.
1) create the gui interface ‘pf-status’ (with BACK and EXIT buttons) and a container ( give name as CONTAINER) for the screen.
2) In PBO of screen, write ‘MODULE LIST.’ after ‘MODULE STATUS_0100′.








Wednesday, April 24, 2013

The difference between INSERT, UPDATE, and MODIFY


Here's a very common syntactic question: What's the difference between INSERT, UPDATE, and MODIFY?
The answer is plain and simple:

INSERT - inserts a new record. INSERT expects that a record with the required key does NOT exist in the table. Therefore, if a record with the same key already exists, a runtime error occurs. For more details on INSERT, visit here.

UPDATE - update an existing record. UPDATE expects that a record with required key exists in the table. If a record with the required key does not exist, it issue an error (sy-subrc is 4). For more details on UPDATE, visit here.

MODIFY - acts like a combination of INSERT and UPDATE. If a record with the specified key does not exist, it adds it to the table. If a record with the specified key does exist, it modifies it. So MODIFY actually acts like "Insert or change record". To read more about MODIFY, visit here.

To summarize:
INSERT - adds a new record to the table. If the row (key) exists, issues an error.
UPDATE - updates an existing record to the table. If the row (key) does not exist, issues an error.
MODIFY - If the key exists, modifies the record. If the key does not exist, adds the record to the table.

Iterating On a Table Using Field Symbols


Say you have a Table called “table_name”, of line type “table_row”, and you wish to iterate on it and perhaps change the rows while you’re iterating. You can do it in ABAP using field symbols.
First, you need to define the field symbol. In our example it’s called “symbol_name”


FIELD-SYMBOLS <symbol_name> TYPE table_row.


Now, you can iterate over the table, assigning each row to the field symbol


LOOP AT table_name ASSIGNING <symbol_name>.
...
ENDLOOP


On each iteration, you can manipulate the table using the field symbol. Any change done to the field symbol is also done on the table. It’s like using a pointer in C or a reference variable in C++.

Important note: When using field symbols on sorted orhashed table, then you may not change the key fields of these tables. Doing so results in a runtime error. The logic is simple: changing the key will change the sorting order or hashing order of the table, and since you’re in mid-iteration, it may cause you to re-iterate on these rows. You Java developers out there may be familiar with this concept, as it also exists in Java.

Sunday, April 21, 2013

Macro to validate Date


PROGRAM ZDATE_VALIDATE .

* Validation of Date

DEFINE VAL_DATE.

  CLEAR: %_DATE1,

         %_DATE2.

  %_DATE1(4)   = &1"Year

  %_DATE1+4(2) = &2"Month

  %_DATE1+6(2) = &3"Date

  %_DATE2 = %_DATE1 - 1.

  %_DATE2 = %_DATE2 + 1.

  IF %_DATE1 <> %_DATE2.

    SY-SUBRC = 1.

  ELSE.

    SY-SUBRC = 0.

  ENDIF.

END-OF-DEFINITION.


DEFINE VALDATE.

***************************************************

* Passing Parameters: &1 - Date

*                     &2 - Date Format

* Date Format:

* DDMMYYYY  MMDDYYYY  YYYYMMDD  YYYYDDMM

*

* SY-SUBRC Return Value:

*                     1 invalid date

*                     0 Valid Date

*                     2 Invalid Format

***************************************************

  DATA: %_DATE1 LIKE SY-DATUM  ,

        %_DATE2 LIKE SY-DATUM ,

        %_DATE3(8).

  case &2.

    when 'DDMMYYYY'.

      val_date &1+4(4) &1+2(2) &1+0(2).

    when 'MMDDYYYY'.

      val_date &1+4(4) &1+0(2) &1+2(2).

    when 'YYYYMMDD'.

      val_date &1+0(4) &1+4(2) &1+6(2).

    when 'MMYYYYDD'.

      val_date &1+2(4) &1+0(2) &1+6(2).

    when others.

      sy-subrc =  2.

  endcase.

END-OF-DEFINITION.



***********************************************

*      SAMPLE USE of above MACRO              *

***********************************************



PARAMETER v_date TYPE date.

VALDATE V_DATE 'DDMMYYYY'.

IF SY-SUBRC = 0.

  WRITE:/ 'Valid Date'.

ELSEIF SY-SUBRC = 1.

  WRITE:/ 'Invalid Date'.

ELSEIF SY-SUBRC = 2.

  WRITE:/ 'Invalid Format'.

ENDIF.

*********************************************************************

A Short Tutorial on User Exits

User exits :
1. Introduction
2. How to find user exits
3. Using Project management of SAP Enhancements 
Content Author: Abhishek

1. Introduction:
User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
The naming standard of function modules for functionmodule exits is: 
EXIT_<program name><3 digit suffix>
The call to a functionmodule exit is implemented as:
CALL CUSTOMER.-FUNCTION <3 digit suffix>

Example:
The program for transaction VA01 Create salesorder is SAPMV45A
If you search for CALL CUSTOMER-FUNCTION i program
SAPMV45A you will find ( Among other user exits):
CALL CUSTOMER-FUNCTION '003'
  exporting
    xvbak   = vbak
    xvbuk   = vbuk
    xkomk   = tkomk
  importing
    lvf_subrc = lvf_subrc
  tables
    xvbfa = xvbfa
    xvbap = xvbap
    xvbup = xvbup.
The exit calls function module EXIT_SAPMV45A_003

2. How to find user exits?

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT
If you know the Exit name, go to transaction CMOD.
Choose menu Utillities->SAP Enhancements. Enter the exit name and press enter.
You will now come to a screen that shows the function module exits for the exit.

3. Using Project management of SAP Enhancements, we want to create a project to enahance trasnaction

VA01 .
- Go to transaction CMOD
- Create a project called ZVA01
- Choose the Enhancement assign radio button and press the Change button
In the first column enter V45A0002 Predefine sold-to party in sales document.
Note that an enhancement can only be used in 1 project. If the enhancement is already in use, and error message will be displayed
Press Save

Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.
Now the function module is displayed. Double click on include ZXVVAU04 in the function module
Insert the following code into the include: E_KUNNR = '1010000000'.
Activate the include program. Go back to CMOD and activate the project.
Goto transaction VA01 and craete a salesorder.
Note that Sold-to-party now automatically is "1010000000"

System Fields for Current Date and Time



The following system fields are always set automatically. 

The GET TIME statement synchronizes the time on the application server with the time on the database server and writes it to the field SY-UZEIT. SY-DATUM and the system fields for the local timezone (SY-TIMLO, SY-DATLO, and SY-ZONLO) are also reset.

SY-DATLO
User’s local date, for example 19981129, 19990628, …

SY-DATUM
Current application server date, for example 19981130, 19990627, …

SY-DAYST
X during summertime, otherwise space.

SY-FDAYW
Factory calendar day of the week: Monday = 1 … Friday = 5.

SY-TIMLO
User’s local time, for example 154353, 225312, …

SY-TZONE
Time difference in seconds between local time and Greenwich Mean Time (UTC), for example, 
360, 10800.

SY-UZEIT
Current application server time. for example 164353, 215312, …

SY-ZONLO
User’s time zone, for example, EST, UTC, …

Wednesday, April 17, 2013

Calling a web service in ABAP that validates an email id


In this tutorial, we would use a free web service in an ABAP program  which validates an email-id. For more details regarding this web service, click here

Create a program and use the following code:


REPORT zvalidate_email.

PARAMETERS: p_mail(100) LOWER CASE.                 " E-Mail id to be verified
DATA: http_client TYPE REF TO if_http_client .
DATA: w_string TYPE string ,
      w_result TYPE string ,
      r_str    TYPE string .
DATA: result_tab TYPE TABLE OF string.
START-OF-SELECTION .
  CLEAR w_string .
  CONCATENATE
  'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email=' p_mail
 INTO
  w_string .
  CALL METHOD cl_http_client=>create_by_url
    EXPORTING
      url                = w_string
    IMPORTING
      client             = http_client
    EXCEPTIONS
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      OTHERS             = 4.
 
CALL METHOD http_client->send
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2.
  CALL METHOD http_client->receive
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3.
  CLEAR w_result .
  w_result = http_client->response->get_cdata( ).
  REFRESH result_tab .
  SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .
  READ TABLE result_tab INTO r_str INDEX 2.
  IF r_str+44(1) = 't'.
    WRITE:/ 'Valid email address'.
  ELSE.
    WRITE:/ 'Invalid email address'.
  ENDIF.



Output:

Creation of a web service in SAP


Creating a Web Service

In the function library (SE37), display the function module.
Open the function Module         : ME_GET_CURRENT_USER_ID 



Choose Utilities  -> More Utilities  -> Creating a Web Service  -> From Function Module. 

 
In the Web Service Creation Wizard, choose Continue. 

 Enter the name of the Web Service Definition



In the following screen, enter the required data and select the checkbox Name Mapping. If the checkbox Name Mapping is ticked, the wizard accepts the existing names for the end point.

Choose Continue

In the following screen, enter the required data and select the checkbox Release Service for runtime

Choose Continue.

Choose Complete.
Save as local object.


Open the transaction WSADMIN.

 

Select the Web service definition you have created under SOAP Application for RFC-Compliant FMs
Select and expand the “ZWEB_GET_CURRENT_USER” and select the Web Service as shown in screen.
 

You have entered the address of the application server on which the J2EE Engine is running in transaction WSADMIN under Goto  -> Administration Settings.  

Check the J2EE Server and check in your server.



Choose Web Service Homepage (Execute Button ). 


Select the “Document Style” under Style definition in WSDL.


The Web service requires authentication. 
Enter the user and password  
Click on the “Test”. 
Select the “Operations”.
Fill in values for the method parameters underneath the heading Request if required. Choose Send. 
The required values are displayed under the Response heading. The Web service has not been tested successfully. 

Create Number Range Object


Creation of a Number range object:

1.      Go to transaction SNRO (Simple way to remember is SAP NumberRangeObject).


2.      Enter the number range object name and press CREATE.
3.      Enter the description, Long text and Number Length domain andWarning % as shown below:



Warning% Ã  Assume that an interval is defined from 1 to 1000. If you want to issue a warning at the number 900, enter 10 (%) here.
4.      Press SAVE. You would get a prompt as shown below:

 

5.      Press YES and assign the object to a local class.
6.      Now click on “Number Ranges” button on the application toolbar.

 

7.      Click on “Change Intervals”.

 

8.      Click on “Insert Interval”.
9.      Enter the values as shown below:

 

10. Click “Insert” and then SAVE. The number range object is generated. 

Testing the Number Range Object: 

We can use the function module, NUMBER_GET_NEXT, to get the next number of any number range object. 
Following is a test program to get the next available number of the object created above:  
REPORT zsnro_test.

DATA:
NUMBER TYPE I.

CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
   nr_range_nr = '01'
   object = 'ZDEMO'
IMPORTING
  NUMBER = NUMBER
EXCEPTIONS
  INTERVAL_NOT_FOUND = 1
  NUMBER_RANGE_NOT_INTERN = 2
  OBJECT_NOT_FOUND = 3
  QUANTITY_IS_0 = 4
  QUANTITY_IS_NOT_1 = 5
  INTERVAL_OVERFLOW = 6
  BUFFER_OVERFLOW = 7
  OTHERS = 8
.
IF sy-subrc <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Write :/ 'Next available number is: ', Number. 

Tuesday, April 9, 2013

SAP LSMW Explained with example

LSMW is a tool used to tranfer data from legacy system to R/3 periodically or once.It supports conversion of data and Batch Input,BAPI,IDOC or Direct Input can be used as the method for transfer of data.Total of 26 processing steps are available in LSMW ,In case of data transfer using Batch Input only 14 steps are required.
Execute the transaction LSMW to start transfer of data,Before using the LSMW we should have good knowledge about the business object and the fields that will be transferred.
There are 14 steps that are normally used and these are :
 
1)   Maintain Object Attributes.
2)   Maintain Source Structures.
3)   Maintain Source Fields.
4)   Maintain Structure Relations
5)   Maintain Field Mapping and conversion rules .
6)   Maintain Fixed Values,translations ,user defined routines.
7)   Specify Files .
8)   Assign Files .
9)   Read DATA.
10) Display Read Data.
11) Convert Data.
12) Display Converted Data.
13) Create Batch Input Session.
14) Run Batch Input Sesion.
 

Opening Screen of LSMW
lsmwe1.jpg

How to Setting up LSMW on Mini Basis

Setting up LSMW on Mini Basis
You have setup LSMW on mini basis, 46D, to see how it intergrate LSMW and SXDA into one project. 
Your system is Windows XP home, and you got minibasis from the book ABAP Objects: An introduction to Programming SAP Applications, Horst Keller and Sascha Kruger. 
 
Installing LSMW on Mini Basis 
To install LSMW on mini basis you need a little luck, patience and to read the documents that SAP supply. ‘LSMW180_HowTo_e.doc’ from www.service.sap.com/lsmw, OSS note 449270 from www.service.sap.com/notes, and two documents from the kernel disc, ‘mini_doc.htm’ and ‘mbs_patch1.zip\readme.txt’. 

The first thing we need to do is set up mini basis to have a transport system. This is as per ‘mini_doc.htm’. 
• Log on as user DDIC. 
• Call transaction SE38 and execute program MR3_TMS_CONFIG. You should respond NO to the popup if you have already created any transports. 
• Using the editor <MBS_DIR>\sappad.exe change the profile <MBS_DIR>\MBS_D00.pfl. 
Configure one background process by setting the parameter rdisp/wp_no_btc = 1. An alternative is to use transaction RZ10, import the profiles, go:- Utilities -> Import profiles -> Of active servers. Then update the profile MBS_D00, extended maintenance. 
• Restart the SAP system MBS. 
• Execute program RDDNEWPP (transaction SE38), which schedules the background job RDDIMPDP. 

We now need to correct the errors that the transport system has. 
• Go to transaction STMS to correct the transport configuration. Go:- Overview -> Systems, then select the MBS line and view it (SAP system -> display). On the TRANSPORT TOOL tab change the entry for TRANSDIR to the physical path on your system e.g. C:\MBS\trans. Save and return one level then go to:- Extras -> Distribute TMS configuration. (For some reason without this change the tp command cannot find the right directory). (you could try ‘..\’ or ‘..’). 
• Using the editor <MBS_DIR>\sappad.exe change the profile <MBS_DIR>\DEFAULT.pfl. Add the message server host rdisp/msserv = sapmsMBS. This fixes the errors when importing a transport. Read OSS note 449270 for more details. Again you could use transaction RZ10. 
• Restart the SAP system MBS. 
• Execute program RDDNEWPP (transaction SE38), which schedules the background job RDDIMPDP. 

Now download the appropriate version of LSMW, ‘LSMW180.car’ from www.service.sap.com/lsmw to your computer. Now we follow the instructions from the document ‘LSMW180_HowTo_e.doc’ but these are for a Unix operating system so we work out how to translate them by reading the ‘mbs_patch1.zip\readme.txt’ document. 
One of the commands that we will need is the ‘CAR’ command. To get this copy the file ‘E:\R3SETUP\SAPCAR.exe’ from your kernel disc to your MBS directory. 

Now we are ready to start. 
• Start up mini basis and logon as DDIC. Check that RDDIMPDP is released, System -> services -> Jobs -> Job overview (enter ‘*’ in the “start after event” field). If not execute the program RDDNEWPP. 
• Start up another Dos prompt window and change the directory to your MBS one; Cd <MBS_DIR> 
• Run the command to set the database environment; Dbenv.cmd 
• Change directory to the ‘trans’ one; cd trans 
• Unpack the archive file named LSMW180.car ; ..\sapcar.exe –xvf <DIR>\lsmw180.car 
• Switch to directory <MBS_DIR>\trans\bin; cd bin 
• Import the transport request (U46K001009 is the request for LSMW 1.8.0); ..\..\tp.exe addtobuffer U46K001009 MBS pf=TP_DOMAIN_MBS.pfl ..\..\tp.exe import U46K001009 MBS pf=TP_DOMAIN_MBS.pfl 

The whole import step took about 45 minutes to an hour. 
While we wait for this to run create a text file with the contents; 
import 
client cascade = yes 
file = '<MBS_DIR>\trans\data\R001009.U46' 
including 'R3TRTABU' 
including 'R3TRTDAT' 
and save it as ‘LSMW.cmd’. When the import step has competed we distribute the authorisation profiles by running this command; ..\..\r3trans.exe –u 1 <DIR>\LSMW.cmd 
Now go to transaction SU01 and add the appropriate authorisations for DDIC and BCUSER etc. Log off and log back on for them to take effect. YOU’RE DONE!

SAPScript Print Program

Print Program and Function modules used in it .
  The  function modules like OPEN_FORM
CLOSE_FORM,COMMAND_FORM ,WRITE_FORM and Print Program Etc Explained with example.
The print program is used to print the actual form ,the functions the print program has to do include retrieving of data from database tables , selecting a FORM and printing of TEXT ELEMENTS in a desired sequence.
            The function modules used in aprint prgram are :
 
OPEN_FORM
START_FORM
WRITE_FORM
CONTROL_FORM
END_FORM
CLOSE_FROM
 
To start printing a form we must use OPEN_FORM and in the end we should use CLOSE_FORM to complete the spool request.
 
Function modules in detail.
 
OPEN_FORM function module
This function module should be called first before any printing can take place , here we specify the name of the form and the print language.
 
CALL FUNCTION 'OPEN_FORM'
EXPORTING
   DIALOG         = 'X'
   DEVICE         = 'PRINTER'
   FORM            = form name
   LANGUAGE   = SY-LANGU
*  OPTIONS      =
EXCEPTIONS
   CANCELLED  = 1
   DEVICE          = 2
   FORM            = 3
   OTHERS        = 11
.
 
IF SY-SUBRC NE 0.
MESSAGE ...
ENDIF.
 
In the above function module the parameter
FORM      = Name of form
DEVICE    = PRINTER (print using spool),TELEFAX (fax output)
                   SCREEN (output to screen)
OPTIONS = It is a structure of type ITCPO and it controls the various
                   attributes like number of copies , print preview etc.
 
START_FROM function module
 
This function module is called if we want to use different forms with similar characterstics in a single spool request,it must be closed by END_FORM function module.
 
 
CALL FUNCTION 'START_FORM'
EXPORTING
  FORM            =
  LANGUAGE    =
  STARTPAGE  =
EXCEPTIONS
  FORM            = 1
  OTHERS        = 7
.
 
IF SY-SUBRC NE 0.
MESSAGE ...
ENDIF.
 
WRITE_FORM Function module
 
This function module is used to write text in a window in the form using
text elements (/:E element). We can specify whether the text is to be appended , replaced or added and in which portion of the window it will be printed i.e TOP, BOTTOM ,BODY. In this function module actual printing takes place.
 
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT    =
   FUNCTION  =
   TYPE          =
   WINDOW    =
EXCEPTIONS
   ELEMENT   =  1
    OTHERS    =  9
.
 
IF SY-SUBRC NE 0.
MESSAGE ...
ENDIF.
 
Here in this function module the ELEMENT specifies which textelement is
printed . WINDOW specifies which window of the form to be print in.
TYPE specifies the output area of the window TOP,BOTTOM,BODY.
FUNCTION specifies whether the text is to be appended , replaced or added.
 
CLOSE_FORM function module
 
This function module should be called in the end and it has no exporting
parameter.
 
CALL FUNCTION 'CLOSE_FROM'
IMPORTING
*   RESULT     =
EXCEPTIONS
    UNOPENED = 1
    OTHERS     =  5
 
.
 
IF SY-SUBRC NE 0.
MESSAGE ...
ENDIF.
   Here the result parameteer returns the status information and print/fax parameters after the form has been printed.
 
 
CONTROL_FORM function module
 
 This function module is used to insert SAPScript control commands like NEW-PAGE etc from whithin the ABAP program.
 
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
  COMMAND    =
EXCEPTIONS
  UNOPENED   = 1
  OTHERS        = 3
.
 
IF SY-SUBRC NE 0.
MESSAGE ...
ENDIF.
 
 
NOTE: The print program and the form are stored in the table TNAPR

Mini SAP System Requirement

The system Requirements are :
 
General Requirements
Operating System:
Windows 2000 (Service Pack2  or higher);
Windows XP (Home or Professional);
Windows NT
Linux
Internet Explorer 5.01 or higher
At least 192 MB RAM  (recommended to have 256 MB of RAM)
At least 512 MB paging file
At least 3.2 GB disk space (recommended to have 6 GB hard disk drive space)
(120 MB DB software, 2.9 GB SAP data, 100 MB SAP GUI + temporary free space for the installation)
The file  C:\WINNT\system32\drivers\etc\services (Windows 2000) or
C:\Windows\system\32\drivers\etc\services (Windows XP)  must not include an entry for port 3600.
A possible entry can be excluded by using the symbol '#'.
No SAPDB must be installed on your PC.
The hostname of the PC must not be longer than 13 characters.
The Network must be configured for installation and
the MS Loopback Adapter must be configured when you start the system without a network connection!
Special Requirements for Installations on Windows XP
In the  file C:\Windows\system\32\drivers\etc\hosts the current IP address and the host name must be defined as
<IP address><Host name>
Open the network connectivity definition with start->control panel->network connections for defining the network connection. Select  ->extended-> allow other users in network. Activate new configurations.
Select remote desktop within extended configuration menu.
*********

What is MiniSAP?
How to get MiniSAP?
In order to get the free Mini SAP, you need to buy the following book where in you will get two CD's of SAP WAS (Web Application Server) which can be installed in your system and practice ABAP programming etc...
*******
You can get your MiniSAP with the book :-
ABAP Objects: An introduction to Programming SAP Applications
by Horst Keller, Sascha Kruger. SAP Press.
ISBN 0-201-75080-5.
It comes with 2 cds (Mini Basis SAP kernel + database).
It also includes the SQL server.
or

ABAP Objects Reference Book H. Keller, J. Jacobitz
The first complete language reference book for ABAP!
This book represents the first complete and systematic language reference book for ABAP Objects.
Based on ABAP Objects, this 1000+ page book describes all concepts of modern ABAP up to Release 7.0 (including a "sneak preview" of Release 7.10). Brand new topics found in the new edition include SAP NetWeaver Application Server ABAP, Regular Expressions, Shared Objects, class-based exception handling, assertions, Web Dynpro for ABAP, Object Services, dynamic programming, interface technologies (RFC, ICF, XML), and test tools, among others. Procedural techniques are also covered where necessary.
Highlights:
  • SAP NetWeaver Application Server ABAP
  • Development basics: ABAP Workbench, Object Navigator, Class Builder, etc.
  • Basic elements of ABAP Objects
  • Classic modularisation and program execution 
  • Avoiding erros and error handling
  • GUI programming: dynpros, lists, selection screens, controls and Web Dynpro 
  • Persistent data: DB access, Object Services, file interface, data clusters
  • Dynamic programming: field symbols, RTTS, dynamic tokens and procedure calls 
  • Data und communication interfaces: RFC, ICF, web services, XML
The book also includes two CDs carrying a fully operational SAP Basis System, and containing all the example programs from the book. **************
Alternatively, if you are a customer of SAP and have an OSS user-id, then you can also buy the Minisap software directly from the Sap service market.
MiniSAP are available via the SAP Developer Network (SDN).
http://www.sdn.sap.com/irj/scn/nw-downloads
- First register yourself.
- Then go to the software download page.
- Once there, you will be able to see the different trial versions of SAP software with different system requirements.
Minisap contains only SAP BASIS where you can do your ABAP.
It will costs you 30 EURO.

What is SLIS in ALV

SLIS is the type library for ALV grid.

If you'll use the ALV you have to add TYPE-POOLS : SLIS. command at the beginning of your code.
   
Consider these :
slis_t_fieldcat_alv is containing "_t_"
It means that it is an internal table and slis_fieldcat_alv is header line of that.
   
Here is a practical example for alv grid :
Just think that you have an internal table named 'ITAB' to show.
   
Step1  :  First add these lines to your code :

TYPE-POOLS : SLIS.
  
DATA ALV_PROG_NAME LIKE SY-REPID.
ALV_PROG_NAME = SY-REPID.
  
DATA : ALV_ITAB_NAME(30),
L_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
ALV_ITAB_NAME = 'ITAB'.  "!!Write here the name of your internal table
   
Step 2 : Add these two function :
The first function is filling the fieldcat L_FIELDCAT that you described, second is showing it on the screen.
   
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
  I_PROGRAM_NAME = ALV_PROG_NAME
  I_INTERNAL_TABNAME = ALV_ITAB_NAME
  * I_STRUCTURE_NAME =
  * I_CLIENT_NEVER_DISPLAY = 'X'
  I_INCLNAME = ALV_PROG_NAME
  * I_BYPASSING_BUFFER =
  * I_BUFFER_ACTIVE =
  CHANGING
  CT_FIELDCAT = L_FIELDCAT
  EXCEPTIONS
  INCONSISTENT_INTERFACE = 1
  PROGRAM_ERROR = 2
  OTHERS = 3
  .
IF SY-SUBRC <> 0.
  * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
  * I_INTERFACE_CHECK = ' '
  * I_BYPASSING_BUFFER =
  * I_BUFFER_ACTIVE = ' '
  I_CALLBACK_PROGRAM = ALV_PROG_NAME
  * I_CALLBACK_PF_STATUS_SET = ' '
  * I_CALLBACK_USER_COMMAND = ' '
  * I_CALLBACK_TOP_OF_PAGE = ' '
  * I_CALLBACK_HTML_TOP_OF_PAGE = ' '
  * I_CALLBACK_HTML_END_OF_LIST = ' '
  * I_STRUCTURE_NAME =
  * I_BACKGROUND_ID = ' '
  * I_GRID_TITLE =
  * I_GRID_SETTINGS =
  * IS_LAYOUT =
  IT_FIELDCAT = L_FIELDCAT
  * IT_EXCLUDING =
  * IT_SPECIAL_GROUPS =
  * IT_SORT =
  * IT_FILTER =
  * IS_SEL_HIDE =
  * I_DEFAULT = 'X'
  * I_SAVE = ' '
  * IS_VARIANT =
  * IT_EVENTS =
  * IT_EVENT_EXIT =
  * IS_PRINT =
  * IS_REPREP_ID =
  * I_SCREEN_START_COLUMN = 0
  * I_SCREEN_START_LINE = 0
  * I_SCREEN_END_COLUMN = 0
  * I_SCREEN_END_LINE = 0
  * IT_ALV_GRAPHICS =
  * IT_ADD_FIELDCAT =
  * IT_HYPERLINK =
  * I_HTML_HEIGHT_TOP =
  * I_HTML_HEIGHT_END =
  * IT_EXCEPT_QINFO =
  * IMPORTING
  * E_EXIT_CAUSED_BY_CALLER =
  * ES_EXIT_CAUSED_BY_USER =
  TABLES
  T_OUTTAB = ITAB[]   "Write here the name of your internal table + []
  * EXCEPTIONS
  * PROGRAM_ERROR = 1
  * OTHERS = 2
  .
IF SY-SUBRC <> 0.
  * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.                               

SAPScript Important Programs

Here are some useful programs for SAPSCRIPT development/search ...

RSTXFCAT  -  Program to find out SAP Scirpt names (Search Program)
RSTXCDM1 -  SAPscript: Sample Program for Form Printing
RSTXCNVR -   Converting SAPscript standard text to RAW format (ASCII)
RSTXCPDF   -  Routines for Converting OTF Format to PDF Format
RSTXDBUG   - Activate/Deactivate Form Debugger
RSTXFCAT    - Find Forms
RSTXFCPY    - Copy Forms Between Clients
RSTXFCOM  - Comparison of Two Forms
RSTXFCON   - SAPscript: Conversion of Page Format for Forms
RSTXFINF     - Comprehensive Information about a Specific Form
RSTXHTML   - Conversion of SAPscript Texts (ITF) to HTML
RSTXICON    - List of SAP icons and their names and SAP numbers <xxxxx>
RSTXSYMB   - List of SAP symbols and their names as well as <xxxxx> SAP number
RSTXR3TR     - Transport Program For SAPscript Transport Objects
RSTXSCAT    - Find Styles
RSTXSF01     - TrueType font installation for SAPscript/SmartForms
RSTXTCAT    - Find Standard Texts

Drop Down lists in the selection parameters

PROGRAM ztest.   TYPE-POOLS : vrm.   DATA : name TYPE vrm_id,        list TYPE vrm_values,        value LIKE LINE OF list. ...