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

error in bdc report program .

Former Member
0 Likes
1,132

Hello Experts ,

I was doing the BDC demo program as explained in tutorial ,

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/309cb157-738d-2910-7691-b74c4ddba3c7&override...

but when i run the pgm i get runtime error as

shrt text

type conflict occur when calling fuction module .

Function module was called incorrectely .

here i am pasting the report pgm for bdc ,

<< See below >>

Can anybody suggest how to solve this problem ,

Thks ,

Rushi

Edited by: RUSHI123 on Nov 4, 2009 1:20 PM

Edited by: RUSHI123 on Nov 4, 2009 1:21 PM

Edited by: Rob Burbank on Nov 4, 2009 9:49 AM

9 REPLIES 9
Read only

Former Member
0 Likes
1,085

Your code is not readable. Please format it

Read only

0 Likes
1,085
report Z98
       no standard page heading line-size 255.

include bdcrecx1.

DATA :  BEGIN OF ITAB OCCURS 0 ,
        ID(4) TYPE C ,
        NAME(20) TYPE C ,
        END OF ITAB .



start-of-selection.

CALL FUNCTION 'UPLOAD'
EXPORTING
*   CODEPAGE                      = ' '
   FILENAME                      = 'C:\'
   FILETYPE                      = 'ASC '
*   ITEM                          = ' '
*   FILEMASK_MASK                 = ' '
*   FILEMASK_TEXT                 = ' '
*   FILETYPE_NO_CHANGE            = ' '
*   FILEMASK_ALL                  = ' '
*   FILETYPE_NO_SHOW              = ' '
*   LINE_EXIT                     = ' '
*   USER_FORM                     = ' '
*   USER_PROG                     = ' '
*   SILENT                        = 'S'
* IMPORTING
*   FILESIZE                      =
*   CANCEL                        =
*   ACT_FILENAME                  =
*   ACT_FILETYPE                  =
  TABLES
    DATA_TAB                      = ITAB
 EXCEPTIONS
   CONVERSION_ERROR              = 1
   INVALID_TABLE_WIDTH           = 2
   INVALID_TYPE                  = 3
   NO_BATCH                      = 4
   UNKNOWN_ERROR                 = 5
   GUI_REFUSE_FILETRANSFER       = 6
   OTHERS                        = 7
          .
IF SY-SUBRC <> 0.
    WRITE :/ SY-SUBRC .
ENDIF.

perform open_group.

LOOP AT ITAB .

perform bdc_dynpro      using 'ZTRNSBDCDEMO' '1000'.
perform bdc_field       using 'BDC_CURSOR'
                              'NAME'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SPOS'.
perform bdc_field       using 'ID'
                             ITAB-ID  .  "... '   3'.
perform bdc_field       using 'NAME'
                              ITAB-NAME  .  " ...'MIRAJ'.
perform bdc_dynpro      using 'SAPLSVAR' '0281'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACKLIST'.
perform bdc_dynpro      using 'ZTRNSBDCDEMO' '1000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EE'.
perform bdc_field       using 'BDC_CURSOR'
                              'NAME'.
perform bdc_transaction using 'Z98DEMO'.

ENDLOOP .

And please use code tags

Edited by: RUSHI123 on Nov 4, 2009 1:41 PM

Edited by: RUSHI123 on Nov 4, 2009 1:44 PM

Edited by: Rob Burbank on Nov 4, 2009 9:49 AM

Read only

Former Member
0 Likes
1,085

Hi,

check every field while sendind data to bdc table may some fields are not matching with the data u entered for the field.

Regards,

Padmaja

Read only

0 Likes
1,085

I WAS TRYING TO DO BDC DEMO USING TUTORIAL ON SDN AS

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/309cb157-738d-2910-7691-b74c4ddba3c7&override...

BUT I AM GETING RUN TIME ERROR AS

FUNCTION MODULE WAS CALLED INCORRECTELY .

CAN ANYBODY SUGGEST WHAT SHULD BE DONE ?

THE CODE FOR THE BDC PGM IS PASTED ABOVE

THKS

RUSHI

Read only

0 Likes
1,085

The FM upload is obsolete now. Instead you will have to use GUI_UPLOAD and where is the full path of the presentation server file? You have just mentioned it as c:\

Read only

0 Likes
1,085

Hi Rushi,

Please correct the file type there is a blank space after 'ASC ' it should be 'ASC'. Correct this, it will definitely work.

I have tested on my side.

Please set to resolved if you are satisfied.

Regards

Abhii...

Read only

0 Likes
1,085

Hello Abhi ,

As u suggested to remove the space from file type i did so . Now program is running ( no run time error ) . But

no data is geting transfered .when i execute the pgm it ask me for the file peth , after providing file path and pressing transfer button .

it shows following message

.

CALL_TRANSACTION Z98DEMO RETURN CODE = 0 RECORD = 0

S 'Save as variant ' terminated .

CALL_TRANSACTION Z98DEMO RETURN CODE = 0 RECORD = 0

S 'Save as variant ' terminated .

CALL_TRANSACTION Z98DEMO RETURN CODE = 0 RECORD = 0

S 'Save as variant ' terminated .

Can u suggest what should be done ?

Thks ,

Rushi

Read only

0 Likes
1,085

Hi Friend,

0 means success , go and see your data in that transcation in display mode

Regards,

Read only

0 Likes
1,085

Hello friend ,

I am doing the bdc for the first time . I was just following the steps as escribed in the above mentioned tutorial .

I hv created report pgm with

parameters : id(4) type c ,

name(20) type c.

data sitab type ztrnsdemo .

sitab-id = id .

sitab-name = name .

insert into ztrnsdemo values sitab.

for the above pgm i hv created transcation z98demo .

I did the recording for the same transaction z98demo and created bdc pgm for same recording.

Now i am executing the pgm it displays the messge as described in previous post . but when i see table contents in se11 it doesnt show the recoeds .I thought executing the bdc report pgm will put the records in table .I dont want record to be saved as vriant instead i want them to transfered into table . What should i do to acheive the same

your help will be appreciated .

Thanks ,

Rushi