Skip to Content
Author's profile photo Krishnendu Laha

Explore RAD in CRM

Rapid Application Development in CRM

We are in demanding world to have CRM in place or ready to be use as soon as possible and RAD came as a breather for custom development requirement.

RAD is available from CRM 7.0 EHP 1 and is very useful in developing an application including search facility with RDBMS in place.

I got inspired by two Demo posted by Tzanko Stefanov :

http://scn.sap.com/docs/DOC-5404

http://scn.sap.com/docs/DOC-5405

These demo content most of steps to create a RAD application and it hosted with a simple example.

Here in this blog I would focus more on RDBMS concept and in-depth analysis and maintenance or enhancement of the component.

Necessary configuration:

In your business role CT-ADMIN (Administration) work center with AXT_RAPP_S (Manage Rapid Applications) should be assigned / visible.

Scenario for this example:

Let’s build an application of Employee Header, Employee Monthly Salary and Salary Wages.

Below are structures:

EMP_HEADER.png EMP_MSALARY.pngEMP_MSALARYWAGES.png

So here you can see there is a relation ship between three tables 1: N : N

Please create an application ZEMP through wizard (demo contain video links, please follow that) and 1) select ZEMP_HEADER at the time adding ZEMP_MSALARY, 2) select ZEMP_MSALARY when adding ZEMP_MSALARYWG.

After you finish with RAD wizard, please check status is green or not -> yellow means ‘In Progress’ status and red means error.

After it got green status, the application ZEMP is ready for testing in BSP_WD_CMPWB transaction.

What happens in background?

SAP uses AXT_CA component and component set as a Model to host any application been created following RAD process.

It also add entry for component ZEMP in ‘Working Context Repository’ and create Logical links for Create, Search and Display.

It also create four structures for each tables used in wizard with different usability:

1. Z*ATTR – Attrbiutes from table

2. Z*WORK – Runtime structure

3. Z*LOGKEY – Key fields from table

4. Z*DYN_QUER – Structure for searching records dynamically in table

It also create entries in below tables for Root, Access, Dynamic Query nodes and their fields (wherever applicable):

1. AXT_MODEL_IL

2. AXT_OBJECTS_IL

3. AXT_RUN_TAB_DEF

4. AXT_RUN_FIELDDEF

5. AXT_RUN_FIELDUSE 

6. AXT_RUN_TEXT

7. AXT_RUN_KEY_MAP

8. AXT_RUN_QUERYMAP

It creates different function modules for each table as ZFUNC* under function group ZFUGR00000 for handling of database operations like Insert, Update and Delete.

How request / event handles in component?

Classes under package AXT_RUNTIME and AXT_COMMON are used for request and event handling.

For example process flow happens for event handling in view of component:

Class CL_WCF_BSP_EVENTS_HANDLER called -> navigate proper event handling -> CL_WCF_BSP_NEW_COMMAND (New) / CL_WCF_BSP_EDIT_COMMAND (Edit) / CL_WCF_BSP_SAVE_COMMAND (Save) / CL_WCF_BSP_CANCEL_COMMAND (Cancel).

Enhancement of component:

I would suggest to use component workbench for configuring views not AET; because if AET used in one view and another component workbench sometimes it does supersede later one due to metadata selection (but it might be depend on EHP).

In execution mode component navigation is same like in transaction GENIL_BOL_BROWSER, whcih is Search -> Root node -> Access node -> Details -> Access node -> Details based on relation ship.

You can create some extra Overview page to have some different user interface or skip Details section but please do not delete anything rather hide in OVP page.

Adding an extra parameter in search criteria:

If you want to add an extra search criteria then that field should be available in Z*ATTR, Z*WORK and add that field in Z*DYN_QUER with an related entry in table AXT_RUN_QUERYMAP (please add the entry in transport request also).

Also that field should be added in search view manually to make that available in search list.

Adding an extra view with a new bol entity:

After creating a table, structures like *ATTR / *WORK (as I mentioned above) should be created keeping in mind the relation maintained already!

For example if we want to add monthly leave plan then the table would look like below:

EMP_MLEAVE.png

Then proper entry should be added in require tables as I mentioned above (please use already added entry as a reference).

A new FM should be created (as per entry in AXT_RUN_TAB_DEF table) to handle database operation.

Now add an extra view with table type (if require) in component, add proper hierarchy BOL entities and change the below properties:

1. Change super class of Controller Implementation from CL_BSP_WD_VIEW_CONTROLLER -> CL_AXT_BASE_TABLE_VIEW

2. Change super class of Table node from CL_BSP_WD_CONTEXT_NODE_TV -> CL_WCF_BSP_BASE_TV_CN

Please assign the view in Runtime Repository Editor to be viewed in proper place.

Adding / deleting primary key combination of base table:

If you want to add / delete key field from base table then apart from changing the table related structures which are Z*ATTR, Z*WORK, Z*LOG_KEY, Z*DYN_QUER should be changed.

Also we need to make sure related bol entity is also effected by adding / deleting entries in table AXT_RUN_KEY_MAP (please add the entry in transport request also).

Related FM ZFUNC* under function group ZFUGR00000 should also be changed to reflect the changes in key fields.

Summary:

Please finalize the database design before going for application creation through RAD wizard as it would be really complex to change the relation after it generated. Please use custom data elements in table as it would be useful for length / data type changes in modification phase.

