cancel
Showing results for 
Search instead for 
Did you mean: 

how to make fields mandatory based on user change the status on service order?

former_member198180
Active Participant
0 Kudos

Hi Team,

My requirement is,service order creation screen when ever user change the status to E0009 then 3 drop down fields is  set to mandatory.for this how to do it? could you please give me best solution to achieve this.

Thanks in advance.

Thanks & Regards

Kalpana.

Accepted Solutions (0)

Answers (3)

Answers (3)

samantak_chatterjee
Active Contributor
0 Kudos

Hi Kalpana,

Any update on this ? Were you able to proceed with the Technical Coding or you need some more technical input ?

Thanks in advance.

Best Regards,

Samantak.

samantak_chatterjee
Active Contributor
0 Kudos

Hi Kalpana,

You can create a new View Configuration with those 3 fields as mandatory. And then, in the DO_PREPARE_OUTPUT you can set the view if it is of that particular status.

In the method, you need to read the relationship to get the status using BOL Programming. Then get the status and check if the status which you retrieved is the one you mentioned. And then call the method SET_CONFIG_KEYS and pass the values of the desired configuration.

Let me know if you need help with the coding.

Hope this helps.

Thanks,

Samantak.

kapilpatil
Active Contributor
0 Kudos

Hello Kalpana,

Please refer below.

Implement GET_P method for the WEB UI attribute which you want to make conditionally mandatory.

I hope above helps.

former_member198180
Active Participant
0 Kudos

HI Kapil,

Thanks for your quick reply.

I have created on configuration ,in this config i have set 3 fields as mandatory, and i have added the logic on do_config_determination method like as below.

but the problem is this z configuration is added on all other transaction types.other transactions its get effected..how to do it .what was the best approach for this

.i have redefine the method DO_CONFIG_DETERMINATION.

IF lv_process = 'ZLTS' and lv_status = 'E000'.

        CALL METHOD me->set_config_keys

          EXPORTING

            iv_object_type          = 'BT116_SRVO' "UI Object Type

            iv_object_sub_type      = '<DEFAULT>'  "UI Sub-object Type

            iv_propagate_2_children = 'X'.

      ELSE.

        CALL METHOD me->set_config_keys

          EXPORTING

            iv_object_type          = 'BT116_SRVO'

            iv_object_sub_type      = 'ZLTS' "

            iv_propagate_2_children = 'X'.

      ENDIF.

    ENDIF.

Thanks & Regards

kalpana

kapilpatil
Active Contributor
0 Kudos

Hello Kalpana,

You can implement get_p method for the attributes and set as mandatory based on sales type and status of transaction.

Refer :

With above you need not create multiple configurations.

I hope this helps.