Changing IDOC function module?
Hello everyone!
I would like to make changes to the function module responsible for creating Sales Order Idocs: IDOC_INPUT_ORDERS. How should I go about this procedure? Do I need to copy the existing function module and create a new one? If so, how do I point the IDOC (ORDERS05) to the new function module (for example, ZIDOC_INPUT_ORDERS).
Thanks in advance!
Warm regards,
Glenn
> I would like to make changes to the function module responsible for creating Sales
> Order Idocs: IDOC_INPUT_ORDERS. How should I go about this procedure?
> Do I need to copy the existing function module and create a new one?
(1)This is one possible solution, another one is to use some (2)customer function exits for inbound Idoc these enhancements might be useful: MM06E001, VEDA0001or (depending on platform you are) you might go for e.g. (3)Implicit enhancement. In last two cases you probably dont need to create Z-FM and Z-process code.
> If so, how do I point the IDOC (ORDERS05) to the new function module (for
> example, ZIDOC_INPUT_ORDERS).
1) Copy FM to ZFM
2) Specify characteristic of FM BD51
3) Create Z-inbound process code: WE42 and assign a Z-FM to it.
4) Assign FM to message type WE57
>If you have any other information on how to properly edit the IDOC function
> module (for example, adding ABAP checking codes before populating the IDOC
> fields) it would be great if you could share them!
To add some checks at the beginning you might use all three possible solutions:
(1) in ZFM you might add you code at the very beginning and return some error message
(2) you might use on of the available customer function exits to do some checks
(3) you can do the implicit enhancement and also return some error code at the very beginning of standard FM
In both cases I recommend to go for approach no (2). Useful tcodes: CMOD and SMOD.
Regards,
Jakub
Similar Messages
-
Regarding a Change Document Function Module ----- VERY VERY Urgent
I am using a Change Document Function module "CHANGEDOCUMENT_READ". It is taking a long time.
I am using the parameters:
Start date is the first date of the current month
Enddate as last date of the current month
Object class as 'MATERIAL'
Table Name as 'MBEW'Hi ,
When you want to read the change documents, please follow the below process.
1. Read the change documents headers with function modules
call function 'CHANGEDOCUMENT_READ_HEADERS'
exporting
date_of_change = cdhdr-udate
objectclass = cdhdr-objectclas
objectid = cdhdr-objectid
time_of_change = '000000'
username = cdhdr-username
tables
i_cdhdr = gt_cdhdr
exceptions
no_position_found = 1
wrong_access_to_archive = 2
time_zone_conversion_error = 3
others = 4.
2. From above step you will get data of change documents very quickly into Itab (gt_cdhdr)
3. Read the details on change documents with functiion module by using Itab in loop for each document.
loop at gt_cdhdr.
call function 'CHANGEDOCUMENT_READ_POSITIONS'
exporting
changenumber = gt_cdhdr-changenr
importing
header = cdhdr
tables
editpos = gt_cdshw
exceptions
no_position_found = 1
wrong_access_to_archive = 2
others = 3.
Above is the best way to read the change documents.
Rewards please if above info is useful.
Thanks. -
Hello abap Gurus,
My Zdevelopment reports shows the runtime errors due to
changes in this function module :-
ZCFM_HIDE_INITIALFIELD_ALV
So anybody pls. suggest me what i can do for this.I m attaching the coding also.
FUNCTION ZCFM_HIDE_INITIALFIELD_ALV.
""Local Interface:
*" IMPORTING
*" REFERENCE(STRUC)
*" REFERENCE(FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV
*" REFERENCE(HIDE) OPTIONAL
*" EXPORTING
*" REFERENCE(FIELDCAT_E) TYPE SLIS_T_FIELDCAT_ALV
*" TABLES
*" IT_TAB
*" IT_TAB1
DATA S_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
FIELD-SYMBOLS <F1>.
FIELD-SYMBOLS <F2>.
DATA FIELDNAME(30).
DATA VALUE(100).
DATA : BEGIN OF DISPLAY OCCURS 0,
FIELDNAME LIKE DD03L-FIELDNAME,
END OF DISPLAY.
LOOP AT IT_TAB.
DO .
READ TABLE FIELDCAT INDEX SY-INDEX
INTO S_FIELDCAT.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
ASSIGN SY-INDEX OF STRUCTURE IT_TAB1 TO <F1>.
CONCATENATE 'IT_TAB-' S_FIELDCAT-FIELDNAME INTO
FIELDNAME.
ASSIGN (FIELDNAME) TO <F1>.
IF NOT <F1> IS INITIAL.
DISPLAY-FIELDNAME = S_FIELDCAT-FIELDNAME.
COLLECT DISPLAY.
ENDIF.
ENDDO.
ENDLOOP.
FIELDCAT_E = FIELDCAT.
LOOP AT FIELDCAT_E INTO S_FIELDCAT .
READ TABLE DISPLAY WITH KEY FIELDNAME = S_FIELDCAT-FIELDNAME.
IF SY-SUBRC NE 0.
IF HIDE IS INITIAL.
DELETE FIELDCAT_E.
ELSE.
S_FIELDCAT-NO_OUT = 'X'.
CLEAR S_FIELDCAT-KEY .
MODIFY FIELDCAT_E FROM S_FIELDCAT TRANSPORTING NO_OUT
KEY.
ENDIF.
ENDIF.
ENDLOOP.
endfunction.This is all about the runtime error :-
Incorrect parameter with CALL FUNCTION
Error analysis :-
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was
not caught in
procedure "HIDE_FIELDS" "(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:
When calling the function module "ZCFM_HIDE_INITIALFIELD_ALV", one of the
parameters
needed according to the interface description was not specified.
This parameter was "IT_TAB1".
I am not changing the function module, my couligue has change this he leave it & he doesn't tel to me. So pls. give some sol. to me.
Thanks,
Sumit. -
IDoc Function Module(Invoices)
Dear All,
I want IDoc Function Module(Inbound) for T Codes FB60, FB65, FB70, FB75 for Invoices.
Actual Scenario is that i want to transfer data from JAVA system to SAP(Vendor Invoice,Customer Invoice,Credit Memo,Debit Memo) using IDoc.
Please give me the funcion module(IDoc Inbound and Outbound) can be used in above case.
thanks,
RPHi
They are several function modules.
Pls Go to SE37 and enterr idoc and press f4 then you are able to see
all the idoc function module.
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
http://www.erpgenie.com/abap/functions.htm
Regards,
Ram -
How to debug outbound Idoc function module for invoice
I have to debug the outbound IDOC function module and UserExit for invoice message type INVOIC, process code SD09, function module is IDOC_OUTPUT_INVOIC and user exit for the function module LVEDF001.
I tried putting the break point in function module IDOC_OUTPUT_INVOIC and recreate the IDOC using WE19 but it creates the idoc but does not stop at the break point. I have also tried generation of idoc through VF02. It again creates the idoc but does not stop at the function module.
Please let me know if I am missing any thing and not doing it right.
Appreciate your help.
RohitHi Ali,
I faced the same problem. Thing is the break point is not getting triggered when i ran tha IDOC through WE19.
What i have done is i created a project for my exit in CMOD and kept some junk code in the exit and executed it through BD21. Then the Break point got triggered. See if it works.
Regards,
Uday S. -
How to find IDOC Function Module for Basic Type:ORDERS05
Hi,
What is the Transaction Code to locate the Function Module linked to the IDOC Basic Type & IDOC Message Type?
Appreciate Your Help.
Thanks,
Kannan.Hi Seshu,
Thanks for your reply. While creating a Custom IDOC, How do I link the IDOC Function Module and Basic Type. Appreciate Your Help.
Thanks,
Kannan. -
Idoc/ Function module to create a Licence in GTS
Dear experts,
I have a situation where in I need to create Licence in GTS system based on the information from a 3rd party system. So, Is there any inbound idoc in GTS system to automatically create the licence (I'm using middle ware to convert the XML from 3rd party to an IDOC).
Or is there any function module, to create a licence in GTS system.
Thanks for the Info.
Sorry for the duplication of same question that i posted in GTS forum. I couldn't get a single reply from 3 days, so I reposted the same.
Thanks
-Amit.Hi Amit
I'm facing the same problem you had.
May I ask you how you created the function module?
Thanks in Advance
Ashwaan -
How to find the outbound idoc function module?(Urgent)
Dear All,
How to identify the outbound function module if there is process code assigned to message type.
For partner profile the mesasge type is assigned and idoc type .This is the only information maintained .
Now my question is how to identify the fucntion module which is getting trigger in the system is there any data maintained in the standard table or any t-code .
Points will be rewarded for right answers.
Thank You.
Regards,
Ravi GanjiHi,
If u know the message and basictype then we can know the process code for that message type in transaction code WE64.
if we know process codes then we can know the function modules in transaction codes WE41(Outbound process code) and WE42(Inbound process code).
Each process code is attached with a FM...
Reward if helpful
Regards,
Nagaraj -
Code sample for using change document function modules
Can someone send me some sample code for using function modules CHANGEDOCUMENT_READ_HEADER and CHANGEDOCUMENT_READ_POSITIONS? I'm specifically looking for changes that occured to the standard price field in the material master (MBEW-STPRS) and I need to pull the most recent price change for a given material. I'm not sure how to write the code efficiently since I don't have a date to pass (again, since we're looking for the most recent change.)
Thanks!hi check this..
CHANGEDOCUMENT_READ_HEADERS
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
Check this link.
http://www.sap-img.com/mm001.htm
<REMOVED BY MODERATOR>
venkat.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:05 PM -
Inbound Idoc function module for Cycle count with msg type WVINVE
Can any one tell me which is the standard function Module which processes Cycle count for message type WVINVE.
My requirement is to setup Inbound Idoc for cycle processing with message type WVINVE.Hi Mukesh,
Inbound FM is IDOC_INPUT_STORE_INVENTORY , and Process code is WVIN.
Yoou can check this in Tcode WE42 for process code WVIN.
Regards
Srikanth M -
Accept IDOC function module.
Hi Experts, I am new to IDOCS. I have to update one already written function module to accept IDOC in SAP from external system. In the function module I see some IMPORT parameters like 'input_method' and 'mass_processing' and EXPORT parameters like 'workflow_result' , 'application_variable' , 'in_update_task', 'call_transaction_done' . Can someone tell me what are these parameters for ???.
thanks
-
Changes in function module SO_DOCUMENT_SEND_API1
Hi all,
I've been using function module SO_DOCUMENT_SEND_API1 to send e-mail (containing some simple text) with an Excel file attached to it. As of 01.11.2009 SAP has changed a lot of the function module code - and now the Excel file contents has become faulty (rows missing).
Can anyone give me code examples on how to use the new version of the function module?
Regards,
MVHi all,
I've been using function module SO_DOCUMENT_SEND_API1 to send e-mail (containing some simple text) with an Excel file attached to it. As of 01.11.2009 SAP has changed a lot of the function module code - and now the Excel file contents has become faulty (rows missing).
Can anyone give me code examples on how to use the new version of the function module?
Regards,
MV -
Hi gurus,
I am new to IDOC's. My requirement is from some third party systems data come to IDOC.
For this I created Custom Z segments, Z Idoc and Z message type.
Now I have to develop one Inbound function module. Based on this function module two Z custom tables need to be updated.
Please can any one give me a valubale sugestion. Or send to me the step by step Procedure.
Thanks in Advance.
Thanks and Regards
Abinava Siri.Hi,
Refer to the tutorial below. This will solve all your queries.
Its with all the spanshots available.
http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
Please reward if you find this useful.
Pranu. -
Inbound custom IDOC function module
I have created a custom idoc and attached a process code to it. The proceesing function module, reads values from the idoc and inserts into a database table.
My question is will this function module be invoked simultaneously? If so, should I first lock the table before inserting and then unlock it?
Thanks in advance.Hi,
As soon as the idoc reaches SAP, it will trigger the function module you have connected through process code.
If the table is used only by your function module no need to lock the same.
It is always good to lock the table before updating the same.
Regards,
Baburaj -
Hi Experts!!,
How to find out Function Module which system is using for Inbound Idocs ?
Thanks in advance.Anil,
If these are existing iDocs being processed in your system, I would recommend you run WE19 for an existing iDoc, click on 'Standard inbound', and make a note of the Function Module determined. That will let you know which FM is used for those specific conditions. You might also want to check transaction WE57, which shows FM assignments to iDoc & Message Types, also WE42 for Process Codes. Process Codes are selected in the WE20 Partner Profile, and point to an FM, therefore in theory you could use different FMs for different Partner Profiles.
Cheers, Paul.
Maybe you are looking for
-
hi When i try to login with user details and tried to test the connection it say succesfull but when i come back to securrity repository connection and press ok it dont go in neither it gives error messgae what should be done any suggestions?
-
Control characters handling on sun studio
We have an application on 32 bit Solaris 8 compiled with g++ 3.3.4. It deals with Messages with SOH(^A) character as a delimiter between different fields. Same program when compiled with g++ 3.4.3 or Sun CC on 64 bit Solaris 10 machine in 32 bit mode
-
Hi, we need to bucket customers in to bands based on the number of units they have purchased. Also we need to track the bucket they fall into in the subsequent quarter. This will help us track how customers in each bucket are performing in the
-
What date did Apple's discussion forums begin?
Does anyone know when the Apple discussion forums started? I ask this in in relation to Apple being aware (through these forums) of consumer issues /problems / suggestions and then taking the information onboard in development of their products. In m
-
que pena es para ver quien me puede ayudar mi mac pro no arranca se queda en la manzana gris con fondo blanco e intentado con los comandos pero no quiere arranca ayer lo deje un tiempo en el blanco con gris y despues la manzana gris se volvio un si