Hi i need material for module pool and alv's.
hi
i need material for module pool and ALV's(not object oriented) if any one have pls do send that to my
ID [email protected]
thanx in advance.
Hi
Check the below link:
http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sap-img.com/
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
You can also check the transaction ABAPDOCU which gives you lot of sample programs.
Also you can see the below examples...
Go to se38 and give demodynpro and press F4.
YOu will get a list of demo module pool programs.
One more T-Code is ABAPDOCU.
YOu can find more examples there.
See the prgrams:
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
ALV
ABAP List Viewer
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Reward points if useful
Regards
Anji
Similar Messages
-
hello friends
i m new in ABAP
i had designed database and now i want to enter the data through module pool so please guide me about the module pool and insert condition how could i do that
Do post friends...................
Waiting for ure precious suggestions
With Best Regards
RubyCreate Table Control screen in Module Pool
· Step 1 (Create new structure for table control)
Type is name of structure (ZTC_EKKO) and press create
· Step 2 (Create Program)
Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
Enter your program name, please ensure that is begins with SAPMZ as this is a module pool (dialog program).
Press enter to create, and press yes!
Ensure that you create a top include, and press Enter.
Accept the name created for the top include.
Press Enter.
Create Table Control
· Step 1 (Create new structure for table control)
Type is name of structure (ZTC_EKKO) and press create
Enter the fields that you want to display in the table control. Example uses fields from EKKO.
Now save and activate it!
· Step 2 (Create Program)
Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
Enter your program name, please ensure that is begins with SAPMZ as this is a module pool (dialog program).
Press enter to create, and press yes!
Ensure that you create a top include, and press Enter.
Accept the name created for the top include.
Press Enter.
Press Save
· Step 3 (Create TOP include)
Double click on the top include and enter following ABAP code:
Tables: ZTC_EKKO.
controls: tc100 type tableview using screen 100.
data: ok_code type sy-ucomm.
data: it_ekko type standard
table of ZTC_EKKO initial size 0,
wa_ekko type ZTC_EKKO.
data: ok_code type sy-ucomm.
· Step 4 (Create screen)
Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
· Step 5 (Create table control)
Press the Layout button to bring up the screen painter editor.
Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
Create Table Control
· Step 1 (Create new structure for table control)
Type is name of structure (ZTC_EKKO) and press create
Enter the fields that you want to display in the table control. Example uses fields from EKKO.
Now save and activate it!
· Step 2 (Create Program)
Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
Enter your program name, please ensure that is begins with SAPMZ as this is a module pool (dialog program).
Press enter to create, and press yes!
Ensure that you create a top include, and press Enter.
Accept the name created for the top include.
Press Enter.
Press Save
· Step 3 (Create TOP include)
Double click on the top include and enter following ABAP code:
Tables: ZTC_EKKO.
controls: tc100 type tableview using screen 100.
data: ok_code type sy-ucomm.
data: it_ekko type standard
table of ZTC_EKKO initial size 0,
wa_ekko type ZTC_EKKO.
data: ok_code type sy-ucomm.
Press Save and Activate
· Step 4 (Create screen)
Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
· Step 5 (Create table control)
Press the Layout button to bring up the screen painter editor.
Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
· Step 6 (Populate table control )
Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the Get from Dict button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
Below is the result, there will been syntax errors if we check now! So Save and go back
into the flow logic tab.
· Step 7 (Create flow control )
Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
module data_retrieval.
loop at it_ekko into wa_ekko with control TC100.
module populate_screen.
endloop.
PROCESS AFTER INPUT.
loop at it_ekko.
endloop.
MODULE USER_COMMAND_0100.
Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
***INCLUDE MZ_TCONTROL_DATA_RETRIEVALO01 .
*& Module data_retrieval OUTPUT
text
MODULE data_retrieval OUTPUT.
select data from ekko table
SELECT ebeln bukrs bstyp bsart
bsakz loekz statu aedat
UP TO 10 ROWS
FROM ekko
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDMODULE. " data_retrieval OUTPUT
Double click the module populate_screen to create. Now move the values in this loop from the wa_ekko into the Table Control with the move-corresponding statement.
MODULE populate_screen OUTPUT.
DATA: ld_line TYPE i.
* Set which line of table is a top of displayed table control
IF sy-stepl = 1.
tc100-lines =
tc100-top_line + sy-loopc - 1.
ENDIF.
* move fields from work area to scrren fields
MOVE-CORRESPONDING wa_ekko TO ztc_ekko.
ENDMODULE. "
populate_screen OUTPUT
· Step 8 (Create transaction )
Now create a transaction to test the table control program. Right click the Program and select create-> transaction.
· Step 9 (Execute transaction )
Execute transaction ZTC
please see the link for screen shots of the dailog module
http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm
reward points if it is usefull ....
Girish -
Material for module pool programming
hi
can someone give me a link to THE BEST MATERIAL ON DIALOG PROGRAMMING please.
points will be givenhi,
refer the links:
http://sap.mis.cmich.edu/sap-abap/abap09/sld001.htm
http://abaplovers.blogspot.com/2008/03/sap-abap-module-pool-programming.html -
Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.
my email Id is [email protected]Hi,
A module pool is a collection of screens, flow logic, menu bars and ABAP code that you use to build an application. Typically the transaction code that calls the application will refer to the module pool and the initial screen number.
-->What are the requirements a dialog program must fulfill ?
A dialog program must fulfill the following requirements
. a user friendly user interface
. format and consistency checks for the data entered by the user
. easy correction of input errors
. access to data by storing it in the database.
What are the basic components of dialog program ?
Screens (Dynpros)
Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic and controls exactly one dialog step.
ABAP/4 module pool
Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.
What is a dynpro ? What are its components ?
A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly
one dialog step.
- The different components of the dynpro are:
Flow logic: Calls of the ABAP/4 modules for a screen
Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen
Screen attributes: Number of the screen, number of the subsequent screen, and others
Field attributes: Definition of the attributes of the individual fields on a screen
What is screen flow logic? What are the selections in it? Explain PAI and PBO?
Ans - Screen flow logic contains the procedural part of a screen. The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
PROCESS ON HELP-REQUEST.
PROCESS ON VALUE-REQUEST.
Selections are performed in PAI.
PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.
PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI.
processing, the system either calls the next screen or carries on processing at the point from which the screen was called.
PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.
step by step process of dialog programing:
Firstly, you can go to Tcode SE80 and here create a package.
On that package name right click and select program.
Then choose program type modulepool program.
Similarly, you can create screen and then select layout and drag and drop labels and pushbuttons as per your requirements.. Then double click on th push buttons.You will see property window and there we will find FCTCODE and there type the names e.g suppose you want to
display then typy on the fctcode Display or any name as you wish.
After that save and activate it. and then close the window.
And then go back to the intial screen .
And then click Flow logic button and then uncomment the statement
module status_1000 PBO block and then doible click on status_1000
save and activate and then go back and then PAI block uncomment the statement module status_1000 and the dobule click on status_1000.
step by step process of creating smartforms:
1. What is Smartforms?
Smartforms is a tool to create and maintain forms for mass printing in SAP Systems. Just like sapscripts, for Smart
forms print program is used to create the output internal table which in turn is thrown to the smart form where the
field values are displayed. The output medium for Smartforms support printer, fax, e-mail, or the Internet.
Transaction Code: SMARTFORMS
To print a form the program for the data retrieval and a Smartform that contains the entire form logic is required. As
these two are separate one should adapt the Smartform if changes to the form logic are necessary. The application
program passes the data via a function module interface to the Smartform. When activating the Smartform the system
automatically generates the function module.
The architecture of the smart form is given below:
Creating Forms Using SAP Smart Forms
When creating a form one must:
1. Retrieve the application data
2. Describe the form
3. Pass the application data to the form
Example: Create Smartform for printing Purchase order.
Retrieving the application data (Purchase Order information):
Write an ABAP program (Print Program) to retrieve data or include a retrieval routine into the application. This
code consists of statements that select data from databases according to certain selection criteria. Store the
retrieved data in internal tables, structures or variables and transfer it to the form in one step.
SAP has already provided with the Print Program (/SMB40/FM06P) for Purchase Order. Based on the business
requirement, this Print Program can be copied and modified to get the required data and transfer to Smartform.
Describing the Form:
The user defines the form using a Smartform. Use the tools of the form builder as listed below:
1. Use the form painter to position the windows, graphics and addresses on a page.
2. Use the PC editor to write the texts.
3. Use the table painter to format the tables.
The flow control is used to print the pages and elements.
Form Logic (Introduction)
In the form builder one can describe a Smartform by a set of nodes. To do this, one can build up a tree structure on
the left side of the user interface.
The node global settings and its three successors form attributes, form interface and global definitions always exists
for any newly created forms.
To describe the form logic, create the hierarchy under the node pages and windows.
The following rules apply to control the flow of the form output.
1. The nodes in the tree structure are processed from top to bottom.
2. For each node there is a tab, this can be used to link the node to a condition. If the condition is true, the
system processes the node. If not, it skips the node and all its successors.
3. One should define a next page for each page.
The SAP form builder of the smart form consists of:
1. Form painter for creating the layout of the form
2. PC Editor for entering texts and fields into output areas
3. Navigation tree for maintaining the form logic
4. Table painter for creating templates and tables
To define the text formats, one can use the Smart Styles.
Style builder:
On the left of the style builder screen consists of the predetermined nodes (header data, folder for paragraph
formats, and folder for character formats).
On the right one can see the maintenance screen with its tab pages. At the bottom the preview of the selected font
can be viewed.
Create Purchase Order Smartform
Create a Smartform, copy the existing SAP provided purchase order Smartform to ZSFM_PURCHASEORDER for
customizing as per business requirement.
1. Form Settings under Global Settings node, set the parameters in Output Option:
Page Format: Letter
Character per Inch: 20
Line per Inch: 6
Style: ZSTM_SMB40_SF
Output Format: Standard Output
2. Form Interface
We can add parameters in the Import Parameters and tables in Tables tab of the form interface for the application
data to be available for the Smartform to print.
3. In Global definition we can define the all the global variables which can be used in Smartforms. Initialization
can be used for initializing the variables and even for retrieving the data.
Creating pages:
Each form consists of one or more pages. The first page in the tree structure is the start page and the
processing of the form starts with this page itself.
1. Open the context menu for existing page node and choose create®page
2. Enter a unique name (FIRST) for the node and a description (Page)
3. Determine the format (1, 2, 3...)and the mode of the page counter (Increase counter) on the general
attributes tab
4. Determine the print attributes (Portrait Format) of the page on the output options
5. Determine a background graphic for the entire page on the background tab (Not used in PO).
Creating windows:
The size and position of the window can be graphically set in the form painter. There are main windows and
secondary windows. The difference between these two is that the output in a main window can cover several
pages.
1. Open the context menu for an existing page node and choose®window
2. Enter a name for the node (NAMEFORM) and a description (Title Window).
3. On the general attributes indicate type of window. NAMEFORM is secondary window.
In similar fashion all the other windows are created and positioned as per the form design. Only one MAIN
window is created, it is used for line items which can cover several pages.
Positioning texts on the form
The texts are displayed in the form using text nodes. The only exceptions are addresses.
The predecessor node of the text node determines its use:
Predecessor node Used to
Secondary window Position text on one or more pages
Main window Display text in relation to other nodes in the main window, it may cover several pages
Template Displays texts for table cells of a static table
Table Display table contents
There are three text types:
1. Text element : to enter new text in the PC editor
2. Text module : to include a text module
3. Include text : to include an existing SAPscript text
Entering texts in PC editor: (TITLE)
· To create a text node call the context menu for that node in the tree structure that should receive the
text, then choose->text
· Enter a unique name (TITLE) for the node and the node description (TITLE)
· On the general attributes tab choose text element as text type
· In the text node box choose whether the text should be started with a new paragraph or only in a new
line
· Enter the text in the PC editor. Text could be a program element like &Title& or Purchase Order. &Title&
is a variable for which the value is assigned in Program line before the text.
Including text modules: (TERMSCONDITION)
Text module of the text node is used to refer to an existing text module in the system. The text modules can be
used in two ways:
· To create a text node, call the context menu for that node in the tree structure that shall contain the text
and choose create->text under the window TERMSCONDITION.
· Enter a unique name for the node (TERMSCONDITION) and a description (Terms and Condition)
· On the general attributes tab select the text type text module
· Enter the name of the text module in the text name field (&G_TERMS_TEXT&). &G_TERMS_TEXT& is
used to determine the Text name dynamically in the program lines preceding the text module node.
· Program Lines: GETTERMSCONDITION
Concatenate 'ZTMM_PO_TERMS_' ZXEKKO-BUKRS
INTO G_TERMS_TEXT.
Including SAPscript texts: (HD_TXT_F01 Order Header Text)
The text type include text node to refer to a SAPscript text, which already exists in the system. To identify the
text the text name, object, id and the language is needed.
· To create the text node, call the context menu for that node in the tree structure that shall receive the
text and choose create -> text under the main window.
· Enter a unique name (HD_TXT_F01) for the node and the node description (Order Header Text).
· On the general attributes tab choose include text as text type
· Text Name - &ZEKKO-EBELN&, Text Object EKKO, Text ID F01, Language - &SY-LANGU&. Also check
mark No error if no text exists.
Tip: Since the size of text is not known, its better to have the text in MAIN window, so that it can run to more
than one page if required.
Inserting addresses: (SENDER):
Address node is used to insert an address into the form. This guarantees that the address is formatted
according to the postal rules of the sender country.
· To create an address node , call the context menu for that node in the tree structure that one wants to
contain the text and choose create->Address
· Enter a name for the node (COMPANY_CODE_ADDRESS) and a description (Company Code Address)
· Determine the address type (Organization Address) on the general attributes tab
· For organizational addresses - specify the address number, for any other - specify the person number
and the address number. In this case we get the company code address into variable &ADDNR&, so we need
program lines (SENDER) preceding the address text.
· In the box additional addresses, attributes to specify how to display the address are maintained.
Printing graphics: (LOGO):
Tcode SE78 is used to import graphics into the SAP system. The transaction imports the graphics and stores it
in the BDS (business transaction server) and then it can be displayed in the form.
· To create the graphic node , call the context menu for that node in the tree structure and choose create-
>graphic
· Enter a name (LOGO) for the node and the description (Logo Graphic)
· On the general attributes determine whether a colored or a black and white
· On General Attributes use the fields object - GRPAHIC, id BMAP and name - &G_LOGO& to identify the
graphic. &G_LOGO& is variable and therefore we can print company code specific logo. Program line preceding
the graphic is required.
· Program line COMP_LOGO is used to assign the value to G_LOGO. Concatenate 'ZCOMPANY_LOGO_'
ZXEKKO-BUKRS INTO G_LOGO. So, the name of graphic for example will be ZCOMPANY_LOGO_0202 for
company code 0202.
Displaying a static table (Window INFO, Template - TEM_INFO)
Use node type template to display a table whose layout and size is determined before the runtime of the print
program.
To create a template, define a table layout to determine the cell structure for each line. The cells are used to
display the cell structure for each line. The cells are used to display the contents of the successor nodes of the
template node.
· Create Template under the INFO window node. Create > Template.
The template layout is used to determine the following,
1. The number of lines and cells
2. The height of each cell
3. The width of each cell
4. The alignment of the table in the window
5. Whether and where to display separator lines or frames
Use the table control on the template tab to define the layout of the lines. Each line of the template must have
a definition.
Use the pattern box to select the desired table pattern.
Displaying contents in cells: (TLE_CONTACT)
The template node defines the table layout. The successor nodes of the template determine the data to be
displayed in the table cells.
In General Attributes choose Text type Text Element. In editor, type DTE Contact.
In Output Options, define the output structure LINE 5 and Column 1.
Similarly all other information for each cell can be filed using the text module and address module.
Displaying Dynamic Table (ITEM_TABLE)
· Create TABLE under the MAIN window node. In DATA Tab, loop through the data internal table.
L_XEKPO is the item table which has all the line item details.
Define the line types based on the positioning of the text in main window. For example: TABLE_HEADER1
is used for positioning Header texts in the table.
· Table is divided into three parts: Header, Main Area and Footer.
· Header is used for printing the Header Title of the table and it at the start of the table on every page.
· Main Area is used to print the line item details of the PO. Create a line (ITEM_DETAIL) of the line type
TABLE_HEADER1. It will dynamically generate number cells based on the line type defined in the table layout.
Name all the cells as per the usage. For each cell create the text node to display the information. For example:
Cell VAL_MATERIAL, Text node MATNR is created which has text element - -matnr.
· Footer is used for printing the information after Main Area data is printed. This can be used for Total
printing or any other information which needs to be printed after all line items are printed. Create line
TLE_CONTR_STP for Contractual Stipulation of the line type LINE which has only one column. Create the
text element to print the information.
Special Requirement: Printing the Acknowledgement text if the order value is greater then USD 50,000.00 on
the second copy only.
· This requirement needs the modification in the print program and the Smartform.
· Modification in Print Program to trigger the second copy if the order value is greater then 50K. Its
advisable to copy the standard print program to custom Z program (Z_SMB40_FM06P), and changes should
be made to Z program. Number of copies is passed from NAST to ls_composer_param-tdcopies in Smartforms.
The value ls_composer_param-tdcopies is modified in the print program to 2 if the order value is greater then
50K.
· The printing of Acknowledgement Text only on second copy is achieved using the COPIES WINDOW in
Smartforms. Define Window ACKN_COPY of the type COPIES WINDOW and Output to Only Copies Copies
Differ. Also set the condition in the Condition Tab of the window SFSY-JOBPAGES = 1, so that it only print
on the first page of the copy.
· If user selects to print 2 copies and the order value is more then 50k, program needs to print 2 sets
meaning 4 copies. So number of copies is taken care of in Print program but again the printing of
Acknowledgement Text should be only the Even number copy meaning Copy# 2 and 4. This achieved by using
the program lines to determine the even copy. SFSY-COPYCOUNT will tell us the current copy number being
printed.
regards,
vineela.
Edited by: Radha Vineela Aepuru on Mar 13, 2008 11:12 AM -
OO ABAP is a must or not for Module Pool
Hi all,
I want a valuable suggetion from you.
Is Object Oriented ABAP Programming is a must for Module Pool Programmer not. Because, I think I am preti much confident abt Module Pool but not in OO ABAP.
Please help me out my doubt.
Thanks & Regards,
Ajoy ChatterjeeSorry, can't agree that they are obsolete... I've done dozens of dialog programs over the last few years, with more on the current "to do" list... it depends on what you client site are doing - if they want online data entry transactions inside the SAPGui, then that's what you build.
As you can't have screens in a class pool, so you're going to need to define these dynpros somewhere else (although my usual preference is having them within function groups rather than module pools).
But I do agree that getting your head around ABAP OO is unavoidable - and can add a level of elegance to your code if implemented well, and add a level of future-proofing when it comes time to change your presentation layer to Web Dynpro or whatever, or exposing some logic via web services.
However you can stil make "classic" ABAP elegant - there's little difference between the readability of :
call method z_my_class=>get_region_of_rental_object
exporting
io_contract = ls_contract
importing
rd_region = l_region
os_return = ls_return
exceptions
others = 1.
and
call function 'Z_GET_REGION_OF_RENTAL_OBJECT'
exporting
io_contract = ls_contract
importing
rd_region = l_region
os_return = ls_return
exceptions
others = 1.
i.e. it's often the way you modularise and encapsulate your logic that is the most important step.
Jonathan
p.s. perhaps this should head off to the Coffee Corner...! -
How to conduct training for Module Pool Programming
Hi everybody
I am going to conduct 5 days training for module pool programming.
Can you please provide me some suggestion about how to start & what r the steps?
Please provide suggestion for following
1) From where should I start
2) What should be the first step & subsequent steps
3) how should I get documentation & sample programs
thanksHello,
You can start the training by first explaining what is Module Pool programming, and why is it needed, how is it different from other forms of programming , like reports(SE38).
Then go on to explain how to create a MPP , i.e this you can do by giving the demo online, like:-
Goto SE80
Create a new program, and so on.
Talk about the various elements of MPP, such as the scree(which is also known as Dynpro), text elements, pushbuttons, tabstrips, etc, and how to use them in the program.
For sample programs and documentation, you can refer to help.sap.com, and search the documnetation for Module Pool Programming.
Thanks and regards,
Prerna -
Variants for module pool screena
Hi,
I tried creating a variant for module pool screen by using the FM : RS_CREATE_VARIANT.
For this i created a dummy report which has the same parameters as the fields in the screen.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 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.
but when i try to retrieve the values stored in the variant using FM : RS_VARIANT_CONTENTS.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 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.
I get an error message : variant5 not found.
is there anything that i miss here?
or is the way i use to create variant for module pool screen not right?
Regards,
KaminiHi,
To avail save variant option in module pool screen,
1. You need to create a data base table similar to INDX table with the fields RELID, VARI_NAME
PROG_NAME
UNAME
SRTF2, MEMORYID, CLUSTR, CLUSID. And the remaining fields can be anything.
2. Enable the Save button in the Function keys part of GUI Status. And Add a push button for Get variant.
3. When Save button clicked call a screen with a single field for variant (let us say g_var). After g_var entered, in the PAI of the initial screen export all the screen values to the created database index using the statement .
EXPORT: g_characteristics_tab TO DATABASE zav0257(ch) ID g_var,
s_auart TO DATABASE zav0257(au) ID g_var.
So that the values will be exported to database.
Then update the fields(VARI_NAME,PROG_NAME,UNAME) of the database table using modify from work area.
So that you will have the history of variance existence.
4. Next time , when the user clicks on Get Variant option, call another screen to enter the variant name. Then import the values for that variant from the memory id in the database table.
It worked for me. -
Hi Friends,
Can anyone give me the idea for creating module pool using 3 to 4 database tables.a module pool program can be ceated using <u><i><b>se 80 - object avigator.</b></i></u>
select program in the drop-down box..
enter a program name and press enter key...
right click on the program name (object name)
save the object in ur own package...
u can also create include callled TOPinclude- to globalise all the data used in the program...
choose create ---> choose SCREENS ..
goto layout and set the layout of the screen...
use screen PBO - Process before output modules...
(PBO occurs before user interaction)
and PAI - Process after input modules for module pool programming..
(PAI occurs after user interaction)
double click on modules..
declare structures for using different internal tables and work areas for different database tables .
let us have a a structure called struct_tables
having fields from VBAK and KNA1 such as NAME1, STRAS, ORT01, PSTLZ,
TELF1 BY INNER JOINING VBAK AND KNA1 TABLES BASED UPON KUNNR AS KEY FIELD AND HAVING SALES DOCUMENT NUMBER 'VBELN' AS INPUT BY THE USER .
statement :
SELECT NAME1
STRAS
ORT01
PSTLZ
TELF1
VBELN
KUNNR
FROM VBAK INNER JOIN KNA1 ON
VBAKKUNNR = KNA1KUNNR .
and then u can also write the sselected fields in a table control wizard...
thus u can perform module pool programming using 3-4 database tables. -
'Save As Variant' for Module Pool Program - FM to be called?
I have a dialog program, i want to activate the 'Save As variant' when i click on save on the selection screen of the transaction i created for the dialog program. What funtionality should be called or written for the PF-STATUS to implement the functionality.
hi Dagny,
You can't have variants for module pool. It is possible only for selection screen.
You have following alternatives :-
1. Create a report with same selection screen as you have now in module pool.
And then make a call screen to your intial module pool.
In this way you can all the advantage of variants as well as module pool.
OR
2. Create a transaction variant using transaction SHDO.
Hope it is helpful.
and do search the form , it is already answered before.
regards
venkat -
Reg : Variant saving for Module Pool Programming
Hey Friends,
Plz help me in how to create variant for Module Pool Programming as in normal reports.Thanx in advance.Hi,
You can create variants for Module pool program using the transaction SHD0. You can create Screen variants for your screens using this Tcode.
Go to SHD0 -> Give the Transaction code(ZTRAN) for which you want to create a variant -> name of some variant (ZVAR) -> create -> takes you to your transaction -> Give the values that you want to be displayed as variants -> Click on Save -> Opens a pop up to confirm the screen entries -> Check the check boxes of those fields that you have entered the data with (the column with check boxes that says W.Content) -> Exit and Save -> Save the variant -> You can see a screen variant created (ZVAR_0100)
Now Goto -> Create variant transaction -> Give your transaction variant name (ZVAR) -> Select Transaction with variant -> Takes you to SE93 transaction -> Give the transaction variant name -> save. Run with the created transaction.
Edited by: Nitwick on Jul 27, 2009 4:49 PM -
What is meany By Module Pools and Functional Pools
Hi gurus,
I want to know what are module pools and functional pool. If any of you have some information on it, I would be glad if you can share it with me
Regards
JasonHi Jason
Module pool is a type of program that contains steps of screens and can only be executed with a transaction code or menu function.
function-pool is the introductory statement for programs of type Function Group, these are programs in which you can define function modules.
Take a look at this:
<a href="http://help.sap.com/saphelp_nw70/helpdata/en/21/682f8b277e11d2954e0000e8353423/frameset.htm">Program Types and Execution</a>
I hope it helps. -
How to find standard pdf formular for module MM and SD?
Hello Experts,
Now I have to find out a list of sap standard pdf formular which is already there for module SD and MM like for purchase order, bill of delivery, shipping document etc.
I don't know how can I find it. Can someone tell me that?
Best thanks,
RujingDo you mean "sap script / smartform" used by standard modules ?
Try the transaction NACE.
Proide the application ..e.g. V1 for Sales, V3 for Billing and click the "output types".
Select the output type.. e.g "AN00" for quotation and click "processing routines" .
You will get the standard forms and the print program.
Regards,
Abhishek -
Send me one link for module pool programming !
Send me the link Where i can get the screen shots step by step to create a simple module pool programming !
hi,
pls Go through this link for module pool programming
http://www.allsaplinks.com/dialog_programming.html
http://sap.mis.cmich.edu/sap-abap/abap09/
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://sap.mis.cmich.edu/abap-00/
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://help.sap.com
http://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
http://www.allsaplinks.com/dialog_programming.html
http://www.sapbrain.com/TUTORIALS/default.html
http://www.sappoint.com/abap/spmp.pdf
http://sappoint.com/abap.html
http://www.sap-img.com/abap.htm
http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sap-img.com/abap/
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sap-img.com/
http://www.sappoint.com/faq/faqdiapr.pdf
http://www.allsaplinks.com/dialog_programming.html
Reward Points if usefull
Regards
Fareedas -
Need material on business content and data extraction
hi
friends
iam new to BW i Need material on business content and data extraction , plzz send me without help.sap material to my mail id [email protected]Hi,
Pls check ur inbox....
Also go thru this link....
http://help.sap.com/saphelp_nw2004s/helpdata/en/37/5fb13cd0500255e10000000a114084/frameset.htm
Hope it helps,
Thanks,
Happy Life,
Aravind -
Can somebody help me in getting some good material for Regular Expressions and IP Community list
can somebody help me in getting some good material for Regular Expressions and IP Community list
I'm not sure what you mean by "IP Community list", but here are 3 reference sites for Regular Expressions:
Regular Expression Tutorial - Learn How to Use Regular Expressions
http://www.regular-expressions.info/tutorial.html
Regular Expressions Cheat Sheet by DaveChild
http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/
Regular Expressions Quick Reference
http://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm
Maybe you are looking for
-
"Unknown error" when trying to get updates from App store...
Anyone else having trouble with the App store today? Trying to take in updates but get a "cannot be completed due to unknown error" huh? I've double/triple checked passwords etc, and they're free updates so I don't get it. Deleted apps and tried to
-
Left-side only on Macbook Air headphones
I am having problem with any headphones I plug into new Macbook Air in that sound will only come out of left side despite the headphone settings being set for balance. I tried the resets I have seen on other threads and experienced no change in the p
-
Fundamental question about initializers
There appear to be three different ways (maybe more) to initialize instance (not static) variables in a newly-constructed object. I was hoping someone could shed some light on the differences between them. // 1. In the constructor: class Foo { Bar
-
Error "CoreDAVHTTPStatusErrorDomain error 403"
Hello, If I like to synchronize my contacts with the iCloud I just get an exclamation mark in a yellow triangle. If I click the triangle I get the message Der Vorgang konnte nicht abgeschlossen werden. (CoreDAVHTTPStatusErrorDomain-Fehler 403.) [tran
-
Hi, We have around 10 doors and 10 shipping points. Transfer orders created for all the outbound deliveries are directed to an RF queue for picking. Now, we have a specific Shipping Point which we want to seperate out for picking and we want the tra