cancel
Showing results for 
Search instead for 
Did you mean: 

Switch between B2B customers without logging off

Former Member
0 Kudos

Dear SDN team,

We need your help on this challenging problem.

As you know , when we login to SAP CRM ISA application in B2B scenario , only oneuser can login and choose a list of Sold to parties to access the Product catalog. Once the user completes his B2B activities on the ISA portal , he has logout to switch to another customer.

Now we want the user should be able to process B2B activities for different Sold to parties in the same Login session . Which means that he should not logout at all from the B2B screen if he tries to place orders for different customers.

Do we have solution for this problem ??

How can a B2B user place orders for different customers within the same login session ??

Please help here .

Regards,

Dinesh

Accepted Solutions (1)

Accepted Solutions (1)

prashil
Advisor
Advisor
0 Kudos

Hi Dinesh,

The requirement is very tedious.

The easiest way to achieve the requirement is to create a link like "Switch Customer" which will clear all the customer related information in the session and request object like sold to, sales org, div channel etc.

Once you clear all those information, you can put the action to show the shop list where user can switch the customer.

Hope this clears your query!!!!!

Regards,

Prashil

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Dinesh,

This is a consulting question. We have tackled in two different ways. Here is the easy way if you are running the ISA from Portal.

If you are running ISA through SAP Portal, the ISA Logon (usually) uses SSO ticket / login cookie to do dark-login. You can leverage this feature by simply linking the new "Select New Sold-To" link to relogin action or even init.do. The customer will directly go back to the Web Shop, Sold-To selection screen without any need to login again. Note: The customer will have to re-select the Shop if you have multiple.

Well, if you are not using Portal, then, it is complex. You have to write one custom action say "ZCleanUpSoldToAction" There are lot of values to clear. It is very easier said than done. Really you have to clear up lot of objects, you don't even expect. If you don't do them properly, you will have them show up their "ugly" faces in wrong spots. So, we have to be precise.

In that action you will precisely do the following:

  1. Remove the Business Partner (Sold-To) from the current Business Partner Manager.

  2. Clean up the User object - remove the Sold-To partner from the User object.

  3. Clean up the session context - of saved Sold-To and Sold-To list

  4. Clean up the request context - of saved Sold-To and Sold-To list

Clean up User and Business Partner manager


import com.sapmarkets.isa.businessobject.User;
import com.sapmarkets.isa.businesspartner.businessobject.BusinessPartnerManager;
import com.sapmarkets.isa.businesspartner.businessobject.BusinessPartner;
// Get the current Sold-To
soldToValue = requestParser.getParameter("soldTo").getValue();
soldToTechKeyValue = requestParser.getParameter("soldToTechKey").getValue();
TechKey soldToTechKey = new TechKey(soldToTechKeyValue.getString());
// Clean up the Business Partner
BusinessPartnerManager buPaMa = bom.createBUPAManager();
Partner currentSoldTo = new Partner(soldToValue.getString(),soldToTechKey);
buPaMa .removeBusinessPartner(currentSoldTo);
//Clean up the Sold-To
User user = bom.getUser();
user.getSoldTo().setTechKey(null);
user.getSoldTo().setId(null);

Note: You have access to the bom in any action.

_Clean up the Session and request contexts_

  1. Clear the request attribute soldto

  2. Clear the request attribute soldtotechkey

  3. Clear the request attribute soldtolist

  4. Clear the UserSessionData attribute soldtolist

Hopefully, you have cleared the trace of the current Sold-To in the ISA layer.

If you think this is enough, then we are wrong. Now we have to clean up the catalog related stuff from the request and session. Mmmmm. I will leave the task to you as an exercise! Hint: We have current catalog, current catalog view, catalog list and catalog view list to be cleared.

If you now set the forward of this action to "b2b/selectsoldto", then, you are good to go.

Easwar Ram

http://www.parxlns.com