Packed type

Hi experts
       I am using this field  
       bdmng LIKE resb-bdmng,          *  0.010
       iamng LIKE afpo-iamng,            * 150
      it_final-iamng = it_final-bdmng / it_final-psmng.
       when i do calculations in program the result of iamng
        is supposed to  6.66667E-05, but it assigns iamng = 0.
       but iamng takes Zero, i don't know why, is this problem with packed type.
       how to solve this problem and declare this decimal places.
      Thanks in advance.
Regards
Rajaram

no collect is working for some data with quan field ,
but some of the cases it is not working, i don't know why.
see this error description.
An exception occurred. This exception will be dealt with in more detail               
below. The exception, assigned to the class 'CX_SY_ARITHMETIC_OVERFLOW', was          
  not caught, which                                                                    
  led to a runtime error. The reason for this exception is:                            
The COLLECT statement stores totals in the internal table                             
  "\PROGRAM=Z_PGM\DATA=IT_FINAL[]",                                                    
but the values are too large for the type P field intended to store them              
The name of the field is "BDMNG".

Similar Messages

  • How to differentiate a packing type for Finished goods based on which customer will be invoiced ?

    I need a little expertise
    The requirement for my organization is Certain Finish goods packing.
    Currently certain, Finished goods packaging items when send to Customer, is charged for the packaging items like Pallets , Q- Bit Boxes.
    There will be a deposit fee which will appear on the customer invoice.
    Moving forward they want to eliminate that deposit fee, from the customer invoice for a few of the packaging types.. (For example Pallet we would still charge the customer the same way AS_IS today but for another pack type Q-BIT boxes customer should not be charged as a deposit fee for returing the pack type.)
    From Materials management perspective… At the time of order entry how do we differentiate a particular pack type so that for that a particular Pack type customer is not charged anything…
    2 options I am thinking is introduce a new characteristics in Classification view for PK type.. Upon entering the order the User exit will check the characteristic in material master and customer invoice won’t be charged for the Packing item if Pack type = Q Bit..
    Other one is  From the  Alternate Unit of Measure translation to Common Unit of measure / Sales Unit of measure.
    Which one would you recommend ?
    Pls advise.

    Hi Joe,
    What I was suggesting was to have different material codes per pack size. If this is done, you will not need to modify anything, other than maintain condition types for the correct material codes.
    In case you are leaning towards the classification approach, I will suggest having a custom calculation type added to include  RV64ANNN with a check of the characteristic on a custom table. In this table, maintain the pack sizes with should be charged. The logic should turn  XKOMV-KBETR = 0 if the pack size is not found in the table.

  • @ Decimal Places in Packed Type Variable

    How to check if a packed type variable has decimal placed or not?

    Hi,
    Try to use the statement DESCRIBE. See the help to understand the usage. The syntax is:
    DESCRIBE FIELD <field> DECIMALS <dec>.
    This will show the number of decimals place.
    Then, you can use a condition to test.
    Regards
    RP

  • Is Apple Working on A Leopard "Service Pack" type update?

    I am sorry if this is a redundant post. Is anyone aware of whether or not Apple is working on a "Service Pack" type update for Leopard?

    Sorry, but no one here knows or can say (anyone who would know would be under nondisclosure). But experience shows that Apple is always working on improving their OS releases; that's why 10.4 is up to release 10, constant work in improvements. So I think we can be sure that Apple is working on fixes and improvements to 10.5 as well. When any update will appear is unknown, but as an example, the first update to 10.4 came out about three weeks after 10.4 first shipped.

  • Problem in packed type?

    Hi all,
    i have small problem,iam getting data  which should be check is it packed data or not for that how can i do it? please send different types off ways i can check.................
    my requirement is if the data is not a packed data then i have to catch the exception in try and catch method.
    note:useful ans will be rewarded
    regards,
    phani

    data:  w_pck type p decimals 2.
    data:  typ(2) type c.
    describe field w_pck type typ.
    if typ NE 'P'.
    message 'Not Packed type' type 'E'.
    endif.
    write:/ 'TYPE: ', typ.
    Reward if useful
    Regards
    Prax

  • Packed type in se11

    Hi All,
    I want to create one structure with packed type fields.Could anybody tell me how to define it.
    Regards
    Lalit

    Hi Lali,
      U can try with Decimal fields.
    Regards,
    Sri

  • Convert Char to Packed type

    Hi,
    I have a character variable which holds the value for eg as '1,234.56'
    Now i need to pass this value to an import parameter in a Function moudle .(But this parameter is of packed type).
    Now how can i convert  a character variable to a packed type ?
    Thanks!

    Hi,
    Try:
    CALL FUNCTION 'MOVE_CHAR_TO_NUM'
               EXPORTING
                 CHR             = LWA_INPUT_FILE-CRAMT
               IMPORTING
                 NUM             = NUM
               EXCEPTIONS
                 CONVT_NO_NUMBER = 1
                 CONVT_OVERFLOW  = 2
                 OTHERS          = 3.
    Thanks,
    Krishna

  • About packed type variable declaration

    Hello friends
                      I need a small info related to pack numbers.
    i'm declaring these things in routine creation .
    ok . suppose if i declared
    data: A type p decimals 8 value '1.1245678'.
    its taking tht value as 0.11245678. in this format .. i'm unable to get  this thing .. please help me out .

    try a comma instead of a dot.

  • Variable Decimal of Packed Type Variable: is this possible?

    Hi Experts,
    I'd like to ask if we can have a packed variable with the decimal declaration as variable also, like:
    DATA p_pack_var TYPE p DECIMALS g_var_decimal.
    The scenario is there is a field qamv-toleranzun which I want to be displayed like in the output in QP03. The display in QP03 has variable decimals according to the value in qamv-masseinhsw.
    So for example: qamv-masseinhsw = 3 and qamv-toleranzun is a floating type value, the output in QP03 is format with 3 decimals.
    Or if this is not possible, are there any approach to pass the value of the floating point variable to a decimal type variable with an indefinite decimal places.
    Please Help. Points will be rewarded for valid answers.
    Thanks!

    Is this what you want?
    searchComponents( Class a_class) {
    // browse components
    if (a_class.isInstance(component)) {
    // do something
    }

  • Can't create Inbound Delivery for PO with Packing type material  -- HU

    Hi friends,
    I create a new packing material, and maintain packing material type. And then create a PO but I can't create an inbound delivery by VL31N.
    The error message:
    No item category exists (Table T184L EL VERP V )
    Message no. VL320
    Diagnosis
    There is no item category available in item category determination in the delivery (table T184L) for the following entries: EL VERP V
    I tried to add new item by SM30 with T184L, but still more errors. So it doesn't mean there are erros with delievery type determination.
    Any help?
    Thanks,
    Bruce
    Edited by: Bruce Hu on Jan 10, 2008 7:53 AM

    Hi Anil,
    Welcome to SCN for your first post. Did you check with your functional people about this.
    Regards,
    Madhu.

  • How to print the value of a field of  type FLTP

    hi experts,
    pls tell me how to print the value of a field of  type FLTP. i.e in decimal format not in exponential format.
    thankyou.
    krishna

    Hi ,
    I dont think in Floating point u can able to go for the decimal point display as it is for the minimum precission display..
    Define the variable as the 'packed' type and then u can able to define the decimal point...
    Cheers,
    SImha.

  • Size of packed field

    hi,
    what is the size of packed field

    Hi,
          By default packed size is 8 bytes, range of the packed data type is 1 to 16  bytes.
          If u didn't specify any thing in the declaration.  it occupies 8 bytes   ... Ex.  data num type p.
            If u want some then u can specify the bytes how many u want like below..
    Ex.  data num(2) type p.     Here It occupies only two bytes..
    Complete syntax of packed type is u should specify the decimals how many u want..
      data  num type p decimals 3.  ... That means  after integer it prints 3 decimals.   Ex  ouptut  2345.123
    Thanks and Regards,
    surya

  • Packing material to be set default

    hi all,
          i have a problem here. iam trying to process a standard IDoc inbound HU_CREATE wherein i want that the packaging material should be set default. i have tried BADI and user exit for this  but i am unable to do it. i have tried the conversion rule also but not working.
    pls help

    Hello,
    In Material Master , basic view and sales general select the packing type .
    Thanks
    RK

  • [internal tables] TYPES or DATA

    Hi,
    starting with ABAP and try to understand internal tables. The structure
    of an internal table isn't quiet clear. They have a work area and a table body,
    but why do I need a additionally type of line?
    Is this content, my tutorial uses DATA to define the itab and TYPES to define
    the workarea (type of line). I don't really understand the different between those
    commands.
    Does anyone got a good web blog to understand internal tables completly?
    thx
    chris

    Hi,
    The Statements TYPES and DATA
    Each ABAP program define its own data types using the statement.
    TYPES dtype TYPE type ...
    and declare its own variables or instance attributes of classes using the statement
    DATA var {TYPE type} ...
    Within the program or a class, you can also define local data types and variables within procedures. Local variables in procedures obscure identically-named variables in the main program or class.
    When creating data types and data objects, there are a number of naming convention that also apply for other local program definitions, such as procedures. These are described in detail in the keyword documentation.
    The Additions TYPE and LIKE
    The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
    ·        Definition of local types in a program
    ·        Declaration of data objects
    ·        Dynamic creation of data objects
    ·        Specification of the type of formal parameters in subroutines
    ·        Specification of the type of formal parameters in methods
    ·        Specification of the type of field symbols
    Constructing New Data Types
    The TYPE addition allows you to construct new data types in the TYPES, DATA; CONSTANTS; and STATICSstatements. In the TYPES statement, these are local data types in the program. In the other statements, they are attributes of new data objects, meaning that the newly defined data types are not free-standing. Rather, they are linked to database objects.This means that you can refer to them using the LIKEaddition, but not using TYPE.
    To construct new data types, the addition TYPE can be used with the following type constructors:
    ·        Construction of reference types
    REF TO type|dobj
    ·        Construction of structured data types
    BEGIN OF struc_type.
    END OF struc_type.
    ·        Construction of table types
    tabkind OF linetype
    These data types only exist during the runtime of the ABAP program.
    Referring to Known Data Types or Data Objects
    Using the additions TYPE or LIKE in the TYPESstatement, local data types in a program can be referred to known data types or data objects. This is mainly the case with user-defined elementary data types. If you declare variables using the additions TYPE type or LIKE dobj with statement DATA, the data type of var is already fully defined before the declaration is made.
    The known types or data that are referred to must be visible at the point where the data type or variable is declared.
    A known data type can be any of the following:
    ·        A predefined ABAP type to which you refer using the TYPE addition
    ·        An existing local data type in the program to which you refer using the TYPE addition
    ·        The data type of a local data object in the program to which you refer using the LIKE addition
    ·        A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.
    The LIKE addition takes its technical attributes from a visible data object. As a rule, you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context.  The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
    ·        In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
    ·        You can also refer to the data objects of other visible ABAP programs. These might be, for example, the visible attributes of global classes in class pools. If a global class cl_lobal has a public instance attribute or static attribute attr, you can refer to it as follows in any ABAP program:
    DATA dref TYPE REF TO cl_global.
    DATA:  f1 LIKE cl_global=>attr,
           f2 LIKE dref->attr.
    You can access the technical properties of an instance attribute using the class name and a reference variable without first having to create an object. The properties of the attributes of a class are not instance-specific and belong to the static properties of the class.
    TYPES: BEGIN OF struct,
             number_1 TYPE i,
             number_2 TYPE p DECIMALS 2,
           END OF struct.
    DATA:  wa_struct TYPE struct,
           number    LIKE wa_struct-number_2,
           date      LIKE sy-datum,
           time      TYPE t,
           text      TYPE string,
           company   TYPE s_carr_id.
    This example declares variables with reference to the internal type STRUCT in the program, a component of an existing data object wa_struct, the predefined data object SY-DATUM, the predefined ABAP type t and STRING, and the data element S_CARR_ID from the ABAP Dictionary.
    Referring to Generic Data Types
    If you refer to one of the generic predefined ABAP types of fixed length (c, n, p, x) in the TYPES or DATA statement, you must specify the undefined technical attributes.
    TYPES|DATA var[(length)] TYPE type ...
    TYPES|DATA var TYPE type ...
    DATA: text1,
          text2 LENGTH 2,
          text3 TYPE c LENGTH 3,
          pack TYPE p DECIMALS 2 VALUE '1.225'.
    This example creates three character variables with field lengths of one, two, and three bytes respectively, and a packed number variable with field length 8 bytes and two decimal places. If the attribute Fixed point arithmetic is set, the value of pack is 1.23.
    This example shows how to declare elementary data objects with reference to predefined ABAP types.
    PROGRAM demo_elementary_data_objects.
    DATA text1  TYPE c LENGTH 20.
    DATA text2  TYPE string.
    DATA number TYPE i.
    text1 = 'The number'.
    number = 100.
    text2 = 'is an integer.'.
    WRITE: text1, number, text2.
    This program produces the following output on the screen:
    The number              100 is an integer.
    In this example, the data objects text1, text2 and number are declared with the DATA statement. The technical attributes are determined by referring to the predefined ABAP types c, string, and I. Values from unnamed literals are assigned to the data objects. The contents of the named data objects are displayed on the list.
    Specifying a Start Value
    When you declare an elementary fixed-length variable, the DATAstatement automatically fills it with the type-specific initial value as listed in the table in the Predefined ABAP Types section.
    However, you can also specify a starting value of a fixed-length elementary variable (also within a structure declaration) using the VALUE addition in the DATAstatement:
    DATA var ... VALUE val|{IS INITIAL}.
    Specifying start values:
    DATA: counter TYPE p VALUE 1,
          date    TYPE d VALUE '19980601',
          flag    TYPE n VALUE IS INITIAL.
    After this data declaration, the character string flag contains its type specific
    Initial value ‘0’.
    Regarsd

  • Selection screen packed entries

    Hi ,
    i want to add a packed number in the standard selection screen designed by me.i used the below code but i want to restrict the integer value of the packed number to 3 places.
    like i should allow to enter values of format XXX.X and only 5 chars
    SELECTION-SCREEN BEGIN OF line.
    SELECTION-SCREEN COMMENT 1(9) text-012.
    parameters:  Packed TYPE p decimals 1 modif id sc1 .
    SELECTION-SCREEN END OF line.
    how to do this..
    thanks,
    Vinay

    if u use char 5 then u have to do lot of validations for ex: say user enters decimals point twice.
    Here is another solution:
    SELECTION-SCREEN BEGIN OF line.
    SELECTION-SCREEN COMMENT 1(9) text-012.
    parameters: Packed(3) TYPE p decimals 1 modif id sc1.
    SELECTION-SCREEN END OF line.
    at selection-screen.
    data:l_val type i.
    if Packed is not initial.
    l_val = Packed.
    if l_val > 1000.
      message e303(me) with 'Wrong format, enter in this format:(___._)'.
    endif.
    endif.
    Regards,
    Joy.

Maybe you are looking for

  • Zen Vision M - Problem with Scr

    I place my Vision M on locked mode (power button towards the padlock symbol) and use the player for a while. Then when I want to change album or skip a track I will slide the power button back to the middle. At this point the screen does not display

  • Simple java.lang.IndexOutOfBoundsException Question

    Hi, I'm trying to be able to put data into a vector or arraylist without filling the previous spots. Take this for example: ArrayList temp=new ArrayList(10); temp.ensureCapacity(10); temp.set(5, new Integer(5)); I declaired the size to be 10 twice, w

  • Mac Mini stuck on grey screen, what to do?

    A friend of me has got a Mac Mini (Late 2005) with some problems. She was looking at a Powerpoint presentation, but in the end it froze (spinning wheel). Then he turned off the machine, rebooted it, but it would display nothing then the grey screen a

  • OBI 11.1.1.3, analytics

    Hello, I have a problem when I want to log in to OBI Analytics. I receive the following error: "Unable to sign in- An error occurred during authentication." Thank you

  • Do i need an audio interface? HELP!!!

    Do i need an audio interface for logic to connect m audio speakers, a novation launchpad, and an akai mpk 25 keyboard?, Do i need an audio interface for logic to connect m audio speakers, a novation launchpad, and an akai mpk 25 keyboard?