CharlieShen

新人,大家多关照啦@_@

  博客中心 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 登录 ::
  3994 随笔 :: 0 文章 :: 20 评论 :: 0 Trackbacks
Cached @ 2025/4/27 1:22:16Control ASP.skins_cogitation_controls_blogstats_ascx
<2007年8月>
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678

留言簿(14)

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜

Cached @ 2025/4/27 1:22:16Control ASP.skins_cogitation_controls_singlecolumn_ascx

Pre-Analysis

Finding out the Enhancement

As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):

Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields

Studying the Function Exits

The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out the purpose for their use:

EXIT_SAPLAIST_002

Function module Level Documentation

This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.

Import Parameters

Understanding

This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.

EXIT_SAPLAIST_003

Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:

Understanding

This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.

Studying the Documentation of the Enhancement

The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.

Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:

Deciding the Final course of Action

After making all the investigations, the final course of action was determined.

SrlNo Step Justification

  1. A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
  2. Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
  3. A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be ‘CUST’ (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.

In the PAI of the subscreen, validation for Location to start with ‘L’ will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.

  1. In the custom include of the function exit module ‘EXIT_SAPLAIST_002’, the following code will be written:-

ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.

  1. In the custom include of the function exit module ‘EXIT_SAPLAIST_003’, the following code will be written:-

E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.

  1. Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done – otherwise, the new custom subscreen will not be displayed in the Asset master screens.

Development

Creating a Project to include the enhancement
  1. Go to transaction CMOD and create a project.
  2. Enter a description for the project. Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.
  3. Enter the name of the enhancement and Save.
  4. Go to ‘Components’.
Creating Custom Include for ANLU

The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.

Create the include structure with three new fields, as required. Then, save and activate it.

Develop the subscreen and the program

Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.

Create it as subscreen.

Then, go to the Layout of the screen and create three new fields from Database table ANLU.

Drag the fields in the screen body and place them.

Then, save and activate the screen and come back to screen flow editor.

Create the PAI module to add validation for field “Location 2”, as required .

Activate the whole function group and come out.

Write code in the Function Exits to synchronize the programs

Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.

Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:

Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.

Then, activate everything – the whole project and come out.

分享按钮发布于: 2007-08-29 06:50 CharlieShen 阅读(153) 评论(0)  编辑 收藏