14.01.2020 Views

ABAP_to_the_Future

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Editing Data 10.4

id_title

= 'Monster Report'

id_report_name = ld_repid " Calling program

id_variant = p_vari " Display Variant specified by user

it_user_commands = lt_user_commands

CHANGING

ct_data_table = gt_monsters ).

Listing 10.27 Method in the Model Class to Define User Commands

Figure 10.13 shows the end result. Yo u’ve added a new user command button

programmatically to a normal full screen SALV report without having to manually

create a new screen or a new custom STATUS.

Figure 10.13 Monster Report with New Button

10.4 Editing Data

In this section, you’re once again going to look at a (very) common user requirement,

realize that CL_SALV_TABLE cannot cut the mustard on its own, and work

out a way to plug the gap.

Once upon a time, there was a clear se paration between reports (which showed

end users lists of data) and transactions (which enabled end users to be able to

change that data). These days, most business users will not settle for that. If they

see a list of data, then they want to be able to interact with that data: remove billing

blocks, change the price, add an extra head to a monster, and so forth. As a

result, over the last decade there have been a lot of SAP GUI reports moving from

read-only to being able to change the data—technically using an editable ALV

grid.

Business users have become used to this, and they love it. It makes their lives so

much easier, because they no longer have to go into 5,400 contracts individually

447

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!