cancel
Showing results for 
Search instead for 
Did you mean: 

SC - Default check - Team shopping cart - Make accessible to my purchasing

Former Member
0 Kudos

Hi gurus,

On the final shopping cart order screen (3. Complete and Order) We have a requirement to check the 'Team shopping cart' by default for users whom purchasing substitutes has been maintained.

I did the following

1> Search all the Badis - but could not locate a correct ont

2> Tried to enhance (Pre exits) the WD component - /SAPSRM/WDC_SC_WZ_GAF_3ST, but it looks like the standard code does not like my changes

Has anyone done this before? Is there a way to implement functionality?

Thanks

Amit kumar Jain

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I have definitely solved.

In order to have the default team shoppong cart check I've done se following steps:

in BBP_DOC_CHANGE_BADI:

IF iv_mode = 'C'.

es_header-purchteam = 'TEAMCART'.

ENDIF.

and in standard class /SAPSRM/CL_PDO_FACTORY_SC_ADV , method CREATE_SC_INT, line 368 I deleted the following lines:just before the call function BBP_PROCDOC_CREATE:

* Team Purchasing

ls_header-purchteam = /sapsrm/if_pdo_constants_gen_c=>gc_tp_standard.

best regards,

Alberto

ps. why SAP has inserted that "unuseful" instruction just before the document creation!?!

Former Member
0 Kudos

Albert,

We have the same requirement.

How did you accomplish this without making a MOD ?

If we have to comment this out, don't you have to do a mod?

standard class /SAPSRM/CL_PDO_FACTORY_SC_ADV , method CREATE_SC_INT, line 368 I deleted the following lines:just before the call function BBP_PROCDOC_CREATE: 

* Team Purchasing

ls_header-purchteam = /sapsrm/if_pdo_constants_gen_c=>gc_tp_standard.

Former Member
0 Kudos

Hi Kelly,

Yes, I did a MOD in the standard method in order to make the choice "free" and customizable via BBP_DOC_CHANGE_BADI.

I think there are no workarounds.

Albe.

ricardo_cavedini
Active Contributor
0 Kudos

Hello,

I think BBP_DOC_CHANGE_BADI will be overwritten by standard code.

In standard, system always defaults the ls_header-purchteam as STANDARD.

You could set this flag as default using a Post Exit Method for method CREATE_SC_INT in class /SAPSRM/CL_PDO_FACTORY_SC_ADV.

You could add the following line in the code in order to set the team cart as default:

es_header-purchteam = /sapsrm/if_pdo_constants_gen_c=>GC_TP_TEAMCART.

Regards,

Ricardo

Former Member
0 Kudos

Hi

Just to let you know that if you implement the DOC_CHANGE_BADI for this it will work perfectly and will not be overwritten by standard code...

I've done it on two implementations and all is fine.

Keith

Former Member
0 Kudos

Hi all,

It looks like it doesn't work: in BBP_DOC_CHANGE_BADI I typed this code:

IF iv_mode = 'C'.

     es_header-PURCHTEAM = 'TEAMCART'.

ENDIF.

But the webdynpro doesn't show the flag team cart the first time and as soon as I do any action the BBP_DOC_CHANGE_BADI shows in the field

     es_header-PURCHTEAM = 'STANDARD'.

even if I've setted in creation 'TEAMCART'.

Even if I put the code above outside the IF statement, the first time I create the SC, the webdynpro shows up without the flag but after any action the checkbox is flagged.

How can I set the default team shopping cart flag? Do you have any suggestion?

Thanks a lot.

Alberto

Former Member
0 Kudos

Hey Ricardo,

I tried updating the value of es_header-purchteam = teamcart  in Debugging mode but couldn't get the Cechkbox marked as true.

if I am not getting it wrong, using implicit enhancement, I should be able to do it but it's nto working that way.

regards

Manish agrawal

Former Member
0 Kudos

Amit

You do this by implementing the BBP_DOC_CHANGE_BADI....

Simply change is_header-purchteam to 'TEAMCART' and then move is_header to es_header.

This will then set all carts to a team cart regardless as to whether a user has set up any purchasing substitutes.

If a user hasn't set up substitutes this can be done as an SRM administrator and amending the user account details for an employee or by updating table /sapsrm/sc_tp via SE16.

Hope this helps.

Regards

Keith