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 invalid user name error

Former Member
0 Likes
2,274

hai ,

the given below is my bdc programming. while am executing(F8) these program it depicts the message in one dilaog box like as bdc_open_group , user name is invalid. or say this program is correct or not.

if any error .recover it

plz resolve this problem.

REPORT YSUSBDC5.

DATA: BDC_TAB LIKE BDCDATA OCCURS 6 WITH HEADER LINE.

START-OF-SELECTION.

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

  • DEST = FILLER8

GROUP = 'SURENDER'

  • HOLDDATE = FILLER8

  • KEEP = FILLER1

  • USER = FILLER12

  • RECORD = FILLER1

PROG = SY-CPROG.

  • IMPORTING

  • QID =

  • EXCEPTIONS

  • CLIENT_INVALID = 1

  • DESTINATION_INVALID = 2

  • GROUP_INVALID = 3

  • GROUP_IS_LOCKED = 4

  • HOLDDATE_INVALID = 5

  • INTERNAL_ERROR = 6

  • QUEUE_ERROR = 7

  • RUNNING = 8

  • SYSTEM_LOCK_ERROR = 9

  • USER_INVALID = 10

  • OTHERS = 11

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

PERFORM FILL_BDC_TAB.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'FK02'

  • POST_LOCAL = NOVBLOCAL

  • PRINTING = NOPRINT

  • SIMUBATCH = ' '

  • CTUPARAMS = ' '

TABLES

DYNPROTAB = BDC_TAB.

  • EXCEPTIONS

  • INTERNAL_ERROR = 1

  • NOT_OPEN = 2

  • QUEUE_ERROR = 3

  • TCODE_INVALID = 4

  • PRINTING_INVALID = 5

  • POSTING_INVALID = 6

  • OTHERS = 7

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'BDC_CLOSE_GROUP'

  • EXCEPTIONS

  • NOT_OPEN = 1

  • QUEUE_ERROR = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

FORM FILL_BDC_TAB.

REFRESH BDC_TAB.

PERFORM POPULATE_BDC_TAB USING:

'1' 'SAPMF02K' '0106',

' ' 'RF02K-LIFNR' 'SUREN',

' ' 'RF02K_D0110' 'X',

'1' 'SAPMF02K' '0111',

' ' 'LFA1-NAME1' 'SURENDER',

' ' 'LFA1-STRAS' '69 abass ali',

' ' 'SZA1_D0100-SMTP_ADDR' '[email protected]'.

ENDFORM.

FORM POPULATE_BDC_TAB USING FLAG VAR1 VAR2.

CLEAR BDC_TAB.

IF FLAG = '1'.

BDC_TAB-PROGRAM = VAR1.

BDC_TAB-DYNPRO = VAR2.

BDC_TAB-DYNBEGIN = 'X'.

ELSE.

BDC_TAB-FNAM = VAR1.

BDC_TAB-FVAL = VAR2.

ENDIF.

APPEND BDC_TAB.

ENDFORM.

regards

SURENDER

hai ,

the given below is my bdc programming. while am executing(F8) these program it depicts the message in one dilaog box like as bdc_open_group , user name is invalid. or say this program is correct or not.

if any error .recover it

plz resolve this problem.

REPORT YSUSBDC5.

DATA: BDC_TAB LIKE BDCDATA OCCURS 6 WITH HEADER LINE.

START-OF-SELECTION.

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

  • DEST = FILLER8

GROUP = 'SURENDER'

  • HOLDDATE = FILLER8

  • KEEP = FILLER1

  • USER = FILLER12

  • RECORD = FILLER1

PROG = SY-CPROG.

  • IMPORTING

  • QID =

  • EXCEPTIONS

  • CLIENT_INVALID = 1

  • DESTINATION_INVALID = 2

  • GROUP_INVALID = 3

  • GROUP_IS_LOCKED = 4

  • HOLDDATE_INVALID = 5

  • INTERNAL_ERROR = 6

  • QUEUE_ERROR = 7

  • RUNNING = 8

  • SYSTEM_LOCK_ERROR = 9

  • USER_INVALID = 10

  • OTHERS = 11

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

