Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

bdc-uploading data into table control fields of xk01 transactions.

Dear friends,

my requirement is to upload flat file data into xk01 xtn thru BDC.

But i am unable to upload table control data.

My coding related to table control data is like this.

DATA:X(2),N(2) TYPE N.

N = 0.

LOOP AT T_BANKS INTO WA_BANKS.

N = N + 1.

ENDLOOP.

X = 1.

perform bdc_dynpro using 'SAPMF02K' '0130' 'X'.

CNT = 1.

DO N TIMES.

IF CNT > 5.

perform bdc_field using 'BDC_OKCODE' '=P+'. "*LOGIC FOR EXTENDING TABLE CONTROL

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'BDC_CURSOR' 'BANKNAM(01)'.

CNT = 1.

ENDIF.

LOOP AT T_BANKS INTO WA_BANKS FROM X TO X.

CONCATENATE 'LFBK-BANKS(' CNT ')' INTO FLD.

perform bdc_field using FLD wa_BANKS-BANKS.

ENDLOOP.

LOOP AT T_BANKL INTO WA_BANKL FROM X TO X.

CONCATENATE 'LFBK-BANKL(' CNT ')' INTO FLD.

perform bdc_field using FLD wa_BANKL-BANKL.

ENDLOOP.

LOOP AT T_BANKN INTO WA_BANKN FROM X TO X.

CONCATENATE 'LFBK-BANKN(' CNT ')' INTO FLD.

perform bdc_field using FLD wa_BANKN-BANKN.

ENDLOOP.

LOOP AT T_KOINH INTO WA_KOINH FROM X TO X.

CONCATENATE 'LFBK-KOINH(' CNT ')' INTO FLD.

perform bdc_field using FLD wa_KOINH-KOINH.

ENDLOOP.

LOOP AT T_BKONT INTO WA_BKONT FROM X TO X.

CONCATENATE 'LFBK-BKONT(' CNT ')' INTO FLD.

perform bdc_field using FLD wa_BKONT-BKONT.

ENDLOOP.

perform bdc_field using 'BDC_CURSOR' 'LFBK-bkont'.

perform bdc_field using 'BDC_OKCODE' '=BANK'.

perform bdc_dynpro using 'SAPLBANK' '0100' 'X'.

LOOP AT T_BANKA INTO WA_BANKA FROM X TO X.

CONCATENATE 'BNKA-BANKA(' CNT ')' INTO FLD.

perform bdc_field using FLD wa_BANKA-BANKA.

ENDLOOP.

perform bdc_field using 'BDC_CURSOR' 'BNKA-BANKA'.

perform bdc_field using 'BDC_OKCODE' '=ENTR'.

CNT = CNT + 1.

X = X + 1.

ENDDO.

My problem is that first table control data is getting loaded in the table fields BANKS, BANKL, BANKN, KOINH, BKONT . But next screen ('SAPLBANK' '0100' 'X'.) is not getting called and BANKA data is not getting filled..

Pls help.

As per the recording, first BANKS, BANKL, BANKN, KOINH, BKONT table control data should be filled and next screen should be called and then BANKA data should be filled and again cursor should come back to screen ('SAPMF02K' '0130' 'X'.).

similarly second table control data.

Not what you were looking for? View more on this topic or Ask a question