Interview Questions

We use clocking machine for recording employee clock-in/out ...

SAP, SD, BDC, Human Resource questions and answers


(Continued from previous question...)

We use clocking machine for recording employee clock-in/out ...

Q: We use clocking machine for recording employee clock-in/out . All the data is stored in a 'flat' file which is supposed to be uploaded into SAP. When tried to open and read the flat file using OPEN DATASET and READ DATASET commands, the Sy-subrc value returned is 8 and the error message 'the specified file not found' is displayed. We checked the path and the file is in the correct location. What is missing?

A: Check the path once again. Check the upper and lower cases. Define you parameter file name like filename-fileextern. Depending on the place where the flat file resides, the procedure varies. OPEN DATASET is used for upload of file from the host system. If your flat (text) file is on the PC, you can use the function WS_UPLOAD which will upload your text file into an internal table. This internal table data can be loaded into SAP. The syntax is as follows:

CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = pcfile
IMPORTING
FILELENGTH = fileleng
TABLES
DATA_TAB = internal table name
Please note that you have to specify the pcfile of length 128.

(Continued on next question...)

Other Interview Questions