2008 Nov 18 10:55 AM
hi!
i have to do RFC testing!
the demo code:
DATA:NAME(20) TYPE C,
LINEKEY(20) TYPE C.
DO 2 TIMES.
LINEKEY = SY-INDEX.
CONDENSE LINEKEY.
CONCATENATE 'LINEKEY' LINEKEY INTO LINEKEY.
NAME = LINEKEY.
CALL FUNCTION 'ZARFCTEST'
DESTINATION 'DEV120'
STARTING NEW TASK NAME
EXPORTING
linekey = linekey
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2.
ENDDO.
and RFC FUNCTION CODE:
tables:ZTEST_TEST.
ZTEST_TEST-LINEKEY = numkey.
ZTEST_TEST-CTIME = SY-UZEIT.
ztest_test-cdate = sy-datum.
insert ztest_test.
CALL FUNCTION 'RZL_SLEEP'
EXPORTING
SECONDS = 5
EXCEPTIONS
ARGUMENT_ERROR = 1
OTHERS = 2.
the report runing and result in table just exist one line:
LINKEY1 data.
when to do insert into LINEKY2 the insert statement return 4!
i don't know what happened!
who can tell me why insert LINEKEY2 data can't be successfully!
thank you very much!
You need to clear the string before the second do..enddo.
do
...
clear linekey.
enddo.
2008 Nov 18 11:00 AM
You need to clear the string before the second do..enddo.
do
...
clear linekey.
enddo.
2008 Nov 18 11:03 AM
check your key fields in table ZTEST_TEST ..
also clear LINEKEY ..
DO 2 TIMES.
CLEAR : LINEKEY.
LINEKEY = SY-INDEX.
CONDENSE LINEKEY.
CONCATENATE 'LINEKEY' LINEKEY INTO LINEKEY.
NAME = LINEKEY.
CALL FUNCTION 'ZARFCTEST'
DESTINATION 'DEV120'
STARTING NEW TASK NAME
EXPORTING
linekey = linekey
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2.
ENDDO.
2008 Nov 18 11:04 AM
thank you very much!
i add clear statement but the result not change
2008 Nov 18 11:10 AM
USE
CONCATENATE 'LINEKEY' LINEKEY INTO LINEKEY SEPARATED BY SPACE.
2008 Nov 18 11:10 AM
2008 Nov 18 11:19 AM
2008 Nov 18 11:34 AM
You may have to define the call as sunchronous or asynchronous, define it as asynchronous with MODE = ....
2008 Nov 19 12:38 AM
hi
i can't find call function have parameter about MODE!
can you give some demo code !
thank you very much!
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |