cancel
Showing results for 
Search instead for 
Did you mean: 

call getBOM() from jsp

Former Member
0 Kudos

All

Is it possible to call getBOM() from jsp and not from action

// gettting custom BOM

Z_CustomBusinessObjectManager myBOM =

(Z_CustomBusinessObjectManager)userSessionData.

getBOM(Z_CustomBusinessObjectManager.CUSTOM_BOM);

getting run time error when I call from jsp

Murali

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Yes you still instantiate from a jsp. But this is not a recommended way to call a FM or bom from a jsp.

Try to follow the right way to call i.e. from a Java class.

Regards,

Sateesh Chandra

Former Member
0 Kudos

sateesh

Yes I already imported the classes

(UserSessionData,Basket and BusinessObjectManager)

Thats why I have the doubt whether I can call the getBOM() from jsp

IS IT POSSIBLE?

If yes where I'm going wrong?

Murali

Former Member
0 Kudos

Hello Murali,

Yes, you can call you Z_BOM in JSP. Indeed, SAP standard code does the same for standard BOM.

If you have maintained the import of the Z_BOM class

<%@ page import

in your JSP properly, you should be able to get the instance.

  1. The most probable reason could be that your configuration files are not set or maintained properly

  2. or you did not restart the application after making a change to BOM config.

  3. Check the BOM names in the code and the config and see if there are typos. This is also likely.

FYI, BOM-s are instantiated during application start and hence require application restart after any change.

Easwar Ram

http://www.parxlns.com

Former Member
0 Kudos

Hi,

Check whether you have imported all the necessary java classes or not.

Regards,

Sateesh Chandra