cancel
Showing results for 
Search instead for 
Did you mean: 

doubt in bdc program session method

Former Member
0 Kudos

hi,

I tried to execute this program..i am getting error in the bolded line..can you give suggestions..

REPORT ZPRABA1.

TABLES:LFA1.

DATA:BEGIN OF IT_ITAB OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

LAND1 LIKE LFA1-LAND1,

NAME1 LIKE LFA1-NAME1,

END OF IT_ITAB.

DATA:BEGIN OF IT_JTAB OCCURS 0,

<b>* Error is showing in the below line..that means i have to create new structure or

  • what?</b>

<b>INCLUDE STRUCTURE BDCDATA.</b>

END OF IT_JTAB.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD

FILENAME = 'C:/praba.txt'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

CHANGING

DATA_TAB = IT_ITAB[].

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = 'USER01'

USER = SY-UNAME.

LOOP AT IT_ITAB[] INTO IT_ITAB.

REFRESH IT_JTAB.

PERFORM SUB USING 'YVTRANS' '0100'.

PERFORM SUB1 USING 'LFA1-LIFNR' ITAB-LIFNR,

PERFORM SUB1 USING 'LFA1-LAND1' ITAB-LAND1,

PERFORM SUB1 USING 'LFA1-NAME1' ITAB-NAME.

PERFORM SUB1 USING 'BDC_OKCODE' 'INSERT'.

PERFORM SUB USING 'YSBDC1' '100'.

PERFORM SUB1 USING 'BDC_OKCODE' 'EXIT'.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'YSBDC1'

TABLES

DYNPROTAB = IT_JTAB.

ENDLOOP.

CALL FUNCTION 'BDC_CLOSE_GROUP'.

SUBMIT RSBDCSUB VIA SELECTION-SCREEN.

FORM SUB USING A B.

CLEAR IT_JTAB.

IT_JTAB-PROGRAM = A.

IT_JTAB-DYNPRO = B.

IT_JTAB-DYNBEGIN = 'X'.

ENDFORM.

Accepted Solutions (1)

Accepted Solutions (1)

prabhu_s2
Active Contributor
0 Kudos

replace

DATA:BEGIN OF IT_JTAB OCCURS 0,

  • Error is showing in the below line..that means i have to create new structure or

  • what?

INCLUDE STRUCTURE BDCDATA.

END OF IT_JTAB.

with

DATA:BEGIN OF IT_JTAB OCCURS 0.

INCLUDE STRUCTURE BDCDATA.

END OF IT_JTAB.

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Praba,

DATA:BEGIN OF IT_JTAB OCCURS 0,

  • Error is showing in the below line..that means i have to create new structure or

  • what?

INCLUDE STRUCTURE BDCDATA.

END OF IT_JTAB.

change your code as below:

<b>data: IT_JTAB type table of BDCDATA with header line.</b>

hope this helps,

Sajan Joseph.

Former Member
0 Kudos

Hi,

Data : IT_JTAB LIKE BDCDATA occurs 0 WITH HEADER LINE.

see below link

http://help.sap.com/saphelp_47x200/helpdata/en/fa/0970a4543b11d1898e0000e8322d00/content.htm

Regards

Chilla

<i>reward points if it is helpful..</i>

Former Member
0 Kudos

Error messages i am getting like this

unable to interpret 'STRUCTURE'. POSSIBLE causes of error:Incorrect spelling or comma error. at Row number 19.

Row 19

INCLUDE STRUCTURE BDCDATA,