Currency field in PERFORM, -- SAP Script

Hi,
I am calling a zperform from SAP Script and sending two currency values as input and after doing subtraction , I want the result value from the Zperform.
When I send 1,000,000.00 as input to PERFORM. I am getting a dump when I try to assign the in_par-value to a currency field in FORM.
The error is "Unable to interpret "1,000,000.00 " as a number." Please let me know how to handle this case. I mean is there any converstion routine to convert the external currency value to internal format?

You must remove the commas.
Warren

Similar Messages

  • How to test the performed  SAP SCRIPT

    Hi friends can any one help for
    how to test the performed  SAP SCRIPT. What are the necessary codes or anything else for performing it

    Praveen,
    Can you be much clear with your query? What do you mean by performing? Do you mean how to execute it ?
    Regards,
    Vinod.

  • Quantity Field Display in Sap Scripts

    Hi,
    I am displaying the quantity field in the sap script layout.But in the quantity field having 3 decimal places.
    Ex: 3.400 is there i want to display 3.4
    3.000 only i want to display 3
    3.740 -
    3.74 like that i want.
    I want to omit the zeros after decimal places.
    Please give me the solution.
    Regards,
    Jenny

    As it is quantity field, it will print even the decimal points...U can try this...move the value to a char variable and use truncating to remove zeros by deleting them and use this value in ur script to print the value.

  • How to clear fields used in SAP SCRIPT

    hi all,
       i want to clear all fields which i have printed on my sap script.
    i have passed the values to these  fields by useing function module
    'TEXT_SYMBOL_SETVALUE' in se38 abap program.
    i have also used clear statement in my abap program to clear those fields but it cant working. is there any statement in SAPSCRIPT to clear fields.
    if so then please give me its an urgent. 
    thanks in advance.
    Vinod.

    hey,
    I understand that in a text-symbol when u set the values once, then u print them. for the second time when u want to print with diff values, then it will automatically get refreshed when u open it again.
    So use code like this.
    PERFORM OPEN_FORM USING FORMNAME.
    PERFORM WRITE_FORM USING TEXT_SYM.
    PERFORM CLOSE_FORM
    for the next run...
    at this instant all the text elements will get refreshed.
    PERFORM OPEN_FORM USING FORMNAME.
    PERFORM WRITE_FORM USING TEXT_SYM.
    PERFORM CLOSE_FORM
    Cheers,
    Sam

  • Deleting zeros in Quantity field in Sap Script

    Hi,
    I have a Quantity(FKIMG) field in Invoice (Sap Script), It is showing as 1.000 ,I want to show this as 1 ,By removing all zeros and point.
    how can i do this in Script?
    Thanks in advance,
    fractal

    Hi,
    Use <b>TRUNC</b>    "Interger part of x
    ex:
      TRUNC(FKIMG) to get integer part of the quantity.
    or
    declare an integer variable and pass quantity to this variable , use the same variable for print.
    Regards
    Appana

  • Adding Fields to New Hire SAP Script, Text ID PAMA

    Hi there,
    I have successfully created a sapscript email to be sent via Dynamic Actions for the notification of New Hires and Terminations.  This has been accomplished via feature M0001 (we have created two new features u2013 M00NH & M00TM), dynamic action (T588z), Business Workplace, distribution lists, etc.  All are working correctly, and an email is being generated and forwarded to appropriate parties.
    Now we have been asked to add extra fields to the SAP Script text for New Hire and Termination.  These are text fields for Employee Group, Employee Subgroup, among others.
    Our syntax has been set up as follows:
    &'Employee Group:             'P0001-PERSG(02)&
    &'Employee Group Text:        'T501T-PTEXT(20)&
    &'Employee Subgroup:          'P0001-PERSG(02)&
    &'Employee Subgroup Text:     'T503T-PTEXT(20)&
    For the New Hire action, we are getting the Employee group and Employee subgroup codes to display but we are NOT getting the Employee Group or Employee Subgroup texts to display.  To confuse the issue, we ARE getting these text fields to display for the Termination script.  Our ABAP'er is also having difficulty determining how to bring in these fields to the New Hire script.
    We have researched this website have tried the instructions given by one user..... which states that we needed to go to our SAPscript text and make the following changes:
    " To get other HR data into your standard text (from SO10):
    Insert > Symbols > Program symbols (now you'll see a list of print programs, and i guess this is where the ABAP grabs the data).
    Highlight the one for HR Master data, and click the DDIC button.
    Double click the table you need data from (e.g P0000, P0001 or P0002).
    Finally select the field you want."
    I have done this, but when I get to the Program symbols, I do not see a print program for HR Master Data.  I only see RPUCOB02 - Processing of Qualifying COBRA Events and Letters & SAPMSSCE - SAPscript Standard Text Maintenance. 
    I tried to use the RPUCOB02 and inserted the text for Employee Subgroup as a test.  But it did not work as the text still did not display.
    The other oddity is that for the Termination sapscript text, the Employee Group and Employee Subgroup text displays correctly.  To test our syntax, we then connect the Termination sapscript text to the 'New Hire' action and reran the New Hire action.  The Employee Group and Employee Subgroup text fields then disappeared.  So it worked when the action was a termination, but did not work when the action was New Hire.
    The difference between these two actions is that the feature for the sapscript generation for New Hires is being generated upon saving of I0002 (which is created AFTER I0001) - we needed the Employee's name in the text.  For the Termination action, the feature is set to generate the mail upon saving of I0001.  This is the only difference between the two.  But as I need the employee name to display, it seemed the best approach.  I did try to generate the New Hire sapscript after saving of I0008, but had the same problem. 
    Does anyone know how we can add text fields to our New Hire sapscript text and actually get them to display?  We would also like to display the Org Unit text (&'ORGEH_2nd_TEXT(40)&) or even  the Supervisor (from the OM relationship).  But they do not display for the New Hire sapscript either. And our ABAP'er is able to insert the Supervisor logic, but the field still does not display.
    Thanks very much for any help.
    Edited by: Cathryn Westgarth on Nov 17, 2009 6:23 PM
    Edited by: Cathryn Westgarth on Nov 17, 2009 6:24 PM

    I am going to repost this question to the HR forum as it may be more appropriately an HR forum questions.
    Thanks
    Cathryn

  • Reg sap script long text

    Hi experts,
    I have one problemin bseg-sgtxt field. i develop sap script for payment print prog, In my script my field is bseg-sgtxt(item text). and this field lenght is 50 char. i want more then 50 char through this field in my script. for that i use long text button... this long text stored in EENO_DYNP and field name is ZEILE , but it is a structure...so my question is
    1) How can i retrive this long text field in my script
    2) Can u give me example with this coding..
    3) How can i concate bseg-sgtxt with EENO_DYNP-ZEILE
    I need code example for that....
    Pl help me its urgent
    zeni

    hi,
    the long text of a document are stored into the standard text table and u can read it with the function READ_TEXT.
    call this function in this way
    >CONCATENATE bseg-bukrs bseg-belnr bseg-buzei INTO name.
    >CALL FUNCTION 'READ_TEXT'
    >  EXPORTING
    >    id                      = '0001'
    >    language                = sy-langu
    >    name                    = name
    >    object                  = 'DOC_ITEM'  " identified FI document
    >  TABLES
    >    lines                   = t_line
    >  EXCEPTIONS
    >    id                      = 1
    >    language                = 2
    >    name                    = 3
    >    not_found               = 4
    >    object                  = 5
    >    reference_check         = 6
    >    wrong_access_to_archive = 7
    >    OTHERS                  = 8.
    the id of the text you can find in SPRO transaction under
    Financial accounting->Financial accounting Global Settings ->Document->line Item-> Define Text Identifications for Line Items
    here you can find all ID of the standard text that are configurated in your system.
    now you can concatenate BSEG-SGTXT with the standard text of the document item .
    bye
    Marco

  • Missing fields in the output while using SAP SCRIPT

    Hi,
    I am working on an issue where we are using F110 to print some checks, and for this we have created a custom sap script and we are using a std driver program RFFOUS_C, we have also maintianed a custom subroutine pool ZRFFOUS which will retrieve the missing data for the sap script which was not there in the std. program. Now we have applied a SP to our system and since then we are having a problem...when we are printing the chechks its missing some fields.
    Surpisingly, it is happening for all scripts like Dunning, invoice......
    These scripts are working good in production which is not applied patches.
    I have tried in all ways, did debug, data is there in tables and scripts are exactly same as in production.
    Could you please share any ideas regarding this? What would be the effect of patches?
    Thanks
    Sha

    Hi ,
    I think u r printing the Check through the Tr Code F110.
    In that program u r using the Standard Driver Program RFFOUS_C and u create a New Sap script.
    and also u also mantained the custom subroutine pool ZRFFOUS .  when ru giving printing u are  not able to print some  field.
    In this case  when u using the Standard driver Program RFFOUS_C in that program there is a Include Progran  * RFFORI01---- check  , 
    in this program it is calling the Standard Form (F110PRENUM_CHCK) i--e t042e-zforn .as shown in the below and it is calling the function module 'OPEN_FORM'._
    Please copy  the form  asZF110_PRENUM_CHCK and  and do the changes in that form . and we need to maintained the Form as Company code level  -- and it will shown this Table T042E (Company Code-Specific Specifications for Payment Methods)
    Please go to Transaction Code FBZP  and U can maitained the  New Sap Script Form Company Code Level.
    one thing while u calling your new subroutine pool ZRFFOUS  Please call  this subroutine in  your Sap Script form then only u can see all values in your Check.  and Actvate the Sap script .
    Like U can call your new  subroutine ZRFFOUS  in your New Sap script Program.
    /E   CHECK
    /:   PERFORM XXXXXXX IN PROGRAM XXXXXX''                  
    /:   PERFORM CHECK_NAME IN PROGRAM  ZRFFOUS
    /:   USING &XXXXXXX&                      
    /:   CHANGING &XXXXXX&                   
    /:   ENDPERFORM                              
    In the subroutine pool ZRFFOUS   u have to call  as
    FORM CHECK_NAME TABLES t_data_in  STRUCTURE itcsy
                                                   t_data_out STRUCTURE itcsy.
    xxxxx
    xxxxx
    xxxxx
    ENDFORM.
    In this case  when u using the Standard driver Program RFFOUS_C in that program there is a Include Progran  * RFFORI01---- check  , 
    in this program it is calling the Standard Form (F110_PRENUM_CHCK) i--e t042e-zforn .
        open check form
          CALL FUNCTION 'OPEN_FORM'
               EXPORTING
                    form     =  t042e-zforn
                    device   = 'PRINTER'
                    language = t001-spras
                    options  = itcpo
                    dialog   = space
               EXCEPTIONS
                    form     = 1.
          IF sy-subrc EQ 1.                "abend:
            IF sy-batch EQ space.          "form is not active
              MESSAGE a069 WITH t042e-zforn.
            ELSE.
              MESSAGE s069 WITH t042e-zforn.
              MESSAGE s094.
              STOP.
            ENDIF.
          ENDIF.
    I thing it will help u to solve this issue.
    Thanks.
    Gagan

  • Using Sum field in Sap script

    Hi all,
    I am trying to add content of field (Tax VAT) in sap script and put into another symbol using following command
    /:SUMMING program symbol INTO sum symbol
    but after running me22n tcode to display the PO error occured
    <b>Overwriting a protected field</b>Error analysis
        The program tried to assign a new value to the field "<SM_SUM>" even though
        it is protected against changes.
    I am modifying medruck std PO script and using standard prog. for it i.e. SAPFM06P.
    Please tell me wheather it is necessary to make sum symbol dynamically define in SAPFM06P and how to do this.
    with regards
    Rajvinder Sahni

    Hi...
    If you need to summ numbers or do any operation, in your SAP Script you can call subritunes and do all the operations you need.
    On your SAP script write:
    /: PERFORM subrutine IN PROGRAM Zprogram
    /: USING &PAR1&
    /: CHANGING &PAR2&
    /: ENDPERFORM
    PS: You can use as many USING AND CHANGING as you need.
    And the zprogram goes;
    FORM subrutine TABLES t_in STRUCTURE itcsy
    t_out STRUCTURE itcsy.
    data: par1 type n.
    Read the value on PAR1
    READ TABLE t_in WITH KEY 'PAR1'.
    CHECK sy-subrc = 0.
    PAR1 = t_IN-value.
    DO WHATEVER YOU NEED TO DO
    ADD 1 TO PAR1.
    SEND THE VALUES BACK
    READ TABLE t_OUT WITH KEY 'PAR2'.
    t_sal-value = PAR1 .
    MODIFY t_OUT INDEX sy-tabix.
    ENDFORM.
    Hope this helps,
    Gabriel

  • How can i update regup-sgtxt field in sap script

    Hi experts,
    I have created sap script for payment print prog. In that one field is amount discription "REGUP-SGTXT". i want to use field "REGUP-SGTXT" as a discription. for sap script payment print i use T-Code f-43, fb03,f-58... now in whic T-code i fiiled the value of "REGUP-SGTXT"?? how can i update value in my sap script?? cause i ceateed so many doc no but "REGUP-SGTXT" its blank... so how can i fill this fiels???
    Give me suggetion
    Zenithi

    Hi
    Most of the times this text won't get populated
    So better write an external PERFORM subroutine in the SCRIPT and fetch it from BSEG/BKPF tables using BELNR field and use in the cheque printing.
    see the sample code for subroutines
    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

  • Sap script form perform statement

    HI ALL ,
    CAN ANYONE HELP ME WITH SAP-SCRIPT FORM AND PERFORM SYNTAX. THAT IS WHEN U NEED TO ADD A FIELD TO AN EXISTING SAPSCRIPT, BY USING AN EXTERNAL SUBROUTINE.
    i NEED THE SYNTAX BOTH FOR PERFORM AND ENDPERFORM STATEMENT AND ALSO THE FORM STSEMENT. ANOTHER TRHING IS IF CAN LET ME KNOW HOW TO USE DEFINE STATEMENT IN SAPSCRIPT. WHATS ITS USE AND IS IT RELATED TO THE QUERY ABOVE.
    else,
    U PLZ LET ME KNOW ANY HELPFUL LINKS TO GO THROUGH.
    THANLS IN ADVANCE,
    ANUPMA.

    Hi anupma,
    1. while calling subroutines from sapscripts,
    there is a special technique,
    which has got its own limitations.
    2.
    FORM abc
    TABLES
    in_tab STRUCTURE itcsy
    out_tab STRUCTURE itcsy.
    ENDFORM.
    3. The perform in se38 program should be of the
    above format only.
    4. We cannot pass internal tables.
    5. Rather we need to pass
    VARIABLE NAME
    VARIABLE VALUE
    (see the structure of itcsy in se11)
    6. In this form, we have to read
    the internal table in_tab
    to capture the variable name and its value.
    7. Similary, to return the values,
    we have to put one record (for each variable)
    in out_tab.
    regards,
    amit m.

  • How to add a report into the SAP-SCRIPT .using PERFORM ......ENDPERFORM

    My question is that How to add a report into the SAP-SCRIPT .
    by using PERFORM ......ENDPERFORM
    I don't know how to used it .

    Hi Sandeep,
    Please check this link
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    http://www.allinterview.com/showanswers/37425.html
    Calling ABAP Subroutines: PERFORM
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: 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.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (u2018First pageu2019, u2018Next pageu2019, u2018Last pageu2019) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Best regards,
    raam

  • Conert  currency in sap script

    Hi experts,
      I have problem in SAP SCRIPT , I want to display currency in the PO currnecy format, How it is possible?
    we removed all comas and dots in the currency, now i want to display these values in the particular PO currency format.

    hi,
    Currency formatting is easy in reports, with the "currency" option in the statement.
    But in SAPscript, when no currency reference is set for an amount field, default formatting of two decimal places will occur. This may sometimes be unacceptable -- especially with exceptional currencies like 'JPY', 'KRW', 'LUF', 'TND,' etc. The default formatting affects not only the number of decimal places, but also the position of decimal point, which results in wrong amounts being displayed on the output.
    This can be prevented by setting the correct currency reference, using database structures that have amount fields with currency references. The amount has to be populated in a structure's amount field and proper currency key in the currency reference field and then using the structure's amount field in the layout set rather than using a global variable of type P.
    (e.g. Use of KOMK-FKWRT for populating the amount and KOMK-WAERK for holding the corresponding currency key. This will use the currency reference relation defined in the structure KOMK.)
    NOTE: This formatting works similarly even for the global variables defined with like reference to structure's amount field when the amount field's currency reference field is populated with the required currency key.
    Code
    Driver Program
    * Data Declaration
    DATA: NET_AMOUNT LIKE KOMK- FKWRT.
    * Code:
    KOMK- FKWRT = 234.50.
    NET_AMOUNT = 987.65.
    KOMK-WAERK = 'JPY'
    Layout
    &KOMVD-KERT&  =>      The output will be 23450
    &NET_AMOUNT&  =>      The output will be 98765
    &KOMVD-KERT& would have been printed as 234.50 if the currency key (KOMK-WAERK) were USD and as 23.450 if the currency key (KOMK-WAERK) were TND
    regards,
    Ashok Reddy

  • Sap script perform statement.

    hi all,
       i have a problem with modifying standard sap script form. i have added a field in the line item of my form using perform statement in sap script. but only the corresponding to last line item is getting displayed for all.please help me on this issue my code and sap script is as follows.
    **&      Form  material_wt
         -->IN_TAB     text
         -->OUT_TAB    text
    FORM MATERIAL_WT TABLES in_tab STRUCTURE itcsy
                            out_tab STRUCTURE itcsy.
      DATA : BEGIN OF IT_MAT OCCURS 0,
               ZEILE LIKE J_1IEXCDTL-ZEILE,
               MENGE LIKE J_1IEXCDTL-MENGE,
               MATNR LIKE J_1IEXCDTL-MATNR,
               NTGEW TYPE MARA-NTGEW,
             END OF IT_MAT.
      DATA : V_DOCNO TYPE J_1IEXCDTL-DOCNO,
             V_NTWT TYPE CHAR20.
           READ TABLE in_tab WITH KEY name = 'J_1IEXCDTL-DOCNO'.
           CHECK sy-subrc = c_zero.
           V_DOCNO = in_tab-value.
           SELECT ZEILE MATNR MENGE INTO CORRESPONDING FIELDS OF TABLE IT_MAT FROM J_1IEXCDTL
                                  WHERE DOCNO = V_DOCNO AND TRNTYP = '57FC'.
                   LOOP AT IT_MAT.
                         SELECT SINGLE NTGEW INTO IT_MAT-NTGEW FROM MARA WHERE MATNR = IT_MAT-MATNR.
                   modify it_mat.
                  ENDLOOP.
             loop at it_mat.
                       IF not it_mat[] IS INITIAL.
                       READ TABLE out_tab WITH KEY name =  'NETWT'.
                                  IF sy-subrc = 0.
                                    V_NTWT = IT_MAT-NTGEW * IT_MAT-MENGE.
                                        CONDENSE:V_NTWT.
                                    out_tab-value  =  V_NTWT.
                                    MODIFY out_tab INDEX sy-tabix.
                                  ENDIF.
                        ENDIF.
             endloop.
    endform.
    and my perform statement is as follows,
    /E  ITEM_VALUES
    /:   PERFORM MATERIAL_WT IN PROGRAM ZMM_RPT_CHALLAN
    /:   USING &J_1IEXCDTL-DOCNO&
    /:   CHANGING &NETWT&
    /:   ENDPERFORM
    I1  &J_1IEXCDTL-ZEILE&,,&J_1IEXCDTL-MATNR&,,&NETWT&

    answered

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