Courtesy: To my colleague Shashi Jha for referring to interesting world of RAD.

Assigned Tags

      19 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks Krishnendu,

                                  Nice doc. and it is handy.

      Author's profile photo Former Member
      Former Member

      Hi,

      It is a very nice blog.

      I have one question reagrding enhancement of application created using RAD.

      Is there any Genil class created for the bol objects?

      If we need to write some business logic where do we write that?

      Thanks and Regards,

      Saurabh Gupta

      Author's profile photo Krishnendu Laha
      Krishnendu Laha
      Blog Post Author

      Hello Saurabh,

      It use standard Genil class available for component AXT_CA and data are retrieved through API classed maintaiend AXT_RUN_TAB_DEF table.

      Thanks

      Krish

      Author's profile photo Daniel Araujo
      Daniel Araujo

      Thanks, Krishnendu.

      I have some questions about RAD, as I'm new to this tool.

      I'm trying to create a RA based on two tables (the second is a text table for the first). At first glance, the RA is created OK, and I can save records on the main table. But I can't save any values to the text table. I can edit it, but when I hit Enter or save, the values I typed disappear, and are not saved. What could be wrong?

      Another questions:

      Is it mandatory to the tables having the fields MANDT and GUID?

      Field MANDT has to be named MANDT, or could it be CLIENT?

      Thanks and Regards,

      Daniel.

      Author's profile photo Krishnendu Laha
      Krishnendu Laha
      Blog Post Author

      Hello Daniel,

      I have not tested with text table - but can say this works purely on relationship between two tables. Please put debugger in API and check.

      Regarding MANDT and GUID -> I took an example here, you can choose any combination, only relationship should be perfect.

      Please feel free to ask any question if you have.

      Thanks

      Krish

      Author's profile photo Daniel Araujo
      Daniel Araujo

      Hello Krishnendu,

      Thanks for the reply.

      Did you set up the relationship in TX se11, or just pointed it in AXT Wizard?

      I still didn't get it to work with Text table, setting the relationship in SE11.

      Regards,

      Daniel

      Author's profile photo Former Member
      Former Member

      Hello Krishnendu,

      I'm facing the same issue as mentioned by Daniel above.

      PFB a screenshot of my data model.

      Header table:

      Docket header.PNG

      Item table:

      Items.PNG

      Following my RAD appn:

      GR RAD.PNG

      Here, when I try to change the header fields and save, it updates values properly in header table.

      But, if I change lets say the received quantity in items table, it just doesn't do so.

      I tried debugging through the APIs. It's not allowing to save.

      Any ideas?

      Thanks

      Ashish

      Author's profile photo Daniel Araujo
      Daniel Araujo

      Hey Ashish!

      I'm not sure if your problem is the same as mine, but I'll explain my solution.

      I found a bug within standard code for RAD.

      As I was working with text table, I named my text table ending with "_T", as SAP does with most of its text tables.

      The problem is that RAD doesn't deal well with tables ending with "_T", and get lost in the middle of the process, without even propagating the exception/error message, that also gets lost.

      So, if you are working with two or more tables, and named at least one of them ending with "_T", try changing to "T" instead, and your RAD should work perfectly.

      Author's profile photo Former Member
      Former Member

      Hey Daniel,

      Neither of the tables I created are named ending with '_T'. Not able to figure out what might be the reason.

      Thanks

      Ashish

      Author's profile photo wang cailiang
      wang cailiang

      Hello Former Member:

      I’m facing the same issue with you. Did you resave you issue? Thanks.

      Author's profile photo wang cailiang
      wang cailiang

      Hello Former Member:

      I’m facing the same issue with you. Did you resave you issue? Thanks.

      Author's profile photo Arjun Pawar
      Arjun Pawar

      Thanks for sharing and It is a very nice blog.

      Author's profile photo Jabulani Jerry Mtsweni
      Jabulani Jerry Mtsweni

      Awesome and very informative blog.

      Author's profile photo ashok gondi
      ashok gondi

      Good One. : ) Thank You.

      Author's profile photo ram ram
      ram ram

      Hi Krishna, Good one !!

      By using the Rapid tool I  have created a assignment block(Z table) in BP which is going to create/update/delete the data . But  what ever changes I am doing in the assignment block(z table) not updating in Change history . Could you please let me know if any configurations are required to handle the changes of Rapid application  .

      thanks,ram

      Author's profile photo Krishnendu Laha
      Krishnendu Laha
      Blog Post Author

      Hello Ram,

      Change history triggers through settings in Data Element table. Please find out the Data Element -> and in SE11 Transaction in one of the tab your would fine Change Document check box -> please select the check box...

      Let me know if it works..

      Thanks,

      Krish

      Author's profile photo ram ram
      ram ram

      Hi Krishna, already I did the same, but changes are not capturing .

      regards,rama

      Author's profile photo Apple I
      Apple I

      Hi Krishna,

      I have created RAD table and added in standard Component Overview page as Table AB. Question is How can I enable button like Edit, Insert Row delete button and Save Functionality in RAD Table Assignment Block when Overview Page Saved. Please help

      Author's profile photo Krishnendu Laha
      Krishnendu Laha
      Blog Post Author

      Those buttons should be enabled by default, if RAD componet was created successfully. Please check if there is BADI or enhacement active to hide these buttons.