cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to split a count value into multiple rows in SAC...

08-06-2026 3:57 PM
N1kh1l Active Contributor
161 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi All,

Based on planning model, have a input story to plan new positions say with a position count (e.g. 5). I want to generate 5 separate rows, each keeping the same dimension values as the source row, can we do this in scripting and export the result to Excel, without writing back to the model.

Questions:

  1. Can the built-in Export to Excel widget export rows that aren't from a bound Table (i.e. built purely in script)?

vinay_009_0-1786016482664.png

@N1kh1l , your thoughts please?

Thanks,

Vinay

0 Likes
View Entire Topic
N1kh1l
Active Contributor

@vinay_009 

Not sure of the use case but if its about feeding it back to HR system for position creation, then you can export the table row to Excel and then just use a simple vba to split into multiple lines. In SAC, scripting might not be suitable for the use case.

 

Hope this helps !

Nikhil

vinay_009
Explorer
0 Likes
@N1kh1l Thanks for your response. Yes, that's exactly the use case — HR needs one row per new position create in their system. Also, few questions need to clarify. 1. Does the SAC Add-in for Excel support running VBA directly inside the same workbook where the Add-in is pulling data? If yes, we don't need the manual "export from SAC → open in Excel → run VBA" step — we could just pull the data with the Add-in and run the macro right there in the same file. 2. If VBA is blocked in the Add-in, then the only option is the manual flow: export the filtered table from SAC → open in Excel → run VBA there. is my understanding correct? Thanks, Vinay
N1kh1l
Active Contributor
0 Likes
Yes you can run the vba on the same sheet that is pulling data but I would suggest that it should be the source sheet for the vba. The vba should create multiple lines on a new sheet so that your source remains intact