Skip to Content
author's profile photo Former Member
Former Member

Bdc for Housebank

Hi experts i am doing BDC on house bank through SM34 with clusterid vc_t012 . but problem is if i give bank key which is already created it doesn't saves through BDC but it saves when i execute the standard transaction normally.can u please check the piece of code and rectify my error.

PERFORM zz1bdc_field USING 'V_T012-HBKID'

wa1-f3." HBKID_002.

PERFORM zz1bdc_field USING 'V_T012-BANKS'

wa1-f4. " BANKS_003.

PERFORM zz1bdc_field USING 'V_T012-BANKL'

wa1-f5." BANKL_004.

SELECT bankl FROM bnka INTO i_bnka1 WHERE bankl = wa1-f5.

ENDSELECT.

IF i_bnka1 IS INITIAL.

PERFORM zz1bdc_dynpro USING 'SAPLBANK' '0100'.

PERFORM zz1bdc_field USING 'BDC_CURSOR'

'BNKA-BNKLZ'.

PERFORM zz1bdc_field USING 'BDC_OKCODE'

'=ENTR'.

PERFORM zz1bdc_field USING 'BNKA-BANKA'

wa1-f6." BANKA_005.

PERFORM zz1bdc_field USING 'BNKA-PROVZ'

wa1-f7."

PERFORM zz1bdc_field USING 'BNKA-STRAS'

wa1-f8."

PERFORM zz1bdc_field USING 'BNKA-ORT01'

wa1-f9."

PERFORM zz1bdc_field USING 'BNKA-BRNCH'

wa1-f10."

PERFORM zz1bdc_field USING 'BNKA-SWIFT'

wa1-f11."

PERFORM zz1bdc_field USING 'BNKA-BGRUP'

wa1-f12."

PERFORM zz1bdc_field USING 'BNKA-XPGRO'

wa1-f13."

PERFORM zz1bdc_field USING 'BNKA-BNKLZ'

wa1-f14."

/* even though i put this block letter code outside of IF it doesn't work

PERFORM zz1bdc_dynpro USING 'SAPLSTRD' '0300'.

PERFORM zz1bdc_field USING 'BDC_CURSOR'

'KO008-TRKORR'.

PERFORM zz1bdc_field USING 'BDC_OKCODE'

'=LOCK'.

PERFORM zz1bdc_field USING 'KO008-TRKORR'

wa-f15'.

endif.

PERFORM zz1bdc_dynpro USING 'SAPLFHBANKC' '0101'.

PERFORM zz1bdc_field USING 'BDC_CURSOR'

'V_T012-BANKL'.

PERFORM zz1bdc_field USING 'BDC_OKCODE'

'=UEBE'.

PERFORM zz1bdc_dynpro USING 'SAPLFHBANKC' '0100'.

PERFORM zz1bdc_field USING 'BDC_CURSOR'

'V_T012-BUKRS'.

PERFORM zz1bdc_field USING 'BDC_OKCODE'

'=BACK'.

PERFORM zz1bdc_dynpro USING 'SAPMSVMA' '0200'.

PERFORM zz1bdc_field USING 'BDC_OKCODE'

'/EBACK'.

PERFORM zz1bdc_field USING 'BDC_CURSOR'

'VCLDIR-VCLNAME'.

WAIT UP TO 2 SECONDS .

wa_ctuparams-racommit = 'X'.

wa_ctuparams-dismode = 'N'.

wa_ctuparams-updmode = 'A'.

CALL TRANSACTION 'SM34' USING bdcdata_tab

OPTIONS FROM wa_ctuparams MESSAGES INTO msgtb1 .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 01, 2014 at 06:24 AM

    Hi Rajendra,

    Please put statement 'COMMIT WORK' after the call transaction.

    do like this....

    CALL TRANSACTION 'SM34' USING bdcdata_tab

    OPTIONS FROM wa_ctuparams MESSAGES INTO msgtb1 .

    if sy-subrc is initial.

    commit work.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.