on 02-16-2024 3:39 AM
Dear experts,
I hope this message finds you well.
I have a requirement to add an extra column of expiry date to the batch selection screen from B1 of Sap Customer Checkout through a plugin.
Kindly note that we are working with the SAP Customer Checkout version 2.0 FP17.
To develop the new feature, I have planned to build a new screen for the batch selection.
Here is where I trigger the event (for popup new screen) for selecting the batch number from the CCO backend.
@PluginAt(pluginClass = ManagedByBatchOrSerialNumberPosService.class, method = "fetchBatchOrSerialNumbers", where = POSITION.BEFORE)
public void checkBatchItem(Object proxy, Object[] args, StackTraceElement caller) {
JSONObject payLoad = new JSONObject();
payLoad.put("type", "event");
payLoad.put("eventName", "EXTEND_EXPIRY_DATE_EVENT");
//adding event payload data article id, quantity and stock location
BroadcasterHolder.INSTANCE.getBroadcaster().broadcastActionForPath("/ws/tech", "plugin", payLoad);
logger.info("--------------------------------------------------------");
}
Here is the JS code for listening to the event.
this.eventBus.subscribe({
'handleEvent': (event) =>{
if(event.getType() == "EXTEND_EXPIRY_DATE_EVENT"){
const payLoad = event.getPayload();
console.log(payLoad);
const popupConfig = {
//popup configurations
}
this.eventBus.push('SHOW_GENERIC_POPUP', popupConfig);
}
}
});
}
And these are also a work fine. But the main problem is
I have created a separate scenario package for retrieving the data including the expiry date.
Here is the output of the scenario package.
<CheckNumberReturn>
<Row>
<BatchNr>BATCH001</BatchNr>
<MnfDate/>
<ExpDate>2022-04-30 00:00:00.0</ExpDate>
<Quantity>38</Quantity>
</Row>
<Row>
<BatchNr>BATCH002</BatchNr>
<MnfDate/>
<ExpDate>2022-04-30 00:00:00.0</ExpDate>
<Quantity>22</Quantity>
</Row>
</CheckNumberReturn>
Your valuable guidance, articles, or documents related to solving these problems are greatly appreciated.
Thank You.!
Best Regards,
Ashen.
Dear experts! Could you help me out with this question? I Would appreciate your expertise on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Really very tough to understand what is the exact solution for this problem, It need more expertise on this topic, Sorry that i cannot help you out in this but, I hope you got best answer very soon ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashen,
I could not help you out with your problem I could only provide a workaround. Set the expire-date in front of your batchnumber. That makes sorting as well easier.
Like
20241014-ABCDEF
regards Lothar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
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.