‎2007 Jun 26 10:13 PM
Hi friends,
I got a requirement, in which we need to implement Virtual cube in BW. For this I need to write a RFC enabled function module which fetches data from R/3 tables and fills the cube. If anyone worked on similar requirement or have any details..Please reply back..Useful answers will be rewarded..
Thanks,
Suman.
‎2007 Jul 04 12:46 AM
‎2007 Jul 05 8:43 AM
Hi Suman,
I do have similar requirement where I have to update data in a table which is in BW system using a function module developed in SRM.
Please let me know the way you have implemented this, along with the code(if possible).
TIA,
Nitin
‎2007 Jul 06 11:44 PM
Hi Nitin,
Develop RFC enabled function module in SRM system. Call that FM from BW to get the required data from SRM and update the table in BW table using that data.
thanks,
Suman.
‎2007 Jul 09 7:57 AM
Hi Suman,
Thanks for reply.
I developed a Z RFC in SRM System and acivated sucessfully and used there. But when I try to access the same RFC in BW system through pattern function, it gives me error that Function Module not found. Even though if I copy-paste the RFC from SRM to BW system, it gives Short dump. Can you give me some guidelines for getting RFC destination - the code for the same??. It would be a great help.
Waiting for your reply,
Nitin
‎2007 Jul 09 8:13 AM
Show me the Code you have written in BW system.
Also check whether the FM you deveoped in SRM is RFC enabled(I mean in the attributes tab of FM, did you select the RFC enabled radio button.)
thanks,
Suman.
‎2007 Jul 09 8:25 AM
************************Function Module in SRM****************************************
DATA : porgs TYPE bbpt_om_objtext WITH HEADER LINE,
porg_id TYPE hrtb_objkey,
uporgs TYPE hrtb_object WITH HEADER LINE,
users TYPE STANDARD TABLE OF hrbciuser WITH HEADER LINE,
wa TYPE zapes_pogusr.
CALL FUNCTION 'BBP_OM_FIND_PURCH_ORGS'
EXPORTING
preferred_langu = sy-langu
IMPORTING
porg_tab = porgs[]
porg_keys = porg_id
EXCEPTIONS
internal_error = 1
no_authority = 2
nothing_found = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ELSE.
LOOP AT porgs.
MOVE : porgs-otype TO uporgs-otype, " User ID
porgs-objid TO uporgs-objid. " Purchasing Organization ID
APPEND uporgs. CLEAR uporgs. " from wa.
ENDLOOP.
CALL FUNCTION 'BBP_OM_STRUC_GET_USER_FROM_ORG'
EXPORTING
start_objects = uporgs[]
resolve_all_orgs = 'X'
authority_check = 'X'
IMPORTING
user_tab = users[]
EXCEPTIONS
path_not_found = 1
error_reading_structure = 2
no_roots = 3
invalid_roots = 4
internal_error = 5
OTHERS = 6.
IF sy-subrc <> 0.
EXIT.
ELSE.
LOOP AT users.
MOVE : users-orgobjid-objid TO wa-zpe_porgid,
users-uname TO wa-zpe_usrid.
APPEND wa TO table.
ENDLOOP.
ENDIF.
ENDIF.
**************************Report Program in BW**************************************
REPORT zpe_pogusr_01.
TABLES : z9crprdcus.
DATA : dest TYPE z9crprdcus-zcr_parv1 .
DATA : itab TYPE zapet_pogusr. " WITH HEADER LINE.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_choice(3).
SELECTION-SCREEN : END OF BLOCK b1.
AT SELECTION-SCREEN.
TRANSLATE p_choice TO UPPER CASE.
IF NOT p_choice EQ text-003 AND NOT p_choice IS INITIAL.
MESSAGE e002(sy) WITH text-005.
ENDIF.
START-OF-SELECTION.
SELECT SINGLE * FROM z9crprdcus WHERE zcr_parcdp = 'SRM_DEST'.
dest = z9crprdcus-zcr_parv1.
IF sy-subrc EQ 0.
CALL FUNCTION 'ZSCAFM_UPDPOGUSR' DESTINATION 'BACK'
IMPORTING
table = itab
EXCEPTIONS
system_failure = 1
communication_failure = 2
cx_sy_dyn_call_illegal_type = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ENDIF.
‎2007 Jul 09 8:26 AM
PS: The Function Module in SRM system have attributes of Remote function Module.
Nitin
‎2007 Jul 09 3:19 PM
Destination should contain name of remote destination client.
Try below code:
CALL FUNCTION 'ZSCAFM_UPDPOGUSR' DESTINATION dest
IMPORTING
table = itab
EXCEPTIONS
system_failure = 1
communication_failure = 2
cx_sy_dyn_call_illegal_type = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ENDIF
‎2007 Jul 11 6:36 AM