How to use macros in InCopy

I am having an issue using InCopy and the macro section. I am a new user to InCopy, and I'm trying to figure out how to:
Use a code that means something. For example: AB = $5.00
On my document, I at all times want AB to be there until I tell it to input the macro. Is there a way?
Also, if at some point I need to update the macro (change of price), is there a way I can edit the price, and it will AUTOMATICALLY do the updating in my document?

You'll need to use find/change for what you're trying to do.
Bob

Similar Messages

  • RE: How to use macros in InCopy

    Hi, Meghan:
    Have you looked into using ID's text variables?
    In you example, you'd create a text variable named AB whose value is
    5.00, and insert the AB variable wherever you need it. You could copy
    one instance of it to the clipboard, and use Find/Replace with
    contents of clipboard to replace existing instances of plain text AB,
    or 5.00. When the value needs to change, say to 6.00, you'd edit the
    value of AB, changing to 6.00. This would change all AB instances in
    the current file. You can use Fine/Replace from clipboard to change
    items in all open documents, or synchronize variables across all files
    in a book.
    You would need to create a text variable for each value; for example
    AB=5.00, AC=5.01, AD=5.02, etc., so you can control things to a fine
    degree.
    Another approach would be to look into using a script, or a
    third-party cross-reference tool, like the one at dtptools.com. (I'm
    not connected with DTP Tools.)
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

    You'll need to use find/change for what you're trying to do.
    Bob

  • How to use macro's functionality in a programe...?

    hi,
    i am siva,
    i am new to abap,
    i am not having clarity on how to use macro in a programe,
    please send me any source code of a programe which
    contain functionality of macros..?
    and explain functionality of macros...?
    i any of u know answer..
    please send me source code of a programe that use macros...?
    reguars,
    siva.

    Hi,
    <u>Macros:</u>
    If you want to reuse the same set of statements more than once in a program, you can include
    them in a macro. For example, this can be useful for long calculations or complex WRITE
    statements. You can only use a macro within the program in which it is defined, and it can only
    be called in lines of the program following its definition.
    The following statement block defines a macro <macro>:
    DEFINE <macro>.
    <statements>
    END-OF-DEFINITION.
    You must specify complete statements between DEFINE and END-OF-DEFINITION. These
    statements can contain up to nine placeholders (&1, &2, ..., &9). You must define the macro
    before the point in the program at which you want to use it.
    Macros do not belong to the definition part of the program. This means that the DEFINE...ENDOF-
    DEFINITION block is not interpreted before the processing blocks in the program. At the
    same time, however, macros are not operational statements that are executed within a
    processing block at runtime. When the program is generated, macro definitions are not taken
    into account at the point at which they are defined. For this reason, they do not appear in the
    overview of the structure of ABAP programs [Page 44].
    A macro definition inserts a form of shortcut at any point in a program and can be used at any
    subsequent point in the program. As the programmer, you must ensure that the macro
    definition occurs in the program before the macro itself is used. Particular care is required if you
    use both macros and include programs, since not all include programs are included in the syntax
    check (exception: TOP include).
    To use a macro, use the following form:
    <macro> [<p1> <p2> ... <p9>].
    When the program is generated, the system replaces <macro> by the defined statements and
    each placeholder &i by the parameter <pi>. You can use macros within macros. However, a
    macro cannot call itself.
    Ex:
    DATA: RESULT TYPE I,
    N1 TYPE I VALUE 5,
    N2 TYPE I VALUE 6.
    DEFINE OPERATION.
    RESULT = &1 &2 &3.
    OUTPUT &1 &2 &3 RESULT.
    END-OF-DEFINITION.
    DEFINE OUTPUT.
    WRITE: / 'The result of &1 &2 &3 is', &4.
    END-OF-DEFINITION.
    OPERATION 4 + 3.
    OPERATION 2 ** 7.
    OPERATION N2 - N1.
    The produces the following output:
    The result of 4 + 3 is 7
    The result of 2 ** 7 is 128
    The result of N2 - N1 is 1
    Here, two macros, OPERATION and OUTPUT, are defined. OUTPUT is nested in
    OPERATION. OPERATION is called three times with different parameters. Note how
    the placeholders &1, &2, ... are replaced in the macros.
    Regards,
    Bhaskar

  • How to use macro 'TIMESHIFT_FORWARDS'

    Hi experts,
    I can't get appropriate result using macro 'TIMESHIFT_FORWARDS()'. Please advise how to use this function.
    I would like to shift key1 data by offset in Key2.  I've tried like below two but never works.
    Step(2008/10 to 2008/12)
      ActionBox
         TIMESHIFT_FORWARDS(
           Area(Key1 which is Sales Quantity)
           Area(Key2 which is Offset)
    Step(2008/10 to 2008/12)
      Key1 (2008/10)
         TIMESHIFT_FORWARDS(
           Area(Key1 which is Sales Quantity)
           Area(Key2 which is Offset)
      Please adivise if you ever tried this.

    Hi Anha,
          Your syntax is not correct. Here is how it should be:
    Step(2008/10 to 2008/12)
    ActionBox
    TIMESHIFT_FORWARDS(
    Area{(Key1 which is Sales Quantity)(2008/10);(Key1 which is Sales Quantity)(2008/12)}
    Area{(Key2 which is Offset)(2008/10);(Key2 which is Offset)(2008/12)}
    In the above syntax, replace { by [ and { by ]. [ stands for tag link in this forum.
    In case you are still in doubt, refer to the planning book 9AEXAMPLES in macro workbench ( /sapapo/advm)
    Hope this helps

  • How to use macro to pull data from custom infotype?

    Hi all,
    Is rp_provide_from_last p9004 space pn-begda pn-endda. works?
    i am getting all zeros .
    is using macros possible pull data from custom infotype? or only select?
    Regards
    sas
    For LDB PNPCE
    get peras:

    Hi,
    Try the following Macro it will solve out your problem,
    DEFINE rp_provide_from_last.
      rp_found = '0'.
      clear: rp_tabix.
      loop at &1.
        if &2 ne space.
          check &1-subty eq &2.
        endif.
        if &1-begda le &4 and &1-endda ge &4.
          rp_found = '1'.
          exit.
        endif.
        if &1-begda le &4 and &1-endda ge &3.
          rp_tabix = sy-tabix.
        endif.
      endloop.
      if rp_found eq '0'.
        if rp_tabix ne 0 .
          rp_found = '1'.
          read table &1 index rp_tabix.
        else.
          clear: &1.
        endif.
      endif.
    END-OF-DEFINITION.
    rp_provide_from_last <p????> space <begda> <endda>.
    Best Regards,
    Faisal

  • How to use user exit macros in demand planning?

    Hi all,
    I am have created an user exit macros? but then can anyone guide me how to use the abp code there in the User exit macros in demand planning.
    Thanks
    Pooja

    Hi Pooja,
    The ABAP code can be written inside the functional module assigned to user exit macro.
    Start Transaction SMOD.Enter APODM005 in the 'Enhancement' field. Select 'Display'.
    Then choose 'Components' or Shift+F11 and double-click the name of the function module.
    Double-click the include contained in the function module to enter the source code.
    For step by step details you can refer to SAP note 418801.
    Let me know if it helps.
    Regards
    Gaurav

  • How to return error message using macro or others ways

    Hi !
    I need your help to find a technical solution.
    We have an alv object with 2 parameters (a checkbox and a writable field which is for address mail.) When you push the button B1, the function module SX_INTERNET_ADDRESS_TO_NORMAL is called to verify the email address.
    If I use the classic way to show the exceptions returned by the function module, the user can read the message but when he does an action on the program this dump. (The program has been killed.)
    I am looking for a way to show the error message and the possibility to change the email address. I think that using a popup information would work but I do not find this way very nice. Can I use macro to have the message on the status? In positive case, could you explain me how to use it?
    Thanks!

    check the context in which the message statement is running, [here in sap library - message processing|http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaae335c111d1829f0000e829fbfe/frameset.htm], you will get the answer why!

  • Using Macro in Excel How to open a SAP directly?

    Hi,
           Can Anyone Suggest and help me to do above Code in Excel,"Using Macro in Excel  How to open SAP directly"
    Example: I want to Open T.CODE: MM01 directly, without login in to SAP, Using Macro, i want to open SAP Directly, Anyone Suggest me how to do it?.............
    I Tried this But it  showing Run time Error'438', Object does not support this property or method........
    VBCODE:
    Dim sap As Object
    Dim conn As Object
    Sub T_login()
    Set sap = CreateObject("SAP.Functions")
    Set conn = sap.Connection
    conn.System = "production"
    conn.client = "800"
    conn.user = "SAPUSER"
    conn.Password = "123456"
    conn.Language = ""
    conn.Tcode = "MM01"
    If conn.logon(0, False) Then
    MsgBox "Logon to the SAP system is not possible", vbOKOnly, "Comment"
    Else
    End If
    If Not IsObject(SapGuiApp) Then
    Set SapGuiApp = CreateObject("Sapgui.ScriptingCtrl.1")
    End If
    If Not IsObject(Connection) Then
    Set Connection = SapGuiApp.OpenConnection("production", True)
    End If
    If Not IsObject(session) Then
    Set session = Connection.Children(0)
    End If
    session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "CLIENT"
    session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"
    session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"
    session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = ""
    session.findById("wnd[0]/usr/txtRSYST-LANGU").SetFocus
    session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2
    session.findById("wnd[0]").sendVKey 0
    Set wshell = CreateObject("Wscript.Shell")
    wshell.Run Chr(34) & Path & "\script.vbs" & Chr(34), 1, 1
    End Sub
    Anyone send me the Exact code related to this.................
    Its very immediate requirement.................
    Regards
    Karthick

    Hi Karthick,
    You could try the following:
    Sub Test()
    If Not IsObject(SAPguiApp) Then
        Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
    End If
    If Not IsObject(Connection) Then
        Set Connection = SAPguiApp.OpenConnection("SYSTEMNAME", True)
    End If
    If Not IsObject(session) Then
        Set session = Connection.Children(0)
    End If
    session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "123"
    session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"
    session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"
    session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN"
    session.findById("wnd[0]/usr/txtRSYST-LANGU").SetFocus
    session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2
    session.findById("wnd[0]").sendVKey 0
    session.findById("wnd[0]/tbar[0]/okcd").Text = "/nmm01"
    session.findById("wnd[0]").sendVKey 0
    session.findById("wnd[0]").maximize
    MsgBox "If you click on the OK button, the SAP session is terminated."
    End Sub
    SAP GUI should appear in the new design, you must do the following:
    START -> All Programs -> SAP Front End -> SAP GUI Configuration -> Application -> Add -> excel.exe -> Open
    If the program is started from a VBS file, it must be entered here wscript.exe.
    Regards,
    ScriptMan

  • How to use AppleScript to set "character fill color" in Pages 5.2?

    For Pages 5.2 on OSX 10.9.3, what is the correct applescript for changing the "character fill" of text in pages. 
    If you highlight text, you do this via your mouse in the inspector by clicking "style," "advanced option (the gear wheel to the right of bold, italics, and underline), "character fill color (clicking on the multi-color circle, not the dropdown menu), and then choosing a color that comes up in the "colors" dialogue box.
    I've looked all over and cannot find how to use applescript to set the character fill color in pages. 
    In some examples (not directly related) I see "character fill" used. 
    In others, I see "colorfill." 
    Basically, I want to use applescript, embedded in a keyboard maestro macro, to change the background color of the text (not the text color itself) to particular colors. 
    Given the changes and updates to Pages this year, and to applescript, what's the easy way to do this?
    Thanks!
    Chuck

    Pages v5.2 still does not include selection-object, or character background color entries in its AppleScript dictionary, as does Pages ’09. Indirectly, using System Events, you can get the text selection in Pages v5.2, but then you can do nothing to change the selection. No assurances as to if or when Apple will mature the AppleScript dictionary support for Pages v5 series.

  • How to use CALL FUNCTION '/1BCDWB/SF00000014' in smartform urgent

    hiiiiiiiii
    Iam doing classical report n i want my output to be printed in smartform.
    So my output is in IT_FINAL table.In smartform in Form Interface Table column i had declare :::
    Parameter Name: IT_FINAL
    Type Assignment:LIKE
    Associated Type:ZSD_FINAL ( Its a structure of IT_FINAL)
    And in SE38..iam using...............
    data: FM_NAME1 type RS38L_FNAM.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZCSF_SDPRSR03_PR'
    importing
    FM_NAME = FM_NAME1.
    CALL FUNCTION FM_NAME1
    EXPORTING
    IT_FINAL = IT_FINAL.
    So while running its giving dump..
    I DONT KNOW HOW TO USE THE ABOVE FUNCTION MODULE.
    CALL FUNCTION '/1BCDWB/SF00000014'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Please suggest me with example if possible......URGENT.
    (Rewards if solved)
    Regards.

    Hi
    see the below doc and do accordingly
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    <b>call function 'SSF_FUNCTION_MODULE_NAME'</b>
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    <b>call function FM_NAME</b>
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Smartform
    you can check this link here you can see the steps and you can do it the same by looking at it..
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SMARTFORMS STEPS.
    1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
    2. Create Table type(t_struct) of stracture in se11.
    3. In your program declare Internal table(Itab) type table of structure(struct).
    4. Define work area(wa) like line of internal table.
    5. Open Tcode Smartforms
    6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
    7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
    8. In form pages and window, create Page node by default Page1 is available.
    9. In page node you can create numbers of secondary window. But in form there is only one Main window.
    10. By right click on page you can create windows or Go to Edit, Node, Create.
    11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
    12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
    13. In table there are three areas Header, Main Area, Footer.
    14. Right click on the Main area create table line by default line type1 is there select it.
    15. Divide line into cells according to your need then for each cell create Text node.
    16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
    17. Save form and activate it.
    18. Then go to Environment, function module name, there you get the name of function module copy it.
    19. In your program call the function module that you have copied from your form.
    20. In your program in exporting parameter of function pass the internal table(itab).
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE&
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME&
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE&
    Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
    &SFSY-JOBPAGES&
    Contains the total page number of all forms in the currently processed print request.
    &SFSY-WINDOWNAME&
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME&
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK&
    Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
    &SFSY-MAINEND&
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
    Advantages of SAP Smart Forms
    SAP Smart Forms have the following advantages:
    1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
    2. Displaying table structures (dynamic framing of texts)
    3. Output of background graphics, for form design in particular the use of templates which were scanned.
    4. Colored output of texts
    5. User-friendly and integrated Form Painter for the graphical design of forms
    6. Graphical Table Painter for drawing tables
    7. Reusing Font and paragraph formats in forms (Smart Styles)
    8. Data interface in XML format (XML for Smart Forms, in short XSF)
    9. Form translation is supported by standard translation tools
    10. Flexible reuse of text modules
    11. HTML output of forms (Basis release 6.10)
    12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
    Regards
    Anji

  • How to use the 'swc_element_get' function?

    Hi Experts,
    In  my  workflow  there  is  a  requirement  where  I  want  to  take  up  some  container  elements  and  insert  those  values  into  a  z  table . For  that  i  am  using  the  'swc_element_get'  function.  I  am  confused  about  the  import  parameter 'field' and  the parameter 'Container'.  Can  someone  please  suggest  how  to  use  this function?
    Thanks &  Regards,
    Samrat Dutta

    Hi All,
    I have  been  able  to  get  the  value  of  a container  element by  using  the  macro  'swc_get_element'   .I  have  used  it  in  the  method  of  my  task   and  saved  the  value  in  a  z-table. For  this  I  have  set  the  'Export' property of that  particular container elemnt .Now  my  problem  is  I  want  a  second  container  element  to  be  stored in  the  database , I  have  set  its  'Export'  property ,  but  inspite  of  that  it  is  not  visible  in  the  task  container.  As  a  result  I  am  not  able  to  access  it  from  inside  my  method  and  unable  to  save  it  in  the  z-table.  So  please  give  me  some  solution.
    Thanks  &  Regards ,
    Samrat Dutta.

  • How to use Rstxt in smart forms

    hi
    how to use Rstxt in smart forms

    Hi Ram,
    Go through this hope u can understand.
    How to Upload graphics (IMAGE) to your Sapscript?
    Command in your Sapscript
    /: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E
    These are the steps to be followed for uploading graphics in R/3 system 
    1.   First save the file as BMP 
    2.   Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and 
          make it Zoom as 100% and save as *.TIFF 
    3.   Open SE38 and execute program RSTXLDMC
    4.   Give your TIFF file path name 
    5.   Select Bcol (for Color) 
    6.   TEXT ID will be ZHEX-MACRO-*. 
    7.   Inplace of * write your own logo name (ZCOMPANYLOGO) 
    8.   Execute the program 
    9.   Now Goto SE71 create your ZFORM 
    10. Create logo window 
    11. Goto text element of logo window 
    or
    In 4.6x :-
    1.  Goto SE71 Change the mode to GRAPHICAL 
    2.  Choose the Graph Tabstrips
    3.  Now type in some name for the LOGO WINDOW 
    4.  Press the IMPORT BUTTON (third button from left) and then IMPORT the BMP file from your DESKTOP 
    5.  The code will be written automatically. You just need to drag and drop wherever you want
         the graphics to be. 
    /:   INCLUDE Z_COMPANY_LOGO OBJECT GRAPHICS ID BMON LANGUAGE EN
    Reward points if help ful.
    http://www.sap-img.com/ts001.htm
    Sorry i think for Scripts ..
    better to go for above post . it definetly works
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen

  • How to use the function EXEC_SQLCMD_MSQ in Excel?

    Hi Friends,
    can anyone explain how to use use this function EXEC_SQLCMD_MSQ in Excel to get the result.
    I have written excel macro to use this function,  statement like "Select * from t001" but the function doesn't reply any value.
    My objective is to pass the (any, generalised)
    sql statment to this function and get the result in Excel file.
    Please give the solution for this.
    Thanks
    Shankar

    Hello Shanker,
    The Fm EXEC_SQLCMD_MSQ is used in report RSMSQ020.
    U can do the same in ur report.
    If useful reward the points.
    Regards,
    Vasanth

  • How to write macro's in hr abap

    Hi,
    All
    I am new to HR ABAP .Does any body give links to write macro's in HR ABAP
    Thanks in advance.
    regards
    Ram

    h,
    adding to the aboce post.
    chk this.
    Macros:
    Introduction
    Programs that process the cluster data (for example, RX) do not access the cluster independently. The data is accessed using a defined interface created with macros.
    Macro contains some part of source code which it will be useful for number of applications.  Macro is module which is stored
    Naming Conventions of Macro:
    RP-aaa-bb-cc
    •     aaa is the type of Macro. It takes two values
    o     IMP  Import Macro
    o     EXP  Export Macro
    •     bb is the Database table where the data is saved:
    o     C1 Database object PCL1
    o     C2 Database object PCL2
    o     C3 Database object PCL3
    o     C4 Database object PCL4
    •     Cc is the cluster, it may take
    o     RX Cluster object RX
    o     RD Cluster object RD
    o     B2 Cluster object B2      and so on.
    Defining and Calling the Macros
    Defining:
      There are two options for defining the Macros
    •     Macros are defined using the ABAP Commands DEFINE….END-OF-DEFINITION. A macro can be used within a report or within include. If a macro is used in a report, and the macro is defined in include with the DEFINE command, include must be integrated.
    •     Macros can also be defined as RMAC macros. The source code of these modules is stored in the function section of the control table TRMAC. The coding is grouped under a specific name in the table key.
    According to conventions, the first two letters of the name must stand for the application. The rest of the name is freely definable.
    Difference between the two methods is:
    •     If a macro is changed, each report using this macro is automatically regenerated when it is executed.
    •     When you change a RMAC macro in the table TRMAC, the reports that use this macro are not regenerated automatically. You must regenerate them manually.
    Standard HR Macros
    o     The macro RP-PROVIDE-FROM-FRST retrieves the first(start) data record which is valid in the data selection period.
    o     The macro RP-PROVIDE-FROM-LAST retrieves the last(latest) data record which is valid in the data selection period.
    o     The macro RP-READ-INFOTYPE retrieves the data record(s) which is valid in the data selection period.
    How to check whether the macro operation is successful or not
    For every macro, whether the operation was successful or not will be checked with
    PNP-SW-FOUND.
    If PNP-SW-FOUND = 1, then the operation is successful.
    Where exactly the Macro code is stored
    The program code pertaining to this macro is stored in the control table RMAC
    Guidelines for how and when to use the Standard Macros
    o     RP_PROVIDE_FROM_FRST
    Use macro RP_PROVIDE_FROM_FRST in programs for the logical databases PNP and PAP where the first data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype has time constraint 1 or 2.
    Prerequisites
    •     The validity begin date of the time period must be before or the same as the validity end date.
    •     Validity start and end dates are correct (preferably of the type DATE).
    •     The infotype table is sorted in ascending order. Otherwise, you would receive the first fitting table entry that might not necessarily correspond to the first time entry.
    Features
    The first entry for a specified period is placed in the table header entry from an internal infotype table.
    Parameters
    RP_PROVIDE_FROM_FRST inftytab subty beg end
    IN :     1)     Name of the internal table
         2)     Subtype required or SPACE if no subtype is being specified
         3)     Validity start date of the time interval
         4)     Validity end date of the time interval
    OUT:     1)     PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1.
         2)     The matching table header entry if PNP-SW-FOUND = 1 or
    the initial table header entry if PNP-SW-FOUND = 0
    Example
    (RP_PROVIDE_FROM_FRST inftytab subty beg end)
    RP_PROVIDE_FROM_FIRST P0021 '1' PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '1'.
    ENDIF.
    or
    RP_PROVIDE_FROM_FRST P0001 SPACE PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '0'.
    WRITE: / 'Error: Org. assignment is missing' REJECT.
    ENDIF.
    o     RP_PROVIDE_FROM_LAST
    You use macro RP_PROVIDE_FROM_LAST in programs for the logical databases PNP and PAP where the last data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype (or subtype) has time constraint 1 or 2.
    Prerequisites
    •     The validity begin date of the time period must be before or the same as the validity end date.
    •     Validity start and end dates are correct (preferably of the type DATE).
    •     The infotype table is sorted in ascending order. Otherwise, you would receive the last fitting table entry that might not necessarily correspond to the last time entry.
    Features
    The macro RP_PROVIDE_FROM_LAST makes sure that the last entry for a specified period is placed in the table header entry of the report output list.
    Parameters
    RP_PROVIDE_FROM_LAST inftytab subty beg end
    IN :     1) Name of the internal table
         2) Subtype required or SPACE if no subtype is being specified
         3) Validity begin date of the time interval
         4) Validity end date of the time interval
    OUT:     1) PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1.
         2) The matching table header entry if PNP-SW-FOUND = 1 or
    the cleared table header entry if PNP-SW-FOUND = 0
    Example:
    RP_PROVIDE_FROM_LAST P0021 '1' PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '1'.
    ENDIF.
    OR
    RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '0'.
    WRITE: / 'Error: Org. assignment is missing'. REJECT.
    ENDIF.
    •     RP_READ_INFOTYPE
    You can use the macro in all programs at any point. You can also use it in function modules. In database PNP, an infotype is usually read with GET PERNR. Using macro RP_READ_INFOTYPE is an exception.
    You can also use the function module HR_READ_INFOTYPE. For information on how to use the function module, see the documentation on Function Modules.
    Prerequisites
    •     The validity begin date of the time period must be before or the same as the validity end date.
    •     Validity begin and end are correct date specifications (preferably of the type DATE).
    •     The infotype table must match the infotype number.
    •     The program using the macro must contain the include DBPNPMAC.
    Features
    The macro RP_READ_INFOTYPE makes sure that all data records for a person for the specified period are placed in an internal infotype table.
    Parameters
    RP_READ_INFOTYPE pernr infty inftytab beg end
    IN :     1)     Personnel number of the person requested
         2)     Infotype number of the required infotype
         3)     Name of the internal infotype table
         4)     Validity start date of the time interval
         5)     Validity end date of the time interval
    OUT:     1)     PNP-SW-FOUND = 0, if there is no matching record in the dataset
               PNP-SW-FOUND = 1, if there is no matching record in the dataset
         2)     PNP-SW-AUTH-SKIPPED-RECORD = 0, if the HR authorization check has not retained any records due to incorrect authorizations.
               PNP-SW-AUTH-SKIPPED-RECORD = 1 , if the HR authorization check has retained at least one record due to lack of authorization
         3)     Internal infotype table, containing all matching records for which the user is authorized (this table can also be empty).
    Example
    (RP_READ_INFOTYPE pernr infty inftytab beg end)
       INFOTYPES: 0001.
       RP-LOWDATE-HIGHDATE.
    DATA: PERNR LIKE P0001-PERNR.
    DATA: BEGDA LIKE P0001-BEGDA, ENDDA LIKE P0001-ENDDA.
    PERNR = '12345678'.
    BEGDA = LOW-DATE + 15
    ENDDA = HIGH-DATE - 5.
    RP-READ-INFOTYPE PERNR 0001 P0001 BEGDA ENDDA.
    IF PNP-SW-AUT-SKIPPED-RECORD EQ '1'.
    WRITE: / 'Insufficient authorization'. STOP.
    ENDIF.
    IF PNP-SW-FOUND EQ '0'.
    WRITE: / 'Infotype 0001 missing'. STOP.
    ENDIF.

  • Not able to use macro with LDB PNPCE

    Hi,
    I am trying to use macro 'rp-provide-from-last' as below with LDB PNPCE.But syntax error 'unable to  interpret SPACE' has occurred.
    rp-provide-from-last p0001 space pn-begda pn-endda.
    Please let me know how to use this macro with LDB PNPCE.

    The reason you are getting this error is that you would have used the GET Pernr. in start of selection.For PNPCE u have to define
    Nodes : person, peras.
    and then use the
    Get PERSON.
    Get PERAS in start of selection
    and then u can use the standard macros without any errors.

Maybe you are looking for

  • Why is my spell checker not working in a document using Word 2003

    I have a word document in Word 2003  .   I was altering it and noticed that from page 3 to 6 the spell checker does not work. I transferred the pages into another another file still didn't work .  Just copied a paragraph still didn't work.  So I then

  • Android devices not getting push notifications after a while

    We have just installed a new Exchange 2013 setup and started to move mailboxes across. Users that have Android devices though are noticing that push notifications are not reaching them and checking in the ECP I can see their last sync times are a lon

  • Home sharing doesn't work

    I have recently purchased a MacBook Air and want to convert all of my iTunes library from my WinVista Sony vaio laptop. I have around 20GB of music on my current library and ha the laptop for about 4 years. I have followed all of the steps about home

  • Rename an LDAP entry and all child

    I have an entry in an LDAP tree with the dn dn=ou=Customer, c=country, o=Company This entry has some child entries. Now I want to rename this entry from ou=Customer to ou=Customer_1 and the children should move to the new ou. Does anyone know how I c

  • Cannot Connect to AE After Coming out of Sleep Mode

    This happens on both my iMac and Powerbook. I don't normally use wireless on the iMac but I discovered that both computers are having the same issue when troubleshooting. When coming out of Sleep mode, the Airport device cannot connect to the Airport