cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Variant Based on Item Information

dean_hinson2
Active Contributor
0 Kudos

Hello,

I am trying to hide the availability section in BBPSC01 depending on the information in custom fields at the item level. I created the screen variant in SHD0 but when I got the BADI, I noticed that I did not have access to the S/C item being processed.

Can this be done?

Regards, Dean.

Message was edited by:

Dean Hinson

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try using both the badi's BBP_DOC_CHANGE_BADI and BBP_UI_CONTROL_BADI.You can check the values of the custom fields in the BBP_DOC_CHANGE_BADI and acc set a flag and EXPORT that to the "BBP_UI_CONTROL_BADI" .Based on the flag value you can then hide the availability section.

DO let me know.

BR,

Disha.

<b>Pls reward points for useful answers.</b>

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

We have done this earlier. )

<b>You can either

use

<u>BBP_DOC_CHANGE_BADI</u>

or

<u>BBP_ITEM_CHANGE_BADI</u>

and this will definitely help in this case.</b>

Do let me know.

Regards

- Atul

dean_hinson2
Active Contributor
0 Kudos

Atul,

None of the 'screen' fields are parameters in the BADIs mentioned. I am not trying to set a data field but a screen fields. Please look at the code above and you will see what I mean. The BADI BBP_UI_CONTROL_BADI is the one I thought I could use but you cannot change values of the fields mentioned above.

Regards, Dean.

Message was edited by:

Dean Hinson

Message was edited by:

Dean Hinson

Former Member
0 Kudos

Hi

I guess, I mis-understood your requirement.

Apologies for the same.

Look for BADI <b>BBP_SCREENVARIANT</b>, which will help in this case.

Do let me know.

Regards

- Atul

Former Member
0 Kudos

Hey Dean,

If i understand you requirement correctly, you can do the following:

Use BADI BBP_SCREENVARIANT in conjunction with SHD0 or the BADI BBP_UI_CONTROL_BADI to control the display of the field depending on the values in the customer fields. I think that should be achievable, however if you wish to control the field display and also change values, then you would have to also use the BBP_DOC_CHANGE_BADI along with the above mentioned.

Hope this info helps !

Pls assign points if answer is usefull !

Sundeep

dean_hinson2
Active Contributor
0 Kudos

Atul & Sundeep,

BBP_SCREENVARIANT via SHD0 from what I know, only allows you to hide and prevent input capability, just like BBP_UI_CONTROL_BADI. BBP_DOC_CHECK_BADI or BBP_DOC_CHANGE_BADI only allows you to process shopping cart screen variables.

If you look at the code I posted earlier, you will see that BBP_UI_CONTROL_BADI only allows hide/unhide or input/no input for the screen variables but not the values. BBP_SCREENVARIANT only allows for choding which variant to use. Neither allows you to change the screen variable values as depicted in my sample code.

Thank you for your replies, but it does not solve my issue.

Former Member
0 Kudos

Hi,

Which BADI you are tring to access, for custom fields, you need to use CUF** BADI.

Thank you

Sreedhar Vetcha

dean_hinson2
Active Contributor
0 Kudos

Sreedhar,

I am not trying to modify a custom field but using it's value to change screen field values. Basically, I want to do this in a BADi...

*..no availibility

If ls_item-ZZDIR_PROC = 'X'.

ct_screen-availabil-dynnr = gc_dummy.

ct_screen-availabil-state = gc_no.

ct_screen-availabil-hidden = gc_yes.

endif.

I can make these fields input_ready or invisible using BBP_UI_CONTROL_BADI, but I cannot affect their values.

Has anyone done this?

Regards, Dean.