Macros in layout
is it possible to use macros in a layout inside STS?
Regards
Hi,
There is no problem with settings. Actually problem is not with the macros, but the problem is with buttons. when you try to press it, they are disabled. cannot be pressed.
Hence macros that are written behind them, don't run at all.
I am looking for version of excel 2007 version where buttons can be pressed.
Similar Messages
-
Implementation for BADI - /SAPAPO/ADVX
Hi,
I have created and activated an implementation for the BADI /SAPAPO/ADVX for the method USER_EXIT_MACRO. But this implementation is not triggering when i execute a macro in Transaction /SAPAPO/SDP94. Could you please let me know how to achieve this? (I am implementing this BADI to display the Units in SUOM instead of Base UOM).
Do we have any other BADI for changing the stock from UOM to SUOM?
Thanks,
RajinikanthHello Experts,
I have created one Z class in which i am using the methods of BADI /sapapo/advx , i have hard coded my macro id ,layout id and view id so that it will execute my code on execution of that particular macro.now my problem is how to read the data for particular keyfigure from the internal tables of this interface.i am not getting how to read te data and process it.
please help me on this.
Regards,
Saurabh Kulkarni -
How to create a Layout variable in Macro
Hi Friends,
I have to run a macro in the planning book which will execute and perform disaggregation / aggregation at whatever level the users enter the data. For Example, if a user enters a data at Product level it has to disaggregate to the SKU level and execute the macro to calculate forecast figures. Always calculating at detailed level gives accurate results. Here am using Drill down and Drill up functionality .
My question is, should I use any IF condition to perform a check say IF at AGG_LEVEL ('SKU') =1 then perform Drilldown. And for DrillUp should I set a LAYOUT_VARIABLE
use this to determine if it needs to be drilled up.
Am not familiar using this condition check and Layout variable creation. Can anyone pls let me know how do create these steps probably with an example.
Thanks for your help in advance.
Regards
BalaHi Bala,
I suggest you to go through the following SAP standard macro book. It contains a collective macro..DRILL(Start), which in turn contains macros for setting indicators, for doing Drill-down and drill-up and deleting the idicators..In this way u can set your drill-up and drill -down macros for the charectaristics you want and do the automatic drill-up and drill-down.
SNP94(1)_Interactive Planning
regards,
uma mahesh...
confirm, Am i targetted ur post exactly...if not kindly post back... -
How to modify a macro in manual layout?
Hi all,
I should modify a macro in a manual planning layout but the corrections work only for the very first execution. If I change layout when I go back to the previous one the macro corrections are deleted.
Can you help me??
Thank you in advanceHi Andrea,
Here are the steps I do :
1 - BPS0 ==> (choose area/level/package/layout) ==> Change Layout ==> 3rd screen
2 - Flag the 2 pre-defined macros SAPAfterDataPut and SAPBeforeDataGet (these are part of Modul1)
3 - Go in the macros via ALT+F8 (or Tools ==> Macro ==> Macros...) ==> Edit
4 - Add my code under the related comment written by SAP, for example in SAPAfterDataPut, hereunder in bold :
'put your own coding here
'If you are using own modules for your coding do NOT
'start the name of the module with "SAP_"!
*Write your Code***
5 - Save the coding in the VBA editor : Save WorkSheet in SEM-BPS LAYOUT BUILDER(1)
6 - Receive a warning for the signature that will be discarted
7 - Save model and/or Save in BPS0
if this also does not work
Please make sure that you insert this small piece of code before your VBA code
'put your own coding here
'If you are using own modules for your coding do NOT
'start the name of the module with "SAP_"!
Tabelle1.Unprotect
**Your VBA code******
Tabelle1.Protect
Tabelle1.unprotect and at the end of your code use Tabelle1.protect.
This is resolve the Signature issue.Also from the next time onwards the system recognises your digital signature and does not give the erro message anymore .
Also make sure you go into Tool> Macros>Security--> Trusted Publishers, here you should tick "Trust Access to Visual Basic project".
hope this helps.
regards
Sai Vishnubhatla -
Changing layout of ALV to excel and displaying the data there
Dear All,
My requirement is that I have to develop an ALV report, and also plot the graphs for the same.
I need different types of graphs, so I have searched on SDN, and I found out a blg:-
"Report with a Graph.. An Approach!"
Here is what the person has done:-
I developed a simple ABAP report using ALV and just dumped all my data on it.
After this I downloaded the Standard Excel template available in the ALV.
Defined my own worksheets in this template, wrote some macros to pick up the data from the RawHeader sheet, which is available by default and will contain the ALV data.
I inserted 1 chart in this Excel template. In this chart I used the same chart type as was being used by the user for his graph. Just right clicked on the Graph area and made the changes in the source data and made it point to the sheet containing the final data.
Thats it my job is almost done.
After this uploaded this template back into the report output through
the layout settings->Change Layout Tab.
Save it as a variant and made it a default. (Do not default it if you have more than 1 user and more than 1 template . Select the appropriate variant for the appropriate user and then display)
Well, this also was not that easy as I had thought. I landed up into 1 trouble.
In my report the number of columns displayed was not constant and kept changing based on the input. This fact was taken care by designing a variable field catalogue. But now I had gone past the simple ALV display and was giving the output in an Excel sheet using a pre-defined template. Well, I immediately found a solution to this with the set_frontend_fieldcatalogue method of CL_GUI_ALV_GRID class and fixed the field catalogue every time after calling the set_table_for_first_display method. This solved most of my problems, which were not many though.
Now here are my issues:-
I have developed the ALV report, and I have also changed the layout to excel.
But, I am unable to get the ALV Report data in the RawHeader Sheet, which is available by default.
Could anyone please guide me through this method??
It is urgent.
Points are assured for helpful answers.
Thanks and regards,
PrernaHi Satya Priya,
Do I have to create my own template, or the Standard ones available will do?
HEre is what I do:-
Once I get my ALV output, I goto Change LAyout->View tab.->Prefered view->Microsoft Excel.
Here I get a list of available excel templates There are 2:-
sap_mm.xls, and sap_om.xls
I select one of these, and the excel spreadsheet is displayed on the ALV screen.
But the re is another button, "Upload Document to BDS".
Do I have to upload one of the above templated to BDS?
And please tell me in detail, what is BDS???
Thanks for your help, and waiting for reply,
Prerna -
hi experts, in my ALV report, layout selected from select-options(F4) is not displaying, after the initial list dispaly if i select from the layouts then it is comming, pls help me,
i did all the required things like i_save = 'X' ,is_variant = alv_variant, in FM reuse_alv_grid_display,
i also use the FM in this order
1)INITIALIZATION -> REUSE_ALV_VARIANT_DEFAULT_GET
2)AT SELECTION-SCREEN ON VALUE-REQUEST FOR -
>REUSE_ALV_VARIANT_F4
3)AT SELECTION-SCREEN---->REUSE_ALV_VARIANT_DEFAULT_GET
4)start-of-selection.
perform f001-data_retrieval.
perform f002-build_fieldcatalog.
perform f003-build_layout.
perform f004-display_alv_report.
thanks & regardsREPORT z_demo_alv_event_exit_1.
>********************************************************************
This report reads and displays data from table TRDIR, *
using the FM : REUSE_ALV_LIST_DISPLAY *
The columns are displayed in the same order than the Sort Order *
There is an underline if the sort is by UNAM or UDAT *
Author : Michel PIOUD *
Email : [email protected] HomePage : http://www.geocities.com/mpioud *
SELECTION-SCREEN :
BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(3) TYPE n DEFAULT '99' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
TYPE-POOLS slis. " ALV Global Types
TYPES:
BEGIN OF ty_trdir,
name TYPE trdir-name, " ABAP program name
cnam TYPE trdir-cnam, " Created by
cdat TYPE trdir-cdat, " Created on
unam TYPE trdir-unam, " Last changed by
udat TYPE trdir-udat, " Last changed on
END OF ty_trdir.
DATA:
gt_trdir TYPE TABLE OF ty_trdir. " Data displayed
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data.
PERFORM f_display_data.
Form f_read_data
FORM f_read_data.
SELECT name cnam cdat unam udat
INTO TABLE gt_trdir
UP TO p_max ROWS
FROM trdir
WHERE name LIKE 'Z%'.
ENDFORM. " F_READ_DATA
Form f_display_data
FORM f_display_data.
Macro definition
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = 'TRDIR'.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_event_exit.
clear ls_event_exit.
ls_event_exit-ucomm = &1.
ls_event_exit-after = 'X'.
append ls_event_exit to lt_event_exit.
END-OF-DEFINITION.
DATA :
ls_layout TYPE slis_layout_alv,
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_event_exit TYPE slis_t_event_exit,
ls_event_exit TYPE slis_event_exit.
Build Field Catalog
m_fieldcat 'NAME'.
m_fieldcat 'CNAM'.
m_fieldcat 'CDAT'.
m_fieldcat 'UNAM'.
m_fieldcat 'UDAT'.
Build Event Exit Table
m_event_exit '&OUP'. " Sort up
m_event_exit '&ODN'. " Sort Down
ls_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_event_exit = lt_event_exit
TABLES
t_outtab = gt_trdir.
ENDFORM. " F_DISPLAY_DATA
FORM USER_COMMAND *
FORM user_command USING u_ucomm TYPE syucomm
us_selfield TYPE slis_selfield. "#EC CALLED
CASE u_ucomm.
WHEN '&OUP' OR '&ODN'. " Sort
PERFORM f_modif_fieldcat.
us_selfield-refresh = 'X'.
ENDCASE.
ENDFORM. " USER_COMMAND
Form F_MODIF_FIELDCAT
FORM f_modif_fieldcat.
DATA:
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_sort TYPE slis_t_sortinfo_alv.
FIELD-SYMBOLS :
<sort> TYPE slis_sortinfo_alv,
<fieldcat> TYPE slis_fieldcat_alv.
Read current ALV list information
CALL FUNCTION 'REUSE_ALV_LIST_LAYOUT_INFO_GET'
IMPORTING
et_fieldcat = lt_fieldcat
et_sort = lt_sort
EXCEPTIONS
no_infos = 1
program_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
EXIT.
ENDIF.
CHECK NOT lt_sort[] IS INITIAL.
Fieldcat modification
DESCRIBE TABLE lt_fieldcat.
LOOP AT lt_fieldcat ASSIGNING <fieldcat>.
<fieldcat>-col_pos = <fieldcat>-col_pos + sy-tfill.
ENDLOOP.
LOOP AT lt_fieldcat ASSIGNING <fieldcat>.
READ TABLE lt_sort ASSIGNING <sort>
WITH KEY fieldname = <fieldcat>-fieldname.
CHECK sy-subrc EQ 0.
<fieldcat>-col_pos = <sort>-spos.
ENDLOOP.
SORT lt_fieldcat BY col_pos.
LOOP AT lt_fieldcat ASSIGNING <fieldcat>.
<fieldcat>-col_pos = sy-tabix.
ENDLOOP.
Underline if the sort is by UNAM or UDAT
READ TABLE lt_sort ASSIGNING <sort> INDEX 1.
IF <sort>-fieldname = 'UNAM' OR
<sort>-fieldname = 'UDAT'.
<sort>-group = 'UL'.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_LAYOUT_INFO_SET'
EXPORTING
it_sort = lt_sort
it_fieldcat = lt_fieldcat.
ENDFORM. " F_MODIF_FIELDCAT
END OF PROGRAM Z_DEMO_ALV_EVENT_EXIT_1 *********************** -
Excel 2013 macro to save pptx as pdf; error in code?
Hello MSDN community,
I know that this question probably was asked x1000 times, but i've been struggling for the past 6 hours to covert pptx to pdf via excel vba (this is required for my report generator, and in order to keep layout clean ad tidy i've decided to use PowerPoint,
because Word constantly mess things up).
Here's the code im using:
Dim ppt As Object
On Error Resume Next
Set ppt = GetObject(, "PowerPoint.Application")
If ppt Is Nothing Then
Set ppt = CreateObject("PowerPoint.Application")
End If
On Error GoTo 0
Set WDReport = ppt.Presentations.Open("C:\Users\User1\Documents\Folder\Final Report Template.pptx")
WDReport.UpdateLinks
Dim FileName2 As String
FileName2 = "C:\Users\User1\Documents\Folder\Complete Report\" & Sheet14.Range("Q3").Text & " No " & Sheet14.Range("U21").Text & " Report" & Sheet17.Range("E10").Text & ".pdf"
WDReport.ExportAsFixedFormat FileName2, ppFixedFormatTypePDF, ppFixedFormatIntentScreen
WDReport.Close
ppt.Quit
Set ppt = Nothing
Set WDReport = Nothing
But right after PPT file opens and updates links, i receive an error message "13 Type Mismatch" on the line WDReport.ExportAsFixedFormat
FileName2, ppFixedFormatTypePDF, ppFixedFormatIntentScreen. I've tried to replace WDReport with ActivePresentation, but received and error "429 ActiveX Component Cant Create Object".
Here's the list of Libraries activated:
Visual Basic for Applications
Microsoft Excel 15.0 Object Library
Microsoft Word 15.0 Object Library
Microsoft PowerPoint 15.0 Object Library
OLE Automation
Microsoft Office 15.0 Object Library
Additional info:
1. When initially i was converting .docx to pdf via excel vba, everything worked out fine (well except for the format, ofcourse).
2. I've tried to change
FileName2 to FileName2
= "C:\Users\User1\Documents\Folder\Complete Report\Report.pdf", but without any success.
3. Ranges used in FileName2 use the following variable data:
Range("Q3") is Name (e.g. Test Company)
Range("U21") is Number (e.g. 1234567891011)
Range("E10") is Date (e.g. Feb-15)
So the final file name would be like "Test Company No 1234567891011 Report Feb-15.pdf".
Once again, it worked fine when i was converting .docx to pdf
4. I've run this part of macro directly from PowerPoint, and it worked out fine.
Dim FileName2 As String
FileName2 = "C:\Users\User1\Documents\Folder\Complete Report\Report.pdf"
ActivePresentation.ExportAsFixedFormat FileName2, ppFixedFormatTypePDF, ppFixedFormatIntentScreen, msoFalse
So i guess there might be a problem with my Excel-PowerPoint commands execution?
I'd really appreciate if anyone could help me with this issue. Thanks in advance!Hello MSDN community,
I know that this question probably was asked x1000 times, but i've been struggling for the past 6 hours to covert pptx to pdf via excel vba (this is required for my report generator, and in order to keep layout clean ad tidy i've decided to use PowerPoint,
because Word constantly mess things up).
Here's the code im using:
Dim ppt As Object
On Error Resume Next
Set ppt = GetObject(, "PowerPoint.Application")
If ppt Is Nothing Then
Set ppt = CreateObject("PowerPoint.Application")
End If
On Error GoTo 0
Set WDReport = ppt.Presentations.Open("C:\Users\User1\Documents\Folder\Final Report Template.pptx")
WDReport.UpdateLinks
Dim FileName2 As String
FileName2 = "C:\Users\User1\Documents\Folder\Complete Report\" & Sheet14.Range("Q3").Text & " No " & Sheet14.Range("U21").Text & " Report" & Sheet17.Range("E10").Text & ".pdf"
WDReport.ExportAsFixedFormat FileName2, ppFixedFormatTypePDF, ppFixedFormatIntentScreen
WDReport.Close
ppt.Quit
Set ppt = Nothing
Set WDReport = Nothing
But right after PPT files opens and updates links, i receive an error message "13 Type Mismatch" on the line WDReport.ExportAsFixedFormat
FileName2, ppFixedFormatTypePDF, ppFixedFormatIntentScreen. I've tried to replace WDReport with ActivePresentation, but received and error "429 ActiveX Component Cant Create Object".
Here's the list of Libraries activated:
Visual Basic for Applications
Microsoft Excel 15.0 Object Library
Microsoft Word 15.0 Object Library
Microsoft PowerPoint 15.0 Object Library
OLE Automation
Microsoft Office 15.0 Object Library
Additional info:
1. When initially i was converting .docx to pdf via excel vba, everything worked out fine (well except for the format, ofcourse).
2. I've tried to change
FileName2 to FileName2
= "C:\Users\User1\Documents\Folder\Complete Report\Report.pdf", but without any success.
3. I've run this part of macro directly from PowerPoint, and it worked out fine
Dim FileName2 As String
FileName2 = "C:\Users\User1\Documents\Folder\Complete Report\Report.pdf"
ActivePresentation.ExportAsFixedFormat FileName2, ppFixedFormatTypePDF, ppFixedFormatIntentScreen, msoFalse
So i guess there might be a problem with my Excel-PowerPoint commands execution?
I'd really appreciate if anyone could help me with this issue. Thanks in advance!
This undoubtedly has to do with the FileName2 string, something must be incorrect with concatenation. As a test, in the VBA sub in Excel have the following
FileName2 = "C:\Users\User1\Documents\Folder\Complete Report\Report.pdf"
, I bet you the code would work :) -
How can I manage access to dimension members in a layout?
Hello,
I have a dimension member list of materials (400) on a "material" dimension. But some people have access to one portion of the whole group and others may have access to other groups. But the materials can be shared between groups so I cannot group them in differents hierarchies.
The problem is in the layout you need to select a hierachy to show various rows (the whole group of materiales). The layout shows all the list of materials. Even if the user only have access to 10 of them. I don't know how is the best way for presenting this to the user? It should presents only the 10 rows corresponding to his materials.
One way that I found (but I don't find it acceptable because of the hard effort that represents the maintenance) is to create differents member access profiles and denied the access to each material (dimension member - 390) that the user cannot modified. Then in excel I have to run a macro that hides all the rows that have an empty description in the cell of the material name.
How can I achive this?
Is there a function in BPC to see if a user have access or not to a dimension member?
The only way to show in a layout various rows is to set in the view a hierarchy?
Thanks & Regards
SUhi
pl. verify whether this will suit your requirements:
Material UG1 UG2
MAT1 Y
MAT2 Y
MAT3 Y
MAT4 Y
MAT5 Y Y
Now UG1,UG2 diff user groups and property in Material. Assignment of Y is one time job.
At the time of accessing the dimension members can restrict on the basis of UG1="Y" or UG2="Y" property
Here MAT5 is common in both UG1 and UG2
(Hardly may have 3-4 set of users: Accordingly can have UG1,UG2,UG3,UG4 etc.)
sri -
Hi All,
I have an issue with ALV report.I have basic list and secondary list.The problem is the layout selection of one list is effecting the other list display.Could you please let me know some body what parameters I have to pass for IS_LAYOUT parameter in the ALV_Griddisplay ?what is the purpose of IS_Variant--handle parameter?
Regards
MaheshHi,
Check the sample Interactive ALV Grid Report.
REPORT z_demo_3_alv_list.
This program is an example with 3 ALV Grid lists *
The customers are displayed in the first list *
When a line is selected, the customer's orders are displayed in *
the second list *
When a line is selected in the second list, the items orders are *
displayed in the second list *
Macro definition
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
TYPE-POOLS: slis. " ALV Global types
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
TYPES:
Data displayed in the first list
BEGIN OF ty_kna1,
kunnr TYPE kna1-kunnr, " Customer number
name1 TYPE kna1-name1, " Customer name
ort01 TYPE kna1-ort01, " Customer city
END OF ty_kna1,
Data displayed in the second list
BEGIN OF ty_vbak,
vkorg TYPE vbak-vkorg, " Sales organization
kunnr TYPE vbak-kunnr, " Sold-to party
vbeln TYPE vbak-vbeln, " Sales document
netwr TYPE vbak-netwr, " Net Value of the Sales Order
END OF ty_vbak,
Data displayed in the third list
BEGIN OF ty_vbap,
vbeln TYPE vbap-vbeln, " Sales document
posnr TYPE vbap-posnr, " Sales document item
matnr TYPE vbap-matnr, " Material number
arktx TYPE vbap-arktx, " Short text for sales order item
kwmeng TYPE vbap-kwmeng, " Order quantity
netwr TYPE vbap-netwr, " Net value of the order item
END OF ty_vbap.
DATA:
gs_kna1 TYPE ty_kna1,
gt_kna1 TYPE TABLE OF ty_kna1,
gs_vbak TYPE ty_vbak,
gt_vbak TYPE TABLE OF ty_vbak,
gt_vbap TYPE TABLE OF ty_vbap.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data_kna1.
END-OF-SELECTION.
PERFORM f_display_data_kna1.
Form f_read_data_kna1
FORM f_read_data_kna1.
Read customer data with a least one order
SELECT kunnr name1 ort01 INTO TABLE gt_kna1
FROM kna1 AS k
UP TO p_max ROWS
WHERE EXISTS
( SELECT kunnr FROM vbak WHERE kunnr = k~kunnr ).
ENDFORM. " F_READ_DATA_KNA1
Form f_display_data_kna1
FORM f_display_data_kna1.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
Build the field catalog
m_fieldcat 'KUNNR' 'KNA1'.
m_fieldcat 'NAME1' 'KNA1'.
m_fieldcat 'ORT01' 'KNA1'.
Display the first list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND_KNA1'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_kna1.
ENDFORM. " F_DISPLAY_DATA_KNA1
FORM USER_COMMAND_KNA1 *
FORM user_command_kna1 USING u_ucomm TYPE sy-ucomm
us_selfield TYPE slis_selfield."#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE gt_kna1 INDEX us_selfield-tabindex INTO gs_kna1.
CHECK sy-subrc EQ 0.
PERFORM f_read_data_vbak. " Read data from VBAK
PERFORM f_display_data_vbak. " Display orders
ENDCASE.
ENDFORM. " USER_COMMAND_KNA1
Form f_read_data_vbak
FORM f_read_data_vbak.
SELECT vkorg kunnr vbeln netwr
INTO TABLE gt_vbak
FROM vbak
UP TO p_max ROWS
WHERE kunnr = gs_kna1-kunnr.
ENDFORM. " F_READ_DATA_VBAK
Form f_display_data_vbak
FORM f_display_data_vbak.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
Build the field catalog
m_fieldcat 'VKORG' 'VBAK'.
m_fieldcat 'KUNNR' 'VBAK'.
m_fieldcat 'VBELN' 'VBAK'.
m_fieldcat 'NETWR' 'VBAK'.
Display the second list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND_VBAK'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbak.
ENDFORM. " F_DISPLAY_DATA_VBAK
FORM USER_COMMAND_VBAK *
FORM user_command_vbak USING u_ucomm TYPE sy-ucomm
us_selfield TYPE slis_selfield."#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE gt_vbak INDEX us_selfield-tabindex INTO gs_vbak.
CHECK sy-subrc EQ 0.
PERFORM f_read_data_vbap. " Read data from VBAP
PERFORM f_display_data_vbap. " Display items
ENDCASE.
ENDFORM. " USER_COMMAND_VBAK
Form f_read_data_vbap
FORM f_read_data_vbap.
SELECT vbeln posnr matnr arktx kwmeng netwr
INTO TABLE gt_vbap
FROM vbap
WHERE vbeln = gs_vbak-vbeln.
ENDFORM. " F_READ_DATA_VBAP
Form f_display_data_vbap
FORM f_display_data_vbap.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
Build the field catalog
m_fieldcat 'VBELN' 'VBAP'.
m_fieldcat 'POSNR' 'VBAP'.
m_fieldcat 'MATNR' 'VBAP'.
m_fieldcat 'ARKTX' 'VBAP'.
m_fieldcat 'KWMENG' 'VBAP'.
m_fieldcat 'NETWR' 'VBAP'.
Display the third list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbap.
ENDFORM. " F_DISPLAY_DATA_VBAP
END OF PROGRAM Z_DEMO_3_ALV_LIST ******************
Regards,
Raj. -
Problem in changing layout of ALV to excel
Hello everyone,
I have developed an ALV program, wherein I need to show the graphs for the same.
For this, I need my data in excel format, so that I can write some macros ,and do the further processing on it(I am using an appraoch I found on SDN, "Report with graph").
I got to know, that I need <b>SAP R/3: Add On:Interactive Excel</b>.
I asked the BASIS guys to install it, but even after installing it, I am unable to view the data in Excel layout, when I do Change LAyout->View->Microsoft Excel.
Could anyone let me know if there is any other setting which is required to view the data in excel?On the excel side, we can change the security level(Tools->Macro->Security) to either low, medium or high.
Is there any such provision in SAP?
Kindly suggest your answers, as it is important for me to get the data in excel.
Points will be rewarded.
Thanks and regards,
PrernaHi,
I have already tried what you have just mentioned.
I searched the entire SDN, for this, and this was one of the replies
But still we don't get the data(Even you didn't get it, right?).
when we change the layout to excel(Excel Inplace), there are 2 sheets by default:-
Rawheader and Rawdata.The data comes in RAwheader sheet.
But there is some setting on the BASIS side, which need to be done, in order for it to work.
I have asked my BASIS colleagues and some of my senior consultants to look into the same.
They will let me know.
I would also suggest you try your program on another PC.
I will let you know as soon as I get any replies from my colleagues.
Thanks and regards,
Prerna -
How to create Links in a cell to other Excel docs Cell in Planning layout
Hi All,
I have a requirement to replace an existing forecasting process using normal Excel with BPS with Excel in place. One difficulty I came across is that the existing Excel input template has cells with links to many other excel files so users does not to open all other Excel documents and copy and paste the figures in.
I am stuck on replicate this function in BPS as I cannot create links to to other Excel directly in a cell in BPS Excel layout. My initial idea is to create a Macro to copy the data across but in deeper thought this might not be the best solution as the number of excel link can be a lot and the name and location of these files might change quite frequently and I cannot hard code it in the macro..
Any ideas?
Thanks.Hi Marc,
The reason to use BPS is once the data is in the layout, we need to run the data in a true forecast / simulation model (i.e. compare actuals, copy data between differnt planning versions, Foreign Exchange rate planning , allocation, revaluation, etc...) on a different hierarchy level.
The problem is the starting point data is scattered in lots of other Excel file from local drives from different users. I guess this is the same reason why the csv file upload technique exist, (i.e. to load data to the layout )but in my case the data location needed to be very dynamic and comes from large / different source of data.
I have now developed a solution to reference data from cells in different Excel sheet to the layout. Once set up, it should be able to save users significant amount of time to bring the base data into the layout, especially if their data is source from many ither Excel files.
Regards,
Danny -
Is there a way to automatically display a Word document in Print Layout view?
I am using Report Generation Toolkit (v.1.0.1). After displaying the report, the view in Microsoft Word is always "Normal." It would be really nice to automatically show it in "Print Layout" view. (i.e. in Word, go to View >> Print Layout) Is there a way to do this programmatically through the vi? I'm using LV 7.1 and Windows 2000. Thanks,
Hey dj143
The best way to do something like that is with property nodes.You can do this the easy, by going into word and recording a macro. Then look at the macro and duplicate it using property nodes.here is a vi that I did for you that answer your question
Joe.
"NOTHING IS EVER EASY"
Attachments:
printview.vi 44 KB -
Can I use Word for Mac 2004 to write basic solver/Macros programs?
I just bought the new macbook aluminum unibody. I am in college and am taking computer programming in fall, I need to be able to write basic programs that utilize macros and solver. I spoke with one mac person who told me I would need to buy parallels, the microsoft OS and then microsoft word for Microsoft OS.
However, that costs upwards of 200$ for a class I am only going to be taking for 2 months. Someone else has told me that the 2004 version of Word for Mac has macros abilities on it (those that are not on the current version, but that the 2011 version will have). Can I just use the 2004 version? Or does anyone have other suggestions?Office 2004 and Other Applications Don't Work in Lion/Mountain Lion
If you have Office 2004 which is a PPC-only suite, it will not work in Lion/Mountain Lion. You need to upgrade to Office 2011 - Mactopia - or you can try the freeware suite, Libre Office, that is functionally similar to Office 2007 for Windows except it works on Lion/Mountain Lion.
You may want to consider as well:
These two suites are similar to Libre Office but not as current or as well-supported:
NeoOffice
Open Office
And, then there is Apple's iWork suite:
Pages - word processing and layout
Keynote - presentation
Numbers - spreadsheet
Each can open and save Office compatible files. They may be purchased separately via the Mac App Store for $19.99 each.
As for other software, any PPC-based software will not run in Lion or Mountain Lion because Rosetta is no longer part of OS X. You will need to upgrade to Intel versions of the software.
(Access to the Mac App Store requires Snow Leopard 10.6.6 or higher and an Apple ID.) -
Incopy: Text Macros not working from machine to machine, same template
Hello there - Merry Christmas!
This is my first post as I have exhausted my troubleshooting on an issue within Incopy CS4, version 6.06, Text Macro's.
I have a template that is shared by all users on similar windows XP machines. I could go into more detail if needed here but here's the problem in a nutshell:
I have a nested style, added as a text macro in Incopy, that goes something like this:
USER NAME >>>> SHIFT+ENTER
[email protected]
Screenshots and further explanation below.
I add this as a text macros, keep text attributes, apply a key combo and I'm off. Or so I think.
When I apply the style in the same shared template on one machine - which for all intensive purposes looks the same as another machine (setup, application, fonts), applying the text macro gives the correct style (in layout mode), no missing fonts.
However, on another machine, the macro is applied, go into layout view and it shows the text with the "missing" font pink highlight indicator.
If I apply the style without the macro, the style works in layout mode - no missing font.
I have checked all the settings in Incopy and made sure they are the same on both machines, I have reinstalled the application (InCopy), and uninstalled and reinstalled all fonts on both machines to ensure they are identical.
I have no idea at this point why on one machine the text macros works and on another it does not.
Any insight would be so truly appreciated!
Cheers & Thank you.Since you have allowed all macros, the problem appears to be that the macros are not available.
I noticed in your screencast that the screentip for one of the macros read Normal.NewMacros.Indent. That indicates that the macro should be found in your default template Normal.dotm. For another, the screentip was Project.NewMacros.Bold or something like
that. That makes me suspect the macro is NOT in Normal.dotm
From Word, press Alt+F11 to activate the Visual Basic Editor.
You'll see the Project Explorer on the left hand side. In the screenshot above, you see that my Normal template has one module, named basCode. The macros in this module are globally available in Word.
Check whether you can find macros in your Normal template, under Modules. Double-click a module to see its contents.
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
UCCE 7.5.7 CAD macro to populate ICM Call Variable
UCCE 7.5.7
CAD 7.5.8
I need to create a CAD Toolbar macro in Cisco Desktop Administrator that reads data from a text file (an 8 digit number) and writes this data to an ICM Call Variable.
The 8 digit number is not known until after the call is answered.
I have created a Toolbar Task that asks the CAD Agent to enter digits, which are then written to a text file on the local PC, but I haven't been able to create a macro successfully that will copy the data from the text file and write this to an ICM Call Variable.
Anyone done this before or know how to?
Thanks,
NeilThe layout logic works pretty much the way it is described in the CAD documentation. Double check the naming of your ECC variable id 252. What did you name your ecc variable in ICM? What did you name it in CAD? Remember in CAD the name should not include the "user" prefix. Make sure you are writing the correct layout name into variable 252, this needs to exactly match the name of your layout in CAD.
For database reads you may want to look into the dblookup functionality in ICM. It's somewhat limited with what you can do but easy to setup if it works for you. Otherwise you could use the database querying abilities of CVP or IP-IVR. If none of those are suitable then you can go with some custom integration triggered by a CAD client desktop workflow.
Maybe you are looking for
-
Problem with HttpURLConnection and HttpSession.
Hi, Problem with HttpURLConnection and HttpSession. I created a HttpSession object in my main class and then called a URL via HttpURLConnection. I tried to access the same session object from the servlet called by the URL . but the main session is no
-
Missing characters with menu drop down
I have witnessed today a very strange problem. We have 2 new G5's (less than 6 months old)running 10.4.6. On both machines today I saw problems with missing characters. On one machine I was reinstalling Adobe CS2 Premium and the initial installation
-
Ins. WebDynpro handling with tables form backend which are packed into List
Hi! How can I basically handle a List inside WebDynpro which has been populated by a RFC FuntionModule's table from backend. With iterate() I can't acces its values like a table. What is the standard procedure for these cases ? Even I have tried to
-
Laptop crashed after Redirect Virus/Trojan - please help!
I have HP G72-B66US laptop purchased 10/2010. I am running Windows 7 Home Premium. I have McAfee Antivirus with current virus definitions and nothing was found but a month or so ago my McAfee firewall started turning off. I would turn it back on a
-
My homepage is extremely small and hard to read without a magnifing glass.
When my homepage comes up, it is extremely small and hard to read. How do I magnify or enlarge this page?