USER EXITS IN IDOC
How to use userexits in idocs
Thanks in advance.
Hi Nagini,
First you need to identify the FM module that being is used for inbound or outbound IDoc process. Then next step is to find custom exit available inside the corresponding FM to add your custom codes.
For example, function module IDOC_OUTPUT_ORDRSP is used to generate the IDoc type ORDERS05.
There is a last user exits that can be used to modify the EDIDD segments prior to generate IDoc ORDERS05.
Let's say you want to add quotation date to segment E1EDK03.
*- final customer-Function
CALL CUSTOMER-FUNCTION '003'
EXPORTING
DCONTROL_RECORD_OUT = CONTROL_RECORD_OUT
DORDER_NUMBER = ORDER_RESPONSE_NUMBER
DXVBAK = XVBAK
DXHVBKD = XHVBKD
TABLES
DXVBKD = XVBKD
DXVBPA = XVBPA
DXVBAP = XVBAP
DXVBEP = XVBEP
DIKOMV = IKOMV
DIKOMVD = IKOMVD
DINT_EDIDD = INT_EDIDD
EXCEPTIONS
ERROR_MESSAGE_RECEIVED = 1
DATA_NOT_RELEVANT_FOR_SENDING = 2.
Then in user exits EXIT_SAPLVEDC_003, you can code like this.
data: wa_edidd like edidd,
wa_e1edk03 like e1edk03.
loop at dint_edidd.
if dint_edidd-segnam = 'E1EDK03'.
move dint_edidd-sdata to wa_e1edk03.
if wa_e1edk03-iddat = '013'.
exit.
else.
clear wa_edidd.
clear wa_e1edk03.
move dint_edidd to wa_edidd.
wa_e1edk03-iddat = '013'.
wa_e1edk03-datum = <quotation date>
move wa_e1edk03 to wa_edidd-sdata.
append wa_edidd-sdata to dint_edidd.
endif.
endif.
endloop.
Hope this will help.
Regards,
Ferry Lianto
Similar Messages
-
Hi friends,
I am working on P.O. to S.O scenario using ale idoc. While importing the P.O idoc i need to do some changes in the values coming from P.O. idoc so for that I need to use some user exit for idoc.
Please let me know is it possible and if yes which is user exit suitable for this purpose.
Thanks & Regards,
Brijesh Sonithe exit is EXIT_SAPLVEDA_001.
thanks and regards,
siri -
Hi all,
I need to add a value in a custom IDOC segment for INVOICE. The IDOC basic type used is INVOIC02. Is there any user exit which I can use to populate the IDOC data? Any help will be greatly appreciated.
Thanks,
LalynHi Lalyn,
I do not have an exact code for this.
But just go through the following code, where we are doing some validations in the segments.
Code below this line was to exclude ZRTN materials for which Subtotal 2 (KZWI2) is zero. And,
this is done for billing types:
ZEXP,
ZXAD,
ZXDR,
ZXL2,
ZXG2,
ZXPT.
IF INT_EDIDD-SEGNAM = 'E1EDS01'.
ZE1EDS01 = INT_EDIDD-SDATA.
IF ZE1EDS01-SUMID = '001'.
Start deleting when on 1st E1EDS01 segment
DESCRIBE TABLE INT_EDIDD LINES POS.
LOOP AT XTVBDPR.
CLEAR MARA.
SELECT SINGLE MTART MATKL FROM MARA INTO "DV2K920646
(MARA-MTART,MARA-MATKL) "DV2K920646
WHERE MATNR = XTVBDPR-MATNR. " Find material type MTART
IF XVBDKR-FKART EQ 'ZEXP' OR XVBDKR-FKART EQ 'ZXL2' OR
XVBDKR-FKART EQ 'ZXAD' OR XVBDKR-FKART EQ 'ZXG2' OR
XVBDKR-FKART EQ 'ZXDR' OR XVBDKR-FKART EQ 'ZXPT'.
IF MARA-MTART = 'ZRTN' AND XTVBDPR-KZWI2 EQ 0
AND MARA-MATKL <> 'KEGS DM'. "DV2K920646
MOVE XTVBDPR-POSNR TO POSNRS-POSNR.
APPEND POSNRS. " Store ZRTNs to be deleted
ENDIF.
ENDIF.
ENDLOOP.
DESCRIBE TABLE POSNRS LINES COUNT.
Reduce the number of line items by the number of them to be deleted
ZE1EDS01-SUMME = ZE1EDS01-SUMME - COUNT.
SHIFT ZE1EDS01-SUMME LEFT DELETING LEADING SPACE.
INT_EDIDD-SDATA = ZE1EDS01.
MODIFY INT_EDIDD INDEX POS TRANSPORTING SDATA.
LOOP AT INT_EDIDD INTO IEDIDD. " Loop and delete if in POSNRS
IF IEDIDD-SEGNAM = 'E1EDP01' OR IEDIDD-SEGNAM = 'E1EDS01'.
CLEAR DELETE_FLAG.
Reset delete_flag when on next line item or done with all
ENDIF.
IF IEDIDD-SEGNAM = 'E1EDP01'.
ZE1EDP01 = IEDIDD-SDATA.
READ TABLE POSNRS WITH KEY POSNR = ZE1EDP01-POSEX.
IF SY-SUBRC EQ 0.
DELETE_FLAG = 'X'.
Set delete_flag if the line item is to be deleted
ENDIF.
ENDIF.
IF DELETE_FLAG = 'X'. " Delete the line item fully
DELETE INT_EDIDD.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
At this function module, you have to create an include and write your code.
But remember, before that you have to extend your basic type.
Hope it will help you.
sailesh -
User Exit after IDoc number (control record) generated
Hi
I'm looking for the user exit after the idoc number is generated. Can anyone provide a refrence on such user exit? the process is outbound.
Tried with some of the available exits but none worked...Hi,
Are you referring to any specific scenario?
Regards
Vinod -
Hi,
For any outbound idoc, if the parameters of export/import contain EDIDC and EDIDD along with the table.
It is possible to extend the idoc and populate values?
As i don't have authroizations, i need to confirm whether an wmtcid03 idoc can be extended and values can be populated.
I found the user exit also.Check the Function Group <b>XLID</b>,you could find few where you can track EDIDC and EDIDD and do furter manipulation as needed.
~thomas. -
how to allocate user exit for standard idoc
regards
prajithHi,
check this link , in this it is clearly mentioned about the exits implimentation in IDOC's.
http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
Regards
Appana
*Reward Points for helpful answers -
Hi All,
If we extend an idoc by adding a custom segmant with some new fields we will write the code for the new segment in the respective user-exit(by finding them through cmod and smod).After writing the code when we execute the program that new user-exit will automatically triggers or we need to write any logic for when to trigger the new user-exit.
Regards,
Rakesh.hi
1. you will associate the user exit with a project in CMOD.
2. Will write ur logic in exit.
3. then activate the project.
it will be then triggred when the transaction is saved.
regards
vijay
reward points if helpfull -
User exit for IDoc MBGMCR - BAPI_IDOC_INPUT1 - BAPI_GOODSMVT_CREATE
Hi Gurus,
I just want to ask if there is any user exit that I can use for this IDoc. My requirement is to check if thevalue from E1BP2017_GM_HEAD_01-REF_DOC_NO already exist in MKPF using XBLNR. If this reference document already exist, I need to raise and update the IDoc status into an error.
Thanks and best regards,
AndreHi,
Check the badi "LE_SHP_GOODSMOVEMENT", method "CHANGE_INPUT_HEADER_AND_ITEMS". Pass the errors in the structure CT_LOG.
Regards
Vinod -
When a credit memo is created an IDOC should be generated !
IS there any user exit where i can associate the idoc generation code when the credit memo is created?
if soo then what it is !
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:52 PMJust create an output type for billing and condition record to trigger the output.
Regards,
John. -
USER EXIT FOR IDOC CREATION AND TRIGGER
I needed a user exit in which I could call my function module .The requirement is that whenever a sales order is created or changed ,on saving of the sales order I need to trigger an IDOC .Inside my function module I plan to use the MASTER_IDOC_DISTRIBUTE
Can anyone tell me if the above logic can work and please tell me the name of the user exit which I can use?Hi
Instead of User exit, you can think of using SAP Standard Output type functionality.
Ask your functional consultant to create a Output type with Medium 6 and do the necessary outbound configuration in the Partner profile WE20 transaciton.
Regards
Madhan D
Edited by: Madhan Doraikannan on Dec 10, 2008 10:49 AM -
User exit for idoc extension for material master (matmas05)
Hello all,
I have 10 custom fields added to anl idoc of basic type matmas05.
i created a new segment under parent segment E1MARA1
Now i want to find out the user exit where in i can write a code to read the data of this segment and populate into the data base table.
Can anybody provide me with the name of the user exit?
Regards,
RoshaniCheck enhancement MGV00001 in SMOD.
Exit Fm is EXIT_SAPLMV01_002
Regards,
Naimesh Patel -
User exit for IDOC inbound CREMAS
Hi experts,
I want to find a USER EXIT to change the value for vendor inbound idoc of message type CREMAS when create a new vendor or change a existing vendor. EXIT_SAPLKD02_001 is a function module can be enhanced but it cannot be called when I debug in WE19. The segment of IDOC is not extended by customazing field.
Can anyone tell me what user exit is for IDOC I can use to change the data for vendor when inbound idoc receive?Hi panzhijun,
please check this link
http://forums.sdn.sap.com/thread.jspa?threadID=1659323
An Expert V.V.Reddy is exactly discussing about your issue on extending the FM in a Include: LKD02F01,
just have a look on this and go throw completely so u may get some solutions .
This is how somewhat i can help you , If i get any further details will let u know .
BR,
Lakshmi Rajkumar. -
User Exit for Idoc being posted through ACC_DOCUMENT
Hi Experts!!
We have an inbound interface to post FI document using message type ACC_DOCUMENT. Now, we need to influence the idoc before posting. In detail, we need to change a particular field in the header and then only post it. I tried with EXIT_SAPLF050_008. But that was not being updated. Is this user exit only for a few message types like FIDCMT, FIDCC1, FIDCC2?
If yes, which user exits can be used to influence the idoc before posting?
Kindly help me out.
Thanks a lot in advance.Hi ,
chk with these exits:
SIDOC001 -> fm EXIT_SAPLEDI1_001
SIDOC002 -> fms
EXIT_SAPLEDI6_001
EXIT_SAPLEDI6_002
EXIT_SAPLEDI6_003
hope it helps..
Regards,
Deeba -
Hello all!
I'm trying to send a message with the status of an IDoc that has been processed, but I can't find an exit right after the status of the IDoc has been set, do you have any idea on what can I do for this?
Regards!This is the exit where we have the control of setting idoc status. If there no scope of this idoc status.
Then try to find out an exit which will be triggered before this exit with idoc status ( with value ). Then export this to memory and get back the same from memory in Vijay's suggested exit.
Also if you could able to find the exit after THIS exit you won't have option to set custom idoc status.
Regds
Manohar -
User exit in Idoc TPSSHT01 EXIT_SAPLV56I_012
How to fill custom tables in userexit EXIT_SAPLV56I_012 for creation of shipments with idoc TPSSHT01 ?
Any example? I do not how to access to the shipment number.
ThanksSolved.
I can access to this data in an upper-level program: (SAPLV56I)c_xvttk[]
Maybe you are looking for
-
This is driving me nuts. I need to "rent" some flicks for a trip, but my iPad (64GB) tells me I have insufficient memory. Checking under Settings/General/Usage, I find 3GB free. I hook it up to my computer (iTunes) and clear out pretty much everyt
-
IPad mini now terrible to use, apple support no help because warranty is up. All cause by new ios8 update, wifi issues, many apps no longer work, apps that do work now crash regularly and sometimes take several instances and reboots to even open.
-
Hi, I am using two BAPIs 'BAPI_ACC_ACTIVITY_ALLOC_POST' and 'BAPI_NETWORK_CONF_ADD' in my custom function module. These two BAPIs are used as explained below: 1) Fisrt the BAPI 'BAPI_ACC_ACTIVITY_ALLOC_POST' is called. If sy-subrc NE '0', the error
-
Benefits of Client Side Monitoring with SCOM 2012R2?
I'm working on the architecture for adding SCOM 2012R2 to our Windows network. Right now we use SCCM 2012R2 and SCEP. I'm trying to determine whether I should include our workstation computers as part of this or only servers. We won't be doing App
-
Hi, I have installed the Oracle 9i (9.2.0.1 RC2) Database on Windows 2000 Workstation. When I try to create a new database or I try to connect a repository the TNSLSNR.EXE crashes. I receive the following OS error message: "TNSLSNR.EXE Application Er