Page tree
Skip to end of metadata
Go to start of metadata

Requirement

There are two requirements by client.

1)      While creating PM order via (IW31), he needs to add details about shift in-charge and the respective shift at the IW31 screen.

ENHANCEMENT : IWO10018 (Maintenance order: User fields on order header)

2)      Same fields should also get displayed while list editing report IW38.

ENHANCEMENT: IWOC0004 (Change single-level list editing PM/QM/SM ALV settings)

Note: Plz take help from functional person to find both the above exits via t-code SPRO.

How to add new fields at maintenance order?


Step 1: First read the documentation for enhancement (IWO10018) in SMOD.

Step2: Then execute the exit and activate the same.

Step3: Goto AUFK table. Create CI_AUFK structure with two fields shift incharge (ZZSIC) and Shift (ZZSHIFT). Activate.

Here it may take minimum 30 min to activate the table. As it hits many views and structures while activating. See the warning message after activation, which is normal, and would not affect your work.

Note: When you want to add further fields after activating the CI_AUFK structure then it will again take min 20 min to activate with same warning message. Hence it is suggested that complete all required fields at first go. Since activating CI_AUFK structure means regenerating table.

Step4: Click on screen exit SAPLCOIH green button.

It will ask to create screen no. 900.  Create in sub screen area and activate the same.

Click on maintain in orig.. button.

Step5: Create subscreen area and attach the respective structure fields to each input field.

CI_AUFK-ZZSIC to Shift Incharge and CI_AUFK-ZZSHIFT to Shift.

Step6: Then create PBO and PAI module pools.

Step 7: All PBO modules are saved in include ZXWOCO01 and All PAI modules are saved in ZXWOCI01.

Step8: Code each module as given below or as per your requirement.

Step 9: Once you activate the code, it will start showing in IW31/ IW32/IW33 t codes under enhancement tab.

Step10: Now you can write your own code at each exit.

EXIT_SAPLCOIH_018: This is getting triggered PBO module. Hence all data from SAP application to screen area are passed at this exit. Use import parameters SAP_CAUFVD_IMP and COCI_AUFK_IMP.

Step 11: EXIT_SAPLCOIH_019: Customer Enhancement for User Fields for Order Header PAI. This exits saves data after PAI module. Hence pass data from screen area to SAP application by using export parameter COCI_AUFK_EXP.

How to display new field at list disply?

Now how to display the same added fields at IW38 list editing report. (Enhancement name: IWOC0004

Step1: Plz read the documentation for your reference.

Step2: Activate the enhancement. (It should be assigned to a project )

Step3: Now in report IW38 (RIAUFK20), search for REUSE_ALV_GRID_DISPLAY.

Under tables you will find OBJECT_TAB as the internal table for displaying data.

And it includes a structure RIHAUFK_LIST

We need to append our own structure to the above structure by clicking at Append structure button. So that while populating data via OBJECT_TAB internal table it will refer the fields and will start showing the data at list display.

Step4: Now goto IWOC0004 and activate. In  EXIT_SAPLIREP1_001 write ur own code to modify the list display at IW38.

The fields will start populating at IW38 list display.

  • No labels

3 Comments

  1. HI Rath,

    Very good enhancement.

    Regards,

    Madhu.

  2. Former Member

    Awesome. I used your wiki advice to resolve a problem a had some time ago. Unfortunately, some parts of your article didn't fit to me. After all, I had to adapt your solution to my requirements and I published it here http://www.blogdesap.com/2013/02/mas-campos-listado-de-ordenes.html

    Thank you very much for sharing your knowledge.

    Óscar

  3. Thanks. But I didn’t find where I should implement the field overflow? I use  ENHANCEMENT-SECTION     riaufk20_23 SPOTS es_riaufk20 in RIAUFK20