cancel
Showing results for 
Search instead for 
Did you mean: 

New field at Item Level in ISA B2b

Former Member
0 Kudos

Hi Team,

we have a requirement to add new date field at the item level, and we need to pass this date to the backend during product configuration.

Any Ideas?

Thanks

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

former_member193379
Active Contributor
0 Kudos

Hi Durga,

Please use the Item class and there is a method getExtenstionData() & setExtenstionData(). By these two methods you can save and reterieve the data.

If you face any further problem, please let me know.

Thanks,

Hamendra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,


Thanks for your replies.

Please go through attached image file.

We need to pass BackDate value to the backend while user clicking on the product configuration button(wrench symbol).
In the backend we implemented one custom BADI and we included this date field(DATE_E) in a table called ITEM_I.


We written below code in the ZMaintainBasketDispatcherAction.java file

protected void parseRequest(
     RequestParser parser,
     UserSessionData userSessionData,
     SalesDocument salesDocument,
     IsaLocation log)
     throws CommunicationException {

ItemList itemList = salesDocument.getItems();
String extensionData = "";

if (itemList!=null && itemList.size()>0)
{
   for (int i=0;i<itemList.size();i++)
   {    
     if (itemList.get(i)!=null);
     {
       extensionData = parser.getParameter("DATE_E").getValue().getString();
              
       itemList.get(i).addExtensionData("DATE_E", extensionData);
     }              
   }

}

And in the order.jsp

We included this date field in the order.jsp  as below

<input type="text" class="textinput-small" name="DATE_E" maxlength="10" value="<%= JspUtil.encodeHtml(item.getExtensionData("DATE_E")) %>"/>

Thanks

Prasad

former_member193379
Active Contributor
0 Kudos

Hi Durga,

Code seems ok but you have put debugger to find out the exact issue.

Thanks,

Hamendra

chintan_virani
Active Contributor
0 Kudos

If you are using Web Channel with CRM as backend then you need to add "code" changes in the Items BADI as well. (CRM_ISA_BASKET_ITEMS).

The methods you need to change are CHANGEITEMS_BEFORE_ORDER for persisting the data parsed from JAVA to CRM basket and then GETITEMS_GET_DATA to retrive the value and give it back from CRM to JAVA layer.

former_member202253
Participant
0 Kudos

Hi Prasad,

Could you please provide more information. As I understood you want to pass/Save new date at transaction level during order creation.

Thanks,

Nikhilesh