cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new field in Material New Screen

Former Member
0 Kudos

Hi SDNers,

I am trying to add a field(EXTWG)  in the Material New Screen i.e Initial screen where we enter material no. and select CR type.

When I go to respective UIBB I am not getting field which I want to add .

Kindly let me know how to achieve the same.

Regards,

Neethu Joy


Accepted Solutions (1)

Accepted Solutions (1)

former_member209780
Active Participant
0 Kudos

Hi Neethu,

You can try enhancing the structure MDG_BS_MAT_S_MP_SETTINGS_DATA (maybe an append) and then open the UIBB shown in the screenshot below and adjust it. You might need to adjust some other communication classes as well, try this and let us know if this is working.

Regards

Goutham

Former Member
0 Kudos

Hi Gautham,

I agree with you ,I think I should be able to append the structure which would make field availbale in UIBB and through customization I will be able to add the field.

Will try this and keep you posted.

Regards,

Neethu Joy

Former Member
0 Kudos

Hi ,

I managed to get the field in the UIBB of the initial screen but the value is not getting passed to the next screen.

As per the document  mentioned above section 5.3 it says to enhance the feeder of the corresponding receiving UIBB from table CL_MDG_BS_MAT_ASSIST_UI=>GT_CUSTOM_URL_PARAM

Since EXTWG exists in Basic data and basic data section uses Feeder CL_MDG_BS_MAT_FEEDER_FORM_MAT,So is it I need to enhance this class ?

I am also not sure which method of this class needs to be enhanced.

My value from initial screen is not passing into next screen for field EXTWG .

Regards,

Neethu

former_member209780
Active Participant
0 Kudos

Hi Neethu,

You can try creating an enhancement/post exit for GET_DATA method in the feeder class. Get the instance of class CL_MDG_BS_MAT_ASSIST_UI and read the table GT_CUSTOM_URL_PARAM. Read EXTWG value from this table to the same field of parameter CS_DATA in the feeder class enhancement.

Regards

Goutham

Former Member
0 Kudos

Hi Goutham,

Can you please elaborate how to assign the read value to CS_DATA parameter in the feeder class enhancement.

Regards,

Bhuvaneswari

Former Member
0 Kudos

Hi,


After reading value from CL_MDG_BS_MAT_ASSIST_UI=>GT_CUSTOM_URL_PARAM, try changing CS_DATA in GET_DATA method as below:


FIELD-SYMBOLS: <lv_extwg> TYPE extwg.
ASSIGN COMPONENT 'EXTWG' OF STRUCTURE cs_data TO <lv_extwg>.
<lv_extwg> = "Value for field EXTWG from CL_MDG_BS_MAT_ASSIST_UI=>GT_CUSTOM_URL_PARAM

Former Member
0 Kudos

Hi,

Iam able to share value from initial screen to next page but value is not getting updated and throws error 'please enter the value' .

read table cl_mdg_bs_mat_assist_ui=>gt_custom_url_param assigning <ls_parameter> with table key name = cl_mdg_bs_mat_c=>gc_field_mtart.

     if sy-subrc eq '0'.

       assign component 'mtart' of structure cs_data to <lv_mtart>.

       if <lv_mtart> is assigned.

         <lv_mtart> = <ls_parameter>-value.

          ev_data_changed = 'x'.

       endif.

     endif.


Any idea how to resolve this.

Regards

Bhuvaneswari.

Former Member
0 Kudos

Hi Goutham/MDG user



Any idea how to resolve the issue?



Regards,

Bhuvaneswari

Former Member
0 Kudos

Hi Vemulapalli,

I think you should add the field MTART in the parameter CHANGE_LOG in FLUSH method also in your feeder class.

For ex:

DATA: ls_change_log LIKE LINE OF ct_change_log.

read table cl_mdg_bs_mat_assist_ui=>gt_custom_url_param assigning <ls_parameter> with table key name = cl_mdg_bs_mat_c=>gc_field_mtart.

     if sy-subrc eq '0'.

       assign component 'mtart' of structure cs_data to <lv_mtart>.

       if <lv_mtart> is assigned.

         <lv_mtart> = <ls_parameter>-value.

         GET REFERENCE OF <lv_mtart> INTO ls_change_log-new_value.

         ls_change_log-name = 'MTART'.
         INSERT ls_change_log INTO TABLE ct_change_log.

       endif.

     endif.


Think this should work.

Former Member
0 Kudos

Hi,

  Thanks,

        it worked for me but implemented same code in BEFORE_FLUSH method.

regards,

Bhuvaneswari

Answers (2)

Answers (2)

d024348
Employee
Employee
0 Kudos

Maybe chapter 5.3 "Enhance Initial Screen" of  http://scn.sap.com/docs/DOC-30192 helps.

Good luck, Ingo Bruß

Former Member
0 Kudos

Hi Neethu,

I guess you are using MDG release 6.1

Here application configuration USMD_ENTITY_VALUE2 is built on top of OIF component and you will have two screens (Initial screen and Main Page)

You cannot have non key fields on the initial screen. It is not possible as per standard MDG design. Field EXTWG is a non key field and hence not possible to show in initial screen.

Sorry I thought you are dealing with Custom Data Model. Above are applicable for custom data model