SUMMING command in SAPScript

Hello gurus,
I am trying to use the SUMMING command in SAPScript to output a total on each page of a transfer order.
According to the sap help, I need to declare the summing total variable within the print program using the TABLES statement, I'm trying to total LTAP-VSOLA so should I be declaring a table of this type? ANd if so, shouldn't I be using a DATA statement for this? I'm confused as to what the help actually means?
Has anyone used this statement before and have an example that I can see?
Thanks,
Ruby

Try like:
/: DEFINE &TOT_PRICE&
/: SUMMING &KOMVD-KBERT& INTO &TOT_PRICE&
or
/: DEFINE &SUM& TYPE NETWR and write in the loop
/ &SUM& = &SUM& + &BSEG-WRBTR&
and use this SUM field
normally I would prefer to calculate this kind of stuff in the print program. But I guess you are using the original SAP program.
Amit.

Similar Messages

  • Summing command is not getting the result

    Hi All,
    I am using summing command in my script to print page total on every page.
    I have used:
    SUMMING &ITAB_TDS-BASAMT& INTO &ZTDS-BASE_AMT&
    here itab-tds is my internal table which contains the line items..and ztds is the R/3 transparent table(global) in which the field base_amt is the currency typr field.
    But when I debud the script, i find that ZTDS-BASE_AMT does not get any values(inspite that itab_tds-basamt has values).
    I have declared ZTDS in the tables stmt in the print program(tables: ztds. )
    plz tell me how to get rid of this problem?
    Regards,
    Niyati

    Hi,
    I think this will solve your problem.
    - To use command SUMMING:
    /: SUMMING PROGRAM_SYMBOL INTO TOTAL_SYMBOL
    The PROGRAM_SYMBOL is the global variable you want to sum, TOTAL_SYMBOL is a variable defined in the sapscript:
    /: DEFINE TOTAL_SYMBOL = '0'.
    You should try to define TOTAL_SYMBOL just once (for example in a window you use only once).
    Reward points to all useful answers.
    Regards,
    SaiRam

  • What is use of Read-Text  command in Sapscript  plz replay

    What is use of Read-Text  command in Sapscript  plz replay
    i m geting problem with read-text command in sapscript as will as
    perform and endperform .

    Hi Majid,
              It's a function module to read the texts from a text file. Generally it is used to retrieve the long texts.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    OBJECT = ?...
    NAME = ?...
    ID = ?...
    LANGUAGE = ?...
    ARCHIVE_HANDLE = 0
    IMPORTING HEADER =
    TABLES LINES = ?...
    EXCEPTIONS ´
    ID =
    LANGUAGE =
    NAME =
    NOT_FOUND =
    OBJECT =
    REFERENCE_CHECK =
    WRONG_ACCESS_TO_ARCHIVE =
    Export parameters
    Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
    Reference field: SY-MANDT
    Default value: SY-MANDT
    OBJECT
    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
    Reference field: THEAD-TDOBJECT
    NAME
    Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
    Reference field: THEAD-TDNAME
    ID
    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
    Reference field: THEAD-TDID
    LANGUAGE
    Enter the language key of the text module. The system accepts only languages that are defined in table T002.
    Reference field: THEAD-TDSPRAS
    ARCHIVE_HANDLE
    If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
    The value '0' indicates that you do not want to read the text from the archive.
    Reference field: SY-TABIX
    Default value: 0
    Import parameters:
    HEADER
    If the system finds the desired text, it returns the text header in this parameter.
    Structure: THEAD
    Table parameters:
    LINES
    The table contains all text lines that belong to the text read.
    Structure: TLINE
    Exceptions:  
    ID
    The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
    LANGUAGE
    The parameter LANGUAGE contains a language key that does not exist in table T002.
    NAME
    The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
    Possible errors:
    The field contains only blanks.
    The field contains the invalid characters ‘*’ or ‘,’.
    OBJECT
    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
    NOT_FOUND
    The system did not find the specified text module.
    REFERENCE_CHECK
    The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
    WRONG_ACCESS_ TO_ARCHIVE
    The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
    Br,
    laxmi.

  • About BOX control command in SAPScript.

    Hi,
    I am using the BOX control command in SapScript.
    Is it possible to assign the values of Xpos and Ypos dynamicalliy.
    In BOX XPOS 16 CH WIDTH 0 MM HEIGHT 18 MM FRAME 10 TW,
    i want to assign the values at runtime, instead of
    xpos 16 , something like Xpos Var, where var contain the value of xposition.

    Hi,
       We cant give the dynamic value in runtime . It should be static.
    Regards,
    Saran

  • Summing command in script

    hi experts,
         anybody knows how to use summing command in script.
    pl explain with an example.
    Thanks!
    Edited by: Ranganayahi Chandirasekaran on Mar 6, 2008 12:58 PM

    Hi Chandirasekaran,
    Try the following link,
    Link: [http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm]
    Reward if helpful.

  • Reg INCLUDE command in SAPscript

    Hi Folks,
       Can anybody tell me is it possible to give tab in INCLUDE command in SAPscripts.
       What I mean is I want to display standard text after few spaces.
       Thanks in Advance
       Punit

    Hi Punit,
          You cannot give tabs for INCLUDE command. On the other hand you can read the text in your print program using READ_TEXT function module. You can modify the text using SAVE_TEXT and send it to the SAPScript for output.
    With Regards,
    Nelson

  • ADDRESS Command in SAPScript

    Dear all,
    I'm using ADDRESS ~ ENDADDRESS command in SAPScript. I pass street name to STREET as follow
    NAME name1 name2 name3 name4
    STREET &LFA1-STRAS&
    With the above, my street can be displayed out correctly.
    But i faced problem when i have street2 street3 and street4, like below:
    NAME name1 name2 name3 name4
    STREET &LFA1-STRAS& , &ADRC-STR_SUPPL1& , &ADRC-STR_SUPPL2& , &ADRC-STR_SUPPL3&
    With above, nothing printed for street.
    Could you please point me out where did i code wrong?
    Or we can not pass street2/3/4 to STREET?
    Thank you.

    Hi,
    Just Refer this:
    https://forums.sdn.sap.com/click.jspa?searchID=12447471&messageID=2301405
    Check the below link for details on Text Elements
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802e91454211d189710000e8322d00/content.htm
    Regards,
    Shiva Kumar

  • Enquiry in summing command

    Hi,
      Can any one help in doing SUMMING command in Sap script.
      I want to sum the &MSEG_MENGE& quantity field.
      plz give me code with MSEG_MENGE.
      Pooja

    Hi.
    You specify the SUMMING command in this way
    /: SUMMING &MSEG_MENGE& INTO &SUM_MENGE&
    You have to specify this command only once. Every time &MSEG_MENGE& will be processed it will be added to &SUM_MENGE&.
    See also
    http://help.sap.com/saphelp_47x200/helpdata/de/d2/cb3d07455611d189710000e8322d00/frameset.htm
    Regards,
    Timo.

  • Copying sum total in sapscript

    Hi Experts,
    we have a customer invoice print in sapscript. In this we calculate the sum total in the end of the script .
    My question is how to copy the same sum total to be displayed in the first page of the script.
    Thanks in advance..

    Hii
    put the summation filed in the first page of script
    regards
    Jaipal

  • Please let me know how to use ++HLN text CVR command in sapscript

    Hi,
       does any one know how this ++HLN number CVR command need to implement in sapscript?
    Regards,
    Challa.

    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • ADDRESS ENDADDRESS command in SAPScript

    Hi Gurus,
    How does address endaddress command works in SAPscript.
    I want to use it in SAPscript as
    ADDRESS
        ADDRESSNUMBER <LFA1-ADRNR>
        FROMCOUNTRY 'US'
    ENDADDRESS.
    I have gone through the documentation of ADDRESS_INTO_PRINTFORM but still not clear of the sequence.
    Want to know, what will be the sequence in which address will be printed from above command and how does it determine this.
    Appreciate your help.
    Thanks,
    Kartavya

    Hi,
         Read Below documentation
           The ADDRESS - ENDADDRESS control command formats an address according to the postal convention of the recipient country defined in the COUNTRY parameter. The reference fields are described in the structures ADRS1, ADRS2, or ADRS3, depending on the type of address. Either direct values or symbols may be assigned to the parameters.
    Syntax:
    /: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a] [PRIORITY p] [LINES l]
    /: TITLE title
    /: NAME name1[,name2[,name3[,name4]]]
    /: PERSON name of natural person [TITLE form of address]
    /: PERSONNUMBER number of the personen
    /: DEPARTMENT department
    /: STREET street name HOUSE house number
    /: LOCATION additional location information
    /: POBOX po box [CODE post code / zip code] [CITY city]
    /: POSTCODE post code / zip_code
    /: CITY city1[,city2]
    /: NO_UPPERCASE_FOR_CITY
    /: REGION county / state
    /: COUNTRY recipient country [LANGUAGE language code]
    /: COUNTRY_IN_REC_LANG
    /: LANG_FOR_COUNTRY language key
    /: FROMCOUNTRY sender country
    /: ADDRESSNUMBER address number
    /: ENDADDRESS
    The parameter values contain both formatting and address information. The address data are formatted for output according to the data in the following parameters:
    TYPE
    FROMCOUNTRY
    COUNTRY
    LANGUAGE
    PRIORITY
    DELIVERY
    LINES
    If DELIVERY is not specified and if a POBOX is specified, then the POBOX is used in an address instead of a STREET.
    Regards
    Bala Krishna

  • Include command in SapScript to fill in a local field

    Dear all,
    Normally when we are using the INCLUDE SAPscript command, the system is printing the information retrieved.
    My question is, if someone of you know, whether is possible to put the information retrieved into a local field, defined as DEFINE &wa_localfield& := include &tdname& object vbbk ...
    Many thanks in advance !
    Rgds., Anton

    No, that is not possible using the INCLUDE statement.
    Welcome to SDN!
    Regards,
    Rich Heilman

  • Include command in Sapscript

    Dear all,
    I've added an include command in the main window of my sapscript in order to display text object in my forms. THe thing is that I would like to be able to position the free text not on the left of the windows but in the middle of it. But it seems that I can't use tab strip with the include command.
    /: ,,,,include &VBDPA-TDNAME& OBJECT VBBP ID 0002 Language en does not work for instance.
    Any idea?
    Regards.
    NC.

    Hi,
    Do one thing I am not sure that this will serve your purpose.
    Create one new window and place it on your main window where you want to print that text.
    In that created window INCLUDE your text object and make that window as CENTER justification in paragraph format.
    Here you will face one problem with size of the window.
    That is if your TEXT exceeds your window width or height then the TEXT will be truncated.
    So you need to take care of it.
    Try with this i hope it will solve your issue.
    Thanks.

  • Rightfax commands in Sapscript/Smartforms

    Hi,
    We are using RIGHTFAX with SAP ECC 5.0 for fax sending functionality.
    I have read all the threads related to RIGHTFAX functionality but would like to have answers for the following.
    1) Where exactly in a SAPSCRIPT / SMARTFORM form do I add the fax control commands (FCL Commands)so that RIGHTFAX connector for SAP R/3 recognise them?
    For eg: I want RIGHTFAX to include a particular cover sheet.For that I need to write the fax control command RFSAP_FCSFILE:file name. But where do I write that inside sapscript/smartform?
    Thanks,
    Bhaskar Pal.
    This message is not answered.Somehow it is showing as being answered already. I would appreciate your help/input on this issue. Please respond.

    Hi.  First try to set your post as unsolved.  There should be a radiobutton on the left of your post to do so.
    TO answer your questions,  what you need to do is to create a page, this page will be printed first.  Put your FCL commands in this page.  When the document is send to the printer device(the one setup for RIGHTFAX), it will have this coding on the first page.  Once it reaches RightFax,  the software will recognize that there is FCL code on this page and will except it, get the values, apply them, and then it strips off this first page.  This is good because we don't want the end user to see this anyway.  So, create a page in your sapscript called FAXPAGE,  put your commands in there and always start your printing at this page. 
    Regards,
    RIch Heilman

  • Sha one sum - command not found

    Question: how to extract the key from a sha 1.
    I have been trying to work with sha 1 sum in lower case, and upper case and the replay i receive back is the command not found.
    <code>
    $ sha1sum /file/path
    -bash: sha1sum: command not found
    SHA1SUM /file/path
    SHA1SUM: command not found
    $ SHA1 /file/path
    SHA1: command not found
    $ sha1 file/path
    sha1: command not found
    </code>
    I did some search and there was the suggestion to use:::
    openssl sha1 <path/filename.ext>,
    and that worked to some degree with the options.
    Yet i still cannot get a key from the digest or file to play, match keys.
    any suggestions ?.
    Thank you

    Do you just want the sha1 digest value?
    openssl sha1 tmp.tmp
    SHA1(tmp.tmp)= 154848670fbf9c7b81ee88dc22c33fb2a28ad8c7
    for example:
    digest=$(openssl sha1 tmp.tmp)
    digest=${digest/*= /}
    echo $digest
    154848670fbf9c7b81ee88dc22c33fb2a28ad8c7
    You can use "man openssl" to find out more about the command, however, you might find more information via a google search on sha1 digests.
    PS. To enter code in the forums, you use a pair of idential tags:
    ... your code here ...
    {code}
    Message was edited by: BobHarris

Maybe you are looking for

  • How do I prevent Firefox from installing a new version when I click on the "Check for New Version" button? And why does it even do this?

    I check for updates manually and this is frustrating because I can't stop it once it starts. There is no "Cancel" button or anything that will stop the update. "Check for updates" does not mean "Install updates"

  • Error message when trying to install Skype on E72-...

    Trying to Re-install Skype on my Nokia E72-1. After doing a Hardware reset It disappeared from my Apps. Now get the following message on Nokia Suite when I try to install it via PC using Nokia Suite. "Could not install this file" "There was a problem

  • 10.6.8 update + Time Machine = Finder crashing ;-(

    Hi All, After installing the 10.6.8 update to my Mac Pro, Time Machine will hang on the "Cleaning up" process. Time Machine cannot be exited from the Menu Bar. The finder may hang during this process, if "Force Quit", the finder cannot be relauched.

  • IPCC Error [12005]

    Hello, We have been getting this error on and off when someone logins to CTIOS desktop. the error is IPCC Error [12005]Login could not be performed - Possible causes are Invalid Instrument; Media Termination Problem or other CM issue. This error can

  • How to open a active dataguard?

    Hello, I have an Active DataGuard, Oracle version 11.2.0.3 and Solaris 10. I have to do a test on the Active DataGuard environment, I want to open this database to run multiple scripts DML. At the end I must return to the DataGuard active as it was b