PERFORM FILL_BDC_TAB.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'FK02'

  • POST_LOCAL = NOVBLOCAL

  • PRINTING = NOPRINT

  • SIMUBATCH = ' '

  • CTUPARAMS = ' '

TABLES

DYNPROTAB = BDC_TAB.

  • EXCEPTIONS

  • INTERNAL_ERROR = 1

  • NOT_OPEN = 2

  • QUEUE_ERROR = 3

  • TCODE_INVALID = 4

  • PRINTING_INVALID = 5

  • POSTING_INVALID = 6

  • OTHERS = 7

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'BDC_CLOSE_GROUP'

  • EXCEPTIONS

  • NOT_OPEN = 1

  • QUEUE_ERROR = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

FORM FILL_BDC_TAB.

REFRESH BDC_TAB.

PERFORM POPULATE_BDC_TAB USING:

'1' 'SAPMF02K' '0106',

' ' 'RF02K-LIFNR' 'SUREN',

' ' 'RF02K_D0110' 'X',

'1' 'SAPMF02K' '0111',

' ' 'LFA1-NAME1' 'SURENDER',

' ' 'LFA1-STRAS' '69 abass ali',

' ' 'SZA1_D0100-SMTP_ADDR' '[email protected]'.

ENDFORM.

FORM POPULATE_BDC_TAB USING FLAG VAR1 VAR2.

CLEAR BDC_TAB.

IF FLAG = '1'.

BDC_TAB-PROGRAM = VAR1.

BDC_TAB-DYNPRO = VAR2.

BDC_TAB-DYNBEGIN = 'X'.

ELSE.

BDC_TAB-FNAM = VAR1.

BDC_TAB-FVAL = VAR2.

ENDIF.

APPEND BDC_TAB.

ENDFORM.

regards

SURENDER

7 REPLIES 7
Read only

Former Member
0 Likes
1,217

pass parameter "USER" in the function module "BDC_OPEN_GROUP" as sy-uname.

i hope it helps....

Edited by: Sumeet Maheshwari on Feb 29, 2008 4:37 PM

Read only

0 Likes
1,217

NO THE SAME ERROR SHOULD BE DISPLAYED.

Read only

0 Likes
1,217

hai

can anybody help me?

am stick in bdc. i dont know what to do further?

say the program is correct or not.?

regards

surender

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,217

Hi,

Check this first.

Uncomment the exceptions part and debug and see which exception u r getting. Is the user name u r passing in FILLER12 is a valid one?. if it is valid then it should work.

Also uncomment these things.

DEST = FILLER8

GROUP = 'SURENDER'

HOLDDATE = FILLER8

KEEP = FILLER1

USER = FILLER12

RECORD = FILLER1 .

Thanks,

Vinod.

Read only

Former Member
0 Likes
1,217

Hi try this modified code ,

REPORT YSUSBDC5.

DATA: BDC_TAB LIKE BDCDATA OCCURS 6 WITH HEADER LINE.

START-OF-SELECTION.

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = 'SURENDER'

KEEP = 'X'

PROG = SY-CPROG .

PERFORM FILL_BDC_TAB.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'FK02'

TABLES

dynprotab = BDC_TAB .

CALL FUNCTION 'BDC_CLOSE_GROUP'.

*----


  • FORM FOR THE BDCDATA

*----


FORM FILL_BDC_TAB.

REFRESH BDC_TAB.

PERFORM POPULATE_BDC_TAB USING:

'1' 'SAPMF02K' '0106',

' ' 'RF02K-LIFNR' 'SUREN',

' ' 'RF02K_D0110' 'X',

'1' 'SAPMF02K' '0111',

' ' 'LFA1-NAME1' 'SURENDER',

' ' 'LFA1-STRAS' '69 abass ali',

' ' 'SZA1_D0100-SMTP_ADDR' '[email protected]'.

ENDFORM.

*----


  • FORM FOR THE BDCTAB-

*----


FORM POPULATE_BDC_TAB USING FLAG VAR1 VAR2.

CLEAR BDC_TAB.

IF FLAG = '1'.

BDC_TAB-PROGRAM = VAR1.

BDC_TAB-DYNPRO = VAR2.

BDC_TAB-DYNBEGIN = 'X'.

