on 10-04-2007 4:41 PM
Hi,
has anyone used BADI BBP_SCREENVARIANT for removing the delete source of supply button in BBPSC02?
I can create the screen variant via SHD0 and set the field to invisible no problem.
I want to call the screen variant only if the the shopping cart has been added from a catalogue, i.e. only if field CATALOGID is populated (not blank).
Is this possible and has anyone done this?
Regards
Chris
Hi Chris,
use the following code in your badi 'BBP_SCREENVARIANT'
DATA: es_header TYPE bbp_pds_sc_header_d.
DATA: et_item TYPE TABLE OF bbp_pds_sc_item_d,
wa_item TYPE bbp_pds_sc_item_d.
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = iv_guid
IMPORTING
e_header = es_header
TABLES
e_item = et_item.
IF sy-subrc = 0.
LOOP AT et_item INTO wa_item.
IF wa_item-catalogid IS INITIAL.
iv_scvariant = 'ZZSCREENVARIANT'. " your Z screenvariant name
ENDIF.
ENDLOOP.
ENDIF.
<b>Reward points for helpful answer</b>
regards,
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
<u>For which filter type (Business object type) you created the Customer BADI Implementation using SE19 Transaction.</u>
<b>Choose the filter type as BUS2121 'Shopping cart'.</b>
<u>Here is the final syntax error/free code...</u>
METHOD if_ex_bbp_screenvariant~get_screenvariant_sc.
DATA: es_header TYPE bbp_pds_sc_header_d.
DATA: et_item TYPE TABLE OF bbp_pds_sc_item_d,
wa_item TYPE bbp_pds_sc_item_d.
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = iv_guid
IMPORTING
e_header = es_header
TABLES
e_item = et_item.
IF sy-subrc = 0.
LOOP AT et_item INTO wa_item.
IF wa_item-catalogid IS INITIAL.
iv_scvariant = 'ZZSCREENVARIANT'. " your Z screenvariant name
ENDIF.
ENDLOOP.
ENDIF.
ENDMETHOD.
Hope this will help. Do let me know.
Regards
- Atul
Hi Atul,
thanks for the repose, a quick question for clarification should line
iv_scvariant = 'ZZSCREENVARIANT'.
read
ev_scvariant = 'ZZSCREENVARIANT'.
as I want to set my variant as the new screen variant?
also I only want to do this if the catalogue ID is not blank so should this be
IF wa_item-catalogid NOT INITIAL. ????????????????
Thanks in advance
Chris
Andy, Atul,
thanks for all your help. The code is correct from a syntax point of view however the screen variant is not 'hiding' the Remove Assigned Vendor button (BUTTON_SOS_RESET).
My screen variant ZBBP_SC_0330 has the field Remove Assigned Vendor marked as Invisible but this is either not being called or is not making a diffierence.
Any ideas at all?
Cheers
Chris
Hi Chris,
Can you give the screen variant details that you are using.
You can also do the following
Create a transaction variant and put your screen variant in it.
now in the standard variant, give the transaction code and your transaction variant and activate it.
Now check in SAP GUI, if you have created your screen variant correctly then the field will not be visible in GUI and in WEB.
Test thie and Let me know.
Regards,
Andy
Hi Andy,
I created by screen variant from scratch by doing the following
1. In SHD0 for transaction code I created Transaction variant ZBBP_SC.
2. This took me into transaction BBPSC02 in the GUI.
3. From here i processed a shopping cart up to the point where I could select the Source of Supply screen (SAPLBBP_SC_UI_ITS 0330) and the field for 'Remove Assigned Vendor' was visible.
4. I set the flag for Invisible for this field and then clicked the Exit and Save button which created my screen variant ZBBP_SC_0330.
I'm unsure what you mean when you say "now in the standard variant, give the transaction code and your transaction variant and activate it. " can you claify.
Thanks
Chris
in the tcode SHD0, you can see three tab strips.
first one is standard variants
second one is transaction variants
third one is screen variants
create a screen variant -
which u did
create a transaction variant -
give some name and add your screen variant
create a standard variant -
give the transaction variant name here and activate it.
regards,
Andy
Hi Andy,
I've activated the transaction variant as the standard variant and the delete assigned vendor is now removed!
However, the logic in the BAdi to remove the button only if the Catalogue ID is not blank does not seem to be taken into account. The button is remvoed for describe requirement items with vendor lists and for catalogue items.
Any ideas?
Thanks for all your help.
Chris
Hi Chris,
This shows that your screen variant is working fine.
Check the following
1) Deactivate the Standard variant in Tcode SHD0
2) In the badi 'BBP_SCREENVARIANT' comment the catalogid condition and just pass your screen variant name. Check whether 'Delete assigned vendor' button is invisible.
3) If this is happening put a external break point in the badi near 'BBP_PD_SC_GETDEATIL' and check whether data is getting passed to the FM or not.
Regards,
Andy
Hi Andy,
again thanks for your help.
1. If I remove my screen variant from the transaction variant or deactivate the transaction varaint and debug the BAdi I can see the following.
a. The BAdi is called and the code is cycled through.
b. If I change the statement from IF NOT wa_item-catalogid is INITIAL to IF wa_item-catalogid is INITIAL to allow me to create a shopping cart in the Gui for a product category with an associated evdnor list then I can see that the screen variant is correctly passed to parameter ev_scvariant. However this doesn't seem to have any impact on the display of the button.
The info coming back from function module BBP_PD_SC_GETDETAIL appears to be correct.
I'm at a bit of a lose.
Regards
Chris
Yes this can be done. Just set the ev_scvariant in the shopping cart method equal to the name of the screen variant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.