Function Module Strange execution
Hi Kindly see below scenario:
I have a RFC FM called "BAPI_DOCUMENT_CHECKIN2" on ERP back end System.
I execute with below parameters :
CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
EXPORTING: documenttype = lf_doctype
documentnumber = lf_docnumber
documentpart = lf_docpart
documentversion = lf_docversion
hostname = ''
statusintern = ''
statusextern = lf_status
statuslog = ''
IMPORTING: return = ls_return
TABLES: documentfiles = lt_files.
I give parameters:
lt_files-storagecategory = 'Z_xxxL_xxx'. "
lt_files-docfile = '
10.x.x.xxx\mdmtest\srinivas\srinipaddu.txt'.
Now "srinipaddu.txt" gets attached in the DMS system (IP:10.x.x.xxx: Belongs to the XI box and not either backend erp or SRM box below)
Second Scenario:
Now this same FM which is not present in the SRM BOX is called up using below syntax (Destination)
call function 'BAPI_DOCUMENT_CHECKIN2' DESTINATION 'abapdest' EXPORTING: documentnumber = lf_docnumber
documenttype = lf_doctype
documentpart = lf_docpart
documentversion = lf_docversion
hostname = ''
statusintern = ''
statusextern = lf_status
statuslog = ''
IMPORTING: return = pr_ls_return
TABLES: documentfiles = pr_lt_files.
Now the FM gets executed but the file in the specified folder is not getting attached in DMS system.
help me out
With regards
Srin
Hello,
Assuming you mean in a workflow, you could do this by having the step that calls the FM in a 1-from-2 fork with in the other leg of the fork a step that calls a dummy method and has a 30-minute deadline on it.
regards
Rick Bakker
hanabi technology
Similar Messages
-
Limit Function Module time execution
Hi experts,
I would like to know how to limit FM execution in time .
I can only wait 30 seconds for the function to answer, and continue even if its processing is not over.
I can't figure ou how to do it..does anybody know ?
Thanks in advance !
Regards,Hi,
I didnt get you , you want to see the time limit FM execution ..? can you tell me the scenario.
here the following link may be useful to you.,
http://help.sap.com/saphelp_nw04/helpdata/en/22/042578488911d189490000e829fbbd/frameset.htm
Thanks & Regards,
Jana -
Debugging Outbound Function module in EDI
Hello All,
I have a query regarding debugging function module which is used for creation of outbound Idoc for Purchase Order.
We have a Z process code which is assigned to a Z function module which creates an IDOC while a PO is created in the system.
But If I set break points in the Function module, the execution does stop there.
Can any one please tell me how to debug outbound processing Functioon module while PO is created.
Regards
ArindamHi,
There are 2 ways to to debug an outbound idoc triggered by an output type. One way is to set the output timing to 1, and save the purchase order and then execute RSNAST00 which will take the control to the breakpoint.
You can also debug the idoc with the output timing set as 4.
Here the idoc is triggered in update mode. Hence any breakpoints you may have set before will not reflect. Hence you need to activate update debugging.
Below are the steps for the same..
1. Add the output type in purchase order.
2. Enter '/h' to activate debugging in transaction window.
3. Save purchase order.
4. The process enters debugging mode.
5. In Settings tab, select checkbox for Update Debugging.
6. Click F8.
7. The control will appear to go out and re-enter debugging mode.
8. Now from the menu bar, in breakpoints option, choose Breakpoint At Function Module option, and give the name of the function module which is processing the idoc.
9. Once breakpoint set, click F8.
10. The control will now go to the function module. You can then debug the FM.
Hope this information is helpful. -
How to avoid a function module runnning parallely twice
Hello,
There is a scenario, where user calls a function module via RFC.
The requirement is to avoid the user from running the function module parallely twice or more because it may lead to dead lock problems.
To realize this creation of a new enqueue object and set up of enqueue of this object in the function is suggested.
If the object is blocked (which means the function is already being
running by the sorter), it should go out of the function.
Can i get help in locking this function module during execution.
With Best Regards,
Adarsh.Here's a sample of how you might do this - see comments in code for explanation.. run the program in two differ SAPGui sessions to see the effect.
report zlocal_jc_tfdir_lock.
start-of-selection.
perform set_and_check_lock.
form set_and_check_lock.
*" Use SAP enqueue to prevent multiple RFC calls of same object
data:
l_object like tfdir-funcname.
*" Build some name that is specific to your needs
*" Include sy-uname in key if lock is per user, not for process
concatenate '#Z LOCK:' sy-uname into l_object.
*" and enqueue
call function 'ENQUEUE_ESFUNCTION'
exporting
funcname = l_object
exceptions
foreign_lock = 1
system_failure = 2
others = 3.
if not sy-subrc is initial.
message e398(00)
with
l_object 'is held by' sy-msgv1 space.
else.
write: / l_object, 'is now locked - check sm12 for proof'.
endif.
endform. -
Hi,
I want to test the BAPI Function mudule for PO.how to test it in SE37.
please tell me the Step by Step procedure like how to give values and how to know the errors etc.
Regards,
Shobha Henryhi,
It similar to like testing any function module. after execution you have to check the RETURN parameter to see how the bapi was executed.
you might want to call commit bapi in order to see if bapi really does the changes that you want ot do... In such case you to call commit bapi after your bapi call in se37 itself..
To do so
1. Go to trasanction SE37
2. Menu path: Function Module --> Test --> Test Sequence..
3. On the popup menu enter the sequence of func mode want to execute in series...
4. For example, for one of my test I executed bapis in these order.
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CREATE_MULTI
BAPI_PS_PRECOMMIT
BAPI_TRANSACTION_COMMIT
Hope this helps you.
Enjoy SAP.
Pankaj Singh. -
Scheduling function module execution in background jobs
Hi,
I have requirement where in after obtaining all the required inputs from the user we will call an function module to execute it.
The requirement is that the execution of fm shld happen in background and a log must be created showing the user whther it was successful or if it failed with the list of errors.
Can you kindly give some input on how to schedule the execution of function module in background job and if scheduled how to create the logs to display the success or error message.
Warm Regards,
Naveen MHi,
Just create a simple program where you have to call this FM.
Pass the values to FM either by declaring some internal table of selection screen and execute the program in background.
For Message Log, you can use structurre BDCMSGCOLL
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
After Call to FM, read from this internal table as follows
READ TABLE MESSTAB WITH KEY MSGTYP = <Message Type>
MSGNR = <Message Number>.
regds,
Anil -
Need to know how to find the last execution time for a function module
HI all
I need to know
1) How to find out the last execution time of the function module ?
say for eg. I have executed a func. module at 1:39pm. How to retrieve this time (1:39pm)
2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
How to capture the latest SAP database update b/w time intervals?
3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
Is it possible to run the program once again from 21st records ? All this will be running in background...
Kindly clarify....
Points will be rewarded
Thanks in advance1.Use tcode STAT input as Tcode of Fm and execute .
2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
VBRk-Erdat "date ., u can check the time field also
So now if u talk the date and time we can filter then display the records in intervals.
3. with an error exeption how is my txt download finished .
once exception is raised there will not be a download .
regards,
vijay -
Function Module to find the Last Execution date of Back ground Job
Hi,
Is there any function module to find the <b>last execution date of back ground job</b>.
So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
thanks in advance.
Eswar.Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.
-
Tcode for the execution of function module
Hi!
A very simple question:
What is the Tcode for the execution of function module? (Se38,???)
I have to execute the function module RRSI_INITIAL_LINE_INSERT with import parameter I_CHABASNM = 0REQUID.
Thank you very much!
regards
Thomhi,
You create new or edit Fm in SE37. You also put the code for that FM in SE37.
You can call it through pattern button in SE38, where u pass the importing and exporting parameters of that Fm
Hope this helps, Do rewad. -
Tracking the execution of Function Modules
Hi there,
for ABAP reports there is an enhancement S38MREP1 'Exit at Start report' in transaction CMOD available which could be used e. g. to track the execution at least of executable programs (TRDIR-SUBC = 1); limitation: it is executed before the selection screen, so no guarantee that a certain program is really submitted afterwards.
Is there something similar available in release 4.5B (or in any higher release?) or how can I track the execution of function modules in the customer name space in a smart way?
Thanks in advance for any support,
PeterExpanding a bit on Seigfried's post, you could write a little function module with with a parameter which would be function module name and it would update a custom table everytime it is executed.
Put this function call at the end of the function module that you want to log.
call function 'Z_LOG_FUNCTION_EXECUTION'
exporting
fcname = 'Z_THE_NAME_OF_THE FUNCTION'.
The code inside this function module could be something like this.
ztable-fcname = fcname.
ztable-uname = sy-uname.
ztable-datum = sy-datum.
ztable-uzeit = sy-uzeit.
insert ztable.
Regards,
Rich Heilman -
Runtime Error in execution of 'SO_OBJECT_SEND' function module
Hi friends,
We are going for upgradation from 4.6c to ECC6.0. There is one program which is used to send external mails thru 'SO_OBJECT_SEND', but the function module is giving runtime error(line no:515) in ECC6.
what could be the reason?
rewarded,
SteveHi,
Plz check if any latest release notes of SAP for the function module 'SO_OBJECT_SEND' are available. If so you may apply those.
If you have valid SAP service username and password you can get the notes from service.sap.com. Else your BASIS people can help you.
Which is the highest patch level you have applied?
Regards,
Renjith Michael. -
Execution of a Function module ?
Hi,
Could you please tell me how to execute a custom function module in which the import parameters are a couple of tables which has lot of fields. Do i need to give entries in all of the fields to execute or to debug the Function Module..??
Thanks in Advance.. !!Hi,
To call function module from program
slect the pattern button on APPlication toolbar of ABAP editor enter your FM name.
Regarding parameters...
You have to pass all mandatory field values of FM.
To check whether mandatory or not
GOTO tcode SE37 enter Fm name press display
import parametres--->check call OPTION if check means Mandatory else. not.
Don't forget to reward if useful.... -
How to exit the execution in middle of a function module
Hi Fox,
I have a function which sometime needs more than 10 minutes to deliver a result.
This is not acceptable thus this function will be given a time-out value in a second format after which the function should be stopped or killed. Do you have an idea how to do it. The function has to process a lot of records within a table, so maybe a solution with a counter
Cheers!
KamiCALL FUNCTION func DESTINATION 'NONE' ...
The destination NONE refers to the calling system. Function
modules called with are executed in the system of the calling program, but in their own program context.
As you know RFC uses dialog work process and the timeout for dialog work process will be in the range of 10 -15 mins not beyond that , so once the time the function module gets killed !!!
I m sure about this process because i did a similary requirement like yours.
Thanks. -
Function Modules for Campaigns Execution
Hi Experts,
I have an query, I am executing a Campaigns based on this campaign creating a Leads as transaction. I need some function module or BAPI , using which i can download the Lead Numbers , Business Partner Details like name , address, marketing attribute etc.
Regards
Arun KumarHi,
use this function module:
<b>RSS_UNIQUE_CONVERT_TO_HEX</b>
regards
Debjani
Rewards point for helpful answer -
Function Module error in query execution
Hi SDN Gurus,
When I run this query in Dev it gives me an error: "Function Module RSD_ZK_ACCT_TEXT_GET does not exist." When I look up in SE37 in both DEV and QAS, there is no such function module though I don't get this message in QAS.
ZK_ACCT is one of our important infoobjects and is in the query.
Thanks for your help.
SAFHi Saf,
Try with Tcode RSRT and with the following option:
Buttom:Genrate Report.
Menù: Repair.
And then execute once again the report.
Ciao.
Riccardo.
Maybe you are looking for
-
N96: photo upload via iphoto (Mac), please help!
I created folders in iphoto, but when I opload them to my phone (N96), they are all in one folder ('All') and not in the folders I organized. Since it concerns many images, I find it too much work to do this once they are in my phone. Any way to orga
-
LR4.2 & 4.3 crash when entering book module
Hi, Both the LR4.2 & 4.3 Crash when I enter to the book module... Anyone with the same problem ? Thank you ! Julien
-
JES MS 6.2 and Symantec Brightmail 6.0.1
We are trying to get Brightmail version 6.0.1 working on Solaris 9 with MS 6.2. Brightmail is on the same server as the MTA is running on. It doesn't look like mail is bring processed by Brightmail, when I send test messages through the MTA the count
-
Document for OBIEE 11g services
Hi Gurus, I have a requirement wherein we need to run the OBIEE 11g services(Weblogic server and node manager) in background in AIX instance. If anyone has a document or step by step procedure for that, please share it. Thanks in Advance. Raghu
-
In itunes i don't see the possibility to synchronise the agenda from the pias
In Itunes I don't see the possibility to synchronise the agenda from the Ipad anymore. What can I do