How to remove function module error?
Hi Iam using a FM to get the database value of project name(PROJ-PSPID),Iam using this in my module pool program,when I enter wrong project name,the FM itself throwing the error,I want my own error message rather FM error message.How to achieve it?
Thanks in advance.
Hi Rock,
After executing the function module , check for sy-subrc value as shown below
data: w_return type bapiret2,
it_return type table of bapiret2.
call function '.....'
IF SY-SUBRC EQ 0.
PERFORM fm_update_return_msg
USING 'E'
your Message class
'msg no'
CHANGING w_return.
APPEND w_return TO IT_RETURN.
clear w_return.
ENDIF.
FORM fm_update_return_msg USING p_msgty TYPE sy-msgty
p_msgid TYPE sy-msgid
p_msgno TYPE sy-msgno
p_msg_v1 TYPE sy-msgv1
p_msg_v2 TYPE sy-msgv2
p_msg_v3 TYPE sy-msgv3
p_msg_v4 TYPE sy-msgv4
CHANGING p_return TYPE bapiret2.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = p_msgty
cl = p_msgid
number = p_msgno
par1 = p_msg_v1
par2 = p_msg_v2
par3 = p_msg_v3
par4 = p_msg_v4
IMPORTING
return = p_return.
ENDFORM. "fm_update_return_msg
Similar Messages
-
How to create function module for getting customer name
Hi Experts,
How to create function module? when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
how to write the logic in source code....
Regards,
Thiru. R1. First of all create function group.
2. Create function module using this function group.
3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
4. Fetch name1 for each kunnr from KNA1 table.
"->> if many kunnr
if not t_kunnr[] is initial.
select kunnr as kunnr name1 as name1
into table t_kunnr_name1
from kna1
for all entried in table t_kunnr
where kunnr = t_kunnr-kunnr.
endif.
sort t_kunnr_name1 by kunnr name1.
delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
table t_kunnr_name1 will contain kunnr and its name1.
I hope logic is clear for you now.
Regards,
Aparna -
How to create function module in abap for VirtualProvider in bi
how to create function module in abap for VirtualProvider in bi ???????????????
can any one help me with simple example ?????????????????
Moderator message : Duplicate post locked. Read forum rules before posting.
Edited by: Vinod Kumar on Jun 15, 2011 4:40 PMHi ,
Thanks for replies about my question??.
If i am using the exit in my char relation ship how can i debugg that exit???
if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
Thanks. -
HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM
PLEASE ANYONE TELL ME, ABOUT HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1
Hi,
Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM.
If helpful, reward points.
Rgds,
CK -
How to Use Function Module READ_TEXT
Hi
Anyone give me code or link or example for how to use function module READ_TEXT
and what are the parameters which we have to pass in module.
Regards.
MohsinHi,
refer the given below code.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = 'KOPF'uF0E0 these details we will get thru transaction , where we enter these details.
language = 'EN'uF0E0 these details we will get thru transaction , where we enter these details.
name = TNAME "table name
object = 'AUFK' " these details we will get thru transaction , where we enter these details.
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
IMPORTING
HEADER = HTEXT
tables
lines = LTEXT
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* NOT_FOUND = 4
* OBJECT = 5
* REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks
Arun -
How to use functional module " DETERMINE_DUE_DATE"
Hi All,
Can anyone suggest how to use functional module " DETERMINE_DUE_DATE" as it is used in an FI transaction code "FBL5N" and i have to use it in my zprogram to capture the net due date..please suggest..
Regards,
Shanuhi,
CALL FUNCTION 'DETERMINE_DUE_DATE'
EXPORTING
I_FAEDE = LS_FAEDE
IMPORTING
E_FAEDE = LS_FAEDE
EXCEPTIONS
OTHERS = 1 -
How to assign function module with process code in IDOC ?
how to assign function module with process code in IDOC ? and what code i have to write in that function module for custom IDOC ?
helpful answer will be rewarded?Hi,
First goto transaction we42 -->editing mode --> new entries -->give name of your process code and description --> processing with alv service and function module -->then press enter -->after that enter the name of the function module you want to associate from the drop down and save it.
Thats the way to assign function module with process code.
In that process code we will have the Function modules and Bapi's which will take the data which we are sending through IDOC and then process it.
for example: i am triggering the IDOC for every purchase order created then this process code in the receiver system will take the data which i have enetered in the sender system to create the purchase order and process it and creates the same purchase order in the receiver's system.
Reward if helpful.
with regards,
Syed -
How to Debug Functional Module called via RFC?
Hi Experts,
Please, can someone explain to me how to debug functional module that is called via RFC? Thanks in advance.
Best Regards,
AleksandarHi Laxman,
First of all thank you very much for giving attention to my post. Ok, I am trying to debug function module in RM-CA (FICA), function module is called by CRM system (via RFC) and in addition all this chain is triggered by WebClient.
I have user that can login on the CRM as well as on RM-CA (ECC 6.0) system, but those users are different (unfortunately I do not have administration permission so I cant change profiles of my users but I can ask for it). I can without any problem debug calls that come from WebClient, so setting an external break point in CRM system I can catch whatever I want but when process comes to point where actually call to back-end (RM-CA) takes place I simply cant get into functional module, that resides on RM-CA side. Actually what happens is that processing continues as was chosen NEXT STEP (F6).
To resume, two systems and two different users. Where XCM user should be created? (on RM-CA system or CRM). Should I change something in Menu option Utilities -> Settings -> ABAP Editor tab -> Debugging tab, in field users? If you need any additional info please tell me.
Thanks again for your support.
Aleksandar -
How to Add function modules to retrieve current month
how to Add function modules to retrieve current month from TVARV variables (currently we have functions to do close month).
Hi
Double click on the CODE for the line..
SET PF-STATUS 'XYZ'.
It will open the Menu Painter (SE41). Click on the Function Keys Tree Node and And assign the
Function Keys and Function codes for the Menu Items.
Hope this would help you.
Murthy -
How to remove memory modules from Toshiba notebooks?
You can remove the memory module from your laptop,this is the hardware related technique.
Here you can find a nice Forum place containing some workarounds how to remove and replace the modules.
[How to remove memory modules from Toshiba notebooks?|http://forums.computers.toshiba-europe.com/forums/forum.jspa?forumID=114] -
How to remove control flush error
hi
basically i m devloping one application with lotus notes domino serve
i made one bapi in which i m using <b>gui_download</b> function modul
when i m running my bapi in SAP environment which i devloped its working fine
not any kind of exception is generating pdf file also genearting and my bapi saving it into c:/
no problem with sap gui.
but when i m trying to run my bapi in which i used <b>gui_download</b> functon module in this function module one exception is there <b>control fulsh erro</b>
is generating.
so how can i remove this exception when i m tring to run this bapi from lotus notes domino mail server.
help
thanks in advanced.Hi,
control errors come often with old SAP GUI version, have you installed the newest GUI patches? Also patch all other components which might have something (remotely) to do with this (operating system, explorer, JAVA,...) - and if still errors occurs, a OSS message might bring help for you.
Regards,
Christian -
How to use functional module in crystal report
Hi all,
I have imported my functional module to crystal report,
but when i am previewing it i am not getting data in that, according to my functional module.
how to run my functional module through crystal report.
thanks in advancePost Author: mewdied
CA Forum: .NET
'EXPORT to EMAIL ''' Code for exporting the report to Mapi (.Net Windows application) ''' *For a Web application you must export to disk as a PDF file first.
crReportDocument.Load(Application.StartupPath + "\World Sales Report.rpt") crMicrosoftMailDestinationOptions = New MicrosoftMailDestinationOptions With crMicrosoftMailDestinationOptions .MailCCList = "[email protected]" .MailToList = "[email protected]" .MailSubject = "Attached exported report" .UserName = "admin" .Password = "password" End With
crExportOptions = crReportDocument.ExportOptions With crExportOptions .DestinationOptions = crMicrosoftMailDestinationOptions .ExportDestinationType = ExportDestinationType.MicrosoftMail .ExportFormatType = ExportFormatType.PortableDocFormat End With
'Add some error handling Try crReportDocument.Export() MsgBox("Report exported successfully.") Catch err As Exception MessageBox.Show(err.ToString()) End Try
Hope this helps -
How to Call Function Module from XI Mapping
Hi All,
I would like to call a function module that resides in ECC through XI mapping.
Can any one please through some light on how to proceed ?
RegardsHello Shabarish,
Thanks for the reply, Actually i would like to do date validation using ISHMED_CHECK_DATE_TIME FM inside Mapping.
I would like to do this way, please let me know how good is this
1) Expose the FM as a RFC enabled one
2) Use the following UDF code inside Mapping
3) do i need to import the RFC enabled FM into our XI??
4) Do i required to create any Communication channel for this?
function RFC_LOOKUP_API
Imports java.io.;com.sap.aii.mapping.lookup.;
String content = "";
MappingTrace importanttrace;
importanttrace = container.getTrace();
// filling the string with our RFC-XML (with values)
String m = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Z_UDF_CREATE_ZTOR_REC xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">";
m = m + "<I_MESSAGEID>" + MsgID + "</I_MESSAGEID>";
m = m + "<I_EBELN>" + PONum + "</I_EBELN>";
m = m + "<I_ERDAT>" + MsgDate + "</I_ERDAT>";
m = m + "<I_UZEIT>" + MsgTime + "</I_UZEIT>";
m = m + "</ns0:Z_UDF_CREATE_ZTOR_REC>";
RfcAccessor accessor = null;
ByteArrayOutputStream out = null;
try
// 1. Determine a channel (Business system, Communication channel)
Channel channel = LookupService.getChannel("XI","GeneratedReceiverChannel_RFC");
// 2. Get a RFC accessor for a channel.
accessor = LookupService.getRfcAccessor(channel);
// 3. Create a xml input stream representing the function module request message.
InputStream inputStream = new ByteArrayInputStream(m.getBytes());
// 4. Create xml payload
XmlPayload payload = LookupService.getXmlPayload(inputStream);
// 5. Execute Record Create.
Payload result = accessor.call(payload);
InputStream in = result.getContent();
out = new ByteArrayOutputStream(1024);
byte[] buffer = new byte[1024];
for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
out.write(buffer, 0, read);
content = out.toString();
catch(LookupException e)
importanttrace.addWarning("Error while writing " + e.getMessage() );
catch(IOException e)
importanttrace.addWarning("Error " + e.getMessage() );
finally
if (out!=null) {
try {
out.close();
} catch (IOException e) {
importanttrace.addWarning("Error while closing stream " + e.getMessage() );
// 7. close the accessor in order to free resources.
if (accessor!=null) {
try {
accessor.close();
} catch (LookupException e) {
importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
//returning the result u2013 RFC-XML.response
return content;
Thanks & Regards
Vamsi -
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 -
Function module error message.
Call Function Z_function.
Imports
Exports
EXCEPTIONS
no_entry_found = 1
OTHERS = 2
IF sy-subrc = 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Suppose
if sy-subrc = 1.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Giving me popup and is troubling.
Could you please tell me if I comment below
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4....
and proceed will it effect me in case of sy-subrc <> 0.
Thank youHi Sam,
Yes you can. But some times the programs emphasises specific program errors.
For e.g.
Use the following code for function module for GENEREIC case.
In this case you can remove total piece of code suggested by you. and replace the following code.
If sy-subrc ne 0.
Messae 'Error in function module' Type 'E'.
Endif.
Use the following code for function module for SPECIFIC case.
case sy-subrc.
when '1'.
Message 'No_entry found' type 'E'.
when '2'.
Message 'Undetermined error in Function module. Please contact system administrator' Type 'E".
Endcase.
Regards
Bhupal Reddy
Maybe you are looking for
-
What does this console msg mean and how can I stop it?
This is about a CDMA iPhone 4 running iOS 4.2.10 (8E600). The console displays the following message every 10 seconds forever: Wed Aug 31 12:36:47 unknown com.apple.launchd[1]<Error>: (com.apple.mobile.installd.mount_helper) posix_spawn("/usr/libexe/
-
2002 not listed as a choice for "Fit Check" for car cd player?
I want to buy a cd player for my 2002, 2DR Coupe Mustang and when I went to see which cd players would fit in my car with the "Fit Check", there was no option for 2002. It goes right from 2001 to 2003. I called the customer service and was on hold fo
-
Apple Maps - My business location is wrong, and I don't have any iDevices to fix it
Apple Team, I need to fix my location marker because my customers are constantly getting sent to the wrong location and having to call me for turn by turn directions when using their iPhones to find my farm. As a local farmer in Virginia, I cannot af
-
No more EXPORT (Share) into File
Hi, without wanting to critizise iPhoto 6, actually, almost everything worked out without issues in my case, I am missing out on one function which I used on iPhoto 5 a lot. The SHARE to FILE function. I really used it a lot to convert a certain amou
-
I meet a problem about https. I create a web project using axis, config a servlet (public class KeyResponse extends JAXMServlet implements ReqRespListener), in the client, declare SOAPConnection conn,SOAPMessage req,resp,correct defined, resp = conn.