ABAP Programs: Special conversions
REPORT ZSOURCE0709.
* Converting type c to type n
DATA: SCN(4) VALUE ’12×4′,
T1CN(2) TYPE N,
T2CN(6) TYPE N.
MOVE: SCN TO T1CN,
SCN TO T2CN.
* Converting type n to type c
DATA: SNC(4) TYPE N VALUE ’0124′,
T1NC(2),
T2NC(6).
MOVE: SNC TO T1NC,
SNC TO T2NC.
* Converting type n to type p
DATA: SNP(6) TYPE N VALUE ’012345′,
T1NP(10) TYPE P,
T2NP(2) TYPE P.
MOVE SNP TO T1NP.
*move snp to t2np. “This produces a runtime error when activated!
* Converting type p to type n
DATA: SPN(4) TYPE P VALUE 124,
T1PN(2) TYPE N,
T2PN(6) TYPE N.
MOVE: SPN TO T1PN,
SPN TO T2PN.
WRITE ‘Program finished’.
———————
ABAPer, mail: abap.community@gmail.com http://www.erpdb.info
If you like this post, you may as well like these too:
- Use variable time references in currency conversions Today, in SAP’s Business Information Warehouse, currency conversion can take place using different parameters defined in a currency translation key (source currency, target currency, exchange rate type and time reference)...
- Special Periods Special posting periods that subdivide the last regular posting period for closing operations. Irrespective of how we have defined our fiscal year, we can also use special periods. Special periods...
- Use of Special Period in SAP Besides the normal posting periods, SAP allows for defining a maximum four more posting periods, which are known as Special Periods as these are used for year-end closing activities. This...
- SAP FI FAQs – Special Topics 1. Answer True or False to the following: True/False. Multiple currencies may be used within a single cash journal. True/False. A company code may have may cash journals. True/False. The...
- Configure a special GL indicator for Customer You can use an existing special GL indicator ID or create a new one. After creating a special GL indicator id, update the chart of accounts and the Reconciliation account....
- ABAP Source Code: Syntax of ABAP/4 Programs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 * Declaration...
- ABAP Programs: Importing from the ABAP/4 Memory REPORT ZSOURCE1402. * Internal tables which will be imported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH HEADER LINE, NEW_BOOKINGS LIKE BOOKINGS OCCURS...
- ABAP Programs: Exporting to the ABAP/4 Memory REPORT ZSOURCE1401. * Work areas TABLES: CUSTOMERS, BOOKINGS. * Internal tables which will be exported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH...
- ABAP Programs for Beginners Here is the list of Programs available in the ABAP Master Code Book (PDF). How to define types and data objects A Few Simple Examples Working with database tables and...
- ABAP Programs: Using where clauses REPORT ZSOURCE1104.* Work areasTABLES: BOOKINGS, CUSTOMERS.* Internal tablesDATA CUSTOMER_ORDERS LIKE BOOKINGS OCCURS 100 WITH HEADER LINE.DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Selecting data with a simple where...
- ABAP Programs: Using colors REPORT ZSOURCE0807. * Display the header using an appropriate color (grayish blue)WRITE ‘Header’ COLOR COL_HEADING. * Switch the standard colorFORMAT COLOR COL_TOTAL. * Make the color less brightWRITE / ‘total...
- Ending ABAP Programs The execution of an ABAP program is always ended when the corresponding process in the runtime environment ends. From an ABAP programmer’s perspective, this is when the last of the...
- Different types of ABAP Programs There are nine types of ABAP Programs in SAP: 1 Executable Programs (ABAP Reports) I INCLUDE Program M Module Pool/Dialogue programs S Sub-Routine Pool J Interface Pool K Class Pool...
- Some Cool Programs in ABAP and the link is :- http://www.kabai.com/abaps/q.htm...



















Leave a Reply