cancel
Showing results for 
Search instead for 
Did you mean: 

How to using BDC or LSMM for uploading data.

Former Member
0 Kudos

Please help me how to write BDC program for the tranfer information from time machine or data of Excel file (include informations about In/Out record time ) to data SAP system.

I know that using BDC or LSMW for uploading data but

I don't know how to do it and I haven't any documents for that.

please help me steps by steps or if you have the doccuments about it, share it to me.

Thanks for your supports.

Regards,

Huyen Nguyen

Accepted Solutions (1)

Accepted Solutions (1)

sikindar_a
Active Contributor
0 Kudos

https://forums.sdn.sap.com/click.jspa?searchID=18173789&messageID=6400122

check this thread for LSMW

u can follow the BAPI also

Answers (1)

Answers (1)

Former Member
0 Kudos

I sugguest you transfer time records from time machine to sap using BAPI not BDC, for reason of performance. Code snippet as below:

CALL FUNCTION 'BAPI_CC1_UPLOAD_TIMEEVENT'

TABLES

TIMEEVENTS = TIMEEVENTS

RETURN = RETURN

EXCEPTIONS

OTHERS = 01.

CASE SY-SUBRC.

WHEN 0. " OK

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

TEXT_QUESTION = 'No error occured,posting time events now?'

DEFAULT_BUTTON = '1'

DISPLAY_CANCEL_BUTTON = SPACE

IMPORTING

ANSWER = POPUP_RET.

IF POPUP_RET = '1'.

CALL TRANSACTION 'PT45'.

ENDIF.

WHEN OTHERS. " to be implemented

LOOP AT RETURN .

WRITE: / RETURN-NUMBER,'---',RETURN-MESSAGE.

ENDLOOP.

ENDCASE.