Skip to Content
0
Former Member
Apr 26, 2007 at 10:33 AM

BDC Using Call transaction

16 Views

Hi,

Iam uploading the file using bdc call transaction.

Iam having problem after uploading the data from the flat file, again it is going

to the startting screen.(i,e iam not able to come out of the screen). It is asking the OK-CODE for 6 times when i prees the exit button, then it is throwing the error messages. Iam attaching the recording code below

PERFORM bdc_dynpro USING 'SAPMF40K' '0101'.

PERFORM bdc_field USING 'BDC_CURSOR'

'FEBMKA-MNAM1'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'FEBMKA-BUKRS'

'IN14'.

PERFORM bdc_field USING 'FEBMKA-HBKID'

gu_upload-hbkid.

PERFORM bdc_field USING 'FEBMKA-HKTID'

gu_upload-hktid.

PERFORM bdc_field USING 'FEBMKA-AZNUM'

gu_upload-aznum.

PERFORM bdc_field USING 'FEBMKA-AZDAT'

gu_upload-azdat.

PERFORM bdc_field USING 'FEBMKA-SSALD'

gu_upload-ssald.

PERFORM bdc_field USING 'FEBMKA-ESALD'

gu_upload-esald.

PERFORM bdc_field USING 'FEBMKA-BUDTM'

gu_upload-budtm.

PERFORM bdc_field USING 'FEBMKA-MNAM1'

gu_upload-mnam1.

PERFORM bdc_field USING 'FEBMKA-JNAME'

gu_upload-jname.

&----


*& POPULATE THE DATA FOR SECOND SCREEN

&----


DATA : fnam(20) TYPE c,

idx TYPE c.

MOVE 1 TO idx.

LOOP AT itab.

PERFORM bdc_dynpro USING 'SAPMF40K' '8000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'FEBMKK-CHECT_KF(03)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

CONCATENATE 'FEBMKA-VGMAN(' idx ')' INTO fnam.

PERFORM bdc_field USING fnam

itab-vgman.

CONCATENATE 'FEBEP-VALUT(' idx ')' INTO fnam.

PERFORM bdc_field USING fnam itab-valut.

CONCATENATE 'FEBMKA-KWBTR(' idx ')' INTO fnam.

PERFORM bdc_field USING fnam itab-kwbtr.

CONCATENATE 'FEBMKK-CHECT_KF(' idx ')' INTO fnam.

PERFORM bdc_field USING fnam itab-chect_kf.

idx = idx + 1.

ENDLOOP.

&----


*& POPULATE THE DATA FOR THIRD SCREEN

&----


PERFORM bdc_dynpro USING 'SAPMF40K' '8000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'FEBMKK-CHECT_KF(03)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=SICH'.

&----


*& POPULATE THE DATA FOR FOURTH SCREEN

&----


PERFORM bdc_dynpro USING 'SAPMF40K' '0101'.

PERFORM bdc_field USING 'BDC_CURSOR'

'FEBMKA-BUKRS'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=BUCH'.

PERFORM bdc_field USING 'FEBMKA-BUKRS'

'IN14'.

PERFORM bdc_field USING 'FEBMKA-HBKID'

gu_upload-hbkid.

PERFORM bdc_field USING 'FEBMKA-HKTID'

gu_upload-hktid.

PERFORM bdc_field USING 'FEBMKA-AZNUM'

gu_upload-aznum.

PERFORM bdc_field USING 'FEBMKA-AZDAT'

gu_upload-azdat.

PERFORM bdc_field USING 'FEBMKA-SSALD'

gu_upload-ssald.

PERFORM bdc_field USING 'FEBMKA-ESALD'

gu_upload-esald.

PERFORM bdc_field USING 'FEBMKA-BUDTM'

gu_upload-budtm.

PERFORM bdc_field USING 'FEBMKA-MNAM1'

gu_upload-mnam1.

PERFORM bdc_field USING 'FEBMKA-JNAME'

gu_upload-jname.

PERFORM bdc_dynpro USING 'SAPMF40K' '0101'.

PERFORM bdc_field USING 'BDC_CURSOR'

'FEBMKA-BUKRS'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=BACK'.

PERFORM bdc_field USING 'FEBMKA-BUKRS'

'IN14'.

PERFORM bdc_field USING 'FEBMKA-HBKID'

gu_upload-hbkid.

PERFORM bdc_field USING 'FEBMKA-HKTID'

gu_upload-hktid.

PERFORM bdc_field USING 'FEBMKA-AZNUM'

gu_upload-aznum.

PERFORM bdc_field USING 'FEBMKA-AZDAT'

gu_upload-azdat.

PERFORM bdc_field USING 'FEBMKA-MNAM1'

gu_upload-mnam1.

PERFORM bdc_field USING 'FEBMKA-JNAME'

gu_upload-jname.