cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Expiry Date Column to Batch Selection Screen in Customer Checkout

Ashen
Discoverer
0 Kudos

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.

Ashen_0-1708053420840.png

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

  1. Where should I set the batch number to show in the previous menu (Where to return the batch number)?
  2. Showing data on the newly created menu?

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.

 

 

 

                                                                                                                                                                            

Accepted Solutions (0)

Answers (3)

Answers (3)

Ashen
Discoverer
0 Kudos

Dear experts! Could you help me out with this question? I Would appreciate your expertise on this.

machbrown2
Explorer
0 Kudos

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 ..

Ashen
Discoverer
0 Kudos
Thanks for your concern on our query. Actually what we need is the expertise support on how we can show the batch details with expiry date in our new screen and after selecting related batch info from that new screen how we could again get return to the sales screen with the relevant batch selected sales item . Yes we are also believing that some expert will surly advise us soon .
LoHa
Active Contributor
0 Kudos

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

Ashen
Discoverer
0 Kudos
Thank you for your suggestion, but it doesn't fix my problem.