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

from, and perfrom (error)

Former Member
0 Likes
437

hi experts,

i got error like this.

PERFORM bdc_transaction TABLES it_msgtab using 'MD61''E''L'.

FORM bdc_transaction TABLES messtab USING tcode ctumode cupdate .

CALL TRANSACTION tcode USING bdcdata

MODE ctumode

UPDATE cupdate

MESSAGES INTO messtab.

REFRESH bdcdata.

CLEAR bdcdata.

ENDFORM. " bdc_transaction

ERROR: Program ZBDC_MD61_UPLOAD

Different number of parameters in FORM and PERFORM (routine:

BDC_TRANSACTION, number of formal parameters: 1, number of actual

parameters: 2).

CASE2) IF I PUT SPACE BETWEEN TCODE E AND L..

PERFORM bdc_transaction TABLES it_msgtab using 'MD61' 'E' 'L'.

FORM bdc_transaction TABLES messtab USING tcode ctumode cupdate .

CALL TRANSACTION tcode USING bdcdata

MODE ctumode

UPDATE cupdate

MESSAGES INTO messtab.

REFRESH bdcdata.

CLEAR bdcdata.

ENDFORM. " bdc_transaction

Program ZBDC_MD61_UPLOAD

Different number of parameters in FORM and PERFORM (routine:

BDC_TRANSACTION, number of formal parameters: 1, number of actual

parameters: 4).

THANKS INADVANCE,.....

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
401

This works perfectly fine for me.

  data: it_msgtab type table of bdcmsgcoll  with header line.
  data: bdcdata type table of bdcdata with header line.

  perform bdc_transaction tables it_msgtab using 'MD61' 'E' 'L'.

form bdc_transaction tables messtab using tcode ctumode cupdate .

  call transaction tcode using bdcdata
  mode ctumode
  update cupdate
  messages into messtab.
  refresh bdcdata.
  clear bdcdata.

endform. " bdc_transaction

Regards,

RIch Heilman

Read only

Former Member
0 Likes
401

Hi

Messagetab you are not passing in PERFORM Statement

write

PERFORM bdc_transaction TABLES

it_bdcdata it_mestab

using 'MD61' 'E' 'L'.

FORM bdc_transaction TABLES bdcdata messtab

USING tcode ctumode cupdate .

CALL TRANSACTION tcode USING bdcdata

MODE ctumode

UPDATE cupdate

MESSAGES INTO messtab.

REFRESH bdcdata.

CLEAR bdcdata.

endform.

reward if useful

regards

Anji

Read only

Former Member
0 Likes
401

Insted of using direct values, can you try using variables instead.

e.g.

DATA: tcode TYPE sy-tcode VALUE 'MD61',

define other two variables as well with their values.

PERFORM bdc_transaction TABLES it_msgtab using tcode ctumode cupdate .

FORM bdc_transaction TABLES messtab USING tcode ctumode cupdate .

CALL TRANSACTION tcode USING bdcdata

MODE ctumode

UPDATE cupdate

MESSAGES INTO messtab.

REFRESH bdcdata.

CLEAR bdcdata.

ENDFORM. " bdc_transaction

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

suresh_datti
Active Contributor
0 Likes
401

there should be space between the parameters like you mentioned in case 2. It might be an issue with your quotes.. pl mak sure you are using the right quotes.

~Suresh