cancel
Showing results for 
Search instead for 
Did you mean: 

Changing data of a screen field

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi All,

I have 10 custom fields on the FPM Create Material UI.

All of them are configured by the functional consultant.

I am populating the Initial Screen plant to one of those fields on the Next screen (When user Enters Material, Plant and Change Request) He hits continue button. I am defaulting the Initial screen plant to the next screen Z field.

Now when user hits save button. The Zfield(plant) is not getting updated to the DB table.

When he enters data to some other field along with this Z field then it is getting updated to the DB Table.

I wrote my logic for defaulting in the Feeder class method GET_DATA.

Please assist.

Accepted Solutions (1)

Accepted Solutions (1)

former_member215610
Active Participant
0 Kudos

Hi,

Set EV_DATA_CHANGED = abap_true in get_data method after navigating from initial screen.

Regards,

Ragavendra BR

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi Ragav,

Thanks for quick reply. I did that. but still not working with that.

former_member215610
Active Participant
0 Kudos

Hi,

Are you calling super class at the beginning of the get_data method?

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi Raghav.

I am just doing this code in GET_DATA.

Call method CL_MDG_BS_MAT_SETTINGS=>GET_INITIAL_SCREEN_VALUES.

Assign component ZZPLANT OF STRUCTURE CS_DATA to <FS>.

If sy-subrc = 0. and not LV_RS_INITIAL_SCREEN_VALUES-WERKS.

   Change the data in CS_DATA with the <FS>.

   EV_DATA_CHANGED = ABAP_TRUE.

endif.

Venkat_Sesha
Advisor
Advisor
0 Kudos

This code is written just below the standard GET_DATA Method.

which is MO_CONTROLLER->GET_DATA ( blah blah).

former_member215610
Active Participant
0 Kudos

If you are using the BOPF framework change the data first and call super method.

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi We are using the FPM_ADAPTABLE_OVP component

and I didnt understand about the super class thing. Please assist

former_member215610
Active Participant
0 Kudos

Change the cs_data and call

CALL METHOD SUPER->IF_FPM_GUIBB_FORM~GET_DATA

   EXPORTING

     IO_EVENT                = IO_EVENT

     IV_RAISED_BY_OWN_UI     = IV_RAISED_BY_OWN_UI

     IT_SELECTED_FIELDS      = IT_SELECTED_FIELDS

     IV_EDIT_MODE            = IV_EDIT_MODE

     IO_EXTENDED_CTRL        = IO_EXTENDED_CTRL

   IMPORTING

     ET_MESSAGES             = ET_MESSAGES

     EV_DATA_CHANGED         = EV_DATA_CHANGED

     EV_FIELD_USAGE_CHANGED  = EV_FIELD_USAGE_CHANGED

     EV_ACTION_USAGE_CHANGED EV_ACTION_USAGE_CHANGED

   CHANGING

     CS_DATA                 CS_DATA

     CT_FIELD_USAGE          = CT_FIELD_USAGE

     CT_ACTION_USAGE         = CT_ACTION_USAGE

     .

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi Raghav,

It says "/PLMU/CL_FRW_G_FEEDER does not contain an interface IF_FPM_GUIBB_FORM.

The class name which i started working on initially is CL_MDG_BS_MAT_FEEDER_FORM_SET.

And inside this class there is a method called GET_DATA. This Method is in the class /PLMU/CL_FRW_G_FEEDER_FORM.

Here I enhanced the using implicit enhancements. Please help now

former_member215610
Active Participant
0 Kudos

/PLMU/CL_FRW_G_FEEDER is having get_data method?

if exist call /PLMU/CL_FRW_G_FEEDER~GET_DATA

importing and exporting same parameter

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi /PLMU/CL_FRW?G_FEEDER doesnt have GET_DATA Method

If I use the FEEDER_FORM's GET_DATA then it goes to infinite loop. because calling same method in the same method's enhancement.

Please help

former_member215610
Active Participant
0 Kudos

put break point at beginning of get_data method and for each time make EV_DATA_CHANGED = 'X' in debugging mode and check.

Venkat_Sesha
Advisor
Advisor
0 Kudos

I tried all those options before I post the question here. Thanks for your help.

let me know other options that I can...!

Venkat_Sesha
Advisor
Advisor
0 Kudos

I tried all those options before I post the question here. Thanks for your help.

let me know other options that I can...!

Answers (1)

Answers (1)

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi All,

Can any one please tell me how do we update the Staging table data..?

franois_henrotte
Active Contributor
0 Kudos

if the ev_data_changed parameter doesn't work, you can force the update by calling the method flush (included in interface if_fpm_guibb_form of your feeder class) at the end of the GET_DATA method

you just have to pass some parameters to the flush:

- is_data = ms_data

- it_change_log = an internal table of type FPMGB_T_CHANGELOG

for each field that you changed inside the GET_DATA, put a record into this internal table

- name = fieldname as in configuration

- new_value = data ref to new value

- old_value = data ref to old value

the values will be updated globally into the buffer of the BOPF object and the new data will be available into all GUIBBs that are using it