Call function problem
Hello
I'm calling a remote function:
CALL FUNCTION 'Z_RFC_TEST' DESTINATION i_rfc-host
At first it worked. But now I always get the error: "FUNCTION MODULE Z_RFC_TEST not found.
Any idea what this could be?
Greets.
Hi,
You have to check out two main things as follows:
1. Check whether the function module exists in the remote system or not. If it exists just go the properties and check whether the remote enabled option have selected or not.If the function module is not exist just create it as a remote enabled function module. Also there might be some problem with the function group where the function module is resided. So just activate the function group.
2. Just check out the RFC destination name. I think you are passing the RFC destination name to the variable as i_rfc-host.
Just make sure the destination name.
Regards,
Sankar.
Similar Messages
-
hello there,
i am using labview's first call function inside a for loop, inside a sequence structure. inside the for loop the function works fine activating a true/false structure, however, when i attempt to do the same thing outside the for loop i get a broken arrow. It says that the the tunnel of the case structure, to which i have wired the first call function, is missing an assignment to it. Cant understand why it is fine in one part and not in the other. Perhaps somebody has encountered this before? I have atttached the relevant code
Thank you
Dave
Attachments:
forum.vi 467 KBStranger, I think if you will look closely at the case statement you will see that you have inadvertently added an output tunnel. Either delete the case and redo it or just click on the input tunnel and move it down enough to see and delete the unwired output tunnel.
goldie -
Hi,
I have created a class file in actionscript2.0
class test
public function test ()
trace("This is constructor")
public function fun_1 ()
trace("This is first function")
fun_2()
public function fun_2 ()
trace("This is second function")
And this is the actionscript in fla
var myObj = new test()
myObj.fun_1()
My problem is i am calling fun_2() in fun_1() but it is not
executing can, any one help me out from this problem.
Thanks,
Sridhar BAs far as I know, that structure worked in at least 8.0 and possibly earlier. I actually saw something similar in production code on that version of Oracle. The actual function took several parameters, and using those paramters did a series of statements along the lines of:
BEGIN
SELECT 1 INTO l_var
FROM table1
WHERE <predicates>
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE APPLICATION_ERROR (-20001, 'Error');
WHEN TOO_MANY_ROWS THEN
RAISE APPLICATION_ERROR (-20002, 'Error');
END;
BEGIN
SELECT 1 INTO l_var
FROM table2
WHERE <predicates>
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE APPLICATION_ERROR (-20003, 'Error');
WHEN TOO_MANY_ROWS THEN
RAISE APPLICATION_ERROR (-20004, 'Error');
END;
-- About 4 or 5 more tables checked
RETURN 1;and the caller looked kind of like:
DECLARE
NO_ROWS_TABLE1 EXCEPTION;
DUP_ROWS_TABLE1 EXCEPTION;
NO_ROWS_TABLE2 EXCEPTION;
DUP_ROWS_TABLE2 EXCEPTION;
PRAGMA EXCEPTION_INIT (NO_ROWS_TABLE1, -20001);
PRAGMA EXCEPTION_INIT (DUP_ROWS_TABLE1, -20002);
PRAGMA EXCEPTION_INIT (NO_ROWS_TABLE2, -20003);
PRAGMA EXCEPTION_INIT (DUP_ROWS_TABLE2, -20004);
l_v NUMBER;
BEGIN
BEGIN
l_v := test_tables(<parameters>);
EXCEPTION
WHEN NO_ROWS_TABLE1 THEN
<do something about it>
WHEN DUP_ROWS_TABLE1 THEN
<do something about it>
WHEN NO_ROWS_TABLE2 THEN
<do something about it>
WHEN DUP_ROWS_TABLE2 THEN
<do something about it>
END;
<Continue normal processing>
END;and, yes, <Continue normal processing> occasionally failed for mysterious reasons when more than one of the checks would have failed had the function got to them, and l_v was never ever used.
This was one of the clevererbits of code in that app.
John -
Has anyone had a problem with TapMedia File Manage installed on iPhone 5? I reported a WIFI functionality problem to the developer and asked for support. Instead the company has been very unprofessional by name calling me instead of logically evaluate and troubleshoot the problem
Hi AKE1919,
Welcome to the Support Communities!
The following information should help you with this:
How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
http://support.apple.com/kb/HT1933?viewlocale=en_US
Cheers,
Judy -
Problem with call function close_form
Hello ,
I have a problem with function module close_form.I dont know if I am doing something wrong but please help me.
the issue is
declarations:
data: gt_itcpp type table of itcpp,
gt_otfdat type table of itcoo.
CALL FUNCTION 'CLOSE_FORM
EXPORTING
RESULT = gt_itcpp
TABLES
otfdata = gt_otfdat
EXCEPTIONS
OTHERS = 1.
DUMP: FUNCTION PARAMETER RESULT IS UNKNOWN.
THANKSMy point was that there are actually two problems with the original code: the one that you pointed out and the one that abapuser pointed out.
Although both were very helpful individually, I don't think either one actually solved the problem.
It would be misleading to anyone searching the forum looking for posts that solved a problem similar to theirs and only implemented half the solution.
In fact abapuser's answer is the one that answers the question that was actually asked.
Rob -
hey my iphone 4 has a problem regarding carrier. Its always showing searching mode and wifi-address N/A and Bluetooth address 00:00:00:00:00 and call function is disable. Please help me. I have tried every thing ..like restore from DFU mode with out sucess.
Refer to Note 98458 - SAPMSSY1, CALL_FUNCTION_NOT_FOUND
-
Call function with select options problem
Hi there dear SDN community members.
I have got an strange ABAP problem wich function call.
Code1
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign = 'I' .
ls_selec-option = 'EQ' .
ls_selec-low = '0000000000000000000000000000000000017714' .
APPEND ls_selec TO lt_selec .
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign = 'I' .
ls_selec-option = 'EQ' .
ls_selec-low = '0000000000000000000000000000000010079409' .
APPEND ls_selec TO lt_selec .
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
EXPORTING
iv_bas_plobid = 'Z_DP_POS'
it_selection = lt_selec
it_group_by = lt_group
IMPORTING
et_plob_values = lt_plobs .
Function returns data in lt_plobs itab only for the last product which was appended to the selection table lt_selec.
Whilst
Code2
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign = 'I' .
ls_selec-option = 'BT' .
ls_selec-low = '0000000000000000000000000000000000017714' .
ls_selec-high = '0000000000000000000000000000000010079409' .
APPEND ls_selec TO lt_selec .
Returns data in lt_plobs for all products included in selection tab lt_selec.
What am I doing wrong in case of Code1? Why function does not return data for both products included in selection tab lt_selec?
Will be thankful for help. Regards. P.I am very sorry to take your time unnecessarily.
The problem was caused by data inconsistency in our sandbox system I was developing in.
Be understanding, please.
Kind regards. P.
Ps.
Vinod Nair
The 'Loop' solution has slowed the performance down very much. -
Facing problem in call function starting new task taskname
Hi all,
when i call a function module using starting new task, it is failing with sy-subrc 3. can anyone guide me in this.
see the code :
DATA lv_taskname(7) TYPE c VALUE 'PEM_EXE'.
CALL FUNCTION 'PEM_SCHEDULE' STARTING NEW TASK lv_taskname
EXPORTING
iv_packid = gv_packid
iv_pebid = ls_alv_out-peb_id
EXCEPTIONS
invalid_state_request = 1
database_error = 2
OTHERS = 3.
Thanks in advance.
Best Regards,
Prashantwhen i change the function module from normal to remote, it gives me a error that the "generic types are not allowed in RFC", but i have not given any generic type in the parameters.
see the signature of the function module.
*" IMPORTING
*" VALUE(IV_PACKID) TYPE CNVMBTPACK-PACKID
*" VALUE(IV_PEBID) TYPE CNVMBTPEB-PEB_ID
*" EXPORTING
*" VALUE(EV_ERROR_DETECTED) TYPE C
*" VALUE(EV_STOP) TYPE C
*" EXCEPTIONS
*" INVALID_STATE_REQUEST
*" DATABASE_ERROR
*" FORIEGN_LOCK
Can u please check it and find out the problem
Thanks,
Prasanth -
Problem with sender name CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
Hi All ,
I am using below function module to send a mail to external email Id's , Everything is working perfectly .
But in the sender address I have passed text as 'infomation ' , In email which i am recieving sender address is like text and '@xyz.com' .
Any idea from where this @xyz.com is picking ? .
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
sender_address = 'Information'
sender_address_type = 'INT'
commit_work = 'X'
IMPORTING
sent_to_all = gd_sent_all
TABLES
packing_list = it_packing_list
contents_bin = it_attachment
contents_txt = it_message
receivers = it_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.Hi All ,
I am using below function module to send a mail to external email Id's , Everything is working perfectly .
But in the sender address I have passed text as 'infomation ' , In email which i am recieving sender address is like text and '@xyz.com' .
Any idea from where this @xyz.com is picking ? .
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
sender_address = 'Information'
sender_address_type = 'INT'
commit_work = 'X'
IMPORTING
sent_to_all = gd_sent_all
TABLES
packing_list = it_packing_list
contents_bin = it_attachment
contents_txt = it_message
receivers = it_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8. -
Problem in CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
While working in PDF attachment I am using
Function 'GET_JOB_RUNTIME_INFO' as bellow
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
But I am getting gd_jobname, gd_jobcount,gd_stepcount blanck
So please help...Try this.....
PARAMETERS: V_EVTID LIKE TBTCM-EVENTID,
V_EVTPRM LIKE TBTCM-EVENTPARM,
V_JOBNAM LIKE TBTCM-JOBNAME.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = V_EVTID
EVENTPARM = V_EVTPRM
JOBNAME = V_JOBNAM
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
WRITE:/'ERROR IN FUNCTION'.
ELSE.
WRITE:/ 'JOB', V_JOBNAM, 'STARTED WITH EVENT', V_EVTID, 'AND PARAMETER', V_EVTPRM.
ENDIF.
Regards
Ajit -
Problem in Call function .. starting new task
Hi,
I want to execute a dialog program in background. I am trying to use call function starting new task.
I am facing some syntax issue. Can any one guide me how to use call function starting new task. The function module is RFC FM. Do we need to define task some where before use please guide.
Thanks in advance. A sample program will be gr8.Hi,
Incase you want to call a RFC FM in background you can call ity like this.
call function 'Y_L_TO_CREATE_HUPAST' in background task
exporting
venum = y_v_venum
backg = 'X'
buser = y_lv_uname
langu = sy-langu
objky = y_lv_objky
printer = y_lv_printer.
Here Y_L_TO_CREATE_HUPAST is a RFC FM.
Regards,
Ankur Parab -
Hi,
i have creted a function module which read stock quantity using BAPI_MATERIAL_AVAILABILITY.
Import - MFRPN
Export - QNTY
If i execute function module from SAP the result it's OK but when i call function from PHP it does not output nothing.
$sap = new saprfc(array(
"logindata"=>array(
"ASHOST"=>"192.168.3.1" // application server
,"SYSNR"=>"00" // system number
,"CLIENT"=>"200" // client
,"USER"=>"rfc" // user
,"PASSWD"=>"123456789" // password
,"show_errors"=>true // let class printout errors
,"debug"=>false)) ; // detailed debugging information
// Call-Function
// Call-Function
$result=$sap->callFunction("Z_READ_QNTY",
array(
array("IMPORT","MFRPN",$_POST['cod']),
array("EXPORT","QNTY",$quantity),
// Call successfull?
if ($sap->getStatus() == SAPRFC_OK)
echo $quantity;
else
// No, print long Version of last Error
$sap->printStatus();
// or print your own error-message with the strings received from
// $sap->getStatusText() or $sap->getStatusTextLong()
Please someone help me.
Thank you.hi Dan,
i will send you an working code sample. The Fuba ZGET_MAKTX is easy MATNR as import parameter and MAKTX as export parameter.
you will receive the material short description.
hope this will help you a little bit.
in your code i thing you forgot to fill the $quantity like this $quantity = saprfc_export($fce,"QNTY"); before echo $quantity;
regards
Tony
<?php
//Login to SAP R/3
$login = array ("ASHOST"=>"vsap3", "SYSNR"=>"2", "CLIENT"=>"200","USER"=>"vsrfc", "PASSWD"=>"********", "CODEPAGE"=>"1100");
$rfc = saprfc_open($login);
if (!$rfc) {
echo "RFC connection failed";
exit;
$fce = saprfc_function_discover($rfc,"ZGET_MAKTX");
if (!$fce) {
echo "Discovering interface of function module failed";
exit;
saprfc_import($fce,"MATNR","200200");
$rc = saprfc_call_and_receive ($fce);
if ($rfc_rc != SAPRFC_OK) { if ($rfc == SAPRFC_EXCEPTION ) echo ("Exception raised: ".saprfc_exception($fce)); else echo (saprfc_error($fce)); exit; }
$maktx = saprfc_export($fce,"MAKTX");
echo $maktx;
saprfc_function_free($fce);
saprfc_close($rfc);
?>
Edited by: Tony Wienhold on Oct 7, 2008 11:19 AM
Edited by: Tony Wienhold on Oct 7, 2008 11:22 AM -
CALL FUNCTION SPELL-AMOUNT (PROBLEM IN INDIAN LOCALE)
I want to convert 1000000 according to Indian Currency.
But when 1 using call function spell-amount it convert it as
One Million not displaying as 10 Lakhs.
Reward points will be given to usefull answers.
Pradeep Sharma.It is working on small amount properly.
But when v try to convert amount greater then 99 Cror it is unable to conver it.
It is working up to Rs. 999999999
But it is not working when amount greater then 999999999(Ninty Nine Crore).
We requirs to conversion up to Rs. Five Thousand Crore.
Kindly help me it is urgent -
Call function POPUP_TO_CONFIRM after Excel close
Good morning
I have written code like this
DATA: EXCEL TYPE OLE2_OBJECT.
DATA: BOOKS TYPE OLE2_OBJECT.
DATA: BOOK TYPE OLE2_OBJECT.
DATA: CELL TYPE OLE2_OBJECT.
DATA: FONT TYPE OLE2_OBJECT.
DATA: FILE TYPE OLE2_OBJECT.
CREATE OBJECT EXCEL 'EXCEL.APPLICATION'.
CALL METHOD OF EXCEL 'WORKBOOKS' = FILE.
CALL METHOD OF FILE 'OPEN'
EXPORTING
#1 = 'C:temp8D.xls'
#2 = 1.
CALL METHOD OF EXCEL 'CELLS' = CELL
EXPORTING
#1 = 6
#2 = 'C'.
SET PROPERTY OF CELL 'VALUE' = zak_pomoc.
CALL METHOD OF EXCEL 'QUIT'.
FREE OBJECT EXCEL.
If user has modified the 8D file I want display this file on the screen, but first function POPUP_TO_CONFIRM should ask him if he really wants to show file.
I make it like this.
call function 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Display report'
TEXT_QUESTION = 'Display report 8D?'
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
START_COLUMN = 25
START_ROW = 6
IMPORTING
answer = ans.
if ans eq '1'.
DATA gs_excel TYPE ole2_object .
DATA gs_wbooks TYPE ole2_object .
DATA gs_wbook TYPE ole2_object .
DATA gs_application TYPE ole2_object .
CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
SET PROPERTY OF gs_excel 'Visible' = 1 .
GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
GET PROPERTY OF gs_wbooks 'Application' = gs_application .
*--Opening the existing document
CALL METHOD OF gs_wbooks 'Open' = gs_wbook
EXPORTING
#1 = 'c:temp8D.xls'.
endif.
But there is my problem because two windows: first- asking about saving the file and the second- asking about showing the file, pop up in this same time.
What condition should I write to call second window after this first one?
Please, any suggestions?
Thank you.Hello
I'm just beginner and there is one thing I don't understand. Between lines
CALL METHOD OF EXCEL 'QUIT'
and
FREE OBJECT EXCEL
the window 'Do you want save changes' appears. And in that moment what is the value that says if the user chooses OK or QUIT?
If I would know that value, I could call function POPUP_TO_CONFIRM in the right moment. -
Filter Function problems on ALV report. [Resolved]
Hi,
I developed an ALV report by using function as below:
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
* I_CALLBACK_PF_STATUS_SET = status_set
* I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME = 'T_BSIK'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
TABLES
T_OUTTAB = TAB_BSIK.
And this ALV custom report is referenced from standard function FBL5N.
After i completed this report, i made an comparision of FBL5N and my custom report.
When I apply the filter function, for example, on the document type, I cannot input 2 characters in the document type field under the filter function. The field length is only 1 character. Similar case results on the field document date.
While the standard function FBL5N works very nice.
What should i do to make the filter function of my own ALV report as the same as the standard function FBL5N do?
Thanks in advance.
Lala
Message was edited by:
Hoo lalaOh, i found where the problem is...
add below 2 statements, then the question is resolved.
LS_FIELDCAT-ref_fieldname = ****
LS_FIELDCAT-ref_tabname = ***
FORM FIELDCAT_INIT tables RT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 3.
LS_FIELDCAT-FIELDNAME = 'BLART'.
LS_FIELDCAT-TABNAME = 'TAB_BSIK'.
LS_FIELDCAT-SELTEXT_L = 'Document Type'.
LS_FIELDCAT-ref_fieldname = 'BLART'.
LS_FIELDCAT-ref_tabname = 'BSIK'.
APPEND LS_FIELDCAT TO RT_FIELDCAT.
endform.
Fine now.
Lala
Maybe you are looking for
-
Hp LaserJet CM1415fnw major driver problem
hello everyone, I have a HP laserjet CM1415fnv that has a major driver issue under Windows 8.1 64-bit. The printer just stopped working and I found that I could not even remove the printer from Devices and printers without causing an issue. If
-
How do I get Mail to download mail and delete it from the server?
I don't think Mail is downloading my E-mail from my server to my computer. My main e-mail account is set up as a POP mail account and I have it set to: "remove a copy from server after receiving message: right away" I have a couple of years of e-mail
-
How to import multiple files linked to swf into captivate?
Hi all I am trying to import a flash swf animation into captivate 5.5. I figured it should be straight forward by going Insert > Animation, but the animation doesn't do what it is meant to. I think this is because the swf file is associated with a nu
-
How to find the enhancement spot in PA30 to validate the field
Hi , Is there any standard procedure to find the enhancemant spot , i want to validate the infotype field in PA30 Thanks, Kalyani
-
Duplicate a web dynpro project
Hi I have to duplicate a web synpro project that is finish. I want make a modification without to damage my original file. help me thanks