17.08.2013 Views

Data Interfaces

Data Interfaces

Data Interfaces

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example: ABAP/4 Dictionary Structures<br />

© SAP AG<br />

REPORT RSFFF01C.<br />

TABLES: SFLIGHT, SBC420A.<br />

PARAMETERS<br />

FILE(20) DEFAULT '/tmp/RSFFF01A'<br />

LOWER CASE.<br />

GET SFLIGHT.<br />

MOVE-CORRESPONDING SFLIGHT TO SBC420A.<br />

TRANSFER SBC420A TO FILE.<br />

WRITE: / SBC420A-CARRID, SBC420A-CONNID,<br />

/ SBC420A-FLDATE, SBC420A-PLANETYPE.<br />

ULINE.<br />

Table structure SBC420A<br />

--------------------------------------------------------------------<br />

Name Type Length Meaning<br />

--------------------------------------------------------------------<br />

SBC420A-CARRID CHAR 03 Short description of airline company<br />

SBC420A-CONNID NUMC 04 Code for flight connection<br />

SBC420A-FLDATE DATS 08 Flight date<br />

SBC420A-PLANETYPE CHAR 10 Aircraft type<br />

REPORT RSFFF01D.<br />

TABLES: SFLIGHT, SBC420A.<br />

DATA: BEGIN OF REC.<br />

INCLUDE STRUCTURE SBC420A.<br />

DATA: END OF REC.<br />

PARAMETERS<br />

FILE(20) DEFAULT '/tmp/RSFFF01A'<br />

LOWER CASE.<br />

GET SFLIGHT.<br />

MOVE-CORRESPONDING SFLIGHT TO REC.<br />

TRANSFER REC TO FILE.<br />

WRITE: / REC-CARRID, REC-CONNID,<br />

/ REC-FLDATE, REC-PLANETYPE.<br />

ULINE.<br />

Dict.<br />

You can also use structures from the ABAP/4 Dictionary for data transfer. To do this, declare the<br />

structure with TABLES.<br />

Then, in your program, do either of the following:<br />

- use the work area declared with TABLES<br />

- copy the structure for your field string with INCLUDE STRUCTURE.<br />

You can display the ABAP/4 Dictionary structure in the ABAP/4 Editor with the SHOW command.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!