Logic to make decimal to integer in sap program?

Hi,
I have a question on make the decimal number to integer .
For example:
I need to make the number 4.0 to become 4 .
How can I make that?
Please help.

Just do the MOVE.
DATA: d_out TYPE i.
PARAMETERS: p_in TYPE p DECIMALS 2.
MOVE: p_in TO d_out.
WRITE:/ d_out.
It will automatically rounded the result.  40.5 ->41
Jeffrey

Similar Messages

  • How to make cross Tab report for SAP B1

    Hello and Hi
    i trying to make cross tab report for SAP B1 but test column not appera in
    File >>New >>Cross Tab Report  start cross tab report creation wizard select database name and table
    but only numeric columns appear in available column fields , how will appearall fields including test fields..

    i got solution
    thanks google
    memo type field will not apper in list .use bellow  statment to convert in interger or char type
    convert(int,U_Dist_Sr_No) AS Dist_Sr,            CAST(U_Dist_Name AS varchar(250)) AS Dist_Name,

  • Apache Compilation Problem: makes pointer from integer without a cast -HELP

    Every time I try to compile apache with ssl I get this error message below. I'm pulling my hair out over it! I've installed current versions of gcc, libgcc, glib, make, m4, & flex.. which havent helped. I am running Solaris 9 sparc.
    I'm honestly baffled by this error and have found no help on the web. Does anyone know what I need to do in order to fix this? Any specific libraries I need to install etc??
    <apache compiles up to this point>
    gcc -c -I../../os/unix -I../../include -DSOLARIS2=290 -DMOD_SSL=208116 -DEAPI -DUSE_EXPAT -I../../lib/expat-lite `../../apaci` -fPIC -DSHARED_MODULE -DSSL_COMPAT -DSSL_ENGINE -I/tmp/web/sweeney/Third_Party/apache/openssl-0.9.7d/include -DMOD_SSL_VERSION=\"2.8.16\" ssl_expr_scan.c && mv ssl_expr_scan.o ssl_expr_scan.lo
    lex.ssl_expr_yy.c:1900: parse error before numeric constant
    lex.ssl_expr_yy.c: In function `ssl_expr_yy_scan_string':
    lex.ssl_expr_yy.c:1901: number of arguments doesn't match prototype
    lex.ssl_expr_yy.c:293: prototype declaration
    lex.ssl_expr_yy.c:1903: warning: passing arg 1 of `strlen' makes pointer from integer without a cast
    lex.ssl_expr_yy.c:1903: warning: passing arg 1 of `ssl_expr_yy_scan_bytes' makes pointer from integer without a cast
    make[4]: *** [ssl_expr_scan.lo] Error 1
    make[3]: *** [all] Error 1
    make[2]: *** [subdirs] Error 1
    make[2]: Leaving directory `/tmp/apache_1.3.29/src'
    make[1]: *** [build-std] Error 2
    make[1]: Leaving directory `/tmp//apache_1.3.29'
    make: *** [build] Error 2
    they key being, "makes pointer from integer without a cast"
    Help me Obi Wan Kenobi, you're my only hope! Thank you much!

    I retried, here is the screen output:
    util.c: In function `ap_find_token':
    util.c:1367: error: `test_char_table' undeclared (first use in this function)
    util.c:1367: error: (Each undeclared identifier is reported only once
    util.c:1367: error: for each function it appears in.)
    util.c:1367: error: `T_HTTP_TOKEN_STOP' undeclared (first use in this function)
    util.c: In function `ap_escape_logitem':
    util.c:1444: error: `test_char_table' undeclared (first use in this function)
    util.c:1444: error: `T_ESCAPE_LOGITEM' undeclared (first use in this function)
    util.c: In function `ap_escape_errorlog_item':
    util.c:1496: error: `test_char_table' undeclared (first use in this function)
    util.c:1496: error: `T_ESCAPE_LOGITEM' undeclared (first use in this function)
    util.c: In function `ap_escape_shell_cmd':
    util.c:1567: error: `test_char_table' undeclared (first use in this function)
    util.c:1567: error: `T_ESCAPE_SHELL_CMD' undeclared (first use in this function)
    util.c: In function `ap_escape_path_segment':
    util.c:1671: error: `test_char_table' undeclared (first use in this function)
    util.c:1671: error: `T_ESCAPE_PATH_SEGMENT' undeclared (first use in this function)
    util.c: In function `ap_os_escape_path':
    util.c:1700: error: `test_char_table' undeclared (first use in this function)
    util.c:1700: error: `T_OS_ESCAPE_PATH' undeclared (first use in this function)
    *** Error code 1
    make: Fatal error: Command failed for target `util.o'
    Current working directory /source/apache_1.3.33/src/main
    *** Error code 1
    make: Fatal error: Command failed for target `subdirs'
    Current working directory /source/apache_1.3.33/src
    *** Error code 1
    make: Fatal error: Command failed for target `build-std'
    Current working directory /source/apache_1.3.33/
    *** Error code 1
    make: Fatal error: Command failed for target `build'
    Current working directory /appl/apa_ssl/apache_1.3.33/src
    *** Error code 1
    make: Fatal error: Command failed for target `build-std'
    Current working directory /appl/apa_ssl/apache_1.3.33
    *** Error code 1
    make: Fatal error: Command failed for target `build'
    root@host #
    the include-line in util.c is:
    #include "test_char.h" (vi: line 43)
    file exists:
    -rw-r--r-- 1 root other 0 Nov 8 16:02 test_char.h
    but, as you can see, it is empty

  • Transaction associated with std SAP Program

    Hi friends,
    I have a custom transaction ZR01 and there is and associated abap program to this which is a std SAP program starting with GP3E*. This program although a std program has been stored as a local object. The report program has a few commented lines in the beginning of the report as follows
       user
       date
       time
       release
    These lines get updated with the name of the last changed author and the date and time at which changes were made.
    Now my doubt is under what circumstances does this comment line gets updated ?
    I tried to make some changes in the transaction to see if there is any update happening but that did not have any effect.
    Hope my query is clear.
    All your valuable inputs are appreciated.
    Thanks in advance.
    Rgds,
    Gayathri.

    o.k. Gayathri
    I think, the commented lines about which you are asking are:
    this is a development/modification log maintained manually by the last user. I mean, if you make these changes to this report using access key, you should (not necessarily) update this modification tag (may be as part of following some standards in your company) so as to provide this information: who was the last mofifier of this report and when it was last modified.
    So, i think, there is no programming logic behind it. Thats also the reason, it didn't change when u modified it
    Regards
    Ashish

  • How to call a Standard SAP Program in Zprogram.

    Hi,
    how to call a SAP Standard program in SAP Program?
    Do we have to use any funtion module and pass paramters?
    I want to call a Standard SAP prg in to my prgram? can anyone explain me or give the piece of code to call standard prg.
    Thanks & Regards

    Again, ABAP related questions should be asked in the ABAP forum.
    To answer you question,  if the standard program is a report program, you can use the SUBMIT statement and pass parameters using the WITH Extention.
    Submit <report>
          with p_fld = 'X'
              and return.
    Please make sure to award points for helpful answers and mark your posts as solved when solved completely.  Thanks.
    Regards,
    RIch Heilman

  • User Exit that will allow the SAP program to create DN, but not create IDO

    Hi all,
    The requirement is when we select 1 PO in VL10g transaction and click the u201CBackgroundu201D button, the user exit will allow the SAP program to create Delivery Number, but not create IDOC for the Delivery Number to send it to warehouse system.  Also the created Delivery Number must be in changeable mode in ECC system .I need to find any exit to make the DN table field LIKP-VLSTK not to be u201CBu201D (distributed).  The B will make DN not changeable in ECC system which is hard coded value in standard program. so the DN should be changeable.
    Please suggest me the User Exit name which serves my purpose.
    Thanks in advance
    Latha.

    Welcome to SCN!
    Here is some code that will allow you to find exits and BADIS on your own:
    [Code To Find BAdi|https://wiki.sdn.sap.com/wiki/display/ABAP/CodeToFind+BAdi]
    Rob

  • Unable to write to a UNC path from a SAP program

    Hi All
    We have just migrated our first server in an OS/DB migration from UNIX to Windows and the developers are trying to convert all our jobs/programs in SAP to write to Windows UNC paths instead of unix directories but we cannot get it to write files to the UNC paths.
    OS = Win 2008 SR2
    DB = Oracle 11.2
    SAP = ERP 6 / ECC 6
    Example path =
    hostname.domainname\directory$
    Can anybody help us please.
    Thanks
    Steve

    Thanks Tony & Manuel
    We believe that we have checked and rechecked all the necessary permissions on the share itself and we know we can resolve the FQDN from the SAP server. The server team here were able to monitor which user SAP was using to try and access these shares and it turns out to be the service account SAPService<SID>. Which surprised me a bit as I thought it would be <sid>adm. Next we tried logging into the SAP server as SAPService<SID> and mapping the UNC path and we were able to write to it so the inference is that the permissions are OK.
    I was wondering if there's something within SAP itself that we need to turn on to make it understand UNC paths. We ran function module EPS_GET_DIRECTORY_LISTING in SE37 and were able to read from the UNC path. But as yet we can't get any of our SAP programs to write to them.
    Thanks
    Steve

  • Enhancing a SAP program

    Hi,
    We are using an standard SAP program and now we have a requirement of adding "lower case" to one of the select-options.
    Please suggest me how to do the same. Thanking you in advance.
    Regards,
    Lakshminarasimhan.N

    Hi,
    i guess you need to copy this standard SAP code into Z program and make the changes in this as per the requirement.

  • How user exits attached to SAP programs ?

    How are user exits attached tp SAP programs ?
    Is it through CALL FUNcTION 'Some-EXIT-NAME'
    Now I know that in my case a user exit EXIT_SAPLCOIH_009 is implemented for transaction IW32. I am turning debugger on by using /H and then clicking on save event in IW32 when the user exit gets triggered.
    Then I set break-point for CALL Function inside the debugger.
    But I can't see CALL FUNCTION 'EXIT_SAPLCOIH_009' in the debugger of transaction program....
    So I am just wondering is it this way the user exit is hanged to program. Please throw some light on this....

    I would say that most are implemented as function modules which are usually called by something like this.
    CALL CUSTOMER-FUNCTION 'WHATEVER'
    Some are implemented as includes, like the ones for Sales Document Processing.
    In your case, it is a function module, EXIT_SAPLCOIH_009 which is probably called by CALL CUSTOMER-FUNCTION '009', or something to that effect, somehow it translates to EXIT_SAPLCOIH_009.  Also there must be a "Z" include in the function module EXIT_SAPLCOIH_009.  Double click the include, system will ask you if you want to create it.  Say yes.  Now put a break-point in the include.  Make sure to activte the enhancement in SMOD/CMOD.  Run your main program,  It should stop at your break point.
    Regards,
    Rich Heilman

  • How to find CUSTOMER EXIT for a Standard SAP program

    How to find CUSTOMER EXIT for a Standard SAP program

    Hi
    To introduce the techniques of enhancement in standard SAP system. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
    They do not affect standard SAP source code.
    When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.
    They do not affect software updates.
    When you add new functionality to your SAP System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.
    Customer exits are not available for all programs and screens found in the SAP System.
    Any change made to an SAP object in a customer system is called a modification. Customers usually modify their systems for one of two reasons. Either they make changes to the SAP standard in order to adjust the R/3 System to their specific business needs (actual modifications), or they alter individual SAP objects in order to correct an error (as recommended in an SAP error note).
    You should only modify the SAP standard if the modifications you want to make are absolutely necessary for optimizing work flow in your company. Be aware that good background knowledge of application structure and flow are important prerequisites for deciding what kind of modifications to make and how these modifications should be designed.
    SAP application programmers create SAP enhancements in transaction SMOD using function module exits, menu exits, and screen exits.
    Customers are given a catalog containing an overview of existing SAP enhancements. They can then combine the SAP enhancements they want into an enhancement project using transaction CMOD.
    SAP enhancements are made up of component parts. These components include function module exits, menu exits, and screen exits. A specific component may be used only once in a single SAP enhancement (this guarantees the uniqueness of SAP enhancements).
    Customer enhancement projects consist of SAP enhancements. Each individual SAP enhancement may be used only once in a single customer enhancement program (this guarantees the uniqueness of a customer project).
    SAP application programmers preplan function module exits, menu exits, and screen exits for their applications and combine them to create useful enhancements for the R/3 System.
    Customers create their own enhancement projects for their systems using SAP enhancements. You can customize the individual components of an enhancement project by creating your own include programs (for function module exits), texts (for menu exits), and subscreens (for screen exits).

  • Fetching of multiple files from Application Server into SAP Program

    Hi All,
    I have a issue related <b>Fetching of multiple files from Application Server into SAP Program</b>.
    Actual issue is as below.
    In the <b>selection screen</b> of <b>my program</b> i will give <b>Application Server Path</b> as :
    <b>/PW/DATA/SAP/D1S/PP/DOWN/eppi0720*</b>
    Then the based on above input it should pick up all the files that are matching <b>eppi0720*</b> criteria.
    Suppose if i am having <b>5</b> files with above scenario, i have to fetch all those <b>5</b> files at a time and place in my SAP Program.
    All those 5 file's data should come into SAP at a time.
    Can anybody tell me how can we solve above issue.
    If any body has come across same issue please provide me with solution.
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    If you want to get around the authorization check, you can do something like this.
    report zrich_0001 .
    parameters: p_path type epsf-epsdirnam
                      default '/usr/sap/TST/SYS/global'.
    parameters: p_file type epsf-epsfilnam default 'CO*'.
    start-of-selection.
    perform get_file_list.
    *       FORM get_file_list                                            *
    form get_file_list.
      types: name_of_dir(1024)        type c,
             name_of_file(260)        type c,
             name_of_path(1285)       type c.
      data: begin of file_list occurs 100,
              dirname     type name_of_dir,  " name of directory. (possibly
                                             " truncated.)
              name        type name_of_file, " name of entry. (possibly
                                             " truncated.)
              type(10)    type c,            " type of entry.
              len(8)      type p,            " length in bytes.
              owner(8)    type c,            " owner of the entry.
            mtime(6)    type p, " last modification date, seconds since 1970
              mode(9)     type c, " like "rwx-r-x--x": protection mode.
              useable(1)  type c,
              subrc(4)    type c,
              errno(3)    type c,
              errmsg(40)  type c,
              mod_date    type d,
              mod_time(8) type c,            " hh:mm:ss
              seen(1)     type c,
              changed(1)  type c,
            end of file_list.
      data: begin of file,
              dirname     type name_of_dir,  " name of directory. (possibly
                                             " truncated.)
              name        type name_of_file, " name of entry. (possibly
                                             " truncated.)
              type(10)    type c,            " type of entry.
              len(8)      type p,            " length in bytes.
              owner(8)    type c,            " owner of the entry.
            mtime(6)    type p, " last modification date, seconds since 1970
              mode(9)     type c, " like "rwx-r-x--x": protection mode.
              useable(1)  type c,
              subrc(4)    type c,
              errno(3)    type c,
              errmsg(40)  type c,
              mod_date    type d,
              mod_time(8) type c,            " hh:mm:ss
              seen(1)     type c,
              changed(1)  type c,
            end of file.
      call 'C_DIR_READ_FINISH'             " just to be sure
           id 'ERRNO'  field file_list-errno
           id 'ERRMSG' field file_list-errmsg.
      call 'C_DIR_READ_START' id 'DIR'    field p_path
                              id 'FILE'   field p_file
                              id 'ERRNO'  field file-errno
                              id 'ERRMSG' field file-errmsg.
      if sy-subrc <> 0.
        sy-subrc = 4.
        exit.
      endif.
    * Read the file list and add to internal table.
      do.
        clear file.
        call 'C_DIR_READ_NEXT'
          id 'TYPE'   field file-type
          id 'NAME'   field file-name
          id 'LEN'    field file-len
          id 'OWNER'  field file-owner
          id 'MTIME'  field file-mtime
          id 'MODE'   field file-mode
          id 'ERRNO'  field file-errno
          id 'ERRMSG' field file-errmsg.
        if sy-subrc =  1.
          exit.
        endif.
        append file to file_list.
      enddo.
    * Write out the file list
      loop at file_list.
        write:/ file_list-name.
      endloop.
    endform.
    Regards,
    Rich Heilman

  • Need to start a program in Oracle System (External) from sap program

    Hi guys,
         I need to start a program in another oracle based system from sap program by writing native sql statements.
    Does anyone have idea how to do this.
    Rgds,
    Ram

    Hi,
    Here is another sample for procedures.Kindly reward points by clicking the star on the left of reply,if it is useful.
    Code Sample for writing a procedure with input and output parameters
    REPORT zzz_jaytest.
    * Getting the regno and total as input parameters
    PARAMETERS : p_regno(10) TYPE c DEFAULT 'R1000',
                               p_total     TYPE i.
    data : v_total type i.
    * In this procedure, we are updating the total of a regno given as input.
    * Here two parameters used in the procedure are input parameters.
    * We are updating the record of regno entered in selection screen and
    * adding the total entered to the already existing total. We have to give semicolon
    * for the statement inside procedure.
    exec sql.
    CREATE or replace PROCEDURE PROC1 ( p_regno in char, p_total in number )
    IS
        BEGIN
          UPDATE stu_det SET total = total + p_total where regno = p_regno;
        END;
    endexec.
    * This is the code to execute the procedure for update.
    * While executing the procedure, the parameter variable should be
    * preceded with colon  :
    EXEC SQL.
      EXECUTE PROCEDURE PROC1 ( in :p_regno, in :p_total )
    ENDEXEC.
    * In this procedure, we are selecting the details for the regno entered
    * as input. Here p_regno is input parameter and v_total is used as output
    * parameter. So that we can use the retrieved value of v_total in our
    * ABAP program
    exec sql.
    CREATE or replace PROCEDURE PROC2 (p_regno in char, v_total out char)
    IS
        BEGIN
          select total into v_total from stu_det
                             where regno = p_regno;
        END;
    endexec.
    * This is the code to execute second procedure.
    EXEC SQL.
      EXECUTE PROCEDURE PROC2 ( in :p_regno, out :v_total )
    ENDEXEC.
    write : / 'Total of ', p_regno, ' is ', v_total.

  • Loading records from .csv file to SAP table via SAP Program

    Hi,
    I have a .csv file with 132,869 records and I am trying to load it to an SAP table with a customized SAP program.
    After executing the program, only 99,999 records are being loaded into the table.
    Is there some setting to define how many records can be loaded into a table? Or what else could be the problem?
    Pls advice.
    Thanks!!!

    hi Arun ,
    A datasource need a extract structure to fetch data .It is nothing but a temp table to hold data.
    First you need to create atable in SE11 with fields coming from CSV file.
    Then you need to write a report program to read you CSV file and populate your table in BW .
    Then you can create a datasource on top of this table .
    After that replicate and load data at PSA and use to upper flow.
    Regards,
    Jaya Tiwari

  • How to find out Which SAP programs are affecting Which Z programs?

    Do we have a program/tool that can tell us the following:
    How to find out Which SAP programs are affecting Which Z programs in the entire development server?  
    We have a list of SAP programs and a list of custom u2018zu2019 programs, which ones impact each other?   I know we have a u201Cwhere usedu201D functionality, however that is at the object by object level. 
    We need are looking for something a little larger u2013
    thanks in advance
    Vishnu

    Do we have a program/tool that can tell us the following:
    How to find out Which SAP programs are affecting Which Z programs in the entire development server?  
    We have a list of SAP programs and a list of custom u2018zu2019 programs, which ones impact each other?   I know we have a u201Cwhere usedu201D functionality, however that is at the object by object level. 
    We need are looking for something a little larger u2013
    thanks in advance
    Vishnu

  • Z search field in standard sap program

    Hi,
    I would like to ask if Z search field can be created in the standard SAP program.
    Basically I need modify the search field used when searching for Business area in creation of asset master data (tr. AS01).
    It shows the list of table tgsbt.  But I would like to exclude by default some rows of the table and also would like to sort it in different way (by text).
    Is that possible, if so, could anyone give me a hint how to do that?
    Many thanks,
    Honza

    Hi Jan,
    Please go thorugh the below link.
    http://wiki.sdn.sap.com/wiki/display/Snippets/ImplementingSearchHelp+Exits

Maybe you are looking for

  • How do I make multiple slideshows on multiple displays?

    I've got 2 x 30" displays, and the new Mac Pro on lend to me for a gallery showing. Whats the best way to make 2 different slideshows (HD) to play on each individual monitor at the same time?

  • Network Solutions email wont fetch after upgrading to IOS 6.1.2.

    Ever sinceI upgraded my IOS to 6.0 I have been having problems with one of my NetSol email accounts on my iPhone 5. I have two netsol email accts and one me.com acct on the phone. I have had no problems with the me.com and one of my netsol accts but

  • Sales analysis report - in query form?

    Good afternoon. Looking for a bit if help/advice. I'm not a complete novice to SAP but what I need is confusing me slightly. I understand the sales analysis report uses many different table as part of its calculations. A company I've recently began w

  • Optimize SWC

    I am creating an SWC library that I like to distribute to a third party developer. And I like to optimize the SWC beforehand so that even if the other developer fail to optimize his/her final SWF, my library will still perform at maximum efficiency.

  • The MDX function CURRENTMEMBER failed because the coordinate for the attribute contains a set

      How to handle this error: The MDX function CURRENTMEMBER failed because the coordinate for the attribute contains a set. when executing MDX query: SELECT ( { [Measures].[Amount]} )ON COLUMNS, [OrganizationUnits].[Description].[Description].MEMBERS,