Maybe you are looking for

  • Rendering bugs on xf86-video-ati on GNOME Shell

    Hi guys. I have a problem with graphics rendering on Arch i686 installed on a bootable USB stick. To handle multiple devices I did pacman -S xorg-drivers. Unfortunately when I log in to GDM/GNOME shell the screen is full of artifacts - several icons

  • Add Internationalization into .EAR archive, I don't have NWDS project

    Hi all, I have deployed WebDYNPRO application on the portal server, so I have appropriate EAR file. Client ask for internationalization of this application, but I don't have project files in NWDS - application developed another developer ages ago. Is

  • Dump in smartform driver program for purchase order

    i created one smartform with driver program for purchase order. in smartfrom i gave form interface: p_ebeln as import,                        tables as it_ekpo like ekpo. global definitions are wa_ekko type ekko for printing the  ekko data in one win

  • How to clear iBooks data in iOS 8?

    Hi guys, After I upgraded to iOS8 and transferred data from my older iphone, iBooks data is about 800MB but I dont have anything in library. Even when I fresh sync it with my Mac nothing happened.    Anybody have solution to this? Thank you, Senaid

  • Awful new Network Map -- how can I get rid of it?

    The latest upgrade, to Network Magic  5.1, is awful.  There is a terrible new circular version of the Network Map.  Many of the devices now are listed off the screen on three pages.  The display is very confusing, with some devices on the screen, and