FUNCTION MODULE UPDATE
What is the use of update mode of an function module . how to use it .
[http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm]
Similar Messages
-
Function module updating the data base table
Hi,
This post is regarding the function module not updating the data base table.
I am calling the FM SD_SHIPMENT_HEADER_CHANGE inside the ZFM. It's returning success an changing the table c_xvttk_new with the new TDLNR value. But it's not updating the Shipment table VTTK-TDLBR or VT02N Forwarding agent.
When I directly updating Forwarding agent in VT02N it's updating fine.
Please let me know what the extra step need to be included to update or COMMIT the FM for updating
Forwarding Agent(VTTK-TDLNR).
Best Regards,
Maheshhi friend,
This link wont five u the complete help but if u ananyse it then it might provide u some idea......
BAPI change shipment doc
regards
kanishak -
BAPI or Function Module - Update VBBE Table
Hi All,
I am looking for any function module or BAPI which Updates VBBE Table.
Regards,
DebiHi,
Use FM RV_SALES_DOCUMENT_UPDATE in update task mode and pass all the required fields and tables.
Pass empty table values for remaining tables except VBBE and pass export parameters.
BR,
Lokeswari. -
Issue with function module updated values
Hi Experts,
We have an issue with customized program. In this program function module 'BBP_PD_SC_GETDETAIL' not picking
the updated values when the UI was opened. But when we were executing the same function module directly by providing the values manually it is picking up the correct data.
We thought it was a problem with session killing or buffer refresh ? We dont know how to handle this issue.
If you have any suggestions that would be great help full for me . Please reply asap.
Regards,
ChanduHi,
Thanks for your quick reply.
I have passed the values to the function module in the program and also used the same values for manually testing of the function module. Getting the correct values when I was testing manually.
We thought it was a session killing problem as we developed the customized code. So any idea how to refresh the session even
though the UI(User Interface) was opened.
This issue was solved when the UI was closed and opened again.
Any other ideas on this issue ?
Regards,
Chandu -
hi all
i search a bapi that can update materialprice in ta vk12.
ThxHi,
Can you check BAPI_PRICES_CONDITIONS. Coding might be little complex. May be you can search the forum for sample code.
Thanks,
Vinod. -
Function Module where-used list does not find update rule programs
We have function modules called in update rules. The where-used list in the function builder does not find the update rule programs.
For example, function DATE_GET_WEEK is called in an update rule to InfoCube YCUBE001. The activated program name for this update rule is GP3PWI6PKM5Y3K75A370DIS8I77. When I goto SE37, enter the function DATE_GET_WEEK, click the where-used button, check the programs option and search. The system does not find the program GP3PWI6PKM5Y3K75A370DIS8I77.
Without this search capability it is difficult to do an impact analysis of changing function modules. Does anyone know of a solution?hi,
i think the reason is the code of update rules' generated program are stored line by line in table(rsaabap), update rules program itself stored in table rsupdrout, link with field codeid, another useful table is rsupdinfo which store infocube, infosource related. other info may stored in some other rs* and rsa* tables.
try to create following program in your system, and run, type in the function module name, and will display out the update rules program id, with additional useful info : which infoprovider, infosource, and detail info of the routine and infoobject in the update rule that using that function module. you may modify the program to have better display out list.
hope this helps.
REPORT Z_FM_UPDRUL_WHEREUSED.
data : lv_sfm,
lv_line type string,
lv_where type string.
tables : rsaabap,RSUPDROUT,rsupdinfo.
select-options:
s_fm for rsaabap-LINE.
start-of-selection.
loop at s_fm.
concatenate s_fm-low ' ' into lv_sfm.
concatenate '%' s_fm-low into lv_line.
concatenate lv_line '%' into lv_line.
write : / 'function module', 'update rule id', 'routine id', 'infoobject', 'infocube', 'infosource'.
select * from rsaabap
where line like lv_line and objvers = 'A'.
select * from rsupdrout
where codeid = rsaabap-codeid and objvers = 'A'.
select single * from rsupdinfo
where updid = rsupdrout-updid and objvers = 'A'.
write: / lv_sfm, rsupdrout-updid, rsaabap-codeid,
rsupdrout-iciobjnm, rsupdinfo-infocube,
rsupdinfo-isource.
endselect.
endselect.
endloop. -
How to update other infotype from source infotype via function module?
Want in source infotype to call a func.module, which shall update other infotype(s) in background.
Have tried out with HR_INFOTYPE_OPERATION, but without success - gives mitchmatch of source it and target it in the internal it buffer tables.
How to do?
Requirements also are to secure rollback, if update of the last of ex. 3 target its fails.
Anyone has experience on this issue?
Regards SørenKnow this functionality - also by means of own coding in the PAI by filling the int. tables dynmeas + initial_values. However the issue remains, i.e. the update has to be done by a function module called from PAI of own infotype, and from a function module you can't trigger the T588Z-functionality.
The update of it0003 from own it9300 is only an example, have general requirements that:
- from own infotype PAI a function module shall be called
- from the function module update of other infotypes
shall take place (modify as well as insert and delete)
- if more infotypes shall be updated from source infotype,
rollback shall take place if ex. update of last target
infotype fails (all to be updated or none!).
Regards Søren -
Function Module Not Getting Activated
Hi,
We are using a customised function module which we are calling in a user exit. We would like to call this function module in update task in the user exit to populate data in a custom table.
We have given the following parameters to the function module
Import Parameters
ITAB LIKE ZPRUNDAT
Export Parameters
l_subrc TYPE sy-subrc
On the attributes tab of the function module, Update Module has been selected under processing type.
When we try to activate this function module we get the following message
EXPORTING parameters are not allowed in the update task.
and the function module does not get activated. What should we change to get the function module activated?
MickHi,
Please try this....
In function module
In tables Section add this...
RETURN TYPE BAPIRET2 and then activate.
if its useful reward points -
Executing function module gives error "Portal request failed: Connection fa
Dear Experts,
I have a Function module Z_SAT_CREDITLIMIT_CHANGE which in itself accesses the SAP Update Function module
UPDATE/INSERT of the credit limit(CREDITLIMIT_CHANGE)
and writes the changed data to the Table KNKK(Customer Master Credit Management : Control Area Data).
While executing this fn module Z_SAT_CREDITLIMIT_CHANGE
from VC storyboard i received error "Portal request failed:
Connection failed: Nested Exception: Native Connection to backend system is broken" . Z_SAT_CREDITLIMIT_CHANGE executes fine and updates data in ECC system.
Than i noticed further that while commenting the part of code in Z_SAT_CREDITLIMIT_CHANGEwhere call to fn module CREDITLIMIT_CHANGE is made there's no error recieved and Z_SAT_CREDITLIMIT_CHANGE executes without error but obviously no data is updated.
Appreciate if any one can please explain how can i use CREDITLIMIT_CHANGE in Z_SAT_CREDITLIMIT_CHANGE
without any errors.
Kind Regards,
Robin.Hi Robin,
Also, check that the user with the one you're accessing to the backend have permissions to execute the Dataservice at the backend system.
You should check the usermapping to know which is the user at backend.
Best Regards,
Luis -
Hello Experts,
we are using SD_SALESDOCUMENT_CREATE function module to create sales order.
Sales order is creating successfully but the configuration for the items are not updating.
Could any one help me out on this ....we tried in different ways but couldn't ....
Here is the code....
*---Filling Configuration data
*--- Filling Configuration Reference Item / Instance
w_sales_cfgs_refinst-posex = w_items-itm_number.
w_sales_cfgs_refinst-config_id = '000001'.
w_sales_cfgs_refinst-inst_id = '00000001'.
APPEND w_sales_cfgs_refinst TO t_sales_cfgs_refinst.
CLEAR w_sales_cfgs_refinst.
*---Filling Configuration Reference Data SALES_CFGS_REF Table
w_sales_cfgs_ref-posex = w_items-itm_number.
w_sales_cfgs_ref-config_id = '000001'.
w_sales_cfgs_ref-sce = '1'.
w_sales_cfgs_ref-root_id = '00000001'.
w_sales_cfgs_ref-complete = 'T'.
w_sales_cfgs_ref-consistent = 'T'.
APPEND w_sales_cfgs_ref TO t_sales_cfgs_ref.
CLEAR w_sales_cfgs_ref.
*---Filling Configuration Instances SALES_CFGS_INST Table
w_sales_cfgs_inst-config_id = '000001'.
w_sales_cfgs_inst-inst_id = '00000001'.
w_sales_cfgs_inst-obj_type = 'MARA'.
w_sales_cfgs_inst-class_type = '001'.
w_sales_cfgs_inst-obj_key = w_sales_items_in-material.
w_sales_cfgs_inst-quantity = w_items-target_qty.
w_sales_cfgs_inst-quantity_unit = 'EA'.
w_sales_cfgs_inst-complete = 'T'.
w_sales_cfgs_inst-consistent = 'T'.
w_sales_cfgs_inst-OBJECT_GUID = 'T'.
w_sales_cfgs_inst-PERSIST_ID_TYPE = w_sales_items_in-material.
APPEND w_sales_cfgs_inst TO t_sales_cfgs_inst.
CLEAR w_sales_cfgs_inst.
*---Filling Configuration Characteristic Values SALES_CFGS_VALUE Table
LOOP AT w_items-itm_config INTO wa_itm_config.
w_sales_cfgs_value_in-config_id = '000001'.
w_sales_cfgs_value_in-inst_id = '00000001'.
w_sales_cfgs_value_in-charc = wa_itm_config-charc_name.
w_sales_cfgs_value_in-value = wa_itm_config-charc_value.
APPEND w_sales_cfgs_value_in TO t_sales_cfgs_value.
*---Filling Configuration Variant Condition Key SALES_CFGS_VK
w_sales_cfgs_vk-config_id = '000001'.
w_sales_cfgs_vk-inst_id = '00000001'.
w_sales_cfgs_vk-vkey = wa_itm_config-charc_name.
APPEND w_sales_cfgs_vk TO t_sales_cfgs_vk.
CLEAR : w_sales_cfgs_value_in,w_sales_cfgs_vk.
ENDLOOP.
Regards,
Harsha PHello All,
Actually there was a bug in my code to update configuration for an item in sales order
Below is my Updated Code with that i can updated configuration successfully....
*---Filling Configuration data
*---Filling Configuration Reference Data SALES_CFGS_REF Table
w_sales_cfgs_ref-posex = w_items-itm_number.
w_sales_cfgs_ref-config_id = '000001'.
w_sales_cfgs_ref-sce = '1'.
w_sales_cfgs_ref-root_id = '00000001'.
w_sales_cfgs_ref-complete = 'T'.
w_sales_cfgs_ref-consistent = 'T'.
APPEND w_sales_cfgs_ref TO t_sales_cfgs_ref.
CLEAR w_sales_cfgs_ref.
*---Filling Configuration Instances SALES_CFGS_INST Table
w_sales_cfgs_inst-config_id = '000001'.
w_sales_cfgs_inst-inst_id = '00000001'.
w_sales_cfgs_inst-obj_type = 'MARA'.
w_sales_cfgs_inst-class_type = '300'.
w_sales_cfgs_inst-obj_key = w_sales_items_in-material.
w_sales_cfgs_inst-quantity = w_items-target_qty.
w_sales_cfgs_inst-quantity_unit = 'EA'.
w_sales_cfgs_inst-complete = 'T'.
w_sales_cfgs_inst-consistent = 'T'.
w_sales_cfgs_inst-object_guid = w_sales_items_in-material.
w_sales_cfgs_inst-persist_id_type = 'G'.
APPEND w_sales_cfgs_inst TO t_sales_cfgs_inst.
CLEAR w_sales_cfgs_inst.
*---Filling Configuration Characteristic Values SALES_CFGS_VALUE Table
LOOP AT w_items-itm_config INTO wa_itm_config.
w_sales_cfgs_value_in-config_id = '000001'.
w_sales_cfgs_value_in-inst_id = '00000001'.
w_sales_cfgs_value_in-charc = wa_itm_config-charc_name.
w_sales_cfgs_value_in-value = wa_itm_config-charc_value.
APPEND w_sales_cfgs_value_in TO t_sales_cfgs_value.
*---Filling Configuration Variant Condition Key SALES_CFGS_VK
w_sales_cfgs_vk-config_id = '000001'.
w_sales_cfgs_vk-inst_id = '00000001'.
w_sales_cfgs_vk-vkey = wa_itm_config-charc_name.
APPEND w_sales_cfgs_vk TO t_sales_cfgs_vk.
CLEAR : w_sales_cfgs_value_in,w_sales_cfgs_vk.
ENDLOOP.
CLEAR : w_sales_items_in,wa_mara,w_items,w_sales_schedules_in,
w_items-itm_number.
ENDLOOP.
Cheers,
Harsha -
Running Function Module in Background with Update Task is not working
Hello Friends,
I have a "Z" Report Program where I am running this Report in Background using JOB_OPEN, JOB_SUBMIT, JOB_CLOSE. I am calling this in BADI.
In this Report I am calling another Function Module PRICES_POST which is a standard Function Module and in this FM there is another FM 'CKML_UPDATE_MATERIAL_PRICE IN UPDATE TASK'. Now when I am running the BADI these values are not being updated.
Friends I would like to know whether can we run Function Modules which are included with UPDATE TASK as Background Job program?
Kindly help me in providing your valuable suggestions in proceeding further.
Thanks and Regards
Pradeep GoliUsually the sequence of CALLs in your report should look like
CALL FUNCTION 'CM_F_INITIALIZE'
EXPORTING
msg_on_screen = c_x.
CALL FUNCTION 'CKMS_BUFFER_REFRESH_COMPLETE'.
CALL FUNCTION 'PRICES_CHANGE'
EXPORTING
actual_bdatj = f_matpr-pp-bdatj
actual_poper = f_matpr-pp-poper
bukrs = p_bukrs
budat = p_date
xblnr = p_xblnr
TABLES
t_matpr = t_matpr.
READ TABLE t_matpr WITH KEY pp-xerror = ' '
TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
MESSAGE i046(ckprch).
ELSE.
CALL FUNCTION 'PRICES_POST'
EXPORTING
i_bktxt = p_bktxt
bukrs = p_bukrs
lis_update = 'X'
TABLES
t_matpr = t_matpr.
ENDIF.
COMMIT WORK.
If you forget the COMMIT-WORK each and every FM called in UPDATE TASK will not be triggered.
Regards,
Raymond -
Function module "GM_DOCUMENT_REVERSE" not found. after Patch Update
Hi Abapers/Basis
After patch update i am not able to do FBCJ reversal entry getting below error message.
Runtime Errors CALL_FUNCTION_NOT_FOUND
Exception CX_SY_DYN_CALL_ILLEGAL_FUNC
Date and Time 25.05.2011 14:43:26
Short text
Function module "GM_DOCUMENT_REVERSE" not found.
What happened?
The function module "GM_DOCUMENT_REVERSE" is called,
but cannot be found in the library.
Error in the ABAP Application Program
The current ABAP program "SAPLRWCL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_FUNC', was
not caught in
procedure "CALL_DISPATCHER_STORNO_R" "(FORM)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The program "SAPLRWCL" contains the CALL FUNCTION statement.
The name of the function module to be called is "GM_DOCUMENT_REVERSE".
No function module exists with the name "GM_DOCUMENT_REVERSE".
All function modules are listed in the Function Library (SE37).
Possible reasons:
a) Wrong name specified. Pay particular attention to
upper/lower case and underscores ("_").
or
b) Transport error
c) In the case of an enqueue/dequeue module,
the lock object may not have been activated
(ABAP/4 Dictionary).
How to correct the error
Check the last transports to the SAP System.
Is the program "SAPLRWCL" currently being changed?
If an enqueue/dequeue module is involved, is the activation
of the lock object missing in the ABAP/4 Dictionary?
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"CALL_FUNCTION_NOT_FOUND" "CX_SY_DYN_CALL_ILLEGAL_FUNC"
"SAPLRWCL" or "LRWCLF10"
"CALL_DISPATCHER_STORNO_R"
Function modules with names similar to "GM_DOCUMENT_REVERSE":
GM_DOCUMENT_CLOSE
GM_DOCUMENT_RECORD
GM_DOCUMENT_DELETE
GM_DOCUMENT_POST
GM_DOCUMENT_CHECK
G_DOCUMENT_RECORD
GJ_DOCUMENT_RECORD
GM_DOCUMENT_PROJECT
GET_DOCUMENTS
GM_DOCUMENT_DISPLAY
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
Moderator message: please don't just dump your dumps, search for SAP notes or open a call with SAP instead.
Edited by: Thomas Zloch on May 25, 2011 2:16 PMHi Karthik,
Thank you for ur reply.
I did not implement any user exit/ badi. Dump is saying that my smarform function module does not exist in the se37 library.
I have excuted my form through se38, that time is working fine. When i tried through output type it is going to dump.
Regards,
Kusuma. -
Function module with UPDATE TASK
All,
Have a look at the below code. While debugging the control is not going inside the function module called using <b>call function ...... in update task</b> statement.
I believe the function module is not executed immediately, but is scheduled for execution in a special work process (update work process). For this purpose, the name of the function module including the passed actual parameters is stored as a log record in the database table VBLOG. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.
The actual execution is triggered by the statement COMMIT WORK which is not happening in this case. The formal parameters of the function module receive the values of the actual parameters from table VBLOG. How can I read the entries in VBLOG? Why the function module is not executed? Please suggest.
PERFORM bte_publish ON COMMIT LEVEL 9.
* syncron update
COMMIT WORK AND WAIT.
* Publish business transaction events. The function module have
* to call as last update module!
FORM bte_publish.
IF NOT gvt_nodes IS INITIAL.
CALL FUNCTION 'CUSTOMER_HIERARCHY_THROW_BTE' IN UPDATE TASK
EXPORTING
ffi_valid_on = knvh-datab
fti_event_list = gvt_nodes
fti_event_listx = gvt_nodesx.
ENDIF.
ENDFORM. " BTE_PUBLISH
Thanks,Right Naren. But I need to check inside the update function module, whether it is calling the BTE function module I had configured and the code which I had put in it. Any ideas?
The COMMIT WORK is returning 4 and hence I believe it is not popping up another debuggin session in which the update FM runs.
Thanks,
Message was edited by: Somen -
Save_text Function module is not update the data in the notification, Help!
Here is the code snippet, does anybody know why? Thanks!
form update_root_causes
tables p_it_root_causes type zqmtxt_t
using notif_no.
data:
ls_header type thead,
lit_lines type standard table of tline,
lwa_line like line of lit_lines,
lv_index type i value 0.
field-symbols:
<fs> like line of p_it_root_causes.
fill the header
ls_header-tdobject = 'QMEL'.
ls_header-tdname = notif_no.
ls_header-tdid = 'LTXT'.
ls_header-tdspras = sy-langu.
fill the lines table
fill from line #2 ...
lv_index = 0.
loop at p_it_root_causes assigning <fs>.
if lv_index gt 0.
lwa_line-tdformat = '*'.
lwa_line-tdline = <fs>-qmtxt.
append lwa_line to lit_lines.
endif.
lv_index = lv_index + 1.
endloop.
update the save_text
call function 'SAVE_TEXT'
exporting
header = ls_header
insert = 'x'
tables
lines = lit_lines.
call function 'COMMIT_TEXT'
exporting
object = ls_header-tdobject
name = ls_header-tdname
id = ls_header-tdid
language = ls_header-tdspras.
endform. " UPDATE_ROOT_CAUSESHi Anthony,
Two things you can check:
1. Ensure the notification number you are passing is valid, i.e. it has the requisite number of leading 0s (apply CONVERSION_EXIT_ALPHA_INPUT to ensure to the field notif_no before passing it to ls_header)
2. In the function module to SAVE_TEXT - INSERT should be 'X' not 'x'
Please check.
Adi -
CRM function module to update the attribute in the classification TAB of BP
Hi All,
Can any body let me know if there is any functionmodule to update the CRM function module to update the attribute in the classification TAB of BP tcode.
I have searched a lot i get FM to update the marketing attribute and not the attributes in the classification tab.
Thanks in Advance
Edited by: Sharath Kumar on Dec 2, 2010 4:48 PMFor material bom: CSAP_MAT_BOM_CREATE
and CSAP_ORD_BOM_CREATE for Order BOM.
Regards,
Ravi
Maybe you are looking for
-
Loops not work - File type not supported
Hi guys and girls one of the imacs (10.6.7) at the site I work at has begun to display the following message when you try to select any of the loops from within garageband. "file type not supported" and then you have no other option other than to abo
-
Calling a JavaScript function from my class
Here's the situation. I am trying to access a website (not my own) through a class I am writing. Some information that I need to pull off the page can only be seen when a JavaScript function is called. How can I make the page call the function from m
-
Problems using .getDocument()
It started when I wanted to scroll my TextArea to the bottom when I append the text onto it. But not when you were already scrolled up. after searching for a while I found this handy little snip of code //Determine whether the scrollbar is
-
every time I try to connect bluetooth between my mac and iphone i get a message that says "connection unsuccessful...XXXXX is not supported." Any clue how to fix this?
-
When iTunes opened automatically and started syncing the moment I turned on my laptop, it asked me if I wanted to "Erase and Sync" or "Transfer Purchases." I clicked "Erase and Sync," because the last few times I'd done this (it's a recurring problem