cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDG Validation error message issue.

former_member517519
Participant
0 Kudos

Hello MDG Gurus,

I am trying to execute the derivation scenario i.e. whenever I enter the value in one field some default values comes in two other fields, and these two other fields are mandatory in the UI as standard.

So, for this I have enhanced the feeder class and the value is coming now in the UI as expected but the issue is, after derivation hits, I am still getting the validation error message for these fields despite of values entered in that field as per the below message as per the below screenshot:-

Country is my input field and Language and Transportation zones are the derived fields:-

Regards

Ashu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ashu

You can try by making them as warning message under node Configure change request properties

former_member517519
Participant
0 Kudos

Hi Sanjay,

I tried this but no luck..

raghu3
Contributor
0 Kudos

Hello Ashu,

Have you also implemented the changes in method FLUSH of your feeder class?

This method is mainly based on it_change_log

which contains the data which were changed in the browser. I.E. the

changes you applied in get_data are not contained here. So you have to

add your changes here as well.

Regards,
Raghu

former_member517519
Participant
0 Kudos

Hi Raghu,

Thanks for the response.

I tried to debug the Flush method by entering the same details of my Get_data method  in the de-bugger screen.

But still no luck.

Could you please help in letting me know what code I need to write in FLUSH method.

Thanks in advance.

raghu3
Contributor
0 Kudos

Hello Ashu,

I hope you inherited the standard class and created a custom class.

Now redefine method IF_FPM_GUIBB_FORM~FLUSH.

Before calling super class , do the following

ASSIGN is_data->* TO <is_data>.
     CREATE DATA lr_data LIKE <is_data>.
     ASSIGN lr_data->* TO <ls_data>.
     <ls_data> = <is_data>.


The data is now available in <ls_data>. Put data in desired fields.


for e.g.
ASSIGN COMPONENT 'xxx' OF STRUCTURE <ls_data> TO <lv_value>.

<lv_value> = 100.

In addition to this we have to populate change log for the changed field
GET REFERENCE OF <lv_value> INTO ls_change_log-new_value.
       ls_change_log-name = xxx.
       INSERT ls_change_log INTO TABLE lt_change_log.
       CLEAR:ls_change_log.


and then call the super class



CALL METHOD super->if_fpm_guibb_form~flush
       EXPORTING
         it_change_log = lt_change_log
         is_data       = lr_data.

Regards,

Raghu

former_member517519
Participant
0 Kudos

Hi Raghu,

Thanks for the response.

It worked but I am having one doubt, Is this the only way of achieving this functionality, or Can we achieve this by some other alternatives also?

Regards

Ashu

raghu3
Contributor
0 Kudos

Hi Ashu,

Usually , these kind of derivations should  be done by creating an implementation of  BADI USMD_RULE_SERVICE_CROSS_ET.

Regards,

Raghu

Answers (1)

Answers (1)

former_member188878
Active Contributor
0 Kudos

Ashu,

can you paste the derivation screen shot.