Subroutine call in sapscript

hii guys,
1. provide me a example program for subroutine call
2. as i want add fielda in form
3.provide me driver program not only step or u provide me
             1. driver program
              2. field i want to add in driver program as well as in form.
              3. steps by step.
regards
rahul

Hi
No need of touching the original Driver program
Write a perform in Script and program in SE38 and do
see the examples
How to call a subroutine form SAPscripts
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck .
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM.
/: PERFORM
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
Example:
In script form
/: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
/: USING &EKKO-EKORG&
/: USING &EKPO-WERKS&
/: USING &EKKO-EKGRP&
/: USING &EKKO-BSTYP&
/: CHANGING &COMPNAME&
/: CHANGING &SENDADR&
/: CHANGING &INVCADR&
/: CHANGING &COMPADR&
/: CHANGING &COVERLTR&
/: CHANGING &SHIPADR&
/: CHANGING &REMINDER&
/: CHANGING &REJECTION&
/: CHANGING &POSTADR&
/: CHANGING &LOGO&
/: ENDPERFORM
In program
FORM Read_texts - To extract the standard texts from the table *
FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA : L_EKORG TYPE EKORG,
L_WERKS TYPE WERKS_D,
L_BSTYP TYPE BSTYP,
L_EKGRP TYPE BKGRP.
READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
CHECK SY-SUBRC = 0.
L_EKORG = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
CHECK SY-SUBRC = 0.
L_WERKS = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
CHECK SY-SUBRC = 0.
L_EKGRP = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
CHECK SY-SUBRC = 0.
L_BSTYP = IN_PAR-VALUE.
CLEAR Z08M1_ORG_TEXTS.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = L_BSTYP.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = SPACE.
ENDIF.
READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SENDADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'INVCADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COMPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REMINDER'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REJECTION'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'POSTADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'LOGO'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
REPORT ZMPO1 .
form get_freight tables in_par structure itcsy out_par structure itcsy.
tables: ekko,konv,t685t.
data: begin of itab occurs 0,
         ebeln like ekko-ebeln,
         knumv like ekko-knumv,
       end of itab.
data: begin of itab1 occurs 0,
         knumv like konv-knumv,
         kposn like konv-kposn,
         kschl like konv-kschl,
         kbetr like konv-kbetr,
         waers like konv-waers,
         kwert like konv-kwert,
       end of itab1.
data: begin of iout occurs 0,
         kschl like konv-kschl,
         vtext like t685t-vtext,
         kbetr like konv-kbetr,
         kwert like konv-kwert,
       end of iout.
data v_po like ekko-ebeln.
read table in_par with key 'EKKO-EBELN'.
if sy-subrc = 0.
   v_po = in_par-value.
   select
     ebeln
     knumv
  from ekko
  into table itab
  where ebeln = v_po.
  if sy-subrc = 0.
    loop at itab.
      select
        knumv
        kposn
        kschl
        kbetr
        waers
        kwert
      into table itab1
      from konv
      where knumv = itab-knumv and
            kappl = 'M'.
    endloop.
    loop at itab1.
      if itab1-kposn <> 0.
        select single * from t685t
                          where kschl = itab1-kschl
                            and kappl = 'M'
                            and spras = 'EN'.
        iout-vtext = t685t-vtext.
        iout-kschl = itab1-kschl.
        iout-kbetr = itab1-kbetr.
        iout-kwert = itab1-kwert.
        append iout.
        clear iout.
      endif.
    endloop.
    sort itab1 by kposn.
    loop at iout.
      sort iout by kschl.
      if ( iout-kschl eq 'GSDC' OR
           iout-kschl eq 'GSFR' OR
           iout-kschl eq 'GSIR' ).
        at end of kschl.
          read table iout index sy-tabix.
          sum.
         write:/ iout-kschl,iout-vtext,iout-kwert.
      out_par-name = 'A1'.
      out_par-value = iout-vtext.
      append out_par.
      out_par-name = 'A2'.
      out_par-value = iout-kwert.
      append out_par.
          endat.
        endif.
      endloop.
    endif.
  endif.
