17.08.2013 Views

Data Interfaces

Data Interfaces

Data Interfaces

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example: Transfer Program 1<br />

© SAP AG<br />

REPORT YSFFF04A.<br />

*E SAP structures for BDC:<br />

TABLES: BGR00, BLF00, BLFA1.<br />

*E Old structures:<br />

DATA: BEGIN OF OLDREC,<br />

TELF1(10) TYPE C,<br />

LIFNR(8) TYPE C,<br />

ANRED(2) TYPE C,<br />

NAME1(30) TYPE C,<br />

END OF OLDREC.<br />

*E Help structure for record layout initialization:<br />

DATA: BEGIN OF AUXREC.<br />

INCLUDE STRUCTURE BLFA1.<br />

DATA: END OF AUXREC.<br />

*E Target fields for conversions:<br />

DATA: LIFNR LIKE BLF00-LIFNR,<br />

NAME1 LIKE BLFA1-NAME1,<br />

TELF1 LIKE BLFA1-TELF1.<br />

*E Only for record layout initialization:<br />

DATA: N TYPE I.<br />

FIELD-SYMBOLS .<br />

*E File and session names, nodata flag:<br />

PARAMETERS:<br />

OLDFILE(20) DEFAULT '/tmp/OLD' LOWER CASE,<br />

SAPFILE(20) DEFAULT '/tmp/SAP' LOWER CASE,<br />

ERRFILE(20) DEFAULT '/tmp/ERROR' LOWER CASE,<br />

SESSION(20) DEFAULT 'B420SES041' LOWER CASE,<br />

NODATA DEFAULT '/' LOWER CASE.<br />

The program in the above example transfers telephone numbers from a sequential file. The data records<br />

have the following format: Telephone number (10), vendor number (8), form of address (2), name (30).<br />

The data is checked, converted and formatted so that it can be processed by the standard SAP batch<br />

input program RFBIKR00.<br />

This is a general example. All processing takes places in the same system and in ABAP/4. It would of<br />

course be possible to simplify the data transfer in this particular case.

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

Saved successfully!

Ooh no, something went wrong!