Effective utilisation of FM HR_ENQUEUE_OBJECT in ABAP HR
is it really necessary to use FM HR_ENQUEUE_OBJECT each time to check whether a particular object is Locked in some other Transaction or not. does usage of FM HR_ENQUEUE_OBJECT is that significant in ABAP HR ??
Pls provide ur inputs
sdsssa
Similar Messages
-
Adjustments for Sales Excise Invoice
Hi,
Our client is Cement Industry, at the time of budget changes, we posted around 1000 nos. of sales excise invoices with excess amounts, now we want to pass JV for that GL accounts because of that we are unable to do J2IUN. Will anybody tell me where to pass JV for sales excise invoice with effecting utilisation also. This is very urgent issue.
Regards,
PrasadDear Goutham,
I will explain u clearly, at the time of budget changes our SD consultants done some changes,it taken too much time to complete, but our client was not able to stop the despatch so with wrong values around 1000 nos. of excise invoice posted, amount difference are around 28 lacs. Now they want to adjust the amounts through JV, which should effect in J2IUN also. Accouting document generated at the time of Excise Invoice is
Excise duty paid Dr
Cenvat payable Cr
Cenvat payable Cess Cr
Cenvat payable Hcess Cr
I tried to post consolidated amount in J1IH but accouting doc, genereted is
CENVAT clearing Cr
CENVAT InpBED Dr
Ecess CENVAT Dr
High Edu Ecess Dr
Because of this it is not updating Original entries and also in J2IUN. Now they are unable to run J2IUN for Mar'08. Please help me what to do.
Regards,
Prasad -
Adjustments for Sale Excise Invoice
Hi,
Our client is Cement Industry, at the time of budget changes, we posted around 1000 nos. of sales excise invoices with excess amounts, now we want to pass JV for that GL accounts because of that we are unable to do J2IUN. Will anybody tell me where to pass JV for sales excise invoice with effecting utilisation also. This is very urgent issue.
Regards,
PrasadDear Prasad,
As far my understanding the excise law, the excess amount paid by you can only be refunded by excice office.
In J2iun the entries are posted thru sales invoice or invoice cancellation.
The utilization amout increases when we create excise invoice thru J1iin and reduction in utilization is thru invoice cancellation.
So in my opinion , you cannot reduce the utilization by passing a JV.
Reward points if answer is useful to you infutrue as the reply is late ,
regards,
subodh -
Importing internal table from one program to another program
Hi everybody,
i have one small doubt.
i am using submit statement and passing the values from this program to another program selection screen. in that program logic is written.In that program one internal table values are being exported to the memory id of that program. now i have to import that internal table values into my program by using import statement. i am using the following syntax
import itab from menory id 'program name'.
but i am getting an error saying program name is unknown.
what is the exat syntax for this .
thanking you,
giri.hi,
check these statements.
IMPORT - Get data
Variants:
1. IMPORT obj1 ... objn FROM DATA BUFFER f.
2. IMPORT obj1 ... objn FROM INTERNAL TABLE itab.
2. IMPORT obj1 ... objn FROM MEMORY.
3. IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.
4. IMPORT obj1 ... objn FROM SHARED BUFFER itab(ar) ID key.
5. IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
6. IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
7. IMPORT obj1 ... objn FROM LOGFILE ID key.
8. IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
9. IMPORT (itab) FROM ... .
In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. For more details, see Storing Cluster Tables.
Variant 1
IMPORT obj1 ... objn FROM DATA BUFFER f.
Extras:
1. ... = f (for each object to be imported)
2. ... TO f (for each object to be imported)
3. ... ACCEPTING PADDING
4. ... ACCEPTING TRUNCATION
5. ... IGNORING STRUCTURE BOUNDARIES
6. ... IGNORING CONVERSION ERRORS
7. ... REPLACEMENT CHARACTER c
8. ... IN CHAR-TO-HEX MODE
9. ... CODE PAGE INTO f1
10. ... ENDIAN INTO f2
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
See You Cannot Use Implicit Field Names in Clusters.
Effect
Imports the data objects obj1 ... objn from the data buffer declared. The data buffer must be of type XSTRING . The data objects obj1 ... objn can be fields, structures, complex structures, or tables. The system imports all the data that has been stored in the data buffer f using the EXPORT ... TO DATA BUFFER statement and is listed here. It also checks that the structure used in the IMPORT statement matches the one in the EXPORT statement.
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged. (In some circumstances, this may mean that no data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported. The contents of all the objects remain unchanged.
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
The object is stored in the field f.
Addition 3
... ACCEPTING PADDING
Effect
This addition allows you to append new fields to the end
of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
Addition 4
... ACCEPTING TRUNCATION
Effect
This addition allows you to shorten the last CHAR
fields, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
Addition 5
... IGNORING STRUCTURE BOUNDARIES
Effect
This addition means that only the fragment sequence is
relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
You cannot use this addition with either addition 3 (enlarge structure) or addition 4 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
Addition 6
...IGNORING CONVERSION ERRORS
Effect
This addition prevents the system from triggering a
runtime error, if an error occurs when the character set is converted. '#' is used as a replacement character.
Addition 7
... REPLACEMENT CHARACTER c
Effect
The replacement character is used if a particular
character cannot be converted when the character set is converted.
This addition can only be used in conjunction with addition 6.
Addition 8
... IN CHAR-TO-HEX MODE
Effect
Not all character-type fields are converted. To convert
a field, you must create a field (or structure) that is identical to the exported field or structure, except that all its character-type components must be replaced with hexadecimal fields.
You can only use this addition in Unicode programs, to allow you to import camouflaged binary data as single-byte characters.
Moreover, you cannot use this addition in conjunction with the additions 3, 4, 5, 6, or 7.
Addition 9
... CODE PAGE INTO f1
Effect
The code page of the exported data is stored in the
character-type field f1 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition.
Addition 10
... ENDIAN INTO f2
Effect
The byte order (LITTLE or BIG) of the
exported data is stored in the field f2 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition. The field f2 must have the type ABAP_ENDIAN, which is defined in the type group ABAP. For this reason, the type group ABAP must be included in the ABAP program using a TYPE-POOLS statement.
Variant 2
IMPORT obj1 ... objn FROM INTERNAL TABLE itab.
Extras:
1. ... = f (for each object to be imported)
2. ... TO f (for each object to be imported)
3. ... ACCEPTING PADDING
4. ... ACCEPTING TRUNCATION
5. ... IGNORING STRUCTURE BOUNDARIES
6. ... IGNORING CONVERSION ERRORS
7. ... REPLACEMENT CHARACTER c
8. ... IN CHAR-TO-HEX MODE
9. ... CODE PAGE INTO f1
10. ... ENDIAN INTO f2
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See No implicit field names in cluster.
Effect
Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from the specified internal table itab. The first column in the internal table must be of the predefined type INT2 and the second must be type X. To define the first column you must refer to a data element in the ABAP Dictionary that has the predefined type INT2.
All data that was stored in the internal table itab using EXPORT ... TO INTERNAL TABLE and listed, is imported. The system checks that the EXPORT and IMPORT structures match.
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the specified data cluster were imported, the rest remain unchanged (it is possible that no data object was imported).
SY-SUBRC = 4:
The data objects could not be imported.
The contents of all listed objects remain unchanged
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
Places the object in the field f.
Addition 3
... ACCEPTING PADDING
Effect
This addition allows you to add new fields to the ends
of structures, even to substructures and internal tables (the additional fields are filled with initial value during the IMPORT). It also allows you to increase the size of existing fields (C, N, X, P, I1, and I2) and to map Char fields to STRING type fields or byte fields to XSTRING type fields.
Addition 4
... ACCEPTING TRUNCATION
Effect
This addition allows you to shorten the last CHAR
field or omit the last component on the highest level (till Release 4.6 this was possible without specifying an addition).
Addition 5
... IGNORING STRUCTURE BOUNDARIES
Effect
This addition means that only the page order is
relevant, that is any substructures match. With this addition, the system also ignores alignment changes arising from the Unicode conversion (for example, due to subsequent insertion of named includes).
This addition rules out any subsequent structural enhancements (addition 3) or structural shortening (addition 4) because with this addition it is the structural limits and include limits that are to be ignored.
As from Release 6.10, the include information will also be stored in the dataset, so that it is possible to also check whether the includes match, that is substructures and includes (named or unnamed) are treated the same. When importing data that was exported in a Release lower than 6.10, the includes are not checked.
Addition 6
...IGNORING CONVERSION ERRORS
Effect
This addition has the effect that an error in the
character set conversion does not cause a runtime error. The system uses "#" as a replacement character.
Addition 7
... REPLACEMENT CHARACTER c
Effect
The system uses the specified replacement character if a
character cannot be converted during a character set conversion. If this addition is not specified, the system uses "#" as a replacement character.
This addition can only be used in conjunction with addition 6.
Addition 8
... IN CHAR-TO-HEX MODE
Effect
No character type fields are converted. For this you
must create a field or structure that is identical to the exported field or exported structure, except that all character type fields must be replaced with hexadecimal fields.
This addition, which is only allowed in programs with a set Unicode flag, allows you to import binary data disguised as single byte characters. This addition cannot be used in conjunction with additions 3, 4, 5, 6, and 7.
Addition 9
... CODE PAGE INTO f1
Effect
The codepage of the exported data is stored in the
character-type field f1 (for example, to be able to analyze the data imported with the addition IN CHAR-TO-HEX MODE).
Addition 10
... ENDIAN INTO f2
Effect
The byte order (LITTLE or BIG) of the
exported data is stored in the field f2 (for example, to be able analyze the data imported using the addition IN CHAR-TO-HEX MODE). The field f2 must be of type ABAP_ENDIAN, defined in type group ABAP. You must therefore include the type group ABAP in the ABAP program with a TYPE-POOLS statement.
Variant 3
IMPORT obj1 ... objn FROM MEMORY.
Extras:
1. ... = f (for each object to be imported) 2. ... TO f (for each object to be imported)
3. ... ID key
4. ... ACCEPTING PADDING
5. ... ACCEPTING TRUNCATION
6. ... IGNORING STRUCTURE BOUNDARIES
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See You Must Enter Identification and Cannot Use Implicit Field Names inClusters
Effect
Imports data objects obj1 ... objn (fields, structures, complex structures or tables) from a data cluster in the ABAP memory (see EXPORT). Reads in all data without an ID that was exported to memory with "EXPORT ... TO MEMORY.". In contrast to the variant IMPORT FROM DATABASE, it does not check that the structure matches in EXPORT and IMPORT.
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that no data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported, probably because the ABAP memory was empty.
The contents of all objects remain unchanged.
Note
You should always use the addition 3 (... ID key) with the statement. Otherwise, the effect of the variant is not certain (EXPORT statements in different parts of a program overwrite each other in the ABAP memory), since it exists only for reasons of compatibility with R/2.
Additional methods for selecting and deleting data clusters in the ABAP memory are provided by the system class CL_ABAP_EXPIMP_MEM.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
The object is placed in field f.
Addition 3
... ID key
Effect
Imports only data stored in ABAP memory under the ID key.
Notes
The key, key, must be a character-type data object (but not a string).
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that no data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported, probably because an incorrect ID was used.
The contents of all objects remain unchanged.
Addition 4
... ACCEPTING PADDING
Effect
This addition allows you to append new fields to the end of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
Addition 5
... ACCEPTING TRUNCATION
Effect
This addition allows you to shorten the last CHAR field, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
Addition 6
... IGNORING STRUCTURE BOUNDARIES
Effect
This addition means that only the fragment sequence is relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
You cannot use this addition with either addition 3 (enlarge structure) or addition 4 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
Related
EXPORT TO MEMORY, DELETE FROM MEMORY, FREE MEMORY
Variant 4
IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.
Extras:
1. ... = f (for each object to be exported) 2. ... TO f (for each object to be exported)
3. ... CLIENT g (before ID key)
4. ... TO wa (after itab(ar) or ID key )
5. ... ACCEPTING PADDING
6. ... ACCEPTING TRUNCATION
7. ... IGNORING STRUCTURE BOUNDARIES
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
See You Cannot Use Implicit Field Names in Clusters and You Cannot Use Table Work Areas.
Effect
Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from shared memory. The data objects are read using the ID key from the area ar in the table itab - c.f. EXPORT TO SHARED MEMORY). You must use itab to specify a database table although the system reads from a memory table with the appropriate structure.
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged. (In some circumstances, this may mean that no data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported. You may have used the wrong ID. The contents of all the objects remain unchanged.
Notes
The table dbtab named according to SHARED MEMORY must be declared using TABLES (except in addition 2).
The structure of fields (field symbols and internal tables) to be imported must match the structure of the objects exported in the dataset. The objects must be imported under the same names as those under which they were exported. Otherwise, they will not be imported.
The key length consists of: the client (3 digits, but only if tab is client-specific); area (2 characters); ID; and line number (4 bytes). It must not exceed 64 bytes - that is, the ID must not be longer than 55 characters, if the table is client- specific.
The key, key, must be a character-type data object (but not a string).
Additional methods for selecting and deleting data clusters in the shared memory are provided by the system class CL_ABAP_EXPIMP_SHMEM.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
The object is stored in the field f.
Addition 3
... CLIENT g (before ID key)
Effect
The data is imported from client g (provided the import/export table is tab client-specific). The client, g must be a character-type data object (but not a string).
Addition 4
... TO wa (after itab(ar) or ID key)
Effect
You need to use this addition if user data fields have been stored in the application buffer and are to be read from there. The work area wa is used instead of the table work area. The target area must correspond to the structure of the called table tab.
Addition 5
... ACCEPTING PADDING
Effect
This addition allows you to: append new fields to the end of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
Addition 6
... ACCEPTING TRUNCATION
Effect
This addition allows you to shorten the last CHAR fields, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
Addition 7
... IGNORING STRUCTURE BOUNDARIES
Effect
This addition means that only the fragment sequence is relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
You cannot use this addition with either addition 4 (enlarge structure) or addition 5 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
Related
EXPORT TO SHARED MEMORY, DELETE FROM SHARED MEMORY
Variant 5
IMPORT obj1 ... objn FROM SHARED BUFFER itab(ar) ID key.
Extras:
1. ... = f (for each object to be exported) 2. ... TO f (for each object to be exported)
3. ... CLIENT g (before ID key)
4. ... TO wa (last addition or after itab(ar))
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
See Cannot Use Implicit Fieldnames in Clusters und Cannot Use Table Work Areas.
Effect
Imports data objects obj1 ... objn (fields or
tables) from the cross-transaction application buffer. The data objects are read in the application buffer using the ID key of the area ar of the buffer area for the table itab (see EXPORT TO SHARED BUFFER). You must use dbtab to specify a database table although the system reads from a memory table with an appropriate structure.
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this means that no data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported, probably because an incorrect ID was used.
The contents of all objects remain unchanged.
Example
Import two fields and an internal table from the application buffer with the structure INDX:
TYPES: BEGIN OF ITAB3_LINE,
CONT(4),
END OF ITAB3_LINE.
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
F1(4),
F2(8) TYPE P DECIMALS 0,
ITAB3 TYPE STANDARD TABLE OF ITAB3_LINE,
INDX_WA TYPE INDX.
Import data.
IMPORT F1 = F1 F2 = F2 ITAB3 = ITAB3
FROM SHARED BUFFER INDX(ST) ID INDXKEY TO INDX_WA.
After import, the data fields INDX-AEDAT and
INDX-USERA in front of CLUSTR are filled with
the values in the fields before the EXPORT
statement.
Notes
You must declare the table dbtab, named after DATABASE using a TABLES statement.
The structure of the fields, structures, and internal tables to be imported must match the structure of the objects exported to the dataset. Moreover, the objects must be imported with the same name used to export them. Otherwise, the import is not performed.
The maximum total key length is 64 bytes. It must include: a client if the table is client-specific (3 characters); an area (2 characters); identification; and line counter (4 bytes). This means that the number of characters available for the identification of a client-specific table is 55 characters.
The key, key, must be a character-type data object (but not a string).
Additional methods for selecting and deleting data clusters in the cross-transaction application buffer are provided by the system class CL_ABAP_EXPIMP_SHBUF.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
The object is placed in the field f
Addition 3
... CLIENT g (after dbtab(ar))
Effect
Takes the data from the client g (if the import/export table dbtab is client-specific). The client g must be a character-type data object (but not a string).
Addition 4
... TO wa (as the last addition or after itab(ar))
Effect
You need to use this addition if you want to save user data fields in the application buffer and then read them from there later. The system uses a work area wa instead of a table work area. The target area must have the same structure as the table tab.
Example
DATA: INDX_WA TYPE INDX,
F1.
IMPORT F1 = F1 FROM SHARED BUFFER INDX(AR)
CLIENT '001' ID 'TEST'
TO INDX_WA.
WRITE: / 'AEDAT:', INDX_WA-AEDAT,
/ 'USERA:', INDX_WA-USERA,
/ 'PGMID:', INDX_WA-PGMID.
Variant 6
IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
Extras:
1. ... = f (for each object to be imported)
2. ... TO f (for each object to be imported)
3. ... CLIENT g (before ID key )
4. ... USING form
5. ... TO wa (last addition or after dbtab(ar))
6. ... MAJOR-ID id1 (instead of ID key)
7. ... MINOR-ID id2 (with MAJOR-ID id1 )
8. ... ACCEPTING PADDING
9. ... ACCEPTING TRUNCATION
10. ... IGNORING STRUCTURE BOUNDARIES
11. ... IGNORING CONVERSION ERRORS
12. ... REPLACEMENT CHARACTER c
13. ... IN CHAR-TO-HEX MODE
14. ... CODE PAGE INTO f1
15. ... ENDIAN INTO f2
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Implicit Fieldnames in Clusters and Cannot Use Table Work Areas.
Effect
Imports data objects obj1 ... objn (fields, structures, complex structures, or tables) from the data cluster with ID key in area ar of the database table dbtab (see EXPORT TO DATABASE).
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that not data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported, probably because an incorrect ID was used.
The contents of all objects remain unchanged.
Example
Import two fields and an internal table:
TYPES: BEGIN OF TAB3_TYPE,
CONT(4),
END OF TAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH
NON-UNIQUE DEFAULT KEY,
WA_INDX TYPE INDX.
INDXKEY = 'INDXKEY'.
IMPORT F1 = F1
F2 = F2
TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY
TO WA_INDX.
Notes
You must declare the table dbtab, named after DATABASE, using the TABLES statement (except in addition 5).
The structure of fields, field strings and internal tables to be imported must match the structure of the objects exported to the dataset. In addition, the objects must be imported under the same name used to export them. If this is not the case, either a runtime error occurs or no import takes place.
Exception: You can lengthen or shorten the last field if it is of type CHAR, or add/omit CHAR fields at the end of the structure.
The key, key, must be a character-type data object (but not a string).
Additional methods for selecting and deleting data clusters in the database table specified are provided by the system class CL_ABAP_EXPIMP_DB.
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
The object is placed in field f.
Addition 3
... CLIENT g (before the ID key)
Effect
Data is taken from the client g (in client-specific import/export databases only). Client g must be a character-type data object (but not a string).
Example
DATA: F1,
WA_INDX TYPE INDX.
IMPORT F1 = F1 FROM DATABASE INDX(AR) CLIENT '002' ID 'TEST'
TO WA_INDX.
Addition 4
... USING form
Note
This statement is for internal use only.
Incompatible changes or further developments may occur at any time without warning or notice.
Effect
Does not read the data from the database. Instead, calls the FORM routine form for each record read from the database without this addition. This routine can take the data key of the data to be retrieved from the database table work area and write the retrieved data to this work area. The name of the routine has the format <name of database table>_<name of form>; it has one parameter which describes the operation (READ, UPDATE or INSERT). The routine must set the field SY-SUBRC in order to show whether the function was successfully performed.
Addition 5
... TO wa (after key or after dbtab(ar))
Effect
You need to use this addition if you want to save user data fields in the cluster database and then read from there. The system uses the work area wa instead of a table work area. The target area entered must have the same structure as the table dbtab.
Example
DATA WA LIKE INDX.
DATA F1.
IMPORT F1 = F1 FROM DATABASE INDX(AR)
CLIENT '002' ID 'TEST'
TO WA.
WRITE: / 'AEDAT:', WA-AEDAT,
/ 'USERA:', WA-USERA,
/ 'PGMID:', WA-PGMID.
Addition 6
... MAJOR-ID id1 (instead of the ID key).
Addition 7
... MINOR-ID id2 (with MAJOR-ID id1)
This addition is not allowed in an ABAP Objects context. See Cannot Use Generic Identification.
Effect
Searches for a record the first part of whose ID (length of id1) matches id1 and whose second part - if MINOR-ID id2 is also declared - is greater than or equal to id2.
Addition 8
... ACCEPTING PADDING
Effect
This addition allows you to append new fields to the end of structures, sub-structures, and internal tables. The IMPORT statement fills the additional fields with initial values; make existing fields (C, N, X, P, I1, and I2) longer; map character-type fields to STRING-type fields; or to map byte-type fields to XSTRING-type fields.
Addition 9
... ACCEPTING TRUNCATION
Effect
This addition allows you to shorten the last CHAR fields, or to omit the last component at the top level. (Until Release 4.6, you could do this without using an addition).
Addition 10
... IGNORING STRUCTURE BOUNDARIES
Effect
This addition means that only the fragment sequence is relevant - that is, that any sub-structures match. If you use this addition, the system ignores any alignment changes necessitated by Unicode - such as inserting named includes.
You cannot use this addition with either addition 8 (enlarge structure) or addition 9 (shorten structure), since it specifies that structure and include boundaries are to be ignored.
From Release 6.10 onwards, the include information is stored in datasets, so that the system can also check that includes match - that is, that sub-structures and includes (named or unnamed) are treated equally. When data is imported in a Release prior to 6.10, includes are not checked.
Addition 11
...IGNORING CONVERSION ERRORS
Effect
This addition prevents the system from triggering a runtime error, if an error occurs when the character set is converted. '#' is used as a replacement character.
Addition 12
... REPLACEMENT CHARACTER c
Effect
The replacement character is used if a particular character cannot be converted when the character set is converted. If you do not use this addition, '#' is used as a replacement character.
This addition can only be used in conjunction with addition 11.
Addition 13
... IN CHAR-TO-HEX MODE
Effect
All character-type fields are not converted. To convert a field, you must create a field (or structure) that is identical to the exported field or structure, except that all its character-type components must be replaced with hexadecimal fields.
You can only use this addition in Unicode programs, to allow you to import camouflaged binary data as single-byte characters. Moreover, you cannot use this addition in conjunction with the additions 8, 9, 10, 11, and 12.
Addition 14
... CODE PAGE INTO f1
Effect
The code page of the exported data is stored in the character-type field f1 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition.
Addition 15
... ENDIAN INTO f2
Effect
The byte order(LITTLE or BIG) of the exported data is stored in the field f2 - for example, to analyze data that has been imported with the IN CHAR-TO-HEX MODE addition. The field f2 must have the type ABAP_ENDIAN, which is defined in the type group ABAP. For this reason, the type group ABAP must be included in the ABAP program using a TYPE-POOLS statement.
Variant 7
IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
This variant is not allowed in an ABAP Objects context. See Cannot Use Clusters in Files
Note
This variant is no longer supported and cannot be used.
Variant 8
IMPORT obj1 ... objn FROM LOGFILE ID key.
Note
This statement is for internal use only.
Incompatible changes or further developments may occur at any time without warning or notice.
Extras:
1. ... = f (for each field f to be imported) 2. ... TO f (for each field f to be imported)
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Implicit Field Names in Clusters
Effect
Imports data objects (fields, field strings or internal tables) from the update data. You must specify the update key assigned by the system (with current request number) as the key.
The key, key, must be a character-type data object (but not a string).
The Return Code is set as follows:
SY-SUBRC = 0:
The existing data objects in the data cluster specified were imported. The rest remain unchanged (in some circumstances, this may mean that no data objects were imported).
SY-SUBRC = 4:
The data objects could not be imported. An incorrect ID may have been used.
The contents of all objects remain unchanged.
Addition 1
... = f (for each object to be imported)
Addition 2
... TO f (for each object to be imported)
Effect
The object is placed in field f.
Variant 9
IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
Extras:
1. ... CLIENT g (after dbtab(ar)) 2. ... TO wa (last addition or after dbtab(ar))
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Table Work Areas.
Effect
Imports an object directory stored under the specified ID with EXPORT TO DATABASE into the table itab. The internal table itab may not have the type HASHED TABLE or ANY TABLE.
The key, key, must be a character-type data object (but not a string).
The Return Code is set as follows:
SY-SUBRC = 0:
The directory was successfully imported.
SY-SUBRC = 4:
The directory could not be imported, probably because an incorrect ID was used.
The internal table itab must have the same structure as the Dictionary structure CDIR (INCLUDE STRUCTURE).
Addition 1
... CLIENT g (before ID key)
Effect
Takes data from the client g (only with client-specific import/export databases). Client g must be a character-type data object (but not a string).
Addition 2
... TO wa (last addition or after dbtab(ar))
Effect
Uses the work area wa instead of the table work area. When you use this addition, you do not need to declare the table dbtab, named after DATABASE using a TABLES statement. The work area entered must have the same structure as the table dbtab.
Example
Directory of a cluster consisting of two fields and an internal table:
TYPES: BEGIN OF TAB3_LINE,
CONT(4),
END OF TAB3_LINE,
BEGIN OF DIRTAB_LINE.
INCLUDE STRUCTURE CDIR.
TYPES END OF DIRTAB_LINE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4),
F2(8) TYPE P decimals 0,
TAB3 TYPE STANDARD TABLE OF TAB3_LINE,
DIRTAB TYPE STANDARD TABLE OF DIRTAB_LINE,
INDX_WA TYPE INDX.
INDXKEY = 'INDXKEY'.
EXPORT F1 = F1
F2 = F2
TAB3 = TAB3
TO DATABASE INDX(ST) ID INDXKEY " TAB3 has 17 entries
FROM INDX_WA.
IMPORT DIRECTORY INTO DIRTAB FROM DATABASE INDX(ST) ID INDXKEY
TO INDX_WA.
Then, the table DIRTAB contains the following:
NAME OTYPE FTYPE TFILL FLENG
F1 F C 0 4
F2 F P 0 8
TAB3 T C 17 4
The meaning of the individual fields is as follows:
NAME:
Name of stored object
OTYPE:
Object type (F: Field, R: Field string / Dictionary struc -
Hi
We'r creating a PO with me21n and geting the message FF718 - Tax code does not exists for the jurisdiction code"
The problem is that the PO is a future dated, i.e. document date, delivery date and also a tax code eff. date s in the future (e.g. the current system date is Mar 24, the PO and the Tax Code dates are May 01, 2010.
We assume the system should allow entering POs which are using the Tax Code effective in the future under condition that the document date is after the effective date of the Tax Code.
abap debugging revealed a possible problem in the MM06EF0E_EKPO_TXJCD, MM06EF0E_EKPO-MWSKZ in the function call (, CALL Function "CALCULATE_TAX_FROM_GROSSAMOUNT" in our case).
Neither the delivery not PO dates are not passed to this function (the parameter I_PRSDT). If the date is not passed the function is using sy-datlo (system date) as the date to check the Tax and Tax Jurisdition codes.
The questions:
1) Is my assumption that using future dated tax code is not programmed in the ME21N ?
2) if I am right whether this problem was addressed by sap, i.e. is there a note to fix this and to allow using future dated tax codes.
tnx,
VictorHi sap mates,
any suggestions ..i do get the same problem..
need ur help badly ... -
IMPORT ... FROM MEMORY
Hi,
I would like to know if there is a way to <b>generically</b> import an object stored into memory.
Indeed, IMPORT.. FROM MEMORY doesn't seem to accept any reference of field-symbols or anything of that sort.
The class CL_ABAP_EXPIMP_MEM looks like it only provides description of the content.
Thanks in advance.
Best regards,
GuillaumeHai
Check the following Code
IMPORT - Get data
Variants
1. IMPORT f itab FROM MEMORY.
2. IMPORT f itab FROM DATABASE dbtab(ar) ID key.
3. IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
4. IMPORT f itab FROM DATASET dsn(ar) ID key.
Variant 1
IMPORT f itab FROM MEMORY.
Additions
1. ... TO g (for each field f to be imported)
2. ... ID key
Effect
Imports data objects (fields or tables) from the ABAP/4 memory (see EXPORT ). Reads in all data without an ID that was exported to memory with "EXPORT ... TO MEMORY." . In contrast to the variant IMPORT FROM DATABASE , it does not check that the structure matches in EXPORT and IMPORT .
The return code value is set as follows:
SY-SUBRC = 0 The data objects were successfully imported.
SY_SUBRC = 4 The data objects could not be imported, probably
because the ABAP/4 memory was empty.
The contents of all objects remain unchanged.
Addition 1
... TO g (for each field f to be imported)
Effect
Takes the field contents stored under f from the global ABAP/4 memory and places them in the field g .
Addition 2
... ID key
Effect
Imports only data stored in ABAP/4 memory under the ID key .
The return code value is set as follows:
SY-SUBRC = 0 The data objects were successfully imported.
SY_SUBRC = 4 The data objects could not be imported, probably
because an incorrect ID was used.
The contents of all objects remain unchanged.
Variant 2
IMPORT f itab FROM DATABASE dbtab(ar) ID key.
Additions
1. ... TO g (for each field f to be imported)
2. ... MAJOR-ID maid (instead of ID key )
3. ... MINOR-ID miid (together with MAJOR-ID maid )
4. ... CLIENT h (after dbtab(ar) )
5. ... USING form
Effect
Imports data objects (fields, field strings or internal tables) with the ID key from the area ar of the database dbtab (see also EXPORT )
The return code value is set as follows:
SY-SUBRC = 0 The data objects were successfully imported.
SY_SUBRC = 4 The data objects could not be imported, probably
because an incorrect ID was used.
The contents of all objects remain unchanged.
Example
Import two fields and an internal table:
TABLES INDX.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
BEGIN OF TAB3 OCCURS 10,
CONT(4),
END OF TAB3.
INDXKEY = 'INDXKEY'.
IMPORT F1 F2 TAB3 FROM DATABASE INDX(ST) ID INDXKEY.
Notes
The structure of fields, field strings and internal tables to be imported must match the structure of the objects exported to the dataset. In addition, the objects must be imported under the same name used to export them. If this is not the case, either a runtime error occurs or no import takes place.
Exception: You can lengthen or shorten the last field if it is of type CHAR , or add/omit CHAR fields at the end of the structure.
Addition 1
... TO g (for each field f to be imported)
Effect
Takes the field contents stored under the name f from the database and places them in g .
Addition 2
... MAJOR-ID maid (instead of ID key )
Addition 3
... MINOR-ID miid (together with MAJOR-ID maid )
Effect
Searches for a record with an ID that matches maid in the first part (length of maid ) and - if MINOR-ID miid is also specified - is greater than or equal to miid in the second part.
Addition 4
... CLIENT h (after dbtab(ar) )
Effect
Takes the data from the client h (only with client-specific import/export databases).
Example
TABLES INDX.
DATA F1.
IMPORT F1 FROM DATABASE INDX(AR) CLIENT '002' ID 'TEST'.
Addition 5
... USING form
Effect
Does not read the data from the database. Instead, calls the FORM routine form for each record read from the database without this addition. This routine can take the data key of the data to be retrieved from the database table work area and write the retrieved data to this work area schreiben; it therefore has no parameters.
Note
Runtime errors
Depending on the operands or the datsets to be imported, various runtime errors may occur.
Variant 3
IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
Additions
1. ... CLIENT h (after dbtab(ar) )
Effect
Imports an object directory stored under the specified ID with EXPORT into the table itab .
The return code value is set as follows:
SY-SUBRC = 0 The directory was successfully imported.
SY_SUBRC = 4 The directory could not be imported, probably because an incorrect ID was used.
The internal table itab must have the same structure as the Dictionary structure CDIR (INCLUDE STRUCTURE ).
Addition 1
... CLIENT h (after dbtab(ar) )
Effect
Takes data from the client h (only with client-specific import/export databases).
Example
Directory of a cluster consisting of two fields and an internal table:
TABLES INDX.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
BEGIN OF TAB3 OCCURS 10,
CONT(4),
END OF TAB3,
BEGIN OF DIRTAB OCCURS 10.
INCLUDE STRUCTURE CDIR.
DATA END OF DIRTAB.
INDXKEY = 'INDXKEY'.
EXPORT F1 F2 TAB3 TO
DATABASE INDX(ST) ID INDXKEY. " TAB3 has 17 entries
IMPORT DIRECTORY INTO DIRTAB FROM DATABASE INDX(ST) ID INDXKEY.
Then, the table DIRTAB contains the following:
NAME OTYPE FTYPE TFILL FLENG
F1 F C 0 4
F2 F P 0 8
TAB3 T C 17 4
The meaning of the individual fields is as follows:
NAME : Name of stored object OTYPE : Object type ( F : Field, R : Field string / Dictionary structure, T : Internal table) FTYPE : Field type ( C : Character, P : Packed, ...)
Field strings and internal tables have the type C. TFILL : Number of internal table lines filled FLENG : Length of field in bytes
With internal tables: Length of header line.
Variant 4
IMPORT f itab ... FROM DATASET dsn(ar) ID key.
Note
This variant is not to be used at present.
IMPORT DYNPRO - Import a screen
Basic form
IMPORT DYNPRO h f e m ID id.
Effect
Imports the screen specified in the field id . Loads the screen information into the structure h (screen header, structure D020S ) and into the internal tables f (field list, structure D021S ), e (flow logic, structure D022S ) and m (matchcode information, structure D023S ).
The return code value is set as follows:
SY-SUBRC = 0 The screen was successfully imported.
SY_SUBRC = 4 The screen does not exist.
Thanks & regards
Sreeni -
Related to previous post..
Hi realted to my previous question, I was looking at standard ABAP SAPCript driver program PSFCOBJL.
I see something like follwoing inside include LCODRINC:-
Import .....
FROM MEMORY ID 'PPT'.
IMPORT ITAB
ITAB_TDR FROM MEMORY ID 'PPI'.
IMPORT PRLST_TMP FROM MEMORY ID 'PPS'.
What does memory ID' PPT', 'PPI' and 'PPS' signify.
Is this the place from where we can ftech the initail data field(Explained in my previous post)
Tushar.SAP and ABAP/4 Memory
There is a difference between the cross-transaction SAP memory and the transaction-specific ABAP/4 memory.
SAP memory
The SAP memory, otherwise known as the global memory, is available to a user during the entire duration of a terminal session. Its contents are retained across transaction boundaries as well as external and internal sessions. The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.
ABAP/4 memory
The contents of the ABAP/4 memory are retained only during the lifetime of an external session (see also Organization of Modularization Units). You can retain or pass data across internal sessions. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.
Please consult Data Area and Modularization Unit Organization documentation as well.
and
Memory Structures of an ABAP Program
IMPORT - Reading Data
Variants:
1. IMPORT obj1 ... objn FROM MEMORY.
2. IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
3. IMPORT obj1 ... objn FROM LOGFILE ID key.
4. IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
5. IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
6. IMPORT obj1 ... objn FROM SHARED BUFFER dbtab(ar) ID key.
7. IMPORT (itab) FROM ... .
Variant 1
IMPORT obj1 ... objn FROM MEMORY.
Additions:
1. ... = f (for each object to be imported)
2. ... TO f (for each object to be imported)
3. ... ID key
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See ID must be specified and Implicit Field Names not Allowed inClusters
Effect
Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from a data cluster in ABAP memory . All data exported to ABAP memory using EXPORT... TO MEMORY without ID is read. Unlike the IMPORT FROM DATABASE variant, the sytsem does not check whether the structures used in EXPORT and IMPORT correspond.
The return code is set as follows:
SY-SUBRC = 0:
Data objects imported.
SY-SUBRC = 4:
Unable to import data objects.
The ABAP memory was probably empty.
The contents of all listed objects remain unchanged.
Notes
You should always use addition 3 /... ID key) with this statement. Variants that do not use this addition have unpredictable effects ( EXPORT statements in different parts of programs can overwrite each other's data in ABAP memory. These variants only exist for the sake of compatibility with R/2.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... = f (for each object you want to import)
Addition 2
... TO f (for each object you want to import)
Effect
Places the object in the field f.
Addition 3
... ID key
Effect
Only the data stored in ABAP memory under the key key is imported.
The return code is set as follows:
SY-SUBRC = 0:
Data objects imported.
SY-SUBRC = 4:
Data objects could not be imported.
You may have used an incorrect ID.
The contents of all listed objects remain unchanged.
Related
EXPORT TO MEMORY, FREE MEMORY
Variant 2
IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
Additions:
1. ... = f (for each object you want to import)
2. ... TO f (for each object you want to import)
3. ... CLIENT g (before ID key )
4. ... USING form
5. ... TO wa (as last addition or after dbtab(ar))
6. ... MAJOR-ID id1 (instead of ID key)
7. ... MINOR-ID id2 (together with MAJOR-ID id1)
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed in clusters and Table work areas not allowed.
Effect
Imports data objects obj1 ... objn (fields, structures, complex structures, or tables) from the data cluster with the ID key in area ar of the database table dbtab (compare EXPORT TO DATABASE).
The return code is set as follows:
SY-SUBRC = 0:
Data objects imported.
SY-SUBRC = 4:
Data objects could not be imported.
You may have used an incorrect ID.
The contents of all listed objects remain unchanged.
Example
Importing two fields and an internal table:
TYPES: BEGIN OF TAB3_TYPE,
CONT(4),
END OF TAB3_TYPE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4), F2 TYPE P,
TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH
NON-UNIQUE DEFAULT KEY,
WA_INDX TYPE INDX.
INDXKEY = 'INDXKEY'.
IMPORT F1 = F1
F2 = F2
TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY
TO WA_INDX.
Notes
You must have named the table dbtab listed in DATABASE in a TABLES statement (except in addition 7).
The structure of the fields, structures, and internal tables that you want to import must correspond to the objects exported to the dataset. Furthermore, the objects must be imported with the same names with which they were exported. If you do not do this, the import will fail, and a runtime error may occur.
Exception: The last field may be longer or shorter, as long as it has type CHAR. Likewise, you can add or remove CHAR fields at the end of the structure.
Addition 1
... = f (for each object you want to import)
Addition 2
... TO f (for each object you want to import)
Effect
Places the object in the field f.
Addition 3
... CLIENT g (before ID key)
Effect
The data is taken from client g (only for client-specific import/export databases).
Example
DATA: F1,
WA_INDX TYPE INDX.
IMPORT F1 = F1 FROM DATABASE INDX(AR) CLIENT '002' ID 'TEST'
TO WA_INDX.
Addition 4
... USING form
Note
This statement is for internal use only.
Incompatible changes or further developments may occur at any time without warning or notice.
Effect
The data is not read from the database. Instead, the subroutine form is called for each data record that would have been read from the database. This routine can use the key fields of the records that would have been read from the work area of the database table and write the procured data into the work area. The routine has the name <database table name>_<subroutine name>. It has one parameter that describes the operation mode (READ, UPDATE, or INSERT). The routine must set SY-SUBRC to indicate whether the function has been executed successfully.
Note
Runtime errors: Various runtime errors can occur, depending on the operands you use to import data:
Addition 5
... TO wa (last addition or after dbtab(ar))
Effect
Use this addition when you want to read user data fields that have been strored in the database. Instead of the table work area, the statement uses the specified work area wa. The target area must have the structure of the corresponding table dbtab.
Example
DATA WA LIKE INDX.
DATA F1.
IMPORT F1 = F1 FROM DATABASE INDX(AR)
CLIENT '002' ID 'TEST'
TO WA.
WRITE: / 'AEDAT:', WA-AEDAT,
/ 'USERA:', WA-USERA,
/ 'PGMID:', WA-PGMID.
Addition 6
... MAJOR-ID id1 (instead of ID key)
Addition 7
... MINOR-ID id2 (together with MAJOR-ID id1)
This addition is not allowed in an ABAP Objects context. See Generic ID not allowed.
Effect
Searches for a record with an ID whose first part corresponds to id1 and (if you also specify MINOR-ID id2) whose second part is greater than or equal to id2.
Variant 3
IMPORT obj1 ...objn FROM LOGFILE ID key.
Note
This statement is for internal use only.
Incompatible changes or further developments may occur at any time without warning or notice.
Additions:
1. ... = f (for each field f you want to import)
2. ... TO f (for each field f you want to import)
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed in clusters
Effect
Imports data objects (fields, structures, or internal tables) from the update data. You must specify the update key assigned by the system (with the serial request number).
The return code is set as follows:
SY-SUBRC = 0:
Data objects imported.
SY-SUBRC = 4:
Data objects could not be imported.
You may have used an incorrect ID.
The contents of all objects listed in the statement remain unchanged.
Addition 1
... = f (for each object you want to import)
Addition 2
... TO f (for each object you want to import)
Effect
Places the object in the field f.
Variant 4
IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.
Additions:
1. ... CLIENT g (before ID key)
2. ... TO wa (last addition or after dbtab(ar))
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Table work areas not allowed.
Effect
Places a directory of the objects stored under the specified ID using EXPORT TO DATABASE in the internal table itab. itab may not have the type HASHED TABLE or ANY TABLE.
The return code is set as follows:
SY-SUBRC = 0:
Directory imported.
SY-SUBRC = 4:
Unable to import directory.
You may have used an incorrect ID.
The internal table itabmust have the same structure as the ABAP Dictionary structure CDIR (INCLUDE STRUCTURE).
Addition 1
... CLIENT g (before ID key)
Effect
Takes the data from client g (only if the import/export database is client-specific).
Addition 2
... TO wa (last addition, or after dbtab(ar))
Effect
Uses the specified work area wa instead of the table work area. The table dbtab specified after DATABASE does not, in this case, have to be declared in a TABLES statement. The specified target area must have the same structure as dbtab.
Example
Directory of a cluster consisting of two fields and an internal table.
TYPES: BEGIN OF TAB3_LINE,
CONT(4),
END OF TAB3_LINE,
BEGIN OF DIRTAB_LINE.
INCLUDE STRUCTURE CDIR.
TYPES END OF DIRTAB_LINE.
DATA: INDXKEY LIKE INDX-SRTFD,
F1(4),
F2(8) TYPE P decimals 0,
TAB3 TYPE STANDARD TABLE OF TAB3_LINE,
DIRTAB TYPE STANDARD TABLE OF DIRTAB_LINE,
INDX_WA TYPE INDX.
INDXKEY = 'INDXKEY'.
EXPORT F1 = F1
F2 = F2
TAB3 = TAB3
TO DATABASE INDX(ST) ID INDXKEY " TAB3 has 17 entries
FROM INDX_WA.
IMPORT DIRECTORY INTO DIRTAB FROM DATABASE INDX(ST) ID INDXKEY
TO INDX_WA.
DIRTAB subsequently has the following contents:
NAME OTYPE FTYPE TFILL FLENG
F1 F C 0 4
F2 F P 0 8
TAB3 T C 17 4
Meanings of the individual fields:
NAME:
Name of the object
OTYPE:
Object type (F: field, R: structure / ABAP Dictionary structure, T: internal table)
FTYPE:
Field type (C: character, P: packed, ...)
Structures and internal tables have type C.
TFILL:
Number of filled lines in an internal table
FLENG:
Length of the field in bytes
For internal tables: Length of the header line.
Variant 5
IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.
This variant is not allowed in an ABAP Objects context. See Clusters not allowed in files
Note
Do not use this variant.
Note
Catchable runtime errors
The following catchable runtime errors can occur with this variant:
EXPORT_DATASET_CANNOT_OPEN: The EXPORT/IMPORT statement could not open the file.
OPEN_DATASET_NO_AUTHORITY: No authorization to access a file.
Variant 6
IMPORT obj1 ... objn FROM SHARED BUFFER dbtab(ar) ID key.
Additions:
1. ... = f (for each object you want to import)
2. ... TO f (for each object you want to import)
3. ... CLIENT g (before ID key)
4. ... TO wa (last addition or after dbtab(ar))
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See No implicit field names allowed in clusters and Table work areas not allowed.
Effect
Imports the data objects obj1 ... objn (fields, structures, complex structures, or tables) from the cross-transaction application buffer. The data objects are read from table dbtab using the ID key from area ar (see EXPORT TO SHARED BUFFER).
The return code is set as follows:
SY-SUBRC = 0:
Data objects imported.
SY-SUBRC = 4:
Unable to import data objects.
You may have used an incorrect ID.
The contents of all data objects listed in the statement remain unchanged.
Example
Importing two fields and an internal table from the application buffer with the structure indx:
TYPES: BEGIN OF ITAB3_LINE,
CONT(4),
END OF ITAB3_LINE.
DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
F1(4),
F2(8) TYPE P DECIMALS 0,
ITAB3 TYPE STANDARD TABLE OF ITAB3_LINE,
INDX_WA TYPE INDX.
Import data
IMPORT F1 = F1 F2 = F2 ITAB3 = ITAB3
FROM SHARED BUFFER INDX(ST) ID INDXKEY TO INDX_WA.
After the import, the fields before CLUSTR
(INDX-AEDAT and INDX-USERA) are filled with the
values they had before the corresponding EXPORT
statement.
Notes
The table dbtab specified after DATABASE must be declared under TABLES (except in addition 2).
The structures of the fields, structures, and internal tables you want to import must be the same as those fo the objects you exported. The EXPORT and IMPORT statements (unlike IMPORT FROM DATABASE statement) does not check that they are the same. If the structures are not the same, a runtime error may occur if invalid assignments are attempted during the operation. The objects must also be imported using the same name as that with which they were exported. Otherwise, nothing is imported.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... = f (for each field you want to import)
Addition 2
... TO f (for each field you want to import)
Effect
Places the object in field f.
Addition 3
... CLIENT g (before ID key)
Effect
Takes the data from client g (if the import/(export table dbtab is client-specific).
Addition 4
... TO wa (as last addition or after dbtab(ar))
Effect
Use this addition if the application buffer contains user data fields that you want to read. Instead of the table work area, the system uses the specified work area wa. The target area you specify must have the same structure as dbtab.
Example
DATA: INDX_WA TYPE INDX,
F1.
IMPORT F1 = F1 FROM SHARED BUFFER INDX(AR)
CLIENT '001' ID 'TEST'
TO INDX_WA.
WRITE: / 'AEDAT:', INDX_WA-AEDAT,
/ 'USERA:', INDX_WA-USERA,
/ 'PGMID:', INDX_WA-PGMID.
Variant 7
IMPORT (itab) FROM ... .
Effect
Specifies the objects you want to import in the internal table itab. You can use this variant instead of the static object list in the following variants: " ... FROM MEMORY", "... FROM DATABASE ", " ... FROM DATASET" und "... FROM SHARED BUFFER". Any additions that are valid in the static cases can also be used here. The table itab may not have the type HASHED TABLE or ANY TABLE.
Note
Structure of the internal table itab:
The first column of the table contains the object name in the data cluster (corresponds to obj1 ... objn from the static case. The second column contains the different name in the program (if necessary), and corresponds to f in the FROM f addition. If the table has only one column, or the second column contains only blanks, the statemeht is the equivalent of a static IMPORT with no TO addition. Both the first and the second columns should have the type character.
Example
TYPES: BEGIN OF OBJ_LINE,
CLUSTERNAME(30),
PROGRAMNAME(10),
END OF OBJ_LINE,
BEGIN OF B_LINE,
FIELD_1 TYPE I,
FIELD_2(1) TYPE N,
END OF B_LINE.
DATA: OBJ_TAB TYPE STANDARD TABLE OF OBJ_LINE,
OBJ_WA TYPE OBJ_LINE,
B_PROG TYPE STANDARD TABLE OF B_LINE,
B_WA TYPE B_LINE,
A(10),
C_PROG LIKE SYST.
MOVE: 'A' TO OBJ_WA-CLUSTERNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'B' TO OBJ_WA-CLUSTERNAME,
'B_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'C' TO OBJ_WA-CLUSTERNAME,
'C_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
IMPORT (OBJ_TAB) FROM MEMORY ID 'ABCD'.
The dynamic EXPORT statement corresponds to the static IMPORT statement.
IMPORT A = A B = B_PROG C = C_PROG FROM MEMORY ID 'ABCD'.
Places the single field A in field A, the internal table B in the internal table B_PROG, and the structure C in the structure C_PROG.
Note
Runtime errors:
DYN_IMEX_OBJ_NAME_EMPTY: The object name in the cluster (that is, the contents of the first column of obj_tab) is empty.
DYN_IMEX_OBJ_NAME_TWICE: An object name (in the cluster) occurs twice in the first column of the internal table.
DYN_IMEX_OBJ_NOT_FOUND: The data object in the program (the object whose name appears in column 2, if this is not empty, otherwise in column 1) does not exist.
The return code is set as follows:
SY-SUBRC is set in the same way as for the static IMPORT.
Note
General notes about catchable runtime errors
The variants
IMPORT obj1 ... objn FROM MEMORY,
IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key,
IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key,
IMPORT obj1 ... objn FROM SHARED BUFFER dbtab(ar) ID key,
IMPORT (itab) FROM ... ,
can cause the following catchable runtime errors:
CONNE_IMPORT_WRONG_COMP_LENG: A component in the dataset has an incorrect length
CONNE_IMPORT_WRONG_COMP_TYPE: A component in the dataset has an incorrect type
CONNE_IMPORT_WRONG_FIELD_LENG: A field in the dataset has the wrong length
CONNE_IMPORT_WRONG_FIELD_TYPE: A field in the dataset has the wrong type
CONNE_IMPORT_OBJECT_TYPE: Type conflict between a simple and a structured data type
CONNE_IMPORT_WRONG_STRUCTURE: Type conflict between structured objects
IMPORT_ALIGNMENT_MISMATCH: Same sequence of components in different structures
IMPORT_TYPE_MISMATCH: Only with IMPORT...FROM MEMORY | FROM SHARED BUFFER... -
hi,
how to print the Quantity variable with 2 decimals actually the field is having 3 decimals.
Ex: field1 having value <b>16000.000</b> and field2 value is <b>800.000</b>
in out put i want field1 = <b>16.000,00</b> and field2 = <b>800,00</b>.
same is achieved in script is done by using field1(I12.2), and field2(12.2).
how can we do same thing in Smartform....
Regards
Ashok PPlease see formatting options for Smart Forms. There you will find this:
&field(.<nat.number>)&
Limits output of decimal places to <nat.number>
You should then use: &field1(.2)&
Here is the complete list:
Overview
Formatting Options for Fields
Syntax
Description
&field+<offset>&
Skips offsets (<offset>) in the field value (character fields only). If the offset is greater than the length of the value, nothing is displayed.
&field(<length>)&
Sets the output length to <length>.
&field(*)&
If the field is defined by a Data Dictionary type, Smart Forms sets the output length to the value specified there.
&field(S)&
Suppresses the sign
&field(<)&
Displays the sign to the left of the number
&field(.<nat.number>)&
Limits output of decimal places to <nat.number>
&field(E<nat.number>)&
Displays the field value with the fixed exponent <nat.number>. The mantissa is adapted to this exponent by shifting the decimal character and inserting zeros.
&field(T)&
Suppresses thousand indicators when displaying fields of types DEC, CURR, INT, and QUAN.
&field(Z)&
Suppresses leading zeros in numbers
&field(I)&
Suppresses display of initial values
&field(K)&
Deactivates a conversion routine specified in the Data Dictionary
&field(R)&
Right-justified display. Use this option only when specifying an output length as well.
&field(F<filler>)&
Replaces left-justified blanks in the value by the fill character <filler>.
&field(L)&
Converts a date field to a local date and displays it. The date is then formatted using the edit mask JPDAT.
Since this representation uses Japanese characters, it is only to be used in the Japanese version of the SAP System.
&field(C)&
The system takes the field value as a sequence of words separated by blanks. Option C shifts these words to the left
and leaves one blank in-between as a separator. Any leading blanks are omitted. This effect corresponds to that
of the ABAP statement CONDENSE. -
Hi Xperts,
how To CAll Methods In SE38.
isit just like calling function module .
Can any one guide me through the process with small example and TCODE.
Thank You in Advance.Hi,
to call a method u should use syntax from SAP help...
Static Method Call
1. [CALL METHOD] meth_identifier( parameter_list ).
CALL METHOD meth_identifier parameter_list.
Short Forms
2. [CALL METHOD] { meth_identifier( )
| meth_identifier( a )
| meth_identifier( p1 = a1 p2 = a2 ... ) }.
Dynamic Method Call
3. CALL METHOD meth_identifier { parameter_list
| parameter_tables }.
Effect
Call of a method in ABAP Objects. There is a difference between a static method call, in which the method ID must be fully known in the program, and a dynamic method call, in which the method ID is determined entirely or in parts at runtime. The static method call can be executed in different forms. In one form, the parameters are passed in a parenthetical expression, in the other without a parenthetical expression. For the parenthetical expression, short forms are allowed. With the dynamic method call, you are not allowed to specify the parameters in parentheses and you must use the statement CALL METHOD.
When you call an instance method using a reference variable and the static type of the reference variable is a superclass of the dynamic type, then you can use the dynamic method call to call all visible methods of the dynamic type, whereas with the static method call, you can call only the visible methods of the static type.
Note
Functional methods cannot only be called with CALL METHOD, but also at operand positions.
rewards points if answer was helpful,
Regards,
Tejas -
Suppress leading spaces while displaying an amount field in a Smart form
Hi all,
In a smart form, I am using fields like KONV-kbetr and VBAP-netwr each of them currency type and 2 decimal places. I want to suppress the decimal places and also the leading spaces while displaying these fields in a smartform cause when this field is inserted in a sentence, a lot of gap is there between the field and the words of the sentence. I dont want to change the field length cause it can be that huge in some cases.
Please help.
Thanks ,Hi, if you would place it in a sentence, it would be an option to concatenate the text and values into one string and then condense it.
concatenate <text> <value> into lv_sentence.
condense lv_sentence.
but another way is to use codes for displaying values in smartforms:
This is from a smartforms PDF i have..
Output Options for Field Contents
Use the Formatting options to adapt the value of a field before printing it. You can enter the
relevant parameters directly behind the field name. Make sure to write the short forms of the
different options in uppercase letters. Some of the options can be combined.
General Information
The formatting options are not suited for all data types of fields (for example, for character fields
you need no exponential representation). You must distinguish between numeric fields and
character fields.
Numeric Fields
If specified, the system first evaluates the length (<length>).
If no length is specified, the system displays the value in its overall length.
The trailing blank indicates a positive sign. To suppress it, use formatting option S.
Any offset <offset> specified is ignored.
Sequence of evaluation: (<length>), sign to the left(<),Japanese date (L), suppress blanks (C),
right-justified display (R), insert fillers (F).
Character Fields
By default, the system displays the value of a field in its overall length, but truncates trailing
blanks.
Sequence of evaluation: suppress blanks (C), <offset> and (<length>), right-justified display (R),
insert fillers (F).
Overview
Formatting Options for Fields
Syntax Description
&field+<offset>& Skips <offset> places of the field value (character fields only). If the
offset is greater than the length of the value, nothing is displayed.
&field(<length>)& Sets the output length to <length>.
&field(*)& If the field is defined by a Data Dictionary type, Smart Forms set the
output length to the value specified there.
&field(S)& Suppresses the sign
&field(<)& Displays the sign to the left of the number
&field(.<nat.number>)& Limits output of decimal places to <nat.number>
&field(E<nat.number>)& Displays the field value with the fixed exponent <nat.number>. The
mantissa is adapted to this exponent by shifting the decimal
character and inserting zeros.
SAP Smart Forms (BC-SRV-SCR) SAP AG
Output Options for Field Contents
72 April 2001
&field(T)& Suppresses thousand indicators when displaying fields of types
DEC, CURR, INT, and QUAN.
&field(Z)& Suppresses leading zeros of numbers
&field(I)& Suppresses display of initial values
&field(K)& Deactivates a conversion routine specified in the Data Dictionary.
&field(R)& Right-justified display. Use this option only when specifying an
output length as well.
&field(F<filler>)& Replaces left-justified blanks in the value by the fill character <filler>.
&field(L)& Converts and a date field to a local date and displays it. The date is
then formatted using edit mask JPDAT.
Since this representation uses Japanese characters, use it in the
Japanese version of the SAP System only.
&field(C)& The system takes the field value as a sequence of words separated
by blanks. Option C shifts these words to the left and leaves only
one blank inbetween as separator. Any leading blanks are
suppressed. This effect corresponds to that of the ABAP statement
CONDENSE. -
Sap scripts for cheque payment
Hi,
How to modify the following form?
Form : F110_PRENUM_CHCKHi
fathima.
Modifying SAP Forms (F110_PRENUM_CHCK)
If you want to modify SAP forms, set up your development environment as follows:
Make sure that no SAP-standard forms are stored as client-specific copies in your development client.
Such forms should be held only in client 000, the SAP development and installation client. If you access an SAP-standard form from another client, then the central copy in client 000 is used.
If you need to remove SAP-standard objects from your development client, see Notes 10388 and 3355 in the SAP Online Service System (OSS). These notes explain the procedure for saving modified forms and then deleting all forms.
To modify SAP standard forms,
Copy the forms you need from client 000 to your development client.
Rename the forms using a name from the customer name reserve (names starting with Y or Z).
Copy the forms to one of your own Y or Z development classes.
Renaming the SAP standard object makes it possible to manage and transport your changes with the SAP workbench organizer. The organizer is not activated for SAP-standard objects that are modified in clients other than 000.
To put your modifications into effect, you must also modify the ABAP print program used to print documents that use this form. You should rename such print programs and store them in your own Y or Z development classes.
You can use the SAP Customizing System to replace the SAP print program with your modified print program in the affected applications.
Forms: Concepts
Forms are used to control the page layout and also the text formatting in your documents. Before formatting a document for output to the screen or to a printer, you must assign a form to it. If you do not specify a form for a document, then the SYSTEM form is assigned to the document by default.
Application-specific forms are used in SAP applications to specify the page layout for such special documents as invoice or checks. These forms specify the structure of the information on the page(s) of such a document. They define, for example, the address header, item lines, the footer, and so on.
There are two ways to format texts with forms:
In the standard SAPscript text processing (Tools ® Word processing ® Standard text), you can select a form for a document. You can then type text into the main window of the form and output the document in the format defined in the form.
For example, you can select a form for a letter. You can then type the body text of the letter in the main window. When you print the letter, the default text elements in the other windows of the form (heading, footer, and so on) are printed with the body text.
A document can be generated by a print program in one of the SAP applications. The print program uses a form to generate the document. Most correspondence and document generation in the SAP System are handled by way of print programs.
A print program selects the text elements that are to be printed in the windows of a form. It may also collect information from the user or ask the user to input text directly, as in some correspondence functions. The print program may also provide data for variables defined in the form.
Finally, the print program uses the form to format the document for display or printing.
Check this link...
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/802d7d454211d189710000e8322d00/frameset.htm
Step 1.
In SE71 Transaction Copy the standard Sapscript to your 'Z' Sapscript.
Step 2.
Go to NACE transaction assign your newly created 'Z' sapscript to the output type of your application.
Step 3.
Execute your transaction now your new sapscript will be executed.
regards
venu.T -
SAP Standard Scripts ( how to Modify Standard Scripts)
hi every one , This is Abdul Rahman , i want to know how i should modify Standard SAP Scripts like RVORDER01 or MEDRUCK SCRIPTS ,i want to know whole process . and how to Run the Script . plz any kindly send some good DOC or web pages which i can acess
thankyou
Abdul RahmanHi,
Modifying SAP Forms
If you want to modify SAP forms, set up your development environment as follows:
Make sure that no SAP-standard forms are stored as client-specific copies in your development client.
Such forms should be held only in client 000, the SAP development and installation client. If you access an SAP-standard form from another client, then the central copy in client 000 is used.
If you need to remove SAP-standard objects from your development client, see Notes 10388 and 3355 in the SAP Online Service System (OSS). These notes explain the procedure for saving modified forms and then deleting all forms.
To modify SAP standard forms,
Copy the forms you need from client 000 to your development client.
Rename the forms using a name from the customer name reserve (names starting with Y or Z).
Copy the forms to one of your own Y or Z development classes.
Renaming the SAP standard object makes it possible to manage and transport your changes with the SAP workbench organizer. The organizer is not activated for SAP-standard objects that are modified in clients other than 000.
To put your modifications into effect, you must also modify the ABAP print program used to print documents that use this form. You should rename such print programs and store them in your own Y or Z development classes.
You can use the SAP Customizing System to replace the SAP print program with your modified print program in the affected applications.
Forms: Concepts
Forms are used to control the page layout and also the text formatting in your documents. Before formatting a document for output to the screen or to a printer, you must assign a form to it. If you do not specify a form for a document, then the SYSTEM form is assigned to the document by default.
Application-specific forms are used in SAP applications to specify the page layout for such special documents as invoice or checks. These forms specify the structure of the information on the page(s) of such a document. They define, for example, the address header, item lines, the footer, and so on.
There are two ways to format texts with forms:
In the standard SAPscript text processing (Tools ® Word processing ® Standard text), you can select a form for a document. You can then type text into the main window of the form and output the document in the format defined in the form.
For example, you can select a form for a letter. You can then type the body text of the letter in the main window. When you print the letter, the default text elements in the other windows of the form (heading, footer, and so on) are printed with the body text.
A document can be generated by a print program in one of the SAP applications. The print program uses a form to generate the document. Most correspondence and document generation in the SAP System are handled by way of print programs.
A print program selects the text elements that are to be printed in the windows of a form. It may also collect information from the user or ask the user to input text directly, as in some correspondence functions. The print program may also provide data for variables defined in the form.
Finally, the print program uses the form to format the document for display or printing.
Check this link...
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/802d7d454211d189710000e8322d00/frameset.htm
Thanks and Regards,
Bharat Kumar Reddy.V -
Hi All,
I am new to upgradtion.I am upgrading from 4.6C to ECC6.0.
I am working in ABAP.I want the technical upgrade Procedure.LIke Basis people has done the every thing.They given me the system.What i need to do exactly.What is the procedure i have to follow.
If anybody has the documentation.By seeing that documentation i need to do Technical Upgrade.Please can anybody help me.Please this is very urgent.I will reward you more points.Following are the activities carried out after Basis activities in a Technical Upgrade -
SPAU & SPDD
During an upgrade or the import of a Support Package, existing objects of the SAP standard are overwritten with the objects redelivered. To help the customer retain the objects modified in a previous release, SAP provides all modified objects which are redelivered (in an upgrade or Support Package) in the upgrade adjustment of transactions SPAU and SPDD. These transactions allow customers to enter their modifications into the corresponding new objects being delivered at upgrade. The Modification Assistant supports this process of adopting customer modifications.
In the past, all objects modified by a customer and delivered again by SAP, an IBU or an SAP partner had to be manually re-modified during an upgrade. Now, modifications are either automatically adopted or the system provides you with an assistant for adjusting your modifications to the newly upgraded configuration.
http://help.sap.com/saphelp_nw2004s/helpdata/en/60/d6ba7bceda11d1953a0000e82de14a/content.htm
Catch up of Transports
There were some transports moved from DEV to PRD (4.6 c) after the development system was upgraded to ECC 6.0.
To keep both the development systems DEV 4.6c and D60 ECC 6.0 in Sync remediation of the respective objects was done. All the changes w.r.t the latest transport was incorporated in the new upgraded system D60 after comparison with DEV using the Remote Comparison functionality or the SE39 transaction.
DDCHECK
Table enhancement categories
OSS note Note 493387 - Potential effects of table- and structure - extensions
ABAP Fixing of the affected or Obsolete Function modules
Some tables are obsolete in ECC 6.0, moving the data from Obsolete tables to new tables
Some transactions are either changed or outdated or obsolete, or there are some screen changes; BDCs recorded for all such transactions should be re-recorded.
Please refer to the below WIKI page for details on upgrade -
https://wiki.sdn.sap.com/wiki/display/HOME/ERP2005+Upgrade
Hope this helps you. -
Change std invoice smart form?
hi experts,
how to change standard invoice, can u explain in details?Modifying SAP Forms
If you want to modify SAP forms, set up your development environment as follows:
Make sure that no SAP-standard forms are stored as client-specific copies in your development client.
Such forms should be held only in client 000, the SAP development and installation client. If you access an SAP-standard form from another client, then the central copy in client 000 is used.
If you need to remove SAP-standard objects from your development client, see Notes 10388 and 3355 in the SAP Online Service System (OSS). These notes explain the procedure for saving modified forms and then deleting all forms.
To modify SAP standard forms,
Copy the forms you need from client 000 to your development client.
Rename the forms using a name from the customer name reserve (names starting with Y or Z).
Copy the forms to one of your own Y or Z development classes.
Renaming the SAP standard object makes it possible to manage and transport your changes with the SAP workbench organizer. The organizer is not activated for SAP-standard objects that are modified in clients other than 000.
To put your modifications into effect, you must also modify the ABAP print program used to print documents that use this form. You should rename such print programs and store them in your own Y or Z development classes.
You can use the SAP Customizing System to replace the SAP print program with your modified print program in the affected applications.
Forms: Concepts
Forms are used to control the page layout and also the text formatting in your documents. Before formatting a document for output to the screen or to a printer, you must assign a form to it. If you do not specify a form for a document, then the SYSTEM form is assigned to the document by default.
Application-specific forms are used in SAP applications to specify the page layout for such special documents as invoice or checks. These forms specify the structure of the information on the page(s) of such a document. They define, for example, the address header, item lines, the footer, and so on.
There are two ways to format texts with forms:
In the standard SAPscript text processing (Tools ® Word processing ® Standard text), you can select a form for a document. You can then type text into the main window of the form and output the document in the format defined in the form.
For example, you can select a form for a letter. You can then type the body text of the letter in the main window. When you print the letter, the default text elements in the other windows of the form (heading, footer, and so on) are printed with the body text.
A document can be generated by a print program in one of the SAP applications. The print program uses a form to generate the document. Most correspondence and document generation in the SAP System are handled by way of print programs.
A print program selects the text elements that are to be printed in the windows of a form. It may also collect information from the user or ask the user to input text directly, as in some correspondence functions. The print program may also provide data for variables defined in the form.
Finally, the print program uses the form to format the document for display or printing.
Check this link...
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/802d7d454211d189710000e8322d00/frameset.htm
Reward Points if useful. -
What are the print modes available in the sap scripts?
Hi
Parent Topic: SAPScript
HOWTO:Sap script
Edit this entry - Discuss - Rename - Watch - History -
Major contributors: gopang, cmurphy262 | All Contributors
Your votes have been tallied! See which wiki entry took top honors and find out who is this year's Wiki Ironman. View the winners.
White Papers
Do You Need a Fax Server? A Special Guide on Fax Servers and SAP Electronic Document Delivery
Achieving Real-Time Supply Chain Integration
E-Invoicing for Business Process Efficiency with SAP(R) Systems
Jobs
SAP Consultants (Any City) - SD, MM, PP, FI/CO, CS, ABAP (Dice)
SAP ABAP LEAD (Dice)
SAP ABAP Workflow Developer -Contract (Dice)
Community Content
3 days until GO-LIVE!!! (Blogs)
RE: RE: RE: RE: RE: Lost connection when using tcode FS00 (Groups)
SAP SCRIPT
Table of contents Show TOCHide TOC
1. 1 Concepts
1.1. 1.1 Modifying SAP Forms
1.2. 1.2 Forms: Concepts
1.3. 1.3 Client and Language Versioning: Concepts
2. 2 Componentes
2.1. 2.1 Header Data
2.2. 2.2 Paragraph Formats and Attributes
2.2.1. 2.2.1 Standard Paragraph Attributes
2.2.2. 2.2.2 Font Attributes for Paragraphs
2.2.3. 2.2.3 Tabs in Paragraph Formats
2.2.4. 2.2.4 Paragraph and Heading Numbering
2.3. 2.3 Character Formats and Attributes
2.3.1. 2.3.1 Standard Attributes for Character Formats
2.3.2. 2.3.2 Font Attributes for Character Formats
2.4. 2.4 Windows
2.4.1. 2.4.1 Default Paragraph
2.5. 2.5 Pages
2.5.1. 2.5.1 Defining Follow-On Pages in Duplex Print Modes
2.5.2. 2.5.2 Testing Tray Selection and Print Mode Selection
2.6. 2.6 Page Windows
2.7. 2.7 Text Elements
2.7.1. 2.7.1 Default Text Element
2.8. 2.8 Main Window
3. 3 Técnicas
3.1. 3.1 Displaying Versions of Forms
3.2. 3.2 Including Graphics
3.2.1. 3.2.1 Using Boxes, Lines, and Shading
3.2.2. 3.2.2 Supported Printers
3.2.3. 3.2.3 Boxes, Lines, Shading: BOX, POSITION, SIZE
3.2.3.1. 3.2.3.1 BOX Command
3.2.3.2. 3.2.3.2 POSITION Command
3.2.3.3. 3.2.3.3 SIZE Command
3.2.4. 3.2.4 Pre-Setting BOX Position Arguments
3.2.5. 3.2.5 Using the Commands in Texts and Forms
3.2.6. 3.2.6 Tips and Guidelines
4. 4 Design Tools
4.1. 4.1 Form Components
4.2. 4.2 Processing in Overview
4.2.1. 4.2.1 Defining Header Data
4.2.1.1. 4.2.1.1 Completing the Header Data After Defining the Attributes
4.2.1.2. 4.2.1.2 Passing Data to an External Program
4.2.2. 4.2.2 Defining Paragraph Formats
4.2.3. 4.2.3 Defining Character Formats
4.2.4. 4.2.4 Defining Pages
4.2.5. 4.2.5 Defining Windows
4.2.6. 4.2.6 Using Text Elements in Page Windows
4.2.7. 4.2.7 Defining Page Windows
4.2.7.1. 4.2.7.1 Filling Page Windows with Text
4.2.8. 4.2.8 Using Text Elements in Page Windows
4.2.9. 4.2.9 Defining Main Windows in Page Windows
4.3. 4.3 Test-Printing a Form
5. 5 Releasing Forms
6. 6 SAPscript Control Commands
6.1. 6.1 Syntax of Control Commands
6.2. 6.2 Explicit Page Break: NEW-PAGE
6.3. 6.3 Preventing Page Breaks: PROTECT
6.4. 6.4 Next Main Window: NEW-WINDOW
6.5. 6.5 Assigning a Value to a Text Symbol: DEFINE
6.6. 6.6 Formatting Date Fields: SET DATE MASK
6.7. 6.7 Formatting Time Fields: SET TIME MASK
6.8. 6.8 Country-Dependent Formatting: SET COUNTRY
6.9. 6.9 Position of the Leading Sign: SET SIGN
6.10. 6.10 Initializing Numbered Paragraphs: RESET
6.11. 6.11 Including Other Texts: INCLUDE
6.12. 6.12 Changing the Style: STYLE
6.13. 6.13 Formatting Addresses: ADDRESS
6.13.1. 6.13.1 Parameters
6.14. 6.14 Setting a Footer Text in the Main Window: BOTTOM
6.15. 6.15 Conditional Text: IF
6.16. 6.16 Finding a Match: CASE
6.17. 6.17 Calling ABAP Subroutines: PERFORM
6.18. 6.18 Inserting Print Controls: PRINT-CONTROL
6.19. 6.19 Boxes, Lines, Shading: BOX, POSITION, SIZE
6.20. 6.20 Hexadecimal Data: HEX, ENDHEX
6.21. 6.21 Summing a Program Symbol: SUMMING
6.21.1. 6.21.1 Summing and Carrying Forward is Incorrect
7. 7 SAPscript Symbols
7.1. 7.1 Syntax of Symbols
7.2. 7.2 System Symbols
7.2.1. 7.2.1 Current Date
7.2.2. 7.2.2 Current Day Number
7.2.3. 7.2.3 Current Month Number
7.2.4. 7.2.4 Current Year Number
7.2.5. 7.2.5 Current Day Name (Long Form)
7.2.6. 7.2.6 Current Month Name (Long Form)
7.2.7. 7.2.7 Current Time
7.2.8. 7.2.8 Hours Component of Current Time
7.2.9. 7.2.9 Minutes Component of Current Time
7.2.10. 7.2.10 Seconds Component of Current Time
7.2.11. 7.2.11 Current Page Number
7.2.12. 7.2.12 Page Number of the Next Page
7.2.13. 7.2.13 Selected Device Type
7.2.14. 7.2.14 Spaces
7.2.15. 7.2.15 Underline
7.2.16. 7.2.16 Vertical Line
7.3. 7.3 Program Symbols
7.3.1. 7.3.1 SYST: System Fields in the ABAP Programming Environment
7.3.2. 7.3.2 USR03: User Address Data
7.3.3. 7.3.3 SAPSCRIPT: General SAPscript Fields
7.4. 7.4 Standard Symbols
7.5. 7.5 Text Symbols
7.6. 7.6 Formatting Options
7.6.1. 7.6.1 Offset
7.6.2. 7.6.2 Output Length
7.6.3. 7.6.3 Omitting the Leading Sign
7.6.4. 7.6.4 Leading Sign to the Left
7.6.5. 7.6.5 Leading Sign to the Right
7.6.6. 7.6.6 Omitting Leading Zeros
7.6.7. 7.6.7 Space Compression
7.6.8. 7.6.8 Number of Decimal Places
7.6.9. 7.6.9 Omitting the Separator for Thousands
7.6.10. 7.6.10 Specifying an Exponent for Floating Point Numbers
7.6.11. 7.6.11 Right-Justified Output
7.6.12. 7.6.12 Fill Characters
7.6.13. 7.6.13 Suppressing Output of Initial Values
7.6.14. 7.6.14 Ignoring Conversion Routines
7.6.15. 7.6.15 Changing the Value of a Counter
7.6.16. 7.6.16 Preceding and Subsequent Texts (Pre-Text / Post-Text)
7.7. 7.7 Country-Dependent Formatting
7.7.1. 7.7.1 Date Mask
7.7.2. 7.7.2 Time Mask
7.8. 7.8 Formatting Conventions
7.8.1. 7.8.1 Primary Formatting of System Symbols
7.8.2. 7.8.2 Primary Formatting of Standard Symbols
7.8.3. 7.8.3 Primary Formatting of Program Symbols
7.8.4. 7.8.4 Primary Formatting of Text Symbols
7.8.5. 7.8.5 End Formatting
1 Concepts Edit section
1.1 Modifying SAP Forms Edit section
If you want to modify SAP forms, set up your development environment as follows:
1. Make sure that no SAP-standard forms are stored as client-specific copies in your development client. Such forms should be held only in client 000, the SAP development and installation client. If you access an SAP-standard form from another client, then the central copy in client 000 is used.
If you need to remove SAP-standard objects from your development client, see Notes 10388 and 3355 in the SAP Online Service System (OSS). These notes explain the procedure for saving modified forms and then deleting all forms.
2. To modify SAP standard forms,
Copy the forms you need from client 000 to your development client.
Rename the forms using a name from the customer name reserve (names starting with Y or Z).
Copy the forms to one of your own Y or Z development classes.
Renaming the SAP standard object makes it possible to manage and transport your changes with the SAP workbench organizer. The organizer is not activated for SAP-standard objects that are modified in clients other than 000.
3. To put your modifications into effect, you must also modify the ABAP print program used to print documents that use this form. You should rename such print programs and store them in your own Y or Z development classes.
You can use the SAP Customizing System to replace the SAP print program with your modified print program in the affected applications
1.2 Forms: Concepts Edit section
Forms are used to control the page layout and also the text formatting in your documents. Before formatting a document for output to the screen or to a printer, you must assign a form to it. If you do not specify a form for a document, then the SYSTEM form is assigned to the document by default.
Application-specific forms are used in SAP applications to specify the page layout for such special documents as invoice or checks. These forms specify the structure of the information on the page(s) of such a document. They define, for example, the address header, item lines, the footer, and so on. There are two ways to format texts with forms:
In the standard SAPscript text processing (Tools  Word processing  Standard text), you can select a form for a document. You can then type text into the main window of the form and output the document in the format defined in the form.
For example, you can select a form for a letter. You can then type the body text of the letter in the main window. When you print the letter, the default text elements in the other windows of the form (heading, footer, and so on) are printed with the body text.
A document can be generated by a print program in one of the SAP applications. The print program uses a form to generate the document. Most correspondence and document generation in the SAP System are handled by way of print programs.
A print program selects the text elements that are to be printed in the windows of a form. It may also collect information from the user or ask the user to input text directly, as in some correspondence functions. The print program may also provide data for variables defined in the form.
Finally, the print program uses the form to format the document for display or printing.
1.3 Client and Language Versioning: Concepts Edit section
Forms and styles are client-specific. That is, a form or style other than the SAP standard in client 000 is available only in the client in which it was created.
Forms and styles are also language-specific. That is, the definitions and texts in a form or style are defined for a particular language. Forms and styles can be translated using the standard SAP translation tools.
Client 000 Defaulting: SAPscript accords forms and styles in client 000 a special status.
If a form or style that is used in a document is not available in the client in which the document is being printed, then SAPscript checks for the form or style in client 000. If it is found there, then the client 000 version is used to print the document.
SAP standard forms and styles are always held in client 000. You can take advantage of the client 000 defaulting as well by storing your Yxxx and Zxxx forms and styles there. That way, if a local version of a form or style is not present in a client, the client 000 version is used instead.
Language rules: SAPscript uses the following rules to manage versions of forms and styles in different languages:
The language in which a form or style is created is its "original language." You can translate a form or style into other languages using SAPs translation tools.
If a form or style is needed only in its original language and need not be translated, then you can indicate this in the language attributes in the header data. The form or style then does not appear in work lists in the translation tools.
In versions other than the original language version, changes to a form or style are limited only to translation of texts. No changes to definitions and attributes are permitted.
2 Componentes Edit section
2.1 Header Data Edit section
You can find header data in both form and style maintenance. In style maintenance, it is used primarily to present important information information designed to make it easier for the end user to select a style. The header data in form maintenance, on the other hand, is used for information and control purposes. For this reason, the header data of a form will be described in more detail.
Below, the header data is described as it appears in the alphanumeric Form Painter.
Like the header data of a style, the header data of a form comprises two parts: the data set by the system and the data you are expected to enter. The latter is dealt with separately.
Device-independent entries.
Description
A short explanatory description of the form (also applies to the style), designed to make selection easier for the end user.
Form class
You can assign a form to a class to help you organize and search for forms. The default set of classes is the set of program classes in your system.
Start page
Tells the print program which page format in a form to use first for printing.
Default paragraph
Paragraph set to * in standard text maintenance.
Tab stop
A grid set at specified intervals in all windows defined in the form. However, you should note that the tab stops are only valid in paragraphs where you have not defined your own tabs.
Language, Original language, Translation applic
Use these fields to record the master language and language of the current version of a form. Marking Translation applic makes the form accessible for translation from the SAP Systems translation tools (transaction SE63).
Device-dependent entries.
You can only enter values here that are supported in the R/3 printer definition. If you make other entries, this leads to errors in the check routine.
Page format
Determined from the spool administration table with transaction SPAD. Make sure there is a printer assignment there must be an additional spool format for the printer with the same page format.
Orientation
Depends on the page format selected. This can also be determined from the spool administration table. Please note that the formats landscape and portrait are not supported by all printers.
Lines per inch (LPI)
Basis for converting the unit of measurement LN in style and form maintenance. The value 6.00 is set by the system, as this value is supported by all printers.
Characters per inch (CPI)
Basis for converting the unit of measurement CH in style and form maintenance. The value 10.00 is set by the system, as this value is supported by all printers.
Font attributes
With these fields, you can set the default font for a form. The default font applies if other objects do not specify a font. SAPscript suggests a default font, which you can change.
2.2 Paragraph Formats and Attributes Edit section
In SAPscript, paragraphs are formatted using formats and their corresponding attributes. Text processing is simplified by the use of different paragraph attribute groups:
Standard
Font
Tabs
Outline
There are naming conventions for paragraph tags:
The paragraph tag can have one or two characters.
The first character in the paragraph tag must be a letter, the second a letter, number, or blank; special characters are not valid.
The paragraph format must be identified in the Description field.
2.2.1 Standard Paragraph Attributes Edit section
In the Standard attribute group, you find the general attributes that can be defined in paragraph formats:
Description
Precise explanation of your paragraph tag, so that the user can immediately identify it.
Left or right margin
Amount of space between the paragraph and the left or right border of the form window.
Indent first line
Indent of the first line of a paragraph. If the value is positive, it is indented to the right, if it is negative, it is indented to the left.
If you specify a negative value, then you must place the minus sign after the number: 1- .
Space before and space after
Space before and space after control the amount of space between paragraphs. The actual space between paragraphs results from the space after the preceding paragraph and the space before the following paragraph.
Alignment
Alignment of a paragraph.
Left-aligned
LEFT
Right-aligned RIGHT
Centered CENTER
Justified BLOCK
Line spacing
Spacing between the lines. The default value is 1 line; the LPI value (lines per inch) in the header data is used to calculate the line spacing.
No blank lines
Suppression of blank lines. You can control whether the blank lines of a paragraph should be suppressed in the printout or not:
No entry
blank lines not suppressed
X blank lines suppressed
Page protection
Cohesion of a paragraph. It is possible to determine whether or not a paragraph can be divided by a page break.
No entry
no page protection (default)
X all lines of the paragraph are on one page
Next paragraph same page
Cohesion of two adjacent paragraphs. Here you can define whether the subsequent paragraph should begin on the same page (that is, at least the first line of the subsequent paragraph must be on the same page).
No entry
subsequent paragraph is output on the same page or the next page, depending on the amount of space (default)
X subsequent paragraph begins on the same page
2.2.2 Font Attributes for Paragraphs Edit section
You can specify font attributes for paragraph formats. They control the font used in the text. You can specify these attributes both for the default font in the header and for particular paragraph formats:
Font family
Enter a font supported in the SAPscript font maintenance.
Font size
Enter the size of a character font. It is measured in 1/10 point.
Bold/Italic
Specify whether to use bold-face printing or italics.
Underlined
Mark this attribute to underline entire blocks of text.
When defining a paragraph format, use More to specify these underline attributes:
Spacing between the base line and the underline
Thickness
Intensity
Intensity is expressed in percent: 0 % is a black underline; 100 % is no underline.
If you defined default underlining in the header, then the fields for underline attributes are already displayed on the screen.
The following selection criteria apply to the font attributes bold, italics, and underlined:
Off attribute is not set
Retain inherited
On attribute is set
The combination of font family, font size, bold type attribute and italics attribute is referred to as a system font or SAP font. To use the SAPscript font maintenance, choose Tools  Word processing  Font.
2.2.3 Tabs in Paragraph Formats Edit section
You can define as many tab positions as you require for each paragraph format. The text can be aligned in different ways:
Left-aligned with LEFT
Right-aligned with RIGHT
Centered with CENTER
At the sign with SIGN
At the comma or decimal point with DECIMAL
You can control the tab feed in a paragraph with tab positions. The tab stops you define in the paragraph format replace the tab spacing you defined in the header data of the form. However, this depends on the extent to which you have defined tab stops in the paragraph format. If there are fewer tabs in the paragraph formats than in the header data, the tab stops of the header data are used for the rest of the line. The tab stops are represented as, , in the text editor.
You can use different units of measurement to define a tab position:
CH Characters
CM Centimeters
MM Millimeters
PT Points
TW Twips (1/20 point)
The unit of measurement CH is converted to an absolute unit of measurement using the CPI value (characters per inch) from the header data of the form.
2.2.4 Paragraph and Heading Numbering Edit section
The paragraph numbering and marking attributes are used to structure texts into chapters, subchapters, and sections. Numbering is carried out automatically by SAPscript.
You can create an outline with the entry options available:
Outline
Enter the name of the highest-level paragraph in an outline hierarchy here. The outline hierarchy is created by assigning this paragraph to all outline paragraphs.
Outline level
Enter the level in the outline hierarchy. The outline levels of the paragraphs are numbered upwards from 1; the highest outline level therefore has the outline number 1.
Number margin
Specify the space between numbering and window border. Note that your numbering may extend into the text area of the paragraph if the difference between the left margin and the number margin is not great enough to hold the numbering characters.
Left/right delimiter
Specify the character that precedes or follows the numbering.
Number chaining
Specify whether you want the paragraph numbering of the paragraph to be preceded by the numbering of all higher paragraphs in the hierarchy.
Example for number chaining
with without
3. 3.
3.1 1.
3.2 2.
3.2.1 1.
Character string
Specify the numbering format. The numbering can be assigned a different font or character format to the rest of the paragraph.
Numbering type
ARABIC
Arabic numerals: 1, 2, 3.
CHAR Fixed character: letter or numeral, entered in the field
LETTER Letters: A-Z
ROMAN Roman numerals: I, II, III, IV
Depending upon the numbering type that you select, the following attributes may also apply:
Fixed character
Define the fixed character to be used for numbering. You should only make an entry in the field Fixed character if you have specified CHAR as the numbering type. Fixed characters include + - and o .
Output length
Enter the number of characters for Arabic numerals.
Upper case
Specify for letters or Roman numerals.
2.3 Character Formats and Attributes Edit section
Character formats, as opposed to paragraph attributes, allow you to format entire blocks of text within a paragraph.
Character attribute groups can be:
Standard
Font
When you define character formats, observe the following naming conventions:
The character format can have one or two characters.
The first character must be a letter, the second a letter, number, or blank; special characters are not valid.
Enter a simple explanation in the field Description. It is intended to help the user make a selection.
2.3.1 Standard Attributes for Character Formats Edit section
Marker
Links a search key to the selected character string when the end user uses this character format. Examples include glossary, hypertext, and data element links. Here, selected character strings are assigned the appropriate key.
Bar code
Bar code that is required for certain variables and is known to the printer, for example EAN8. The character string is printed as a bar code if the character string concerned is selected.
Bar code names, such as EAN8, refer to system bar codes. These are defined in the SAPscript font maintenance (Tools  Word processing  Font).
Protected
The character string is not split by a line break, but printed together on the next line.
Hidden
The character string is not printed. The text is only visible in the text editor.
Superscript/subscript
The character string is printed half a line higher or lower.
The following options are available for defining these attribute types:
Off
Attribute is not set
Retain Attribute is inherited
On Attribute is set
2.3.2 Font Attributes for Character Formats Edit section
Font attributes can be specified for character formats as well as for paragraph formats. You have the same options as for defining font attributes for paragraph formats.
2.4 Windows Edit section
Windows are defined in form maintenance. They represent areas that are positioned on pages as page windows and in which at a later time text is printed. You must define at least one window for each form. Otherwise, SAPscript cannot format the text.
You can assign window names and window types. However, note that you can define only one main window per form.
Use one of these window types:
MAIN
Main window in which continuous text is printed. This is the window used by dialog users of a print program and form. For example, the body text of a letter would be entered in MAIN.
The text in the main window can extend over several pages. If the text fills one page, output continues in the window of the next and subsequent pages, as long as MAIN has been defined for these pages.
VAR
Window with variable contents. The text can vary on each page in which the window is positioned. Variable windows are formatted for each page.
To every window you can assign text, which is printed in the corresponding window when the form is formatted. To assign text, use text elements, which are stored with the form.
To create and maintain text elements with the SAPscript Editor, choose Text elements. Should the text selected for the window exceed the window size, then the text is cut off.
CONST
Window with constant contents that is formatted only once.
Currently, CONST windows are processed in the same way as VAR windows. You should only use windows of type VAR.
2.4.1 Default Paragraph Edit section
For a particular window, you can override the default paragraph format that is set in the form header. Enter the default format that should apply in the window in the Default paragraph field in the window definition screen.
2.5 Pages Edit section
You must define at least one page for every form. And you must designate a "first" page in the form header. Otherwise text formatting is not possible. In addition, you should inform the system which page is to be used after reaching the end of the first page. If you do not specify a next page, the output of your text ends at the end of the current page.
To define a page, give it a name and specify attributes for it:
Name of the next page
Page counter mode
INC Increases the counter by 1
HOLD Counter remains unchanged
START Sets the counter to 1
You can display the contents of the page counter with the system symbol&PAGE&.
Numbering type of the page counter
ARABIC Arabic numerals
LETTER Letters
ROMAN Roman numerals
Although CHAR is displayed as an entry option for the numbering type of the page counter, internally CHAR is converted to ARABIC.
Output length for page numbering with numerals
Upper or lower case for numbering with Roman numerals or letters
Resource name
With Resource name, you specify that the paper for this page should be taken from a particular paper tray at the printer.
In Resource name, enter the print control that has been defined for switching to the paper tray you want to use. In printer types pre-defined by SAP, these print controls are generally as follows:
TRY01 Select first paper tray
TRY02 Select second paper tray (if available at the printer)
TRY03 Select third paper tray (if available at the printer)
TRYEN Print envelopes (if available at the printer)
TRYMN Switch the printer to manual paper feed (if available at the printer). The printer pauses until you feed a sheet of paper into it.
TRYME Switch the printer to manual envelope feed (if available at the printer). The printer pauses until you feed an envelope into it.
You can use all tray selection print controls except TRY03 with suitably equipped printers that are defined with the following SAP device types: HPLJSTND, HPLJ_II, HPLJIIID, HPLJ4, LX4039, and SNI20XX8.
You can use TRY01, TRY02, TRY03, and TRYMN on suitably equipped printers that are defined with these device types: KYOF1000, KYOF1200, KYOFS1500.
See the spool system (transaction SPAD) to check on how your printers are defined.
Print mode
With Print mode, you can specify single- or double-sided printing for a page. You can choose from the following values:
' ' Currently active printing mode continues unchanged.
S The page is printed in simplex mode. That is, the printer should print on only one side of the paper. If another mode was previously active, then the printer is switched to simplex mode with the start of the page.
D The page is printed on the first side of a sheet in duplex mode. If another mode was previously active, then the printer is switched to duplex mode with the start of the pageand continues in this mode.
T The page is printed on the first side of a sheet in tumble duplex mode. That is, the printer prints on both sides. The page on the second side is always inverted, so that the footer of the second page is printed opposite the header of the first page.
If another mode was previously active, then the printer is switched to tumble duplex mode with the start of the page and continues printing in this mode.
Print modes are currently supported for printers that use the PCL-5 language. These are printers that are defined with the following SAP device types: HPLJ_II, HPLJIIID, HPLJ4, LX4039, SNI20XX8.
See the spool system (transaction SPAD) to check on how your printers are defined.
The print controls for these functions are SPMSI (begin simplex printing); SPMDU (begin duplex printing); SPMTU (begin tumble duplex printing); SPMFS (print on first side of sheet in duplex or tumble duplex mode); and SPMBS (print on second side of sheet in duplex or tumble duplex mode).
2.5.1 Defining Follow-On Pages in Duplex Print Modes Edit section
You switch to duplex or tumble duplex mode with a form page for which one of these modes is specified. To continue printing in the current mode, for follow-on pages you must define another page in which the Print mode field is empty. Otherwise, the following pages after the mode switch will continue to be printed only on the front sides of new sheets of paper.
The reason: When SAPscript sends a page with Print mode D or T to the printer, it not only sets the print mode accordingly. To ensure that the first page in the new mode is correctly output, SAPscript also instructs the printer to output the page on the front side of a sheet. If SAPscript sends a sequence of D or T pages to the printer, the output is printed only on the front side of each sheet.
You define a first page named FIRST for a form to be printed in duplex mode. You therefore set the Print mode in FIRST to D.
To make the duplex printing work correctly, you must define a second page FOLLOWER in which Print mode is left empty. In the form definition, you specify FOLLOWER as the follow-on page for FIRST and for itself as well.
Your text is then printed in duplex mode. FIRST switches the printer to duplex mode and forces printing of the first page on the front side of a new sheet. FOLLOWER accepts the duplex mode and sends no further mode print controls to the printer. The printer therefore alternately prints FOLLOWER pages on the fronts and backs of sheets.
2.5.2 Testing Tray Selection and Print Mode Selection Edit section
SAP provides predefined SAPscript documents with which you can test whether tray selection and print mode selection are working properly on your printers.
For tray selection, print the SAPscript document SAPSCRIPT-TRAYTEST, ID ST, Language D or E.
For print mode selection, print the SAPscript document SAPSCRIPT-PRINTMODETEST, ID ST, Language D or E.
2.6 Page Windows Edit section
When you define page windows, the window names are linked to page names. You must specify the position and size of the window on the assigned page.
Define the position of a window by specifying the left margin and upper margin and the size of a window by specifying its width and height.
Left margin
Space between the window and left margin of the page
Upper margin Space between the window and upper margin of the page
Window width Width of the window depending on the page format selected
Window height Height of the window depending on the page format selected
Note that the width of the main window must be the same on all pages. All other window types can have different sizes and positions on different pages.
To print multiple columns, define several main windows on a page. As text entry is continuous, once the first main window has been filled, output continues in the second main window.
Rewards if helpfull
Regards
Pavan
Maybe you are looking for
-
Why does App Store keep opening on it's own
It comes and goes, but when using certain apps that have ads ( for me it's usually my wallpaper apps) the App Store will automatically open like I had touched an ad. It's usually a King game like candy crush or something, but I won't even have my fi
-
Album shuffle in iTunes 8.1
Since i have downloaded iTunes 8.1, i've got a strange problem with the album shuffle function. The normal behaviour of itunes while playing in album shuffle mode is to play : 1. first track of the album 2. second track 3. third track. Itunes 8.1 wil
-
Mac Book / 10.5.2 ~ Keeps ejecting CD-R but DVD's seem okay.
Hello there, My apologizes, I know that there are different threads throughout several discussions on this or something that may seem very similar but regrettable I have not been able to find a solution. I have a first generation Black MacBook runnin
-
ACS : external database config. (AD)
Hello, I installed the last version of Cisco ACS 4.0 and I have a problem with the "Windows database configuration". I want to authenticate users on an active directory, but when I want to configure it I have an error message: "An error has occured w
-
Hello! One of our users checked out a file out of TFS. She replaced the file in that workspace with a modified version by copying it from a different location on her computer. She then tried to check it back in TFS. It comes up with a message saying