Function modules called in update task
Hi,
I am calling two function modules in update task sequentially. I want to know whether these two function modules are also called sequentially in update debugging also?
My code is like this
1. call FM1 in update task
2. Call FM2 in update task
will this be the same sequence at the time of execution also? or will it be random?
Thanks in advance.
ya it will this be in the same sequence only...........
Regards
Anbu
Similar Messages
-
Function Module called in Update Task
Hi Gurus,
We are calling Sales Order Change in update task inside the user Exit MV50FZ1. We can see that the FM is called in update task after the commit work and the return of the FM shows the success message. But still the changes are not saved to the DB.
Can any one help me out with this one.
RashitHi,
If two commit works are called in update task the update will end up with error. Check whether any Commit work is present in the funtion module? If so you may use it in some other method like at save or something like that.
Regards,
Renjith Michael. -
Function Module 'Save_text' in update task of Vl01n
Hi Friends,
My requirement is, when i save a delivery document, the 'Material Sales text' in delivery has to be updated with custom details.
It is good that we can code the function module 'Save_text' in update task in the exit provided for VL01n - Delivery creation right.
At saving of delivery, we can use the set, get parameters to get the delivery document no and pass it to the Function module 'Save_text' in update task. Hope this will work.
Correct me if i am wrong.
Highly appreciate your valuable responses.
Thanks,
Jaffer Ali.SHi,
You are going in a correct method proceed. Its been good to know whether you are going correct or wrong.
Cheers!!
VEnk@ -
How to control sequence of Function Modules processed in update task?
Hello,
I've some questions regarding following process that needs to be extended: a Function Module (FM) 'Save' calls several other FM e.g. 'X1' and 'X2' in update task. Those update modules are independent from each other and write data to the database that finalize the save process.
Now a third FM 'X3' needs to be called in update task. This one is also independent from 'X1' and 'X2' but it calls a further FM 'X4' in background task as separate unit which starts a job. This job requires the data from FM 'X1' and 'X2' already persistent on the database. By the way: the FM 'X3' triggers the Access Control Engine (ACE) notification that calculates the authorization data in the mentioned job. Therefore this process needs to be the last FM call in update task in the queue of calls in FM 'Save'.
Questions:
(1) Is it possible to control the process sequence of the FM 'in update task' simply by the sequence they are called in FM 'Save'.
(2) Presumed that all FM beside 'X3' have processing type "Update with immediate start" or "Immediate start, no restart" (in short V1) would it be another solution to specify FM 'X3' with type 'Delayed' to control the process sequence? When a delayed FM will be processed?
(3) Is it uncritical to call in FM 'X3' (already running in update task) the FM 'X4' with addition in background task as separate unit that furthermore starts a job by an event? I'm afraid that this nesting could lead to unexpected errors.
Thank you in advance for your help!
Best regards,
Oliverya it will this be in the same sequence only...........
Regards
Anbu -
Regarding calling the fuctional module Using 'in update task'
Hi ,
I want to call a Functional module Z-PS_VK11_FRC using the statement IN UPDATE TASK .
What is procedure to work with . can anybodt tell me how to proceed or give me some sample program .
Regards,
Shilpa TalluriFunction modules that run in update task can not return any values because your program has no longer control over the function module (the update task has).
UPDATE TASK fm mostly used to update database tables.
You don't any special coding other than calling fm UPDATE TASK
And in the attributes of function module you need to tick the Update mode and "Coll Run" so that it can be used to run individually in the V2 update process can be grouped together and run collectively.
a® -
Calling another FM, in the FM which is called in Update task
Hi Experts,
I have created the implicit enhancement in the Function module say 'X' .
This 'X' FM is called in Update Task.
Now i am calling another FM say 'Y' in this 'X' FM.
The FM 'Y' has got its own commit statement.It is updating some tables.
Here are my findings,
When i commented the explicit 'commit and wait' from the 'Y' Fm , the data that i needed to be saved was being saved and updated successfully.
However , when i added an extra parameter say 'No Commit' in the 'Y' FM to by pass the explicit 'commit and wait' , the FM 'Y' itself is not getting called for strange reasons.
The update gets interrupted.
Please suggest why this FM is not getting called.
Any thing that i may be missing.
Regards,
Abhishek KokateHope you have called the FM correctly with the additional importing parameter , also check if your FM is RFC enabled then check the "pass by value" option.
-
RFC enabled function module for insert update and delete in a Ztable..
friends..
Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps..
what are the import, export parameters and how to develop and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address)
Thanks and RegardsHi,
Try this code.
REPORT ZMMC071Z_RMV.
TYPE-POOLS : ABAP.
FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
<DYN_WA>,
<DYN_FIELD>,
<LV_CONDI>.
DATA: DY_TABLE TYPE REF TO DATA,
DY_LINE TYPE REF TO DATA,
XFC TYPE LVC_S_FCAT,
IFC TYPE LVC_T_FCAT.
SELECTION-SCREEN BEGIN OF BLOCK F1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_TABLE LIKE DD02L-TABNAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK F1.
Evento: At Selection Screen *
START-OF-SELECTION.
PERFORM GET_STRUCTURE.
PERFORM CREATE_DYNAMIC_ITAB.
PERFORM GET_DATA.
END-OF-SELECTION.
*& Form get_structure
text
FORM GET_STRUCTURE.
DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
XDETAILS TYPE ABAP_COMPDESCR.
DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
DATA VL_LENGHT(30).
Get the structure of the table.
REF_TABLE_DES ?=
CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( P_TABLE ).
IDETAILS[] = REF_TABLE_DES->COMPONENTS[].
LOOP AT IDETAILS INTO XDETAILS.
CLEAR XFC.
XFC-FIELDNAME = XDETAILS-NAME .
XFC-DATATYPE = XDETAILS-TYPE_KIND.
XFC-INTTYPE = XDETAILS-TYPE_KIND.
XFC-INTLEN = XDETAILS-LENGTH.
XFC-DECIMALS = XDETAILS-DECIMALS.
APPEND XFC TO IFC.
ENDLOOP.
ENDFORM. "get_structure
*& Form create_dynamic_itab
text
FORM CREATE_DYNAMIC_ITAB.
Create dynamic internal table and assign to FS
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFC
IMPORTING
EP_TABLE = DY_TABLE.
ASSIGN DY_TABLE->* TO <DYN_TABLE>.
Create dynamic work area and assign to FS
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
ASSIGN DY_LINE->* TO <DYN_WA>.
ENDFORM. "create_dynamic_itab
*& Form get_data
text
--> p1 text
<-- p2 text
FORM GET_DATA .
*Get data from p_table into internal table <DYN_TABLE>
SELECT * INTO TABLE <DYN_TABLE>
FROM (P_TABLE)
Here you can implemente function DELETE, INSERT.
ENDFORM. " De_para -
Problem with function module calling
Hi,
I have two questions here
i have a function moduel 'Z_GET_MATL_BALANCE'
in my code it called in the below said way
CALL FUNCTION 'Z_GET_MATL_BALANCE'
DESTINATION 'NONE'
STARTING NEW TASK 'A'
PERFORMING f_back ON END OF TASK
EXPORTING
ref_dte = s_datum-low
str_dte = s_datum-high
end_dte = s_datum-high
i_werks = p_werks
i_past = 'X'
i_future = 'X'
verselem = p_mrpver
plscn = p_scenar
r_outrec = r_outrec
supstk = p_supstk
days_ahead = w_days_ahead
shipnt = p_shipnt
TABLES
mat_bals = w_zmat_bals_a
i_zdatum = i_datum
mat_movmts = w_mat_movmts_a
mat_ship = i_mat_ship_a.
IF sy-subrc NE 0.
MESSAGE e005(ZMIM) WITH
text-009 text-166 text-054 sy-subrc.
ENDIF.
FORM f_back USING task.
CASE task.
WHEN 'A' .
RECEIVE RESULTS FROM FUNCTION 'Z_GET_MATL_BALANCE'
TABLES
mat_bals = w_zmat_bals_a
mat_movmts = w_mat_movmts_a
mat_ship = i_mat_ship_a
EXCEPTIONS
call_material_lesen_fail = 1
call_t450n_fail = 2
call_t399d_fail = 3
call_aufbauen_mdpsx_fail = 4
call_mdezx_aufbauen_fail = 5
call_t001w_fail = 6
call_zmrpelem_failed = 7
call_aufbauen_mdpsx_sim_fail = 8
OTHERS = 9.
IF SY-SUBRC NE 0.
RET_CODE1 = SY-SUBRC.
ENDIF.
now my first question is what is the difference between function modules calling normally and in the above said way
and the second question is
under tables parameter i have four internal tables defined where as while calling the same function module using recive results i have three internal tables. is this correct?
i am asking this because i am getting an error message while using this funciton module
please do not give generic answers, all the helpful answers will get a def rewardCall function starting new task is used to make Asynchronus RFC Call. In this case your function module will be called in a NEW SESSION and it will exceute independently from the Main program which is calling the FM. Also, the main program will continue its own processing and it will not wait for the RFC FM to complete.
Its not mandatory to have all the TABLES parameters in the RETURN Perform (..Receive results from ...) -
I need to have COMMit WORK with in a FM, which is calling in UPDATE task
Hello
I am sending out the custom IDOC from SAP to partner application by writing a custom my_OB_IDOC_FM, well.
With in this my_OB_IDOC_FM, for some functionality, i am using a standard SAP FM and I need to use a COMMIT WORK immediately after this standard SAP FM call.
But, all my IDOC is calling in update task, so once am triggering IDOC (inturn my_OB_IDOC_FM is calling in UPDATE task) am getting dump because of that inside used COMIT WORK statement!
So, pls. let me know how can replace this COMMIT WORK or hoe can i fix my issue? can i do like CALL FUNCTION standard_SAP_FM in background task/seperate task? so that i can use COMMIT WORK?
Thank youI've dealt with something similar before.
You could make a new z-program and run in a background job... like this:
* create the job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = mv_JOBNAME
IMPORTING
JOBCOUNT = mv_JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
* submit the program to the job
SUBMIT ZPROGRAM
WITH i_ebeln in mr_ebeln
WITH updall = 'X'
WITH wq_simul = ''
TO SAP-SPOOL
DESTINATION sv_output_device
IMMEDIATELY ''
KEEP IN SPOOL 'X'
WITHOUT SPOOL DYNPRO
USER sy-uname
VIA JOB mv_jobname NUMBER mv_jobcount
AND RETURN.
* submit the job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = mv_JOBCOUNT
JOBNAME = mv_JOBNAME
STRTIMMED = 'X'
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
OTHERS = 8. -
RFC enabled function module to insert , update and delete data in a ZTABLE
friends..
Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)?
if not how can we create it? plz give me the details steps..
what are the import, export parameters and how to code and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address. I need to develop a RFM which does the 3 tasks, insert update delete in the same RFM)
Thanks and Regardscreate a f.n mod in se37 and make it rfc enabled. ur import parameters are Emp_Id, Name, Address and TASK and u can have an export parameter like result which gives the status of the update. based on task u can insert using keyword INSERT....and update using UPDATE or MODIFY and delete using DELETE. these keyword are not compelte with syntax but need to refer the SAP documentation.
-
BAPI function module for FUNDS Update
Hi All,
Anybody can help us on BAPI function module for FUNDS Update in FI funds management module please.
Thanks & Regards
SriniHi,
We are writing a program to change / update the existing funds in table FMFINCODE funds master. Here we are using a function module called FM_FUND_CHANGE but we are not able to capture the return messages. So please suggest me any BAPI function module availble for the same. Tcode : FM5U
Regards
Srini -
Function Module to Change / Update BOM Line Items
Hi,
I need a Function Module to Change / Update BOM Line Items.
Please help.
Thanks.Try this FM - CSAP_MAT_BOM_MAINTAIN
-
Function module call with destination
Hi,
how can check if a function module call with destination works or not ?
How can I debug.
What can be the reason if it is not calles
regards
ertas* to chcek the rfc Destination By pass RFC destination name and Connection Type..
RFC_CHECK_DESTINATION
or
RFC_CHECK_DESTINATION_ID
or
You can use this FM RFC_VERIFY_DESTINATION if your release is greater than 4.6C.
Check this sample code from Craig Cmehil's weblog.
CALL FUNCTION 'RFC_VERIFY_DESTINATION'
EXPORTING
DESTINATION = TMP
TIMEOUT = 10
EXCEPTIONS
INTERNAL_FAILURE = 1
TIMEOUT = 2
DEST_COMMUNICATION_FAILURE = 3
DEST_SYSTEM_FAILURE = 4
UPDATE_FAILURE = 5
NO_UPDATE_AUTHORITY = 6
OTHERS = 7.
IF SY-SUBRC EQ '0'.
"* Do code here
ENDIF.
Prabhu -
Rfc function module call error
Hi Abaper,
I'm doing upgrade from 4.7 to ecc 6.0 currently and encounter problem in one of the rfc function module that we used. I've tested the connection to destination using sm59 and the connection is successful.
As an information, in the rfc setting, the target system is not Unicode system.
When I test using se37 and put the rfc destination in my function module call, I always encountered system_error exception. There's no issue with this rfc call before in 4.7 system.
Please help me on this. Thank you.
Edited by: Abraham Bukit on Sep 3, 2008 2:36 AMHi,
I had the same issue in the past and solved it in the following way.
If the destination system is not Unicode please try to set the password for the communication user set in SM59 using only upper-case characters and taking into account that the password shouldn't be longer than 8 characters.
Hope this will help. -
Need to track Function modules called when executing a transaction
Hi All,
Is there a way through which i can track function modules called, while executing a Transaction. Kindly provide pointers to it.
Thanks in advance.
Regards,
Navin.Goto SE80 Transaction and use Program name for corresponding Transaction Use Find operation like Call Function .. then you will get list of FM ..
There is no other option .
reward Points if it is helpful
Thanks
Seshu
Maybe you are looking for
-
HT204387 does the iphone support rsap for skoda car phone can it be adapted with an app
can my iphone be adapted to work in my skoda superb currently i use an old nokia but would love to use my iphone so that i only needed one mobile phone number is there an app that could fix it ????
-
Script logic from BPC 5 in BPC 7.5
Hi, I am trying to use some script logic from an appset in BPC 5 in BPC 7.5. When I validate the logic in 5 it works fine but in 7.5 I get validation errors. They relate to properties of dimension elements that are not currently used (neither in 5 no
-
Find Number of Active Calendar Client Sessions?
What is the "ps" command to find the number of active Calendar clients at any given time? We are using 10.1.2 in an OCS installation on Linux SuSe servers. Also, is there a way to see the individual usernames associated with each active session?
-
Javax.resource.ResourceException: Failed to start the connection
I have created the JMS bridge in Weblogic10.0 to connect with MQ server, I am getting error when startingup the weblogic server. Below the error ####<28-Mar-2009 10:56:25 o'clock GMT> <Info> <MessagingBridge> <clx25ao02> <aauat100-02> <[STANDBY] Exec
-
Hi guys, I created events in sm64. These events should start a process chain. However when I trigger them manually I do not get the event in the event history nor does my process chain start. Do I have to activate any other stuff for events? Thanks i