ITSmobile is SAP’s current technology base for connecting mobile devices to SAP systems. It’s based on SAP Internet Transaction Server (ITS) and has been shipped as part of the Netweaver platform since Netweaver 2004. ITSmobile provides a framework for generating HTML browser based screens for any SAP transaction. For the purpose of this blog, we will focus the RF mobile (LMxx) transactions, which are designed to support various warehouse processes.
The RF mobile transactions typically don’t fit nicely on mobile devices, and are often missing data fields and functionality needed to support the business process. For this reason, customization is nearly always needed to meet the business needs, and to optimize the screens for the mobile devices selected.
From the IMG, Logistics Execution->Mobile Data Entry is the entry point for RF mobile customization. From there we select Define Screen Management to retrieve the logical and original screen numbers of the screen we wish to customize. The RF mobile screens are typically implemented in the SAPLLMOB module pool (function group LMOB). In this example we will customize the LM00 logon screen, which is logical screen 889, original screen 0889 for the narrow format.
Copy the original screen from function module LMOB screen 0889 to “exit” function module XLRF, screen 9889 (standard practice is to substitute the first digit of the original screen number with a 9). Change the new screen to a subscreen and remove the ok code.
Then reformat and activate the screen using the screen layout editor (in this case we just moved one of the buttons and added user name to the bottom of the layout):
BEFORE:
AFTER:
Next we need to implement user exits to populate the new field and perform any additional processing needed to support the business process. The naming convention for enhancements is MWMRFxxx (xxx = logical screen number). So in this case we need to create a new project in CMOD and assign enhancement MWMRF889. Once this is done, go to the components to see the before and after screen exits, in this case EXIT_SAPLLMOB_720 (before) and EXIT_SAPLLMOB_730 (after). These function modules are part of the exit function group XLRF, the same one we added the custom screen to above. The standard data structures and any custom data fields will need to be added to the top include ZXLRFTOP. In this case include LLMOBDAT and a custom data field needs to be declared for the user name W_USERNAME.
*&———————————————————————*
*& Include ZXLRFTOP
*&———————————————————————*
include llmobdat.
data: w_username type adrp-name_text.
We need to transfer the “before” exit input parameters to the screen fields, as well as perform any additional processing needed. The following code is added to the “before” exit EXIT_SAPLLMOB_720 (include ZXLRFU67):
*&———————————————————————*
*& Include ZXLRFU67
*&———————————————————————*
* populate screen fields
lrf_wkqu = i_lrf_wkqu.
rlmob = i_rlmob.
logon_data-queue = i_logon_data_queue.
logon_data-lgnum = i_logon_data_lgnum.
logon_data-devty = i_logon_data_devty.
logon_data-exver = i_logon_data_exver.
lrf_wkqu-mmenu = i_logon_data_mmenu.
* read user full name
select adrp~name_text into w_username
from usr21
join adrp
on adrp~persnumber eq usr21~persnumber
where bname eq sy-uname.
exit.
endselect.
Similarly, the screen fields values need to be returned to the output parameters in the “after” exit EXIT_SAPLLMOB_730 (include ZXLRFU68):
*&———————————————————————*
*& Include ZXLRFU68
*&———————————————————————*
o_rlmob_pback = rlmob-pback.
o_rlmob_psave = rlmob-psave.
o_rlmob_pmlgf = rlmob-pmlgf.
o_rlmob_pclear = rlmob-pclear.
o_logon_data_exver = logon_data-exver.
o_logon_data_mmenu = logon_data-mmenu.
o_logon_data_devty = logon_data-devty.
o_current_field = current_field.
Now just activate the enhancement project and we’re almost there.
Back in the IMG, go to Define Screen Management again and add a table entry for Variant ‘1’ to point logical screen to new exit screen.
Then go to RF Queue Management->Assign Processors to Queues and assign the appropriate screen format and variant to a test user profile.
A good test is to run LM00 and see if the new logon screen appears.
The final step is to generate an internet service and template, instructions for which can be found here:
http://help.sap.com/saphelp_nw70/helpdata/en/46/668d4b72255de4e10000000a1553f6/frameset.htm
We’ll also need to create an ICF service:
http://help.sap.com/saphelp_nw70/helpdata/en/46/668d4b72255de4e10000000a1553f6/frameset.htm
Templates will need to be generated for all of the screens used in the company’s business processes. We’ll also most likely want to create a Z version of the ITSmobile HTML generation class, and tweek it for the RF devices in use, mainly to adjust screen sizes etc. The same applies for the HTML templates so we can add company logos and such. Blue Harbors can assist with all this, and we plan on doing a follow up blog to step through the process of customizing ITSmobile.