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

RFC testing

Former Member
0 Kudos
323

Hi guys,

user calls an RFC "ZRFC" from a non SAP system.When user Executes the non sap program that call SAP RFC

It shows that RFC is called sucessfully ,but the DB table "Zitem_info" is not updated in SAP.

So i want to debug my RFC in SAP when it is called by non SAP to see whether data is received in "tbl_info" declared in Tables statment in RFC as

itab_info like zstructure. "Zstructure" contains all fields of type char.Please guide how shd ii find th problem why data is not been updated or received into tbl_info form Non SAP system?

The source code in SAP RFC is as follows:

DATA: tot_cnt(4).

CLEAR: cntnup,cntup,ws_info,tot_cnt,n.

REFRESH itab_info.

IF NOT tbl_info IS INITIAL.

LOOP AT tbl_info.

MOVE-CORRESPONDING tbl_info TO itab_info.

APPEND itab_info.

ENDLOOP.

ENDIF.

SORT itab_info.

*Count of Total records

DESCRIBE TABLE itab_info LINES tot_cnt.

*Deleting duplicate entries

DELETE ADJACENT DUPLICATES FROM itab_info.

*Inserting records in DB zitem_info

INSERT zitem_info FROM TABLE itab_info ACCEPTING DUPLICATE KEYS.

IF sy-subrc EQ 0.

COMMIT WORK.

cntup = sy-dbcnt.

cntnup = tot_cnt - cntup.

ELSE.

ROLLBACK WORK.

cntnup = tot_cnt - cntup.

ENDIF.

4 REPLIES 4
Read only

Former Member
0 Kudos
288

Use external break-point to debug RFC when called from non-sap system.

Read only

former_member404244
Active Contributor
0 Kudos
288

Hi,

Use external break-point to debug (applicable for ECC 6.0)

TRY to make one small change in ur code

Instead of INSERT zitem_info FROM TABLE itab_info ACCEPTING DUPLICATE KEYS.

Use MODIFY statement and check.

MODIFY zitem_info FROM TABLE itab_info .

Regards,

Nagaraj

Read only

Former Member
0 Kudos
288

Hi

have u tried executing the FM successfully in frontend with your ID?

If it is successful updating with your ID and not when calling from external system I guess this is the authorization issue.

The caller ID might be a Cummunication Type user. Try to give SAP ALL auhtorizations to ID and try.

I am sure it will work.

Read only

0 Kudos
288

how shd i test the RFC in front end it has to receive data form other non SAP system?