‎2009 Aug 12 10:53 AM
Hi Gurus,
I've a requirement where in , I'm supposed to create 5 radio buttons.
1. Upload an Excel File
2. View the Excel File
3. Compute Data
4. View all the computed data till date
5. Enter a new profit center
Each radio buttons have different functionality just as the name suggests. Now, I've 2 issues here.
1st Issue: The client uses a column in it's Excel file which is called - "Store", which is nothing but the Profit Center in SAP standards. How will SAP identify the "Store" column in the Excel file as "PRCTR" ? Is there any key ? Note that, I'm using a Z Table and not any specific Database table.
2nd Issue: In the 4th radio button , there's - View all computed data option. Now, the user wants to see the output in the form of ALV , so that he can transfer the same output to excel file. Is this possible ? I mean, will it be ok if I use the input interface as Module Pool , and the 4th radio button's output as ALV ? Is it technically possible ? Because, the "GUI_UPLOAD" functionality too will be used (to upload the excel file) on clicking the 1st radio button. In short, can GUI_UPLOAD be used in Module Pool ??
Edited by: Prithvi Sridhar on Aug 12, 2009 3:23 PM
‎2009 Aug 12 10:59 AM
I wouldn't use a module pool. I'd build a normal executable program with screens. Then you can have any combination of screen output types you like.
On your first point, your program will take the store field and put it into your profit centre table field - SAP won't do it by itself, your program will do it....
‎2009 Aug 12 10:59 AM
I wouldn't use a module pool. I'd build a normal executable program with screens. Then you can have any combination of screen output types you like.
On your first point, your program will take the store field and put it into your profit centre table field - SAP won't do it by itself, your program will do it....
‎2009 Aug 12 11:00 AM
Hi,
Firstly is this a report or is this a module POOl program?
Both in the module pool and a normal report you can make use of ALV.
In module pool make use of the ALV GRID object using the class CL_GUI_ALV_GRID.
For details you can refer the example programs BC_ALV_GRID_CONTROL and BCALV_GRID_DEMO.
From the ALV grid there is an option to download the data into excel. This button is present on the grid itself.
Regardign you first issue; there is no way SAP can identify that the first column of the ecel sheet contains profit centres.
But since you are going to use GUI_UPLOAD; so when you upload the file into an internal table keep the first column of the internal table of type PRCTR.
Regards,
Anur Parab
‎2009 Aug 13 5:25 AM
>
> Hi,
> Firstly is this a report or is this a module POOl program?
>
> Both in the module pool and a normal report you can make use of ALV.
> In module pool make use of the ALV GRID object using the class CL_GUI_ALV_GRID.
>
> For details you can refer the example programs BC_ALV_GRID_CONTROL and BCALV_GRID_DEMO.
>
> From the ALV grid there is an option to download the data into excel. This button is present on the grid itself.
>
> Regardign you first issue; there is no way SAP can identify that the first column of the ecel sheet contains profit centres.
> But since you are going to use GUI_UPLOAD; so when you upload the file into an internal table keep the first column of the internal table of type PRCTR.
>
>
> Regards,
> Anur Parab
Thanks Ankur and Christine. Both the replies were insightful. The client have changed their requirements. As per the new requirement, I'm supposed to develop a screen where in, after clicking the 5th radio button (Add new Profit Center) , a new screen will pop up, which will have 2 input options - "Enter Old Legacy Number" (Store Number in old Software , PRCTR in SAP ) and "Enter New Profit Centre Number" (in SAP) with the submit button. On clicking the submit button, the values entered by the user should get saved in the Z Table which I created earlier. Can this thing be done in normal executable program , or should this be done in module pool only ?
‎2009 Aug 13 11:44 AM
>
Can this thing be done in normal executable program , or should this be done in module pool only ?
I don't think there there is anything that can be done in a module pool that can't be done in an executable program, and the program has the minor advantage of not needing to have a transaction code to run it. I think I'd always go with the program.