cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable the 'Ship-To Address' field only in 'display ' mode in the SC

Former Member
0 Kudos

Hello,

We would like the 'Ship-To Address' field to be locked for change mode in the SC.

Regards,

Lina

Accepted Solutions (0)

Answers (3)

Answers (3)

laurent_dubois
Explorer
0 Kudos

Hey Gurus,

I have the same issue. When I try the screen variant combined with the BADI BBP_SCREENVARIANT. It doesn't work. If I activate as a standard variant, it works, but I cant switch to input/output in this case, it's always my screen variant which it's called... But I need to call it on demand depending on users roles...

Apparently my badi BBP_SCREENVARIANT is not called... I also tried the BBP_UI_CONTROL_BADI~BBP_SC_UI_CTRL with the following code:

IF IV_DYNPNAME = '0310'.

IF IV_FIELDNAME = 'GS_SCR_D_ADDRESS'.

CV_INPUT_READY = ' '.

ENDIF.

ENDIF.

...unfortunatly it doesn't work neither...

Did Someone fix that issue? If you can share, it will be nice!

Many Thanx!

Laurent.

Former Member
0 Kudos

Hi Lina,

Have you thought of using Transaction variant or screen variant from SHD0 to make the Ship to Address field non editable? If this requirement is not specific to a role or a situation and is applicable to the entire system, then you can use transaction variant. If not then try and see if Screen cariant BBP_SC can be leveraged to attain your solution?

Pls Assign points if answer is helpfull !

Sundeep

Message was edited by:

Sundeep Ravande

Former Member
0 Kudos

Hi Sundeep,

Could you please give me more datails about how i can implement Screen variant :

Coding ...ect

Thanks,

Lina

Former Member
0 Kudos

Hi ,

If you wish to hide or show fields, proceed as follows(through screen variants):

1. Determine the screen variant, for example, BBP_SC(For shopping cart), using the list in documentation of BADI BBP_SCREENVARIANT.

2. Copy this screen variant, for example, in Zbbp_SC, in Transaction SHD0.

3. Change the new screen variant as required. Note that you can only change the display properties for fields of table controls. You can switch the display on and off.

4. Implement the appropriate method (see the list above). Fill the export parameter EV_SCVARIANT with the new screen variant.

You can create multiple screen variants for a screen and then select these in the BAdI depending on the user or on other criteria.

here is sample code in BADI BBP_SCREENVARIANT implementation after creating Z screen variant.

Method IF_EX_BBP_SCREENVARIANT~GET_SCREENVARIANT_SC.

IF iv_progname EQ 'SAPLBBP_SC_UI_ITS'

AND iv_dynnr EQ '0120'

AND flt_val EQ c_fltval.

IF iv_scvariant EQ 'BBP_SC'.

ev_scvariant = 'Zvariant'.

ENDIF.

ENDIF.

ENDMETHOD.

Please reward points if helpful..

Thanks

Venkatesh

Former Member
0 Kudos

Hello Venkatesh,

Is there a way to implement this Screen variant only for users with particular roles.

The objective would be to allow the other users to have access in write mode(for example users that have the Purchasers role)

Regards,

Lina

Former Member
0 Kudos

Hello lina,

User with purchaser role can only shop for items. So no need to implement screen variant only for users with particular roles.

Any other users with out purchaser role cant shop...or cant see that screen itself..

Please let me know if you have queires.

Thanks

Venkatesh

Former Member
0 Kudos

Hi Venkatesh,

We have implemented specific roles, and in our system the purchaser is able to shop.

I mention that we would like only to lock for change the field ''Ship-To Address', but the field should be displayed.

Could you please tell me if we can lock the field in change mode only for particular roles.

Regards,

Lina

Former Member
0 Kudos

Hi,

Use BADI BBP_UI_CONTROL_BADI in that implement the method BBP_SC_UI_CTRL.

if field is ship to address then pass empty value to cv_input_ready.

Like below

if iv_fieldname = ship to address.

to cv_input_ready = ' '.

Please reward points if helpful..

Thanks

Venkatesh

Former Member
0 Kudos

Hi Venkatesh,

Do you know if there is way doing the same thing but only by changing the HTML Code.

In case this is the only solution, please give me more details about this BADI : Coding ...ect

I mention we would like to have 'Ship-To Address' field displayed but not available to modify.

Regards,

Lina

Former Member
0 Kudos

Hi lina,

As mentioned by sundeep u can use screen variants. But i have not used screen varaints.

For BADI BBP_UI_CONTROL_BADI. Go to se18 give the BADI name and create implemenation and after that implement the method BBP_SC_UI_CTRL.

Find out field name for the 'Ship-To Address' then do coding like below.

if flt_val = 'BUS2121'.

case iv_fieldname.

when 'ship to address'

cv_input_ready = ' '.

when others

endcase.

endif.

Please reward points if helpful...

Get back to me if u have any queries..

Thanks

Venkatesh