Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

bdc_open_group error

Former Member
0 Likes
877

HI TO ALL SDNERS

plz help me to solve this error.When i process the session i gives me a message that

"BDC_OPEN_GROUP, create session .ZABHSES. not allowed, as last session is still active"

report ZABVENDOR_UPLOAD1

no standard page heading line-size 255.

types :begin of ty_ven,

i1 TYPE c,

lifnr LIKE rf02k-lifnr,

bukrs LIKE rf02k-bukrs,

ekorg LIKE rf02k-ekorg,

ktokk LIKE rf02k-ktokk,

anred LIKE lfa1-anred,

name1 LIKE lfa1-name1,

sortl LIKE lfa1-sortl,

land1 LIKE lfa1-land1,

akont LIKE lfb1-akont,

fdgrv LIKE lfb1-fdgrv,

waers LIKE lfm1-waers,

end of ty_ven.

data: it_ven type table of ty_ven,

wa_ven like line of it_ven.

types: begin of ty_bank,

j1 type c,

banks LIKE lfbk-banks,"BANK COUNTRY KEY

bankl LIKE lfbk-bankl,"BANK KEYS

bankn LIKE lfbk-bankn,"CONTROL KEY

koinh LIKE lfbk-koinh,"aacount name

BANKA LIKE BNKA-BANKA,

end of ty_bank.

data:it_bank type table of ty_BANK,

wa_bank like line of it_BANK.

DATA : cnt(4) TYPE n.

DATA : fdt(20) TYPE c.

*DATA : c TYPE i.

*

include bdcrecx1.

start-of-selection.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\VN1.TXT'

  • FILETYPE = 'ASC'

  • HAS_FIELD_SEPARATOR = ' '

TABLES

DATA_TAB = IT_VEN.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\BANK.TXT'

  • FILETYPE = 'ASC'

  • HAS_FIELD_SEPARATOR = ' '

TABLES

DATA_TAB = IT_BANK.

.

*ENDLOOP.

LOOP AT IT_VEN INTO WA_VEN.

SPLIT WA_VEN AT '*' INTO WA_VEN-I1

WA_VEN-LIFNR

WA_VEN-bukrs

WA_VEN-ekorg

WA_VEN-ktokk

WA_VEN-anred

WA_VEN-name1

WA_VEN-sortl

WA_VEN-land1

WA_VEN-akont

WA_VEN-fdgrv

WA_VEN-waers.

perform open_group.

perform bdc_dynpro using 'SAPMF02K' '0100'.

perform bdc_field using 'BDC_CURSOR'

'RF02K-KTOKK'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RF02K-LIFNR'

WA_VEN-LIFNR.

perform bdc_field using 'RF02K-BUKRS'

WA_VEN-bukrs.

perform bdc_field using 'RF02K-EKORG'

WA_VEN-ekorg.

perform bdc_field using 'RF02K-KTOKK'

WA_VEN-ktokk.

perform bdc_dynpro using 'SAPMF02K' '0110'.

perform bdc_field using 'BDC_CURSOR'

'LFA1-LAND1'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LFA1-ANRED'

WA_VEN-anred.

perform bdc_field using 'LFA1-NAME1'

WA_VEN-name1.

perform bdc_field using 'LFA1-SORTL'

WA_VEN-sortl.

perform bdc_field using 'LFA1-LAND1'

WA_VEN-land1.

perform bdc_dynpro using 'SAPMF02K' '0120'.

perform bdc_field using 'BDC_CURSOR'

'LFA1-KUNNR'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_dynpro using 'SAPMF02K' '0130'.

perform bdc_field using 'BDC_CURSOR'

'LFBK-KOINH(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

CNT = 0.

LOOP AT IT_BANK INTO WA_BANK WHERE J1 EQ WA_VEN-I1.

SPLIT WA_BANK AT '*' INTO WA_BANK-J1

WA_BANK-BANKS

WA_BANK-bankl

WA_BANK-bankn

WA_BANK-koinh

WA_BANK-BANKA.

CNT = CNT + 1.

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

perform bdc_field using FDT

WA_BANK-BANKS.

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

perform bdc_field using FDT

WA_BANK-BANKL.

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

perform bdc_field using FDT

WA_BANK-BANKN.

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

perform bdc_field using FDT

WA_BANK-KOINH.

IF cnt = 5.

cnt = 0.

perform bdc_dynpro using 'SAPLBANK' '0100'.

perform bdc_field using 'BDC_CURSOR'

'BNKA-BANKA'.

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

perform bdc_field using FDT

WA_BANK-BANKA.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

*perform bdc_field using 'BNKA-BANKA'

  • 'BANK OF INDIA'.

perform bdc_dynpro using 'SAPMF02K' '0130'.

perform bdc_field using 'BDC_CURSOR'

'LFBK-BANKS(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

ENDIF.

ENDLOOP.

perform bdc_dynpro using 'SAPMF02K' '0210'.

perform bdc_field using 'BDC_CURSOR'

'LFB1-FDGRV'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LFB1-AKONT'

WA_VEN-akont.

perform bdc_field using 'LFB1-FDGRV'

WA_VEN-fdgrv.

perform bdc_dynpro using 'SAPMF02K' '0215'.

perform bdc_field using 'BDC_CURSOR'

'LFB1-ZTERM'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_dynpro using 'SAPMF02K' '0220'.

perform bdc_field using 'BDC_CURSOR'

'LFB5-MAHNA'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_dynpro using 'SAPMF02K' '0310'.

perform bdc_field using 'BDC_CURSOR'

'LFM1-WAERS'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LFM1-WAERS'

WA_VEN-waers.

perform bdc_dynpro using 'SAPMF02K' '0320'.

perform bdc_field using 'BDC_CURSOR'

'RF02K-LIFNR'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_dynpro using 'SAPLSPO1' '0300'.

perform bdc_field using 'BDC_OKCODE'

'=YES'.

perform bdc_transaction using 'XK01'.

ENDLOOP.

perform close_group.

6 REPLIES 6
Read only

Former Member
0 Likes
817

Hi Moezam,

Check transaction SM35 is any previous sessions are still open.

Regards,

John.

Read only

0 Likes
817

HI JOHN,

I HAVE SEEN SM35 AND ALSO DELETED THE PREVIOUS SESSIONS IN SM35. THEY ARE NO SESSIONS AT ALL IN SM35.I HAVE ALSO USED PROGRAM RSBDCDEL TO DELETE ALL BI SESSIONS .PLEASE HELP ME OUT

Read only

0 Likes
817

Hi Moazam,

Could you check this post:

Regards,

John.

Read only

Former Member
0 Likes
817

Hi,

include them and see in your program

----


  • Start new screen *

----


FORM bdc_dynpro USING program dynpro.

CLEAR bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

ENDFORM.

----


  • Insert field values

----


FORM bdc_field USING fnam fval.

IF NOT fval IS INITIAL.

CLEAR bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

APPEND bdcdata.

ENDIF.

CLEAR wa.

ENDFORM.

Regards

Read only

0 Likes
817

in response kpn the forms are already there in my code

Read only

0 Likes
817

anybody help me still not getting it