How to create a Macro

Hi,
I am trying to create a new Macro in Numbers to automate number in words printing.
For example, if I enter 154.35 in a cell, I would like that macro to generate "One Hundred Fifty Four and Thirty Five cents".
I have that function in Excel but i would like to move to Numbers completely.
Any help on how to write that Macro?

The script is available on my iDisk:
<http://idisk.me.com/koenigyvan-Public?view=web>
Download:
For_iWork:iWork '09:for_Numbers09:NombreEnLettres.zip
It contains two versions.
One translates anumber in letters using the French spelling.
The other translates anumber in letters using the English spelling (at least, I hope that it's what it does).
Yvan KOENIG (from FRANCE mercredi 25 février 2009 21:57:01)

Similar Messages

  • How to create a macro for a planning type in MC8b transaction

    Hi,
    I am presently working for a product allocation demand, which have a information structiure with characteristic and key field.
    the characteristic are production allocation quantity, incoming order quantity, and open order quantity.
    i have created a planning type in which the data updation takes from the excel file to the planning type in mc95.
    but i need to create a macro for this planning type .
    can any body give the details information how to create a Macro for a planning type.
    Thanks and regards
    GopalKrishna

    Dear Gopal
    May be the link would be helpful to you.
    [Planning Types and Macros|http://help.sap.com/saphelp_46c/helpdata/en/a5/631cc443a211d189410000e829fbbd/frameset.htm]
    Drill down the left tab once you opened the link, for more information.
    Thanks
    G. Lakshmipathi

  • How to create a Macro in excel to store the excel data to Oracle Database

    Hi All
    Does anyone has created a macro in excel which on being run stores the excel data to Oracle database. In my project I need to create one such macro for updating oracle database with excel data and another for inserting excel records.
    I tried doing this using a macro in MS access but Client wants its to be done using Excel Macro only.
    Any help would be highly appreciated.
    Thanks in advance..
    Shikha

    Please read Chapter 19.7 Creating Selection Lists (http://download.oracle.com/docs/html/B25947_01/web_complex007.htm#CEGFJFED) of the Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0)
    Cheers,
    Mick.

  • How to create a Macro on the BEx Queries

    Hi,
    I got a business case where i need to create a Macro on a particular report.
    That Macro should run on that particular report and it should save into .CSV format and fill the data automatically and that file i need to send to client workstation.
    I got a suggestion that Macros can be done only in BEx Analyzer not in the browser.
    Kindly help me in this...
    Thanks & Regards
    Jagannadha Raju

    Yes, macros can only be created if you are working with a report in the Bex Analyzer. For web reports you may need to look for some javascript function to accomplish your reqt.
    Hope this helps...

  • How to create macros in SAP FI?

    Hi,
    Can I any one tell me how to create a macro in SAP for clrearing errors in SM35, all the errors are sam type.
    Regards
    Nama

    Hi Nama,
    I do not think a macro will solve this.
    Check the below link whether this helps
    http://help.sap.com/saphelp_scm70/helpdata/EN/69/c250c34ba111d189750000e8322d00/frameset.htm
    Regards
    R. Senthil Mareeswaran.

  • How to define a macros in labview

    Can you please tell me.
    How to create the macros in the labview.
    Like below mentioned 
    #define sqrt (x)   (x * x)
    with regards and warm welcome,
    Ramamoorthy S
    with regards and warm welcome,
    Ramamoorthy S
    Solved!
    Go to Solution.

    LabVIEW does not have macros, but it is a programming language that can do just about anything.  Please following some LabVIEW Training, or the Skill Guide to get started.
    Edit: I also found this self paced training.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • 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
    Bala

    Hi 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 do I create a macro that allows for the columns to be dynamic

    I've created a macro in my workbook which is a very simple division of one cell by another.  However when they use the filters to add or delete columns my macro isn't dynamic so I need to some how use a dynamic column reference.  Is this possible and if so can you supply some example code.
    Thanks

    Hi,
    What BI version are you in? If you are in 3.x, you can check the resultArea variable in the VBA code. That will give you an idea on the size (height, location, width) of the result area of the query.
    Hope this helps.

  • How do you create a macro for Acrobat Convert Multiple Reports action in Microsoft Access

    I have several reports in microsoft access and I've been able to combine them into a single PDF file using the Acrobat Convert Multiple Reports feature. Is there a way to create a macro for this action? I would like to create a time event for this procedure.
    Any help I get on this is greatly appreciated.
    Thanks

    CTPetEng,
    Since this question is not related to CreatePDF, but rather to Acrobat, I'm moving your question to the Acrobat forum.
    Dave

  • How to create a data load file from Excel !!!

    Hi All,
    I'm new to HFM and would like to load data into an HFM application. As I have an Excel file with all the data. When I'm directly loading the data it throws an error saying "No section has been specified to determine if this is data, description or line item detail". How can I convert this excel file into proper format (.dat) file understandable by HFM ?

    There are several ways to get this data into HFM.
    1) FDM - best option if you have it
    2) Webforms/Data Grids
    3) HsSetValue formulas in Excel
    4) DAT file loads
    5) JVs, etc
    If you wish to use DAT files created via Excel, you will likely want to use Excel VBA macros to create your DAT file to load. We do this on occasion for special projects and it works quite well. What you can do is set up an Excel file with your data inputs to look however you want, then link your POV members and amounts to another tab (we commonly call this the Export tab and it is set up in an HFM-friendly format).
    Create a macro to write a DAT file to a specified location using data from the Export tab. The DAT file will need to be formatted as below. For a specific sample, you can extract data from your HFM app and see the format.
    !Data
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Brush up on Replace, Merge, or Accumulate load options in the HFM Admin and User Guides, then upload your new DAT file.

  • How to create a custom Button in a SNP planning book

    Hi Experts,
    I created my own Planning Book and Dataview in SNP with 3 Key Figures: KF1, KF2, KF3. Now I want to create one my own button with Macro so that when I press that button, the Macro will run to calculate: KF3 = KF1 + KF2.
    I know that I can drag this Macro to one of default events like: Default, Level Change, Start. But actually, I want to create my own button so that I can handle the event as I want.
    My question are:
    1. How to create a custom button on the toolbar of SNP Planning book and writing macro for the button?
    2. Please give me any document, material teaching about writing macro and relating to my above scenario.
    Thanks very much!
    Duyennx
    Edited by: xuanduyen on Sep 6, 2011 9:20 AM

    Hi,
    Access the transaction "/n/sapapo/advm". In the list select your planning book/ data view and click 'Start Macro Builder' button.
    In the Macro builder screen, drag and drop your macro from Macro depot to the work area.
    Right click on your macro name and select 'properties'. In the pop up, next to the Assigned Push button field, there is a button 'Choose'. Click that. It will display all the available icons. In standard system, it displays more than 1000 icon. Choose any one icon which is suitable for your macro function. Close the pop up and save the macro. This will assign a push button to your macro.
    In the Planning book tool bar, you can see the selected icon in the header tool bar. Just by clicking that icon, you can execute the macro interactively.
    And I don't know whether we can include/design our own icon. But there are already 1000+ standard icons to choose.
    Regards,
    Manimaran M.

  • How to create folder names based on Excel values or Txt files?

    Hi there,
    I often need to create large numbers of folders based on names I have saved in an Excel spreadsheet. I know in windows there is a way to create a macro within excel that automatically generates folder names based on cell values.
    I was therefore wondering how to do the same on a Mac operating system. The main thing is to find a way to automate the process. I understand this may involve copying the values to a text file.
    Below is an example of the names I need to create folders for (copied from the excel spreadsheet):
    Wash Bowl Small 600
    Deck Mounted Wash Bowl 500
    Wash Basin - 866 - 2 Shelves
    Wash Bowl Large 800
    Built-In Wash Basin With 1-Taphole
    Deck Mounted Wash Bowl 625
    Would really appreciate a simple step by step approach to an explanation. As my understanding of using Automator, Apple Script, Terminal, etc, is extremely basic.
    Thanks and Best Wishes,
    Graham

    Hi Niel,
    Thanks again for another superb response. I have another question. Is it possible to automatically generate sub-folders along with the folder.
    For example:
    Folder                                                Subfolder
    Wash Bowl Small 600          >            2D CAD
                                                               3D CAD
                                                               BIM
                                                               Images
                                                               Brochures
                                                               Specifications
                                                               Technical
                                                               Case Studies
                                                               Operations
    Deck Mounted Wash Bowl 500    >   2D CAD
                                                              3D CAD
                                                              BIM
                                                              Images
                                                              Brochures
                                                              Specifications
                                                              Technical
                                                              Case Studies
                                                              Operations
    Above shows the 9 generic sub-folders I need to create within each folder that is generated.
    Best Wishes,
    Graham

  • How to create an Editable report?

    I want to generate one report using BEx Analyser as my client’s requirement. What the client’s requirement is, when he refreshes the query, he wants the query to be get refreshed and another user-editable sheet need to be get created. And the calculation doing on the query should be reflected in the additional sheet also. So what he really wants is that, he wants to get a BW report. In addition to that he wants one modifiable worksheet, so that he can compare the results with the query output.
    For Example: My client is a manufacturing company. So it uses different materials in different compositions to manufacture the products to get the maximum profit. When he refreshed the query all the details of each material that used and the final product details also will get. That details will include cost of raw materials, man power he used, machines details and time taken for the manufacturing, power used etc. From these all fields the <b>total cost of the product is getting calculated</b>. As the market prices of various raw materials are changing he wants to reduce the variation in the total expense he has to spend on the product. So he wants to try with different values for the variable fields like cost of raw materials with the variation in market price, by varying the manpower etc. etc. So when he changes each fields the corresponding change <b>should be reflected in the final cost as well as different calculation results</b>.
    How can I give a solution for this? Is this possible with BEx Macros? As I am new to the macros can someone send me the details of Macro and the step by step procedure to create a macro and to use it properly for the requirements in below mail ID..
    [email protected]
    Answers will be rewarded with points..
    Thanks in advance,
    Mathew.

    I would suggest, building additional columns in your query for the what if analysis. These columns would use formula variables for the user to input for the changeable fields. These will give hima side by side comparison of actual and what-if values.
    Thanks
    Vineet

  • HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE

    HAI FRIENDS
      1  I WANT TO KNOW HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE IN ABAP
      2 NEED ABAP PROGRAM EBOOK
    PLZ DO IT

    CHECK THIS ALV DRILL DOWN REPORT
    *& Report  ZHAI_SD_CUSTOMER_DETAILS_ALV
    REPORT  ZHAI_SD_CUSTOMER_DETAILS_ALV.
    TYPE-POOLS: SLIS.
        TYPES DECLARATIONS
    TABLES : KNA1.
    DATA : BEGIN OF IT_CUST OCCURS 0,
      KUNNR LIKE KNA1-KUNNR,
      NAME1 LIKE KNA1-NAME1,
      LAND1 LIKE KNA1-LAND1,
      ORT01 LIKE KNA1-ORT01,
      STRAS LIKE KNA1-STRAS,
      PSTLZ LIKE KNA1-PSTLZ,
           END OF IT_CUST.
    DATA:BEGIN OF IT_SALE OCCURS 0,
    VBELN LIKE VBAK-VBELN,"SALES DOC NO
    AUDAT LIKE VBAK-AUDAT,"DATE RECIEVED AND SENT
    AUART LIKE VBAK-AUART,"SALES DOC LIKE
    NETWR LIKE VBAK-NETWR,"NET VALUE IN DOC CURRENCY
    KUNNR LIKE VBAK-KUNNR,
          END OF IT_sale.
    TYPES: BEGIN OF TY_ITEM,
    VBELN TYPE VBAP-VBELN,
    POSNR TYPE VBAP-POSNR,"ITEM NO
    MATNR TYPE VBAP-MATNR,"MATERIAL NO
    CHARG TYPE VBAP-CHARG,"BATCH
    MATKL TYPE VBAP-MATKL,"MATERIAL GROUP
    MEINS TYPE VBAP-MEINS,"BASE UNIT OF MEASURE
    END OF TY_ITEM.
    SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
         INTERNAL TABLES
    DATA:
         IT_CUST  TYPE TABLE OF TY_CUST,
         IT_SALE  TYPE TABLE OF TY_SALE,
          IT_ITEM  TYPE TABLE OF TY_ITEM.
                       INTERNAL TABLES FOR ALV
    DATA: IT_FCAT   TYPE  SLIS_T_FIELDCAT_ALV,
          IT_FCAT1  TYPE  SLIS_T_FIELDCAT_ALV,
          IT_FCAT3  TYPE SLIS_T_FIELDCAT_ALV.
    DATA: IT_EVENTS TYPE TABLE OF   slis_alv_event,
          IT_EVENTS1 TYPE TABLE OF SLIS_ALV_EVENT,
          IT_EVENTS2 TYPE TABLE OF SLIS_ALV_EVENT.
    DATA: IT_LISTHEADER1 TYPE SLIS_T_LISTHEADER,
          IT_LISTHEADER TYPE TABLE OF slis_listheader,
          IT_LISTHEADER3 TYPE TABLE OF SLIS_LISTHEADER,
          IT_FOOTER TYPE TABLE OF SLIS_LISTHEADER.
    DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV,
          WA_SORT LIKE LINE OF IT_SORT.
                       WORK AREAS FOR ALV
    DATA: WA_LAYOUT  TYPE SLIS_LAYOUT_ALV,
          WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
          WA_FCAT    LIKE LINE OF IT_FCAT,
          WA_FCAT1   LIKE LINE OF IT_FCAT1,
          WA_FCAT3   LIKE LINE OF IT_FCAT3,
          WA_EVENTS  LIKE LINE OF IT_EVENTS,
          WA_EVENTS1 LIKE LINE OF IT_EVENTS,
          WA_EVENTS2 LIKE LINE OF IT_EVENTS.
            WORK VARIABLES
    DATA: W_REPID TYPE SY-REPID,
          W_KUNNR TYPE KNA1-KUNNR.
    $$**----
       WORK  AREAS
        MACROS
    DEFINE ADD_FCAT1..
    WA_FCAT1-COL_POS = &1.
    WA_FCAT1-FIELDNAME = &2.
    WA_FCAT1-TABNAME = &3.
    WA_FCAT1-REF_TABNAME = &4.
    WA_FCAT1-KEY = &5.
    WA_FCAT1-DO_SUM = &6.
    WA_FCAT1-HOTSPOT = &7.
    WA_FCAT1-EMPHASIZE = &8.
    APPEND WA_FCAT1 TO IT_FCAT1.
    END-OF-DEFINITION.
    START-OF-SELECTION.
      PERFORM F_GET_DATA.
      PERFORM F_BUILD_FCAT.
      PERFORM F_GET_EVENTS.
      PERFORM F_BUILD_LAYOUT USING WA_LAYOUT.
      PERFORM F_GET_DISPLAY.
    *&      Form  F_GET_DATA
    FORM F_GET_DATA .
    SELECT   KUNNR
              NAME1
              LAND1
              ORT01
              STRAS
              PSTLZ FROM KNA1
              INTO TABLE
    IT_CUST WHERE KUNNR IN S_KUNNR.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_GET_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY .
    CLEAR W_REPID.
    MOVE SY-REPID TO W_REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = w_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
         I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = 'DUCK'
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = WA_LAYOUT
         IT_FIELDCAT                        = IT_FCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                          = IT_EVENTS
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_CUST
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_GET_DISPLAY
    *&      Form  F_GET_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_EVENTS .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = IT_EVENTS
        EXCEPTIONS
          LIST_TYPE_WRONG = 1
          OTHERS          = 2.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT IT_EVENTS.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'TOP_OF_PAGE' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_TOP_OF_PAGE'.
    MODIFY  IT_EVENTS  INDEX SY-TABIX FROM
    WA_EVENTS TRANSPORTING FORM.
      ENDIF.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_USER_COMMAND'.
    MODIFY IT_EVENTS FROM WA_EVENTS INDEX
    SY-TABIX TRANSPORTING FORM.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
    ENDIF.
    READ TABLE IT_EVENTS INTO WA_EVENTS WITH
    KEY NAME = 'END_OF_PAGE' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_END_OF_PAGE'.
    MODIFY IT_EVENTS FROM WA_EVENTS
    INDEX SY-TABIX TRANSPORTING FORM.
    ENDIF.
    ENDFORM.                    "F_GET_EVENTS
    *&      Form  F_BUILD_LAYOUT
    FORM F_BUILD_LAYOUT  USING P_WA_LAYOUT LIKE WA_LAYOUT .
    CLEAR P_WA_LAYOUT.
    P_WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    *P_WA_LAYOUT-F2CODE = '&ETA'.
    *p_wa_layout-detail_popup = 'X'.
    P_WA_LAYOUT-DETAIL_TITLEBAR = 'ALV REPORT'.
    *P_WA_LAYOUT-CONFIRMATION_PROMPT  = 'X'.
    ENDFORM.                    " F_BUILD_LAYOUT
    *&      Form  F_TOP_OF_PAGE
    FORM F_TOP_OF_PAGE .
    refresh it_listheader.
      DATA: LS_LIST TYPE SLIS_LISTHEADER.
      LS_LIST-TYP = 'H'.
      LS_LIST-INFO = TEXT-004.
      APPEND LS_LIST TO IT_LISTHEADER.
      LS_LIST-typ = 'S'.
      LS_LIST-key = 'Date: '.
      CONCATENATE sy-datum+6(2) '.'
      sy-datum+4(2) '.'
      sy-datum(4) INTO LS_LIST-info. "todays date
      append LS_LIST to IT_LISTHEADER.
      clear: LS_LIST.
      LS_LIST-TYP = 'S'.
      LS_LIST-KEY = 'DEVELOPED:'.
      LS_LIST-INFO = SY-UNAME.
      APPEND LS_LIST TO IT_LISTHEADER.
      CLEAR LS_LIST.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_LISTHEADER
          I_LOGO             = 'GLOBAL'.
    ENDFORM.                    " F_TOP_OF_PAGE
    *&      Form  F_BUILD_FCAT
    FORM F_BUILD_FCAT .
    CLEAR: W_REPID,
           IT_FCAT.
      MOVE SY-REPID TO W_REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = W_REPID
         I_INTERNAL_TABNAME           = 'IT_CUST'
         I_INCLNAME                   = W_REPID
        CHANGING
          CT_FIELDCAT                  = IT_FCAT
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_BUILD_FCAT
    *&      Form  F_USER_COMMAND
    FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                              RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE  R_UCOMM.
    WHEN '&IC1'.
    IF RS_SELFIELD-FIELDNAME = 'KUNNR'.
    READ TABLE IT_CUST
    INDEX RS_SELFIELD-TABINDEX.
    MOVE rs_selfield-value TO W_KUNNR.
    IF IT_CUST IS NOT INITIAL.
       PERFORM F_GET_SECONDARY_DATA.
       PERFORM F_BUILD_FCAT1.
       PERFORM F_BUILD_EVENTS.
       PERFORM F_GET_SORT.
       PERFORM F_BUILD_LAYOUT1.
      PERFORM F_GET_DISPLAY1.
    ENDIF.
      ENDIF.
      ENDCASE.
    ENDFORM.                    " F_USER_COMMAND
    *&      Form  F_GET_SECONDARY_DATA
    FORM F_GET_SECONDARY_DATA .
    data:v_data.
    SELECT  VBELN
              AUDAT
              AUART
              NETWR
    KUNNR FROM VBAK INTO TABLE IT_SALE
    WHERE KUNNR EQ IT_CUST-KUNNR.
      IF IT_SALE[] IS INITIAL .
       CALL FUNCTION 'POPUP_TO_CONFIRM'
         EXPORTING
          TITLEBAR                    = SY-REPID
         DIAGNOSE_OBJECT             = ' '
           TEXT_QUESTION               = 'NO SALES FOR THIS CUSTOMER'
         TEXT_BUTTON_1               = 'Ja'(001)
         ICON_BUTTON_1               = ' '
         TEXT_BUTTON_2               = 'Nein'(002)
         ICON_BUTTON_2               = ' '
          DEFAULT_BUTTON              = '1'
          DISPLAY_CANCEL_BUTTON       = 'X'
         USERDEFINED_F1_HELP         = ' '
         START_COLUMN                = 25
         START_ROW                   = 6
         POPUP_TYPE                  =
         IV_QUICKINFO_BUTTON_1       = ' '
         IV_QUICKINFO_BUTTON_2       = ' '
        IMPORTING
          ANSWER                      = v_data
       TABLES
         PARAMETER                   =
        EXCEPTIONS
          TEXT_NOT_FOUND              = 1
          OTHERS                      = 2
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    case v_data.
    when '2'.
    leave screen.
    when 'A'.
    leave to screen '0'.
    endcase.
      ENDIF.
    ENDFORM.                    " F_GET_SECONDARY_DATA
    *&      Form  F_BUILD_FCAT1
    FORM F_BUILD_FCAT1 .
    REFRESH IT_FCAT1.
    CLEAR WA_FCAT1.
    ADD_FCAT1:
    '1' 'VBELN' 'VBAK' 'VBAK' 'X' ' ' 'X' 'C500',
    '2' 'AUDAT' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C400',
    '3' 'AUART' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C100',
    '4' 'NETWR' 'VBAK' 'VBAK' ' ' 'X' ' ' 'C300'.
    ENDFORM.                    " F_BUILD_FCAT1
    *&      Form  F_GET_DISPLAY1
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           =  'F_USER_COMMAND1'
         I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE1'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         IT_FIELDCAT                       = IT_FCAT1
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       IT_SORT                            = IT_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                         = IT_EVENTS1
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_SALE
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_GET_DISPLAY1
    *&      Form  F_BUILD_EVENTS
    FORM F_BUILD_EVENTS .
    clear wa_events1.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = IT_EVENTS1.
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT IT_EVENTS1.
      read table It_events1 with key name = 'TOP_OF_PAGE'
      into WA_eventS1.
      if sy-subrc = 0.
        move 'F_TOP_OF_PAGE1' to WA_EventS1-form.
        append WA_eventS1 to it_events1.
      endif.
      READ TABLE IT_EVENTS WITH KEY NAME = 'USER_COMMAND'
      INTO WA_EVENTS1.
      IF SY-SUBRC = 0.
      MOVE 'F_USER_COMMAND1' TO WA_EVENTS1-FORM.
      APPEND WA_EVENTS1 TO IT_EVENTS1.
      ENDIF.
    *READ TABLE IT_EVENTS WITH KEY NAME = 'SUBTOTAL_TEXT'
    INTO WA_EVENTS1.
    IF SY-SUBRC = 0.
    MOVE 'F_SUBTOTAL_TEXT' TO WA_EVENTS1-FORM.
    APPEND WA_EVENTS1 TO IT_EVENTS1.
    ENDIF.
    ENDFORM.                    " F_BUILD_EVENTS
    *&      Form  F_TOP_OF_PAGE1
    FORM F_TOP_OF_PAGE1 .
    DATA: LS_HEADER TYPE SLIS_LISTHEADER.
    REFRESH : IT_LISTHEADER1.
      LS_HEADER-TYP = 'H'.
      LS_HEADER-INFO = 'SALES ORDER DETAILS FOR CUSTOMER'.
      APPEND LS_HEADER TO it_listheader1.
      CLEAR LS_HEADER.
      LS_HEADER-TYP  = 'S'.
      LS_HEADER-KEY = 'CUSTOMER NO:'.
      LS_HEADER-INFO = W_KUNNR.
      APPEND LS_HEADER TO IT_LISTHEADER1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER1
         I_LOGO                   = 'DUCK'
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                    " F_TOP_OF_PAGE
    *&      Form  F_END_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM F_END_OF_PAGE .
    DATA:LS_FOOTER TYPE SLIS_LISTHEADER.
    LS_FOOTER-TYP = 'S'.
    LS_FOOTER-KEY = SY-UNAME.
    LS_FOOTER-INFO = 'DEVELOPED BY:'.
    APPEND LS_FOOTER TO IT_FOOTER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = IT_FOOTER
    ENDFORM.                    " F_END_OF_PAG
    *&      Form  F_USER_COMMAND1
          text
    -->  p1        text
    <--  p2        text
    FORM F_USER_COMMAND1 USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&IC1'.
    READ TABLE IT_SALE INDEX RS_SELFIELD-TABINDEX.
    PERFORM F_GET_SECONDARY2.
    PERFORM F_GET_FCAT3 USING:
    'VBELN' '1' 'C' '12' 'SALES_DOC'   'M'  'VBAP' 'X' 'C51' ' ',
    'POSNR' '2' ' '  '5' 'ITEM_NO'      'M'  'VBAP' ' ' 'C61' ' ',
    'MATNR' '3' ' '  '12' 'MATERIAL_NO' 'M'  'VBAP' ' ' 'C71' ' ',
    'CHARG' '4' ' ' '10' 'BATCH_NO'    'M'  'VBAP' ' ' 'C41' ' ',
    'MATKL' '5' ' ' '10' 'MAT_GROUP'   'M'  'VBAP' ' ' 'C31' ' ',
    'MEINS' '6' ' ' '12' 'BASE_UNIT'   'M'  'VBAP' ' ' 'C21' 'X' .
    PERFORM F_GET_EVENTS2 USING WA_EVENTS2
                         CHANGING IT_EVENTS2.
    PERFORM F_GET_DISPLAY3.
    REFRESH IT_FCAT3.
    ENDCASE.
    ENDFORM.                    " F_USER_COMMAND1
    *&      Form  F_GET_SECONDARY2
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_SECONDARY2 .
    SELECT VBELN
           POSNR
           MATNR
           MATKL
           MEINS
           FROM VBAP INTO
           TABLE IT_ITEM WHERE
           VBELN EQ IT_SALE-VBELN.
    IF SY-DBCNT EQ 0.
    MESSAGE E000(ZHAI) WITH TEXT-KO1.
    ENDIF.
    ENDFORM.                    " F_GET_SECONDARY2
    *&      Form  F_GET_DISPLAY3
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY3 .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = SY-REPID
       I_CALLBACK_PF_STATUS_SET          = 'F_PF_STATUS'
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE3'
       I_CALLBACK_HTML_TOP_OF_PAGE       = 'F_TOP_OF_PAGE3'
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = WA_LAYOUT1
       IT_FIELDCAT                       = IT_FCAT3
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           = IT_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       IT_EVENTS                         = IT_EVENTS2
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_ITEM
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " F_GET_DISPLAY3
    *&      Form  F_GET_FCAT3
    FORM F_GET_FCAT3  USING    VALUE(P1)
                               VALUE(P2)
                               VALUE(P3)
                               VALUE(P4)
                               VALUE(P5)
                               VALUE(P6)
                               VALUE(P7)
                               VALUE(P8)
                               VALUE(P9)
                              VALUE(P10).
    CLEAR WA_FCAT3.
      WA_FCAT3-FIELDNAME = P1.
      WA_FCAT3-COL_POS = P2.
      WA_FCAT3-JUST = P3.
      WA_FCAT3-OUTPUTLEN = P4.
      WA_FCAT3-SELTEXT_M  = P5.
      WA_FCAT3-DDICTXT = P6.
      WA_FCAT3-REF_TABNAME = P7.
      WA_FCAT3-HOTSPOT = P8.
      WA_FCAT3-EMPHASIZE = P9.
      WA_FCAT3-DO_SUM  = P10.
      APPEND WA_FCAT3 TO IT_FCAT3.
    ENDFORM.                    " F_GET_FCAT3
    *&      Form  F_BUILD_LAYOUT1
          text
    -->  p1        text
    <--  p2        text
    FORM F_BUILD_LAYOUT1 .
    WA_LAYOUT1-totals_text = 'TOTAL'.
    wa_layout1-detail_popup = 'X'.
    ENDFORM.                    " F_BUILD_LAYO
    *&      Form  F_GET_EVENTS2
          text
         -->P_IT_EVENTS2  text
         <--P_WA_EVENTS2  text
    FORM F_GET_EVENTS2  USING    VALUE(P_WA_EVENTS2) LIKE WA_EVENTS2
                        CHANGING P_IT_EVENTS2 LIKE IT_EVENTS2.
    P_WA_EVENTS2-NAME = 'HTML_TOP_OF_PAGE'.
    P_WA_EVENTS2-FORM = 'F_TOP_OF_PAGE3'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    P_WA_EVENTS2-NAME = 'PF_STATUS'.
    P_WA_EVENTS2-FORM = 'F_PF_STATUS'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    P_WA_EVENTS2-NAME = 'USER_COMMAND'.
    P_WA_EVENTS2-FORM = 'F_USER_COMMAND3'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    p_wa_events2-name = 'HTML_END_OF_LIST'.
    P_WA_EVENTS2-FORM = 'F_HTML_END_OF_LIST'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR p_wa_events2.
    ENDFORM.                    " F_GET_EVENTS2
    *&      Form  F_TOP_OF_PAGE3
          text
    -->  p1        text
    <--  p2        text
    FORM F_TOP_OF_PAGE3 USING DOCUMENT TYPE REF TO cl_dd_document .
    data : link_area type ref to cl_dd_area,
           picture_area type ref to cl_dd_area.
    CALL METHOD DOCUMENT->ADD_TEXT
      EXPORTING
        TEXT          = 'ALV REPORT'
       TEXT_TABLE    =
       FIX_LINES     =
       SAP_STYLE     =
        SAP_COLOR     = cl_dd_area=>list_background_int
        SAP_FONTSIZE  = 'LARGE'
        SAP_FONTSTYLE = 'TIMES'
        SAP_EMPHASIS  = 'STRONG'
       STYLE_CLASS   =
    CHANGING
       DOCUMENT      =
    CALL METHOD DOCUMENT->NEW_LINE.
    CALL METHOD DOCUMENT->ADD_PICTURE
      EXPORTING
        PICTURE_ID       = 'LOGO1'
        WIDTH            = '10%'
    ENDFORM.                    " F_TOP_OF_PAGE3
    *&      Form  F_GET_SORT
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_SORT .
    WA_SORT-FIELDNAME = 'NETWR'.
    WA_SORT-SPOS  = 4.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " F_GET_SORT
    *&      Form  F_PF_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM F_PF_STATUS USING RS_EXTAB TYPE SLIS_T_EXTAB .
    SET PF-STATUS 'ZHAIALV' EXCLUDING RS_EXTAB.
    ENDFORM.                    " F_PF_STATUS
    *&      Form  F_USER_COMMAND3
          text
    -->  p1        text
    <--  p2        text
    FORM F_USER_COMMAND3 USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&SALE'.
    IF RS_SELFIELD-FIELDNAME = 'VBELN'.
    SET parameter ID 'AUN' FIELD rs_selfield-value.
    CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    ENDIF.
    WHEN '&MAT'.
    IF RS_SELFIELD-FIELDNAME = 'MATNR'.
    SET PARAMETER ID 'MAT' FIELD RS_SELFIELD-VALUE.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDFORM.                    " F_USER_COMMAND3
    *&      Form  F_HTML_END_OF_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM F_HTML_END_OF_LIST USING DOCUMENT TYPE REF TO CL_DD_DOCUMENT.
    DATA : PAGE TYPE SDYDO_TEXT_ELEMENT.
    MOVE SY-PAGNO TO PAGE.
    CALL METHOD DOCUMENT->ADD_TEXT
      EXPORTING
        TEXT          = PAGE
       TEXT_TABLE    =
       FIX_LINES     =
       SAP_STYLE     =
       SAP_COLOR     =
       SAP_FONTSIZE  =
       SAP_FONTSTYLE =
       SAP_EMPHASIS  =
       STYLE_CLASS   =
    CHANGING
       DOCUMENT      =
    ENDFORM.                    " F_HTML_END_OF_LIS

  • How to create Reports for the infopath form data

    Hi All,
    I have a requirement to generate reports in SharePoint based on InfoPath form data which is submitted into form library. Do I need to store each InfoPath form data into SQL Database/MS Access Database. if yes, can any one  help me on this how
    to save InfoPath form data into DB while submitting into "Form Library". based on the data stored in DB how to create  and view the report in SharePoint?.
    Thanks in Advance,
    Satish
    Thanks & Regards Satish Dugasani

    Thank you for asking the questions for clarification, my requirement is like below
    1. Need to insert all infopath form fields data into Access Database when i am submitting to the Form library
    2. Create Access Reports like based on time period, based on submitter name, based on state, city, and combination of these etc.
    3. Sync Access Database every time i am updating the form
    4. View Access Reports in share point site
    PS: I worked on this like below approch
    1. Written Web Service to Sync Access Database for the Infopath form
    2. Create Access Reports
    3. Publish using "Publish to Access Services" by providing site URL it will create a subsite there i can able to see reports, tables, macros etc. but that is not an user friendly like i am not able to apply my branding because it is pointing to /_Layouts/accsrv/Modifyapplication.aspx.
    could any one suggest me on this.
    Thanks & Regards Satish Dugasani

Maybe you are looking for

  • Factory calendar error (returncode = 3)

    Hi, I am trying to create planning for product group, but getting error Factory calendar error (returncode = 3) Message no. MA408 I have checked the validity for factory calendor but it is found ok with valid upto 2013. and allocation of factory cale

  • 0CalQuarter after upgrade issue

    Hi buddy, Thanks for this valuable  Note 1019513 - Conversion exit for 0CALQUARTER is missing . i solved my problem on 0calquarter. but i got one more issue on this. In 3.1c after inputting 1/2007 and check it would didplay as Q1 2007 on selection sc

  • E mac only starts up in safe boot

    Having accidently pressed a few keys on the keyboard while not paying much attention to what was happening to my computer it just switched itself off!!! (I think it was the F15 button that was pressed!) Now it only starts in safe mode and I can't get

  • I forgot my administrator log in to my macbook air os 10.7.5

    I forgot my administrator log in to my macbook air os 10.7.5

  • Installing Profiles always fails

    We are currently using 2 profiles on our iPad carts adn deploying them with Apple Configurator.  The first just contains our wireless information.  The second is a profile for Meraki Systems Manager.  It looks like the Meraki Profile is the one that