Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

As this is an ALV we have to use slis structures.

To display the data we have to use function module

CALL function ‘REUSE_ALV_GRID_DISPLAY’

In the exporting parameters

IT_FIELDCAT = IT_FCAT.

Tables

T_OUTTAB = it_mara

And In the tables we have to give whatever the internal table that is containing data

If we want to remove before zeroes in matnr then go to matnr field and add

Wa_fcat-NO_ZERO = ‘X’.

If we want to highlight the particular field row like matnr in output list then use

WA_fcat-HOTSPOT = ‘X’ .
So one hand symbol will be there instead of cursor on matnr, here one click on matnr is equal to
double click.

Now I wanted to make this report as interactive report.

So we need to pass two more parameters here.

SY-REPID is a system variable which captures report name.

USER COMMAND is the event we have to pass.

After that we have to write FORM and ENDFORM.

SY-UCOMM is a system variable which will hold the user action. This sy-ucomm variable will capture
one value whenever an user do any action.
When user perform any action in the output the value of r_ucomm means the value ofsy_ucomm is

‘&IC1’ .

Tabi index one field is there which is of type sy-tabix which will store the line no that the user has
clicked.

Here our requirement is to when we click on any line the particular material description will be
displayed in the next page.

In order to do that we need to know which material no the user has clicked, the line that user clicked
on will be stored in sy-tabix so from this field value we came to know what material description we
need to give in o/p.
Change the field name and description for every field.
We have to refresh the internal table IT_FCAT because we are using same internal table for two lists
the data will get multiplied and we will receive duplicate data.
ALV REPORTS :

In order to develop an ALV report , we have to ue standard structures.

SLIS_T_FIELDCAT_ALV.

SLIS_FIELDCAT_ALV.

SLIS_LAYOUT_ALV.

Fieldcatalog designing means

By using this field catalog we are designing the system.

Suppose in output , if our field is not completely visible meaning we need to drag our field in order
to see the full name of the field then in order to resolve that issue.

First declare a work area that is

Wa_layo type slis_layout_alv.


And then at the end of field catalog design end write

Wa_layo-colwidth_optimize = ‘X’ .

Wa_layo-zebra = ‘X’ .

And in reuse_alv_grid_display

Yu have to pass tha work area in is_layout parameter

After this the complete field header value get displayed.

In matnr field , if we don’t want zeroes infront of material number then use

Wa_fcat-NO_ZERO = ’X’ .

If we want to make any column as editable then

Wa_fcat-edit = ‘X’ .

If we want to design one block for the parameters in the output


If you want to remove high value in the ranges in selection screen.

Only low value will be displayed .

You have to use no intervals keyword.

If you want to remove multipe selection button meaning if you want to remove that arrow mrks.

Suppose you don’t want to see selection screen ,menaing when you execute you will directly get
report then you need to write no display.

IDOC IN SAP ABAP :

IDOC means intermediate document which is responsible for taking data to sap and from sap to
other system.
Modularization techniques :

Macros(out dated)

Includes

Sub routines

Function modules

INCLUDES :
The syntax for creating include is : include <include name> and you can double click on it.

If you want to use some piece of code in some 60 programs , you can create include and call it.

If there is any changes needs to be done you can not open 60 programs and do changes instead we
can do that changes in include.

SMART FORMS
Smart forms are updated version of scripts.
Multiple page orientation means portrait, landscape and portrait is not possible in scripts.
Wither we should use portrait or landscape
In order to create smart forms

Go to tcode smartforms and give smartform name and click on create.

And then suppose if we want to print just a text as output then click on main window and create and
then text.

Type the text in the editor that you want to print in the output.

To print some address in the output


Main window -> create -> address
In sap all the addresses will be stored in ADRC table.

Select any address from adrc table and copy it and mention it in the address window and click on
execute.

Next requirement is How to call a smart form from report/driver program


If you want to call a smart form, you should call FM of that smart form.

If you want to know the FM – go to smart form tcode -> environment -> FM.

In se38 editor -> click on call pattern and give FM name.

Click on activate and execute.

Now REQ is how to pass data to the smart forms .


KUNNR

NAME1

I will take these two values in the smart form and whatever values I will pass into these fields that
values should get displayed in the output.

The two fields need to be declared In the form interface


Now go to the main page and create text.

When you click field list on/off button

Field names will be displayed in the below tab.

Then just drag and drop the fields.


Activate and execute.

O/P will be
NEXT REQ is how to upload graphic/logo into smart forms:
when you click on form painter then the below screen will appear

Now create a window to put the image in that window.


So here we create a window called logo. We can drag and adjust that window anywhere you
want.

How to upload the logo????


In real time client will give us logo, here we are taking the logo from F4 help in the name
field.
Just select the image and activate.
In the form interface we need to give input parameters.

The output parameter will be declared in Global definitions.

To write a logic , you need to go to


Give input and output parameters here as shown below.

TABLE MAINTAINENCE GENERATOR

SM30 is t-code for table maintenance generator

Events in table maintenance generator.

You might also like