SAP ABAP Data Element CGSPACKFLD (Formatting of numbers of type P, I or F)
Hierarchy
SAP_ABA (Software Component) Cross-Application Component
   CA-GTF-DCM (Application Component) Data Transfer
     BKD (Package) Tools for (external) data transfer
Basic Data
Data Element CGSPACKFLD
Short Description Formatting of numbers of type P, I or F  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type XFELD    
Data Type CHAR   Character String 
Length 1    
Decimal Places 0    
Output Length 1    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID KCD_PACKFLD  
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Dob.length 
Medium 15 Double length 
Long 20 Type P double length 
Heading 29 Typ P double length saved 
Documentation

Definition

In the SAP System, monetary amounts and quantities are stored in packed fields (data type P). These fields also appear in DDIC structures, which you can use as templates for your sender structures. Having this format in a file may, however, lead to errors if the file has not come from an R/2 or R/3 System. It is much simpler to generate the files in character format, numbers and letters such as 23.7. This character format requires more space than the packed format. For simplicity, it is assumed that double the space specified in the sender structure will be required.

If you wish to import category P numbers, you can decide whether these numbers should be in the file as double length characters '0123456789+-', or if they should be in the SAP format P (packed). Internally, packed numbers are used for the data transfer. If the numbers in the file are of single length, then it is assumed that the numbers don't need to be packed in the SAP internal format anymore. If the packed numbers are double length in the file then the numbers are converted into the packed format. The minus sign can be before or after the number. Apart from with binary and text files it is assumed that the packed numbers are always of double length in the file, and therefore must be converted.

You can choose whether the numbers carry no editing character, or possess a decimal point or a decimal comma:

  • If the numbers have a decimal point it will be assumed that commas only appear in the number for editing purposes.
  • If the numbers have a decimal comma it will be assumed that points only appear in the number for editing purposes.
  • If you have indicated that there are no editing characters in the file, the number of places after the decimal comma is determined from the entry in the sender structure.

Before import into the SAP System, numbers in integer format and floating point numbers should be converted to packed numbers (BCD format) or to numerical characters in order to avoid problems during external data transfer. These numbers can be delivered in different ways depending on the system of origin: display little endian (numbers are stored as bytes with the leftmost being the most significant) or display big endian (numbers are stored as bytes with the rightmost being the most significant). If these numbers have not already been transformed into packed numbers or NUMC, the SAP System may interpret the numbers incorrectly.

The length of packed fields and numbers are related as follows:

A packed number of length n can represent a (2n-1) digit number. For example, the field packed_16 can represent a number with 31 digits and a +/- sign. Therefore, in CHAR format you require 32 characters to display a value of format packed_16.

History
Last changed by/on SAP  20110908 
SAP Release Created in