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: Transfer Program 3<br />

© SAP AG<br />

DO.<br />

*E Read in data record<br />

READ DATASET OLDFILE INTO OLDREC.<br />

IF SY-SUBRC NE 0. EXIT. ENDIF.<br />

*E Check: Transfer only certain data records<br />

IF OLDREC-LIFNR(5) NE 'BC420'<br />

OR OLDREC-LIFNR(6) EQ 'BC420B'<br />

OR OLDREC-TELF1 EQ SPACE.<br />

TRANSFER OLDREC TO ERRFILE.<br />

*E TEXT-001:'<strong>Data</strong> not transferred for vendor:'<br />

WRITE: / TEXT-001, OLDREC-LIFNR.<br />

ELSE.<br />

*E Convert: Other vendor numbers in SAP system<br />

IF OLDREC-LIFNR+5(1) = 'A'.<br />

OLDREC-LIFNR+5(1) = 'B'.<br />

ENDIF.<br />

*E Convert: Write out abbreviations in full<br />

CASE OLDREC-ANRED.<br />

WHEN 'Co'. BLFA1-ANRED = 'Company'.<br />

WHEN OTHERS. BLFA1-ANRED = NODATA.<br />

ENDCASE.<br />

When a data record has been read, a check is made to see if the data record should in fact be<br />

transferred. In general, extensive checks are run using a customer check table.<br />

If the check proves negative, the data record is placed in a customer error file.<br />

Some data is then converted. In general, a customer table is also used here.

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

Saved successfully!

Ooh no, something went wrong!