cancel
Showing results for 
Search instead for 
Did you mean: 

modify and save in PCUI

Former Member
0 Kudos

Hi,

I want to update a Z table based on the changes made in the PCUI screen.

Am not able to understand the proper flow of the methods.

I captured the changed fields and its object keys and populated an internal table in the MODIFY method. I need to update the Z table with this internal table.

I have declared this internal table as global. so after populating the internal table in MODIFY method, i have written code in SAVE method to get this internal table and save it to the Z table.

Is it the right procedure.

Canany one brief me how the control flows. how to refresh the page after saving with the new data.

Thanks & Regards,

karthik.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Karthik,

To refresh the screen after saving you must implement READ method in your class. You may get data from data base and pass it to et_screen_structure.

Regards,

David

Former Member
0 Kudos

Hi David,

Thanks for your reply, i have added a field through EEWB, which appears in ET_SCREEN_STRUCTURE too. But the value of the field is blank. I want to set some constant value to that field and update ET_SCREEN_STRUCUTRE so that i can see the field populated in PCUI.

I want to know how to handle this ET_SCREEN_STRUCTURE to populate the value i required in to the correspoding field.

Thanks & Regards,

Karthik.

Former Member
0 Kudos

Hi,

To set a constant value, get the field group of the new field added through EEWB and within this assign a default value.Note thate the field group will be GUID itself as this is generated by EEWB. There will be reference field group CI_EEW_CUSTOMER_H and whithin this you will have the acual field name.

Award points if it helps.

Thanks

Kamal

Former Member
0 Kudos

Hi,

Define your Z class by making it a subclass of the standard class CL_CRM_BSP_AM_HEADFM_1O: a lot easier and the recommended way.

redefine the Read method and call the standard read method of the upper class.

below the call of the standard class, implement the following code:

data: lt_screen_structure type standard table of CL_CRM_BSP_AM_HEADFM_1O.

field-symbols: <fs_struct> type CL_CRM_BSP_AM_HEADFM_1O.

  • First map from the standard structure to your own

CALL METHOD cl_bsp_bp_global_service=>table_mapping

EXPORTING

iv_structure_name_dest = 'CL_CRM_BSP_AM_HEADFM_1O'

it_table_dest = et_screen_structure

iv_structure_name_target = iv_screen_structure_name

IMPORTING

et_table_target = lt_screen_structure.

loop at lt_screen_structure assigning <fs_struct>.

  • change the fields as you whish in the field symbol

endloop.

  • Map back to the standard table

CALL METHOD cl_bsp_bp_global_service=>table_mapping

EXPORTING

iv_structure_name_dest = 'CL_CRM_BSP_AM_HEADFM_1O'

it_table_dest = lt_screen_structure

iv_structure_name_target = iv_screen_structure_name

IMPORTING

et_table_target = et_screen_structure.

Kind regards,

Michael.

Answers (0)