endform.
IN THE FORM I AM WRITING THIS CODE.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM
&A1&
&A2&
This Code is to be written in the PO form under ADDRESS window.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:DEFINE &A3& = ' '
/:DEFINE &A4& = ' '
/:DEFINE &A5& = ' '
/:DEFINE &A6& = ' '
/:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:CHANGING &A3&
/:CHANGING &A4&
/:CHANGING &A5&
/:CHANGING &A6&
/:ENDPERFORM
&A1&
&A2&
&A3&
&A4&
&A5&
&A6&
Regards
Anji

Similar Messages

  • Subroutine call from SAP Script

    Hi,
    I need to calculate required/outstanding qty. hence am passing existing values of reservation#/item# and issued qty.
    both req/out qty are returned blank by the code. please help.
    Following is my code segment for a external routine call from SAP Script.
    /:   PERFORM P_GET_QTY IN PROGRAM ZTEST
    /:   USING &MSEG-RSNUM&                     
    /:   USING &MSEG-RSPOS&                     
    /:   CHANGING &REQ_QTY&                     
    /:   CHANGING &MSEG-MENGE&                  
    /:   CHANGING &OUT_QTY&                     
    /:   ENDPERFORM
    REPORT ztest .
    TABLES resb.
    DATA: wa_resb TYPE resb,
          req_qty TYPE resb-bdmng,
          isd_qty TYPE mseg-menge,
          out_qty TYPE resb-bdmng.
    FORM p_get_qty TABLES input  STRUCTURE itcsy
                          output STRUCTURE itcsy.
      DATA: avlbl TYPE resb-bdmng.
      READ TABLE input WITH KEY 'MSEG-RSNUM'.
      CHECK sy-subrc = 0.
      wa_resb-rsnum = input-value.
      READ TABLE input WITH KEY 'MSEG-RSPOS'.
      CHECK sy-subrc = 0.
      wa_resb-rspos = input-value.
      READ TABLE input WITH KEY 'REQ_QTY'.
      CHECK sy-subrc = 0.
      req_qty = input-value.
      READ TABLE input WITH KEY 'MSEG-MENGE'.
      CHECK sy-subrc = 0.
      isd_qty = input-value.
      SELECT SINGLE * INTO wa_resb
                      FROM resb
                      WHERE rsnum = wa_resb-rsnum
                      AND   rspos = wa_resb-rspos.
      CHECK sy-subrc = 0.
      avlbl   = wa_resb-bdmng - wa_resb-enmng.
      req_qty = avlbl - out_qty.
      out_qty = req_qty - isd_qty.
      output-name = 'REQ_QTY'.
      output-value = req_qty.
    MODIFY output TRANSPORTING name value WHERE name = 'REQ_QTY'.
      APPEND output.
      output-name = 'OUT_QTY'.
      output-value = out_qty.
    MODIFY output TRANSPORTING name value WHERE name = 'OUT_QTY'.
      APPEND output.
    ENDFORM.
    Thanks,
    Ram.

    Hi Ram,
    I think you have to use MODIFY instead of append for the OUTPUT table.
    MOdify the table with KEY. This should resolve the problem.
    Ram, you can check this code and see how the MODIFY is to be used.
    REPORT YLSD999A.
    DATA  W_LENGTH TYPE I.
    *   GENERAL PURPOSE SUBROUTINES FOR CALLING FROM SAPSCRIPTS
    FORM DISPLAY_POUND TABLES IN_TAB STRUCTURE ITCSY
                              OUT_TAB STRUCTURE ITCSY.
      DATA: COUNT TYPE P VALUE 16.
      DATA: W_VALUE(17) TYPE C.        "defined as 7 chars to remove pence
      DATA: W_CHAR TYPE C.
      DATA: W_DUMMY TYPE C.
      DATA: W_CURR(3) TYPE C.
    *    Get first  parameter in input table.
      READ TABLE IN_TAB INDEX 1.
      WRITE IN_TAB-VALUE TO W_VALUE .
    * get second parameter in input table
      READ TABLE IN_TAB INDEX 2.
      MOVE IN_TAB-VALUE TO W_CURR.
      IF W_CURR = 'GBP'.
        W_CURR = '£'.
      ENDIF.
      W_LENGTH = STRLEN( W_CURR ).
    *    look for first space starting at right.
      WHILE COUNT > -1.
        W_CHAR = W_VALUE+COUNT(1).
    *  W_CHAR = IN_TAB-VALUE+COUNT(1).
        IF W_CHAR = ' '.
          COUNT = COUNT - W_LENGTH + 1.
          W_VALUE+COUNT(W_LENGTH) = W_CURR.
          COUNT = -1.
        ELSE.
    *     W_VALUE+COUNT(1) = W_CHAR.
          COUNT = COUNT - 1.
        ENDIF.
      ENDWHILE.
    * read only parameter in output table
      READ TABLE OUT_TAB INDEX 1.
      OUT_TAB-VALUE = W_VALUE.
      MODIFY OUT_TAB INDEX SY-TABIX.
    ENDFORM.
    Cheers
    VJ

  • Subroutine pool of sapscript

    Hi All
    can anybody plz tell me waht is subroutine pool of sapscript??
    waiting for replies
    THanks

    Hi,
       If you want to do calculations on some of the fields in a script one way is to change the print program. And other way is to call a routine in the windw which is in another program.
    For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
    /: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
    /: USING &var1&
    /: CHANGING &var2&
    /: ENDPERFORM.
    Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
    In the program ZSHAIL_BASIC, you have to call the subroutine as
    FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
    So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
    This value can thus be obtained in var2 specified in SAPScript.
    Thanks and Regards,
    Bharat Kumar Reddy.V

  • How can I find the program which is calling my SAPscript??

    How can I find the program(std/Custom) which is calling my SAPscript form??
    Regards,
    Shashank.

    Hi
    check in NACE transaction or TNAPR table
    reward points to all helpful answers
    kiran.M

  • How to call a sapscript from a Zprogram

    Hi all,
    How do I pass the object key information when calling a sapscript form in a Zprogram.  For example, where do I indicate the Po number or PR requisition when calling the form.
    Thank you.
    Monica.

    HI,
       These values should be passed to the script through fucnction module WRITE_FORM.
    http://www.allsaplinks.com/sap_script_made_easy.html
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    Reward if helpful.

  • Dynamic subroutine call

    how to perform dynamic subroutine call

    Hi,
    In the Program where you are writing the PERFORM statement: write as below:
    PERFORM <Subroutine Name>(give the other Program name where this subroutine has to be called dynamically)  USING <paramters>.
    In the Other program you will just call this perform with FORM... ENDFORM...
    The PERFORM will not appear in that program.
    Regards,
    Anji

  • Subroutine called from a Dynamic Action.

    Calling a subroutine in a program via a dynamic action, works in foreground, but not in background? Any ideas why?

    What's a dynamic action and what are you actually trying to achieve?

  • Subroutine call in OO

    Hi guys,
    I would like to call a subroutine in a ABAP class:
    PERFORM p6_to_date_time_tz(rstr0400) USING mtime
                                               time
                                               date.
    but I get the following error message:
    "PERFORM form(prog)" is not supported in the OO context.
    Can somebody tell me how can I deal with this problem.
    Thanks in advance
    Regards
    Eriwn

    Re-read the F1 help on the PERFORM statement.  You're using a short form - you must use the long form.

  • Within SAPSCRIPT calling another SAPSCRIPT

    Hi,
    how can i call the other sapscript B within a sapscript A (a copy verison of F110_PRENUM_CHCK with customization) whereby sapscript A is called by a standard printing program when i run F110 for printout?
    thanks.

    Hi Yong,
    You cant start sap script within a script in the driver program using START_FORM and need to end this scirpt wiht END_FORM.
    Psudo code in driver program
    OPEN_FORM with SAP Script A
    START_FORM with SAP Script B
    END_FORM  with SAP Script B
    CLOSE_FORM  with SAP Script A
    Thanks,
    Vinay

  • Cancel a Event and it's further execution from a Subroutine called from that event.

    First I will explain my requirement:
    Consider the following snippet.
    Private Sub SomeEvent(Byval sender as Object) Handles SomeControl.SomeEvent
    --Do Something_1
    --Do Something_2
    --Do Something_3
    call A()
    --Do Something_4
    --Do Something_5
    --Do Something_6
    End Sub
    Private Sub Procedure_A ()
    --Do Something_1
    --Do Something_2
    --Do Something_3
    call B()
    --Do Something_4
    --Do Something_5
    --Do Something_6
    End Sub
    Private Sub Procedure_B ()
    --Do Something_1
    --Do Something_2
    --Do Something_3
    'Exception Ocurs...Here
    --Do Something_4
    --Do Something_5
    --Do Something_6
    End Sub
    In the above exception, if the exception occurs at the said location in Procedure_B then, 
    1. Remaining Statements in Procedure_B should not execute.
    2. Remaining Statements in Procedure_A should not execute.
    3. Remaining Statements in SomeEvent should not execute.
    Please not that:
    I know this can be handled by using Try..Catch in every Subroutine and Raise an exception from there. But it cannot be implemented due to some reason.
    The solution I am looking for is
    1. To somehow cancel the ProcessThread the SomeEvent has started.
    Or
    2. If I could programatically Set Next Statement

    I think that you only need Try-Catch in
    SomeEvent, not in every procedure:
        --Do Something_1
        --Do Something_2
        --Do Something_3
        Try
            Call A()
            --Do Something_4
            --Do Something_5
            --Do Something_6
        Catch
        End Try
    It is also possible to distinguish specific exceptions.
    It is not clear why you cannot use Try-Catch. Then use
    On Error instead:
        --Do Something_1
        --Do Something_2
        --Do Something_3
        On Error GoTo Error1
        Call A()
         --Do Something_4
         --Do Something_5
         --Do Something_6
        Return
    Error1:

  • Calling of Sapscript program from BSP Application

    Hi,
       I have a requirement to display the sapscript output in PDF throgh BSP.
       In the Application program I am taking the output in PDF format.
       Now While calling the Driver program in BSP it is giving dump.
       I am using Submit 'Prog_name'  and return.
      Pls help.

    Hi Thanuja,
    You cannot call the program using SUBMIT PROGRAM in BSPs.
    You can create PDF from a Smart Form. <i>I have no idea of SAPSCRIPTS calling from BSPs.</i> You can do one thing, you can migrate your SAPSCRIPTS to SMARTFORMS and try the below code.
    You can call the the below three FMs in the following sequence.
    1)
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname           = l_form_name
        importing
          fm_name            = l_function_module_name
        exceptions
          no_form            = 1
          no_function_module = 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.
    2)  call function l_function_module_name
    3)  call function 'CONVERT_OTF'
    Thanks,
    Sreekanth

  • What does "skip subroutine call if busy" do???

    if i select this, what happens???

    Hi,
    I didn't know about this...
    Is this a 'proper' feature of LabVIEW? It's not documented, and the most
    simple example I could come up with, crashes (reproducable). LabVIEW
    generates a bookkeep.cpp error, line 6??.
    Regards,
    Wiebe.
    "Greg McKaskle" wrote in message
    news:[email protected]...
    > > if i select this, what happens???
    > >
    >
    > This is a rather advanced bit of functionality that is useful when
    > trying to do more deterministic applications where it is OK to sometimes
    > skip a function.
    >
    > Lets say that you have a subVI that is called from multiple locations.
    > If you leave the VI as non-reentrant, the calls will block waiting for
    > each other to complete. This is fine for most situations, so it is the
    > default.
    >
    > Another option is to make the subVI reentrant. This is appropriate when
    > the subVI either doesn't have any state information/history so that one
    > call affects another, or where you want the history to be kept separate.
    > With a reentrant VI, the calls are totally separate and will not wait
    > on one another -- they will run totally independent even simultaneously.
    > Keep in mind that most computers only have one CPU, so simultaneous
    > really means that the CPU takes turns or multitasks back and forth.
    >
    > Now the choice you asked about. If you set the priority of the subVI to
    > be a subroutine, then you have a popup item on the node that lets you
    > skip. This means that on a particular call, one of two things will
    > happen. If the subVI isn't busy, if no other call is currently running,
    > then this call will enter the subVI and run till completion. On the
    > otherhand, if the subVI is already busy, if another call is already in
    > there, just skip it without running. To tell the difference, make sure
    > the subVI has an output that defaults to FALSE, but returns TRUE if the
    > call completes.
    >
    > When is this option appropriate? If you have multiple calls to
    > something like a logging VI where you pass in an array of the latest
    > values, then you can set it to skip. If it logged the values, go
    > collect some more and call it with just the new values. If it skipped,
    > you can go collect some more, but append them to the old values before
    > calling the logger. This allows your VIs to block less and lets them
    > keep up with computational schedules. It is obviously useful only when
    > a skipped call is acceptable and can be made up for in some way.
    >
    > Greg McKaskle
    >

  • SAPscript print program

    Hi All
    I have the SAPscript form name. I need to find out the name of the print program.
    The table TNAPR gives the standard program name attached to the SAPscript.
    But, I need to find out the Z* program name associated with the SAPscript.
    Pls do help on this.
    Thanks,
    Zahabia.

    hI
    Sapscripts are client dependend and smartforms are client independet.
    SAPscript are CLient Dependent, SmartForms are Client Independent. The reason why SmartForms are client independent is because when you activate a SMartForm, SAP actually generates a Function Module (which as you know is client independent). The Print Program (or as SAP likes to refer to them these days - Application Program) calls your generated FM.
    In the "smartforms" transaction, when you are viewing a smartform, you can go to the Environment->Function Module Name menu path to see the FM name.
    Look at the "Application Program" for the Invoice SmartForm (RLB_INVOICE):
    determine smartform function module for invoice
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING formname = lf_formname
    variant = ' '
    direct_call = ' '
    IMPORTING fm_name = lf_fm_name
    EXCEPTIONS no_form = 1
    no_function_module = 2
    OTHERS = 3.
    call smartform invoice
    CALL FUNCTION lf_fm_name
    EXPORTING
    archive_index = toa_dara
    archive_parameters = arc_params
    control_parameters = ls_control_param
    mail_appl_obj =
    mail_recipient = ls_recipient
    mail_sender = ls_sender
    output_options = ls_composer_param
    user_settings = space
    is_bil_invoice = ls_bil_invoice
    is_nast = nast
    is_repeat = repeat
    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.
    Difference with SMARTFORMS vs. SapScript (SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
    It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
    i) The main difference is that SAP script is client-dependant, while smartform is independent. Also there are some advanced and intreractive features available in smartforms.
    You can use an External subroutine-call in sapscript editor like:
    /: perform <form_name> in program <program_name>
    /: using <var1>
    /: using <var2>
    /: changing <return1>
    /: changing <return2>
    /:endperform

  • Smart forms and script

    hi,,
           will u tell what is the difference between smart forms and scripts.

    hI
    Sapscripts are client dependend and smartforms are client independet.
    SAPscript are CLient Dependent, SmartForms are Client Independent. The reason why SmartForms are client independent is because when you activate a SMartForm, SAP actually generates a Function Module (which as you know is client independent). The Print Program (or as SAP likes to refer to them these days - Application Program) calls your generated FM.
    In the "smartforms" transaction, when you are viewing a smartform, you can go to the Environment->Function Module Name menu path to see the FM name.
    Look at the "Application Program" for the Invoice SmartForm (RLB_INVOICE):
    determine smartform function module for invoice
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING  formname           = lf_formname
                    variant            = ' '
                    direct_call        = ' '
             IMPORTING  fm_name            = lf_fm_name
             EXCEPTIONS no_form            = 1
                        no_function_module = 2
                        OTHERS             = 3.
    call smartform invoice
          CALL FUNCTION lf_fm_name
               EXPORTING
                          archive_index        = toa_dara
                          archive_parameters   = arc_params
                          control_parameters   = ls_control_param
                    mail_appl_obj        =
                          mail_recipient       = ls_recipient
                          mail_sender          = ls_sender
                          output_options       = ls_composer_param
                          user_settings        = space
                          is_bil_invoice       = ls_bil_invoice
                          is_nast              = nast
                          is_repeat            = repeat
         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.
    <b>Difference with SMARTFORMS vs. SapScript (SE71)</b>
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk. 
    It was said that it was provided in CRM 3.0 version, but not available in R/3.  You can download smartforms into Local PC in a XML format.  In the same way you can upload this XML format into Smartform.  From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment. 
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk. 
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people.  What you can do is to create a Transport and then FTP down to your local harddisk.   When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server.  Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it.  Actually, there is something you can do about it.  By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected. 
    i) The main difference is that SAP script is client-dependant, while smartform is independent. Also there are some advanced and intreractive features available in smartforms.
    You can use an External subroutine-call in sapscript editor like:
      /: perform <form_name> in program <program_name>
      /: using <var1>
      /: using <var2>
      /: changing <return1>
      /: changing <return2>
      /:endperform

  • Differences Between Scripts & Smartforms...

    Hi,
    In my project any one of the Employee should give sessions on any of the topic every week. So i have decided to give on Scripts & Smartforms. Can any one explain in details the difference between Scripts & Smartforms.
    Thanks & Regards,
    Ramana.

    hi
    Difference with SMARTFORMS vs. SapScript (SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
    It was said that it was provided in CRM 3.0 version, but not available in R/3.  You can download smartforms into Local PC in a XML format.  In the same way you can upload this XML format into Smartform.  From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people.  What you can do is to create a Transport and then FTP down to your local harddisk.   When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server.  Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it.  Actually, there is something you can do about it.  By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
    i) The main difference is that SAP script is client-dependant, while smartform is independent. Also there are some advanced and intreractive features available in smartforms.
    You can use an External subroutine-call in sapscript editor like:
      /: perform <form_name> in program <program_name>
      /: using <var1>
      /: using <var2>
      /: changing <return1>
      /: changing <return2>
      /:endperform
    i think it will useful for you.
    Reward points if useful.
    Thanks,
    Usha

