How to call a ECC 6 Function module from BI 7 process chain
Hi BI Gurus
I wann to push the data from infocube to ECC 6 ( Tcurr) table on a daily basis, and we have a function module written in ABAP and this FM is in ECC 6 sytem and we need to call this function module from BI inorder to update the TCURR table.
I used ABAP programm in Process chain but i failed as i dint see any functionality for FM. i could see only abap programm.
I need any you advise on this.
thanks in advance
Hi,
If you are able to see the ABAP report of ECC 6, this ABAP report will inturn call this function module.
Call the report in process chain.
Similar Messages
-
Calling r/3 function module from crm using rfc
Dear SDN Members,
I'm given a task to write a method on CRM side which sets the equipment status to "lost" in ABAON transaction on R/3 side. There is a function module on r/3 side which is RFC enabled and it will set the stuatus to LOST when we call that from CRM. This RFC fm is not available on CRM side, so I cannot used Pattern. I'm very new to abap and when i've gone through abap help I got the syntax which i've write with destination parameter. But I'm really not understanding how to pass Lost status to that fm.
Here-with I put the coding so far i've done on crm side and also the rfc fm coding aswell on r/3 side.
Should any one need for more info please do let me know to my yahoo ID:
[email protected]. I would be pleased to provide you the same.
The coding on crm side to call the r/3 fm through rfc follows here..
method IF_EX_EXEC_METHODCALL_PPF~EXECUTE.
21st November 2006
Created by Venkata Sunder
Method for
Loss Disposal - ERP Equipment Status Update
Damage Notifications
Called by actions
DATA: lv_guid_ref TYPE crmt_object_guid,
lv_kind_ref TYPE crmt_object_kind. "#EC NEEDED
DATA: lv_preview TYPE char1. "#EC NEEDED
DATA:
lt_header_guid TYPE crmt_object_guid_tab,
lt_orderadm_i_buffer TYPE crmt_orderadm_i_wrkt,
gs_orderadm_i_buffer TYPE crmt_orderadm_i_wrk,
lt_orderadm_i_db TYPE crmt_orderadm_i_wrkt,
gs_orderadm_i_db TYPE crmt_orderadm_i_wrk,
lt_customer_i_buffer TYPE crmt_customer_i_wrkt,
gs_customer_i_buffer TYPE crmt_customer_i_wrk,
lt_log_handle TYPE balloghndl,
return TYPE bapiret2_t,
gs_return TYPE bapiret2,
ev_rfcdest TYPE rfcdest.
get guid for referenced object
CALL METHOD cl_hf_helper=>action_helper->get_ref_object
EXPORTING
io_appl_object = io_appl_object
ip_action = ip_action
ii_container = ii_container
IMPORTING
ev_guid_ref = lv_guid_ref
ev_kind_ref = lv_kind_ref
ev_preview = lv_preview.
current crm transaction is identified
IF lv_guid_ref IS INITIAL.
RAISE EXCEPTION TYPE cx_socm_condition_violated.
ENDIF.
Header GUID
APPEND lv_guid_ref TO lt_header_guid.
Read order details from buffer
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
IMPORTING
et_orderadm_i = lt_orderadm_i_buffer
et_customer_i = lt_customer_i_buffer
CHANGING
cv_log_handle = lt_log_handle
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
IF sy-subrc <> 0.
ENDIF.
call function destination 'DERCLNT200'.
(I'm not understanding how and wt to pass to this fm.)
The fm 'Z_SET_EQUIPMENT_STATUS_RFC' on r/3 side has the following coding..
DATA:
lv_objnr LIKE equi-objnr,
lv_estat LIKE tj30-estat,
wa_return LIKE bapiret2.
LOOP AT equipment_status.
SELECT SINGLE objnr
FROM equi
INTO lv_objnr
WHERE equnr EQ equipment_status-equnr.
SELECT estat
FROM tj30t
INTO lv_estat
WHERE stsma = equipment_status-stat_profile
AND txt04 = equipment_status-status
AND spras = sy-langu.
ENDSELECT.
CALL FUNCTION 'STATUS_CHANGE_EXTERN'
EXPORTING
CHECK_ONLY = ' '
client = sy-mandt
objnr = lv_objnr
user_status = lv_estat
SET_INACT = ' '
SET_CHGKZ =
NO_CHECK = ' '
IMPORTING
STONR =
EXCEPTIONS
object_not_found = 1
status_inconsistent = 2
status_not_allowed = 3
OTHERS = 4.
IF sy-subrc NE 0.
MOVE:
equipment_status-equnr TO wa_return-message_v1,
'E' TO wa_return-type,
' Equipment Update failed' TO wa_return-message.
APPEND wa_return TO return.
ELSE.
COMMIT WORK.
ENDIF.
CLEAR wa_return.
ENDLOOP.
ENDFUNCTION.
Thanks in advance.
Best Regards!
Sam.Hi,
You can write similar to the below.
CALL FUNCTION 'CRM_ORDER_READ'
<b>DESTINATION 'DERCLNT200'</b>
EXPORTING
it_header_guid = lt_header_guid
IMPORTING
et_orderadm_i = lt_orderadm_i_buffer
et_customer_i = lt_customer_i_buffer
CHANGING
cv_log_handle = lt_log_handle
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
Thanks
Ramakrishna -
Call of a function module from a method / catch of exceptions
Hello,
how do you catch the error of a function module that is called within the start routine of a data transfer process? The process terminates in case of an exceptions
E.G.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
client = sy-mandt
date = SOURCE_FIELDS-xxx
foreign_amount = SOURCE_FIELDS-xxx
foreign_currency = SOURCE_FIELDS-xxx
local_currency = SOURCE_FIELDS-xxx
IMPORTING
local_amount = RESULT
EXCEPTIONS
NO_RATE_FOUND = 1
OVERFLOW = 2
NO_FACTORS_FOUND = 3
NO_SPREAD_FOUND = 4
DERIVED_2_TIMES = 5
OTHERS = 6.uncomment the exceptions section of your call. ie
EXCEPTIONS
NO_RATE_FOUND = 1
OVERFLOW = 2
NO_FACTORS_FOUND = 3
NO_SPREAD_FOUND = 4
DERIVED_2_TIMES = 5
OTHERS = 6.
Afterwards check sy-subrc value to see if exception has occured. If it is zero, call was successful otherwise it will have a value corresponding to the exception occured (as specified in the code above) -
How can I define a function in "decide" step in process chain?
Hi guys,
I have a process chain und want to use the "decide" step in this process chain. It seems possible that a funktion can be created ( "Customer defined" ) in this step. But how can I create it and how can I check the available code?
Thanks for any hint!
Regards,
YouyouIt's a helpfel document!
But I steel have a question:
I want to use a self-defeind function. And I also see it is possible to use such function here.
But I am not sure how I can define this function, via BADI?
And how can I use this function here. (Maybe if I can define it, then it shows automatically...)
Regards,
Liying -
How to call a function module from a transformation
Hi,
Could somebody please let me know how I can call an abap function module from a transformation (abap xslt program). I know how to call the class methods from transformation, but how do i call a function module..?
Thanks,
Shashi.
Edited by: Shashi Kanth Kasam on Apr 8, 2010 12:45 PMYa. I can do that. But I don't want to use a class and a method to call that function module. Want to directly call function module from transformation. Is that possible..?
Thanks,
Shashi -
Call ABAP function module from script?
Hi,
I have an ABAP function module, which works fine when I call it in a transformation.
Since I don't need to execute this function for each record but rather for each file I process, I would like to move the call from the DataFlow to a script in the WorkFlow. When I click on the 'functions' button the ABAP FM is available in my SAP Datastore, so I drag and drop it into my script. I also make sure to populate all required variables.
There are no error messages or warning when I check my job definition.
When I execute it, I get the following RFC error:
Function call <xxx ( abcd ) > failed, due to error <150413>: <RFC CallReceive exception <FUNCTION_NOT_FOUND>.>.
Is it just not possible to call an RFC enabled function module in SAP from a script or am I doing something wrong here?
Thanks,
Jan.Could you please let me know how I can call an abap function module from a transformation? (from abap xslt program). I know how we can call methods of a class from the transformations, but no idea how we can call function modules. Any suggestions or a sample code snippet towards this will be very useful for me.
Thanks,
Shashi. -
Call an Function Module from BSP page to import an CSV file to internal tab
Hi Experts,
I am working on creating a web application in BSP which will call the function module ALSM_EXCEL_TO_INTERNAL_TABLE.
This function module imports an excel file into an internal table.
Since this is the first time I am working on BSP I am not sure how to call this FM from event handler tab in BSP page.
What I could gather from previous posts is that we need to create an attribute which should take the value of the export parameter of the function module.But I am kind of messed up on this.
Could u guys please help ,I would be extremely grateful.Points will be assigned for sure
Thanking in anticipation
AnkitCould you please let me know how I can call an abap function module from a transformation? (from abap xslt program). I know how we can call methods of a class from the transformations, but no idea how we can call function modules. Any suggestions or a sample code snippet towards this will be very useful for me.
Thanks,
Shashi. -
CNTL_ERROR while calling a function module from Java webdynpro
I am calling a RFC function module from javawebdynpro app
which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
Any help on this is highly appreciatedGood catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
DATA:
SOURCEVAL TYPE /BIC/OIINVQTY,
SOURCEUOM TYPE /BIC/OIUSUOM,
USITM TYPE /BIC/OIUSITM,
TARGETUOM TYPE /BIC/OIUSUOM,
CONVERTED_COST TYPE /BIC/OIINVQTY.
DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
" get the Production UOM
SELECT SINGLE I~/BIC/USPRDUOM
FROM /BIC/PUSITM AS I
INTO PRODUCTION_UOM
WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
IF ( SY-SUBRC = 4 ). " no records found
"RAISE PARTNO_NOT_FOUND.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
" load the parameters
SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
USITM = SOURCE_FIELDS-/BIC/USITM.
" then you can call the FM
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCEVAL
PSOURCEUOM = SOURCEUOM
PUSITM = USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = CONVERTED_COST
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
" ... [do the rest]
Thanks for your help,
Dennis -
Calling Z function module from BSP page
hi,
i am calling a z function module from BSP application ROS_SELF_REG ,The z function module is inside a z function group,It does not give any sytnax error..but while running BSP application ,it is going into dump saying that Z function module is not found..Any idea why this is happening???Hi,
Check whether the Z function module is spelled correctly. Also try activating the whole function group and function module in se80 transaction.
Check whether the BSP application is calling the Z FM from the correct server/client where it is available.
Regards,
Harish -
Debuggin a Call to Remote Function Module
Hi
I have a scenario where i have a Remote Function Module in r3 which is being called synchronously by an external java application. The FM has a lot of input and output parameters and many tables. The output returned by the FM is not as expected.
Can anyone tell me how debug a Remote Function Module when a call has been made from an external application.
I am not able to get the test data sent by the external application . So when the external application gives a call to this Remote FM and if it is possibele to debug it would be great.
regards
Nilesh Taunk.Hi Nilesh,
1) Login to SAP with the same ID with which you will calling the RFC function module from the outside system.
2) Goto transaction - se37/se38
3) Goto Utilities => Settings.
4) Select the ABAP Editor Tab.
5) Click on the Debugging tab.
6) Tick the Actv. button and give the user name with which you will be debugging the code. In this case the logged in user id.
7) Press Enter.
8) Now put an external break point inside the Function Module.
9) Load your external application (from where you want to debug the FM) once again.
The execution will stop in the FM.
Hope it helps..
Lokesh
PS: This was a simple question, but I guess the reason no one has answered your question is due to the fact that you havent rewarded points to members helping you. Also remember to close your post once it has been answered. -
Call report in function module
Hi All,
Please tell me how to call report in function module. i want input parameters of function module with same selection screen parameters of report. please tell to me .if possible provide the code.
Thanks,
Raju.Hi Kumar,
Incorporate the below logic in the FM that you have developed.
SUBMIT zreport WITH s_vbeln IN t_saleorder_range
WITH p_file EQ w_file
AND RETURN.
Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.
Hope this is helpful
Thanks,
Babu Kilari -
How to call a function module from the Web Template?
Hi all,
how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
Many thanks for your hints.
Regards, NilsHi!
I am too working on a similar issue.
Probably this helps:
Re: Calling a function module from a Web Template
Regards,
Sri -
How to call function module from IP
Hi
I need to trigger the process chain from the input ready queries in Bex analyzer. I figured out that I need to call RSPC_API_CHAIN_START.
How do we go about in calling the above function module in IP.
Thanks in advance
IHi Matt
Thanks for your response, it was very productive at the right time as we saw our process chain running indefinetly. With selecting all chars to be changed, it ran just once with no errors.
what is TA ? I know rsplan- transaction code for the planning modeler.
Can you tell me how can we call function module in custom exit planning function.
Where should I embed the code
CALL FUNCTION 'RSPC_API_CHAIN_START'
EXPORTING
I_CHAIN = 'ZPC_CCATOPCA'.
I_T_VARIABLES =
I_SYNCHRONOUS =
I_SIMULATE =
I_NOPLAN =
IMPORTING
E_LOGID =
EXCEPTIONS
FAILED = 1
OTHERS = 2
thanks in advance -
How to call a function module from a workflow ? ?
hi all,
i have to call a function module from an workflow, i got a hint from someone that i have to enhance an object and then write and methode, in this methode i can call that function module. I dont know even how to go for it.
Can anyone suggest that how to go for it ?
thanks.
raman khurana.Hi Raman Khurana,
Please go through the links it might be helpful , notsure
http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af8b453d11d189430000e829fbbd/content.htm
http://www.abapcode.info/2007/07/standard-function-module-text.html
http://it.toolbox.com/wiki/index.php/SAP_Workflow
Regards,
Sreekar.Kadiri. -
How to call a function module from debugger?
Hi all,
i just wanted to know whether we can call a function module from a debugger ,
if yes how ?Hi Laxmikanth,
How ur going to call a function module which is not present in program???
In debugging mode u can change the values of variables,put break points and watch points,but i thnk its not possible to call a function module(not present in program) while debugging .
Please share with us if u have any solution...
Regards,
lakshman.
Maybe you are looking for
-
Open data set for reading excel file on application server in back ground
open data set for reading excel file on application server in back ground
-
Insert numbers table into pages v5.2.2
I seem to remember being able to copy and paste tables from numbers to pages. Now I have a new computer and cannot do this. Any hints?
-
Overcoming VARCHAR2 size limitation
Hi, We have a VARCHAR2 column in a table to store text information. At present the size is 4000. We want to increase the size to 7000. Can anyone help me giving your suggessions? Oneway is we can change the datatype to LONG (as you know the max size
-
TMW: auto loading employee list in time data screen
Hi all, Within TMW one can have an employee list. I'd like to get the employee selection auto loaded in the time data subscreen. Without double clicking on the employee selection or using the button "copy selected records". Anyone have an idea how
-
Photoshop CS5 not printing actual size?
I have created a document in photoshop sized 8.5x11, the same size as my printer paper, at 300dpi. I am using the ruler guidelines onscreen to make an image 6 3/4" wide, but it is printing out too small at 6". Please note that I am not measuring ons