cancel
Showing results for 
Search instead for 
Did you mean: 

Making field as mandatory in Forwarding order application

bharath_k6
Active Participant
0 Kudos

Hi,

I am working in SAP Transportation Management UI.

Please help me for below questions.

1.In forwarding order application,i want to make particular input field as mandatory. I know if it is Web Dynpro ABAP we will selet the state property of input field as required. We have to call 2 methods(Either CHECK_MANDATORY_ATTRIBUTES or CHECK_MANDATORY_ATTR_ON_VIEW) for checking mandatory.

But SAP TM is desgined based on the GUIBB concept and integrated with FBI and BOPF how it can be done here?

2. In same application, i want to hide some tabs based on the role assgined to user. Where will i have to write this code to check what are the roles assigned to user and based on these i should display or hide the tabs.

I believe we have to enhance the existing configuration to achieve the above points. But not sure how or where to enhance?

I have good exp on Plain Web Dynpro ABAP.

Please guide.

Thanks,

Bharath.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Bharath,

You can make mandatory field using BOPF Transactions. The steps are as follows.

     1. Go to Transaction /BOBF/CONF_UI, and enter your BO name in folder icon or Press F7.

     2. After that put transaction as DEBUG for Switching to the Expert Mode of BOPF.

     3. Then Go to Node Elements group and find your respective node.

     4.  In Node elements find entity Node Categories.

     5. There you will get Business node categories, right click on that node and go to Guided
         Procedure
.

     6. In that Guide Procedure you have to tick field as a mandatory field and finalized it and save.

          You can see that field is mandatory in UI.

Thanks and regards,

Chetan P Patil.

bharath_k6
Active Participant
0 Kudos

Dear Chetan,

Thank you very much for helpful answer.

I observed, Node categories are only displayed for standard nodes.

I could able to find the mandatory and enable properties as per your input.

But how do i control them depending on the application mode in UI.

For example - While creating the FWO few fields should be enaabled and while editing the existing FWO few fields should be editable and other non editable.

How to find the respective node of the application UI active screen that we are working and set these visibility properties accordingly.

Thanks,

Bharath.

0 Kudos

Hi Bharath,

For your requirement, you need to create Determination in BOBF. In that determination class put following code.

   DATA : LO_PROPERTY TYPE REF TO /BOBF/CL_LIB_H_SET_PROPERTY.

  CREATE OBJECT LO_PROPERTY
    EXPORTING
      IS_CONTEXT = IS_CTX    " Context Information for Determinations
      IO_MODIFY  = IO_MODIFY.   " Interface to Change Data

you can set your field properties using following code

   LO_PROPERTY->SET_ATTRIBUTE_READ_ONLY(
      EXPORTING
        IV_ATTRIBUTE_NAME = <your constant interface name>=>SC_NODE_ATTRIBUTE-<your Node name>-<Fieldname>  " Name of the attribute for which the property is to be set
        IV_KEY            =  <your instance key>   " Key of the instance for which the property is to be set
    IV_VALUE          = ABAP_FALSE    " New value of this property (true/false)
    ).

Thanks and regards,

Chetan P Patil.

Answers (3)

Answers (3)

0 Kudos

Hello,

my requirement is to make field mandatory in Basic Information->Safety Observation Group Safety Observation->Estimated Risk

I tried to through Node Attributes mandatory tick as Chetan suggested, doesn't work

As Sanket suggested for SPRO, no attribute maintain

Please guide

safety-group.png

safety-risk.png

Thanks & Regards,

Deekshita

Former Member
0 Kudos

Hi Bharath ,

1. You will be  able to make any header or item level fields mandatory through code also. You will need to go the Business object workbench transaction (/BOBF/CUST_UI) for forwarding order which in this case is /SCMTMS/TRQ . Create an enhancement implementation and then at root or sub node level depending on your validation requirement you can always create a consistency validation / action validation and populate the et_messages table with your error/warning messages. As TRQ works for both order and quotation you can also provide a check such that it will only work for order by specifying order category field .You can also specify whether the validation will prevent saving the document thus making it mandatory.

2. Regarding hiding tabs it can also be done using code by enhancing the SAP standard class and method in /BOFU/CL_FBI_TABBED_EXIT~OVERRIDE_CONFIG_TABBED . Try leveraging it by enhancing it and tweaking it according to your requirement. You can hide a tab as below.

io_tabbed->set_tab_visible(
                 EXPORTING
                   iv_tab_id  = "YOUR TAB ID"
                   iv_visible = abap_false   " Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')

Let me know if this helped!!

Thanks

Shuvodeep

Former Member
0 Kudos

Hi Bharath,

You can make any field mandatory in SAP Transportation Mangament UI through SPRO.That is through configuration settings you can make particular field mandatory,read only, visible/invisible.

Regards,
Sanket.

bharath_k6
Active Participant
0 Kudos

Hi Sanket,

Can you please tell me the SPRO path where i can set the UI settings for SAP TM?

Thanks,

Bharath.

Former Member
0 Kudos

Hi Bharath,

Can't show you the exact path in SPRO configurations for TM.

Attaching the screenshot from IM, have a look.

From the 2nd screenshot you can select the required node and proceed to attribute property.

Create a profile, select attribute property.

Add the fields to be done mandatory & tick the option.

Save the changes.

Hope this helps you

Regards,
Sanket.

bharath_k6
Active Participant
0 Kudos

Hi Sanket,

Thanks for your reply. First screen shot shoud be fine.

For 1st point- For my customer,  there is a custom development done for such settings in SPRO to configure it. But i see there are no entries maintained in the maintenance view in SPRO. But mandatory and enabled properties are working fine in all the applications.

2nd point - I did right click on BO nodes in transaction /bobf/conf_ui, but i did not find anything 'Display folder contents' option.

I think, UI properties are set dynamicaly some where in the coding or i am not sure.

I am trying to understand how this UI field properties are being handled in SAP TM applications.

Example - All the fields will be write enabled when application is launched in Creation mode and some of the fields are made as mandatory.

Same applciaton is launched in change(Edit) mode, only few fields will become editable and other fields will become readonly.

How this dynamic UI fields behaviour is handled based on the application mode in SAP TM UI applications?

Thanks,

Bharath.