Application Development 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: 

RFC & BATCH INPUT dows it work?

Former Member
0 Kudos

Hi experts!!

I have the following problem:

I am trying to fill some screens with both custom and standard fields. There is no standard BAPI, for these screens so i will have to use a call transaction. But this has to be done in RFC function moule, so it can be used from SAP Portal.

What i 'v read so far on sdn is a bit confusing: others say Batch Input can be used in rfc modules and others say it cannot. When i debug my rfc using external breakpoint, the call transaction gives me sy-subrc = 1001 (?).

So my question is has anyone ACTUALLY used batch input in an RFC module??

And if yes how can i make it work???

Thank you in advance!!!

1 ACCEPTED SOLUTION

Former Member
2 REPLIES 2

Former Member

Former Member
0 Kudos

Hi Neha & thank u!!!

I use the following code to test the FM. but it does not pass the data needed:

What am i doing wrong??

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0211' to itab_bdc-DYNPRO,

'X' to itab_bdc-DYNBEGIN,

'BDC_OKCODE' to itab_bdc-FNAM,

'/00' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0211' to itab_bdc-DYNPRO,

'X' to itab_bdc-DYNBEGIN,

'KNA1-KUNNR' to itab_bdc-FNAM,

'0000026245' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0211' to itab_bdc-DYNPRO,

'X' to itab_bdc-DYNBEGIN,

'BDC_OKCODE' to itab_bdc-FNAM,

'=SAVE' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0200' to itab_bdc-DYNPRO,

' ' to itab_bdc-DYNBEGIN,

'KNA1-TELF1' to itab_bdc-FNAM,

'2310123456' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0200' to itab_bdc-DYNPRO,

' ' to itab_bdc-DYNBEGIN,

'KNA1-TELF2' to itab_bdc-FNAM,

'2310122667' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0200' to itab_bdc-DYNPRO,

' ' to itab_bdc-DYNBEGIN,

'KNA1-TELFX' to itab_bdc-FNAM,

'2322122667' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0200' to itab_bdc-DYNPRO,

' ' to itab_bdc-DYNBEGIN,

'SZA1_D0100-SMTP_ADDR' to itab_bdc-FNAM,

'TESTTEST.GR' to itab_bdc-FVAL.

APPEND itab_bdc.

move: 'ZTC_CU_REGISTRATION' to itab_BDC-PROGRAM,

'0200' to itab_bdc-DYNPRO,

' ' to itab_bdc-DYNBEGIN,

'KNA1-ZZURL' to itab_bdc-FNAM,

'www.iria.test.web.uk' to itab_bdc-FVAL.

APPEND itab_bdc.

APPEND itab_bdc.

CALL FUNCTION 'ABAP4_CALL_TRANSACTION'

EXPORTING

tcode = 'ZTC_REG02'

SKIP_SCREEN = ' '

MODE_VAL = 'A'

UPDATE_VAL = 'S'

IMPORTING

SUBRC = d_sysubrc

TABLES

USING_TAB = itab_bdc

  • SPAGPA_TAB = itab_SPAGPA

  • MESS_TAB =

EXCEPTIONS

CALL_TRANSACTION_DENIED = 1

TCODE_INVALID = 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.