ELSE.

BDC_TAB-FNAM = VAR1.

BDC_TAB-FVAL = VAR2.

ENDIF.

APPEND BDC_TAB.

ENDFORM.

reward points if useful,

venkat.

Read only

Former Member
0 Likes
1,217

Hallo,

I want to share what happend to me with my bdc Program.

I was able to create Sessions of Batch input (SM35) through the Creation Program ZRSFFL0A (writen below) from 29.04.2008 to 21.05.2008. On May 21 I changed a parameter to play an error, since than the proper original programme has never worked.

Now while I am executing(F8) it shows the message in one dialog box 'BDC_OPEN_GROUP user name is invalid'. I don't know why.

**During Debugging the program stopped Function SAPLLANG:

FUNCTION CONVERSION_EXIT_ISOLA_OUTPUT.

*"----


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(INPUT)

*" EXPORTING

*" VALUE(OUTPUT)

*"----


OUTPUT = SAVE_INPUT(1) = INPUT.

CHECK SAVE_INPUT(1) NA ' *'.

SELECT SINGLE * FROM T002 WHERE SPRAS = INPUT.

CHECK SY-SUBRC = 0.

OUTPUT = T002-LAISO.

ENDFUNCTION.

  • Original programme

REPORT zrsffl0a.

TABLES: apqi, sflight.

DATA: BEGIN OF BDC_TAB OCCURS 50.

INCLUDE STRUCTURE BDCDATA.

DATA END OF BDC_TAB.

PARAMETERS:

name LIKE apqi-groupid DEFAULT SY-UNAME,

carrid LIKE sflight-carrid DEFAULT 'AA',

connid LIKE sflight-connid DEFAULT '0064',

plane LIKE sflight-planetype DEFAULT 'A310-200'.

START-OF-SELECTION.

WRITE: / 'Top creation of a session BDC',

sy-mandt, name, sy-uzeit.

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING: CLIENT = sy-mandt,

GROUP = name,

USER = sy-uname,

KEEP = 'X'.

PERFORM GENERATE_BDC_DATA.

CALL FUNCTION 'BDC_INSERT'

EXPORTING TCODE = 'ZTCF2'

TABLES DYNPROTAB = BDC_TAB.

CALL FUNCTION 'BDC_CLOSE_GROUP'.

WRITE: / 'End creation of a session BDC',

sy-mandt, name, sy-uzeit.

&----


*& Form GENERATE_BDC_DATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form GENERATE_BDC_DATA .

REFRESH BDC_TAB.

CLEAR BDC_TAB.

MOVE: 'ZRSFFL03A' TO BDC_TAB-PROGRAM,

100 TO BDC_TAB-DYNPRO,

'X' TO BDC_TAB-DYNBEGIN.

APPEND BDC_TAB.

CLEAR BDC_TAB.

MOVE: NAME TO BDC_TAB-FNAM,

SY-UNAME TO BDC_TAB-FVAL.

APPEND BDC_TAB.

CLEAR BDC_TAB.

MOVE: carrid TO BDC_TAB-FNAM,

'AA' TO BDC_TAB-FVAL.

APPEND BDC_TAB.

CLEAR BDC_TAB.

MOVE: connid TO BDC_TAB-FNAM,

'0064' TO BDC_TAB-FVAL.

APPEND BDC_TAB.

CLEAR BDC_TAB.

MOVE: plane TO BDC_TAB-FNAM,

'A310-200' TO BDC_TAB-FVAL.

APPEND BDC_TAB.

CLEAR BDC_TAB.

endform. " GENERATE_BDC_DATA

I thank those who will give me suggestions and / or explanations.

Best regards

Claudia

Read only

0 Likes
1,217

Hi Claudia,

First thing check the validity of the user i.e Whether the user has proper authorizations at this point of time and his ID expiry date etc. U can check the USR* tables for this.

second thing take a back up of this program and retrieve the earlier version. If problem still persists then it is not because of ur changes. There must be some thing else with settings.

To retrieve the earlier version follow below path.

Menupath->Utilities->Versions->Version management.

Here select the earlier version and press retrieve button in tool bar.

Hope this info will help u.

Thanks,

Vinod.