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 : DATASET expected not P_DATASE

Former Member
0 Likes
1,094

I am creating a simple BDC program to create a vendor (table xk01 ) .But the program shows this error

DATASET expected not P_DATASE. Please tell me how to remove this error and what exactly it is .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,044

HI,

I think there might be some spelling mistake in ur program . Double click on the error then the cursor will go to the error line .

Just copy the code where it is showing error .

Regards,

Madhukar Shetty

7 REPLIES 7
Read only

Former Member
0 Likes
1,045

HI,

I think there might be some spelling mistake in ur program . Double click on the error then the cursor will go to the error line .

Just copy the code where it is showing error .

Regards,

Madhukar Shetty

Read only

0 Likes
1,044

When I double click on the error , it asks me for an access key

Read only

0 Likes
1,044

HI,

It asks for access key bcause it goes to program BDCRECX1 which is a standard program. If u toggle to display mode then double click then it will go to the abave program.

So do the following steps in ur program

1. Declare

DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

this in ur Z program.

2. Then COPY the below form

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

----


  • Insert field *

----


FORM BDC_FIELD USING FNAM FVAL.

IF FVAL <> NODATA.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDIF.

ENDFORM.

3. Then remove the INCLUDE bdcrecx1. from ur Z program

This will resolve ur problem

Regards,

MAdhukar Shetty

Read only

0 Likes
1,044

ya i do that and it displays the errors :

Relational operator NODATA is not supported

and

form BDC_TRANSACTIOn does not exist .

Read only

0 Likes
1,044

Hi,

you need to define the bdc internal table for this as

DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

this in ur Z program.

while passing the data to BDC screen use

perform BDC_DYNPRO 'Program name' 'screen no' .

whle passing the data to screen field you need to use

perform BDC_FIELD 'FIELDNAME' 'FIELD VALUE'

finally use call transtion 'trasanction code' using BDCDATA[]

include the two forms

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

----


  • Insert field *

----


FORM BDC_FIELD USING FNAM FVAL.

IF FVAL <> ' '.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDIF.

ENDFORM.

Read only

0 Likes
1,044

Hi,

1. NODATA Error --> Comment the line 

*IF FVAL <> NODATA*. "Cooment this line in the form FORM BDC_FIELD USING FNAM FVAL.

2.  Comment the PERFORM  BDC_TRANSACTION and write the below code

CALL TRANSACTION 'XK02'  USING bdcdata
                           OPTIONS FROM  wa_ctuparam
                           MESSAGES INTO messtab.

3. Also declare these two

DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.

DATA : wa_ctuparam LIKE ctu_params.

Regards,

Madhukar Shetty

Read only

0 Likes
1,044

its working now..thanks