Wiki

Clone wiki

SAP / Home

Introduction

This project is the ABAP component of zMob Mobile for SAP, a project allowing conversion of real SAP ABAP report programs into real mobile apps running on iOS, Android, Windows Phone and Blackberry mobile platforms.

Details

Following is a simple example report written in ABAP:

report zmob_example_01.

parameters: p_werks like zmob=>ui_text.
parameters: p_bool type flag.
parameters: p_desc like zmob=>ui_description.

start-of-selection.

write 'DONE'.

And here is the result when rendered by the mobile device:

example 01

Interactive examples can be found on the official website:

http://sapmobility.zmob.de

Following is a more advanced example with multiple widget types:

report zmob_example_02.

type-pools: vrm.

parameters:
  p_plain type c length 30,
  p_werks like zmob=>ui_text_help,
  p_pswrd like zmob=>ui_password,
  p_descr like zmob=>ui_description,
  p_ilist like zmob=>ui_dropdown as listbox visible length 10,
  p_tggle like zmob=>ui_toggle as checkbox,
  p_slidr like zmob=>ui_slider,
  p_numbr like zmob=>ui_number,
  p_kweek like zmob=>ui_keyweek,
  p_mdate like zmob=>ui_date,
  p_telnm like zmob=>ui_telephone,
  p_pgurl like zmob=>ui_url,
  p_email like zmob=>ui_email,
  p_comps like zmob=>ui_compass,
  p_geolc like zmob=>ui_map,
  p_accel like zmob=>accelerometer,
  p_dvnam like zmob=>device_name,
  p_pltfm like zmob=>platform,
  p_dvuid like zmob=>device_uuid,
  p_osver like zmob=>device_version,
  p_dvmod like zmob=>device_model,
  p_usern like zmob=>user.

parameters:
  p_chkbx type flag as checkbox,
  p_radio like zmob=>ui_radio,

  p_photo like zmob=>capture_photo_button,
  p_video like zmob=>capture_video_button,
  p_audio like zmob=>capture_audio_button,
  p_barcd like zmob=>capture_barcode_button.

at selection-screen output.

* pre-populate drop-down list..
  data:
    p_list_t type vrm_values.

  call function 'Z_MY_VALUES'
    exporting
      p_list   = p_list
    importing
      p_list_t = p_list_t.

  call function 'VRM_SET_VALUES'
    exporting
      id     = 'P_LIST'
      values = p_list_t.

at selection-screen on value-request for p_werks.

* provide value help for p_werks..
  data:
    p_werks_t like zmob=>ui_text_help_t,
    return_t type standard table of ddshretval,
    return type ddshretval.

  call function 'Z_MY_VALUES'
    exporting
      p_list    = p_list
    importing
      p_werks_t = p_werks_t.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield   = 'WERKS'
      value_org  = 'S'
    tables
      value_tab  = p_werks_t
      return_tab = return_t.

  read table return_t into return index 1.
  write return-fieldval to p_werks.

start-of-selection.

  write 'Next (Report 1) <link:zmob_example_01>'.
  new-line.
  write 'Back (Report 2 again) <link:zmob_example_02>'.

and the corresponding mobile applications:

example 02

License

The code in the SAP solution is dual licensed under the Lesser GPL v2 and a bespoke Commercial License. The project can be used in any commercial project, but changes to the source must be published under the same licensing terms with the correct attribution.

Issues

Issues with the SAP solution or mobile applications can be discussed in the following groups and trackers:

Updated