Maybe you are looking for

  • Open a custom dialog when button is pressed.

    I have a custom dialog that I want to display another custom dialog. I cannot get it work correctly. Everytime I add a function that will show the 2nd dialog It will show before the 1st one is loaded and then nothing happens when I click the dialog o

  • Connection JDeveloper to Oracle 8i

    How to make a connection in Jdeveloper 3.0 to Oracle Personal 8i local Database on a Windows 98 Machine. Oracle Database 8.1.5 and Jdeveloper 3.0 are in the same computer Win/98. Which JDBC Driver and connection method must be used? I need a complete

  • Availability/GR Date after MRP Run

    Hi All, After MRP Run for perticular period, system plan the material at the start date of the period. Is there any ways where we can set it to last date of the period. Like if I will put the PIR for Month of March and April, system will create the P

  • Impossible d'inserer un décor créé sur photoshop CS3 en arrière plan sur flash professional CS5.5?

    Bonjour, Je viens vers vous car cela fait quelques heures que je n'arrive pas a faire une manipulation qui me parrait pourtant simple : importer un décor créé à partir de photoshop CS3 en arriere plan d'une animation faite sur Flash Pro CS5.5 ... J'a

  • Xterm windows don't cover the wallpaper in Awesome3 [SOLVED]

    I've included a screenshot to show you what I'm talking about. (look on the right and below) This is a fresh Arch install with Awesome 3.4.8 which I installed from the AUR using yaourt. This has happened to me on other awesome installs too, what's go