2008 Dec 30 9:33 AM
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.
2008 Dec 30 9:36 AM
Use external break-point to debug RFC when called from non-sap system.
2008 Dec 30 9:42 AM
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
2008 Dec 30 9:46 AM
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.
2008 Dec 30 10:40 AM
how shd i test the RFC in front end it has to receive data form other non SAP system?