Processing code and Function Module for IDOC
hi forum,
i m trying to make a file to IDOC scenario,
the IDOC is being sent to a R/3 system,
for the purpose, in R/3 i need to make a inbound processing code, can u tell me how to make a processing code and link it with a Function Module.......
can u guide me....
sudheer,
If you are using standard idoc then you do not need to create new processing code.
There would be standard processing code available. You need to set input partner profile with processing code.
Let us know which idoc type you are using for inbound posting.
Anyway..TC for Creating processing code is : WE41(Outbound) and WE42 (Inbound)
Nilesh
Similar Messages
-
Inbound function module for IDoc type INFRECMASS01
Hello everybody,
What is the inbound function module for IDoc type INFRECMASS01?
I tried IDOC_INPUT_INFREC (as for IDoc INFREC01), but I got the following message (B1 044): Incorrect function module IDOC_INPUT_INFREC called up
Thanks in advance
RolandThe only difference between INFRECMASS01 and INFREC01 is that repitition of the same segments. However, the standard function module is hardcoded with IDOC type INFREC01, so if you want to use the MASS IDOC copy the standard one and put in the logic to loop around and process the info records one by one.
There is no standard funtion that can process mass idoc of the info record.
Regards,
Ravi
Note: Please mark the helpful answers -
How to find standard function modules for IDOCs
Hi,
Can anyone tell me is there any way to find the standard function module for IDOC. I have checked BD60 but it's not available. For example Idoc type WPUBON01 and I need to know the function module. Can anyone tell me the way out.
Secondly, if anyone can provide me the code to map the file fields and idoc segements.
RegardsUse WE82 to find message type associated with Idoc type.
Then use this message type as a search string to find the FM.
The associated FMs are.
POSED_FILL_OVERVIEW_ENT_WPUBON
POSED_INIT_DATA_WPUBON
POSED_LOCK_DATA_WPUBON
POSED_OVERVIEW_ASSIGN_WPUBON
POSED_READ_DATA_FROM_DB_WPUBON
POSED_READ_TR_DATA_WPUBON
POSED_SAVE_DATA_WPUBON
POSED_SEARCH_STRING_WPUBON
POSED_STORE_DATA_WPUBON
POSED_UNLOCK_DATA_WPUBON
POSED_UPDATE_DATA_WPUBON
POSED_UPDATE_TR_DATA_WPUBON
Thanks,
Utsah Garg. -
Out Bound Function Module For IDoc Types CODCMT01
Hi Experts,
Can you please tell me the Out Bound Function Module For IDoc Types CODCMT01,CODCAGN01,PRCDOC01.
Thanks..
Debi.Hi Debi,
You can use FM MASTER_IDOC_DISTRIBUTE to distribute outbound IDoc CODCMT01, CODCAGN01 and PRCDOC01.
Regards,
Ferry Lianto -
Assigning of process code to function module
hi all,
please let me know where to go for assigning teh process code to function module. i am unable to get the function module from the process code(we42). please let me know
thank you
chanIn WE42 itself we can assign the process code to a FM.
select new entries.
Enter a process code name & description.
Enter Ur FM in Identification Field.
Now select Processing by Function module in Processing type.
Save it.
For outbound do the same thing in WE41 tcode -
What is outbound function module for IDoc type INFRECMASS01
Hi,
What is outbound function module for IDoc type INFRECMASS01? This is for purchasing info record.
Thanks
KamalHi Kamal,
Have you looked standard program <b>RBDSEINF</b> or transaction code <b>ME18</b>?
This program will call function module <b>MASTERIDOC_CREATE_REQ_INFREC</b> to generate purchasing info record IDoc.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful. -
Process code's function module required for the IDOC Message type PROACT
Hi,
I am trying to trigger an IDOC from ME32K transaction which will carry my Contract agreement details to XI. The IDOC I am using for this purpose is PROACT.PROACT01. But I couldn't find the outbound process code / Function module for the process code associated to this IDOC message type.
Pls help me out....
Thanks,
Ram KalyanI checked table EDIFCT for the message type and found this:
Function module Function type Basic type Message Type
IDOC_INPUT_PROACT F PROACT01 PROACT
Oops...I think you are looking for outbound..Ignore -
Sample Outbound Function Module for IDocs
Hello All,
Does anyone have sample code for an outbound function module for an IDoc - they created themselves. Custom or extended? Weblogs, sample code will be useful
ty, dd
Message was edited by:
Demi DouglasHi,
Check this program:
REPORT zmatmas_idoc.
INCLUDE zmatmas_idoc_top.
INCLUDE zmatmas_idoc_selscreen.
INCLUDE zmatmas_idoc_formroutine.
START OF SELECTION
START-OF-SELECTION.
PERFORM get_data.
PERFORM create_idoc.
PERFORM distribute_idoc.
TABLES
TABLES: mara.
Structures
*Header
TYPES: BEGIN OF gs_h_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
aenam TYPE mara-aenam,
pstat TYPE mara-pstat,
END OF gs_h_mara.
*Item
TYPES: BEGIN OF gs_i_makt,
spras TYPE makt-spras,
maktx TYPE makt-maktx,
maktg TYPE makt-maktg,
matnr TYPE makt-matnr,
END OF gs_i_makt.
TYPES: BEGIN OF gs_i_mbew,
lvorm TYPE mbew-lvorm,
lbkum TYPE mbew-lbkum,
salk3 TYPE mbew-salk3,
vprsv TYPE mbew-vprsv,
verpr TYPE mbew-verpr,
stprs TYPE mbew-stprs,
peinh TYPE mbew-peinh,
matnr TYPE mbew-matnr,
END OF gs_i_mbew.
TYPES: BEGIN OF gs_i_mvke,
vkorg TYPE mvke-vkorg,
vtweg TYPE mvke-vtweg,
lvorm TYPE mvke-lvorm,
versg TYPE mvke-versg,
bonus TYPE mvke-bonus,
provg TYPE mvke-provg,
matnr TYPE mvke-matnr,
END OF gs_i_mvke.
TYPES: BEGIN OF gs_i_mlan,
aland TYPE mlan-aland,
taxm1 TYPE mlan-taxm1,
taxm2 TYPE mlan-taxm2,
taxm3 TYPE mlan-taxm3,
taxm4 TYPE mlan-taxm4,
matnr TYPE mlan-matnr,
END OF gs_i_mlan.
*Segment & control record
DATA: gs_segment_h LIKE zmara_h,
gs_segment_i1 LIKE zmakt_i,
gs_segment_i2 LIKE zmbew_i,
gs_segment_i3 LIKE zmvke_i,
gs_segment_i4 LIKE zmlan_i,
gs_control_rec LIKE edidc.
Internal Table and work area
*Header & Item
DATA: gt_h_mara TYPE STANDARD TABLE OF gs_h_mara,
gt_i_makt TYPE STANDARD TABLE OF gs_i_makt,
gt_i_mbew TYPE STANDARD TABLE OF gs_i_mbew,
gt_i_mvke TYPE STANDARD TABLE OF gs_i_mvke,
gt_i_mlan TYPE STANDARD TABLE OF gs_i_mlan.
DATA: gw_h_mara TYPE gs_h_mara,
gw_i_makt TYPE gs_i_makt,
gw_i_mbew TYPE gs_i_mbew,
gw_i_mvke TYPE gs_i_mvke,
gw_i_mlan TYPE gs_i_mlan.
*EDIDD & EDIDC
DATA: gt_edidc LIKE TABLE OF edidc WITH HEADER LINE,
gt_edidd LIKE TABLE OF edidd WITH HEADER LINE.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS: s_matnr FOR mara-matnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
*& Include ZMATMAS_IDOC_FORMROUTINE
*& Form get_data
FORM get_data .
SELECT matnr ersda ernam laeda aenam pstat
FROM mara
INTO TABLE gt_h_mara
WHERE matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE e003(zkaren_msgclass).
No data found according to the selection criteria
ENDIF.
IF gt_h_mara IS NOT INITIAL.
SELECT spras maktx maktg matnr
INTO TABLE gt_i_makt
FROM makt
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
SELECT lvorm lbkum salk3 vprsv verpr stprs peinh matnr
INTO TABLE gt_i_mbew
FROM mbew
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
SELECT vkorg vtweg lvorm versg bonus provg matnr
INTO TABLE gt_i_mvke
FROM mvke
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
SELECT aland taxm1 taxm2 taxm3 taxm4 matnr
INTO TABLE gt_i_mlan
FROM mlan
FOR ALL ENTRIES IN gt_h_mara WHERE matnr = gt_h_mara-matnr.
ENDIF.
ENDFORM. " get_data
*& Form create_idoc
FORM create_idoc .
*Control data
gs_control_rec-mestyp = 'ZKAR_MATMAS_MSG_TYPE'. "Message type
gs_control_rec-idoctp = 'ZKAR_MATMAS'. "IDoc
gs_control_rec-rcvprt = 'LS'. "Partner type of receiver
gs_control_rec-rcvprn = 'T90CLNT810'. "Partner number of receiver
LOOP AT gt_h_mara INTO gw_h_mara .
*Header data.
gs_segment_h-matnr = gw_h_mara-matnr.
gs_segment_h-ersda = gw_h_mara-ersda.
gs_segment_h-ernam = gw_h_mara-ernam.
gs_segment_h-laeda = gw_h_mara-laeda.
gs_segment_h-aenam = gw_h_mara-aenam.
gs_segment_h-pstat = gw_h_mara-pstat.
*Header segment
gt_edidd-segnam = 'ZMARA_H'.
gt_edidd-sdata = gs_segment_h.
MOVE gt_edidd-sdata TO gs_segment_h.
APPEND gt_edidd.
WRITE:/ gs_segment_h-matnr, gs_segment_h-ersda, gs_segment_h-ernam,
gs_segment_h-laeda, gs_segment_h-aenam, gs_segment_h-pstat.
*ITEM 1
LOOP AT gt_i_makt INTO gw_i_makt.
IF gw_i_makt-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i1-spras = gw_i_makt-spras.
gs_segment_i1-maktx = gw_i_makt-maktx.
gs_segment_i1-maktg = gw_i_makt-maktg.
*Item segment
gt_edidd-segnam = 'ZMAKT_I'.
gt_edidd-sdata = gs_segment_i1.
APPEND gt_edidd.
ENDIF.
ENDLOOP. "at gt_i_vbak
*ITEM2
LOOP AT gt_i_mbew INTO gw_i_mbew.
IF gw_i_mbew-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i2-lvorm = gw_i_mbew-lvorm.
gs_segment_i2-lbkum = gw_i_mbew-lbkum.
gs_segment_i2-salk3 = gw_i_mbew-salk3.
gs_segment_i2-vprsv = gw_i_mbew-vprsv.
gs_segment_i2-verpr = gw_i_mbew-verpr.
gs_segment_i2-stprs = gw_i_mbew-stprs.
gs_segment_i2-peinh = gw_i_mbew-peinh.
*Item segment
gt_edidd-segnam = 'ZMBEW_I'.
gt_edidd-sdata = gs_segment_i2.
APPEND gt_edidd.
ENDIF.
ENDLOOP.
*ITEM3
LOOP AT gt_i_mvke INTO gw_i_mvke.
IF gw_i_mvke-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i3-vkorg = gw_i_mvke-vkorg.
gs_segment_i3-vtweg = gw_i_mvke-vtweg.
gs_segment_i3-lvorm = gw_i_mvke-lvorm.
gs_segment_i3-versg = gw_i_mvke-versg.
gs_segment_i3-bonus = gw_i_mvke-bonus.
gs_segment_i3-provg = gw_i_mvke-provg.
*Item segment
gt_edidd-segnam = 'ZMVKE_I'.
gt_edidd-sdata = gs_segment_i3.
APPEND gt_edidd.
ENDIF.
ENDLOOP.
*ITEM4
LOOP AT gt_i_mlan INTO gw_i_mlan.
IF gw_i_mlan-matnr = gw_h_mara-matnr.
*Item data
gs_segment_i4-aland = gw_i_mlan-aland.
gs_segment_i4-taxm1 = gw_i_mlan-taxm1.
gs_segment_i4-taxm2 = gw_i_mlan-taxm2.
gs_segment_i4-taxm3 = gw_i_mlan-taxm3.
gs_segment_i4-taxm4 = gw_i_mlan-taxm4.
*Item segment
gt_edidd-segnam = 'ZMLAN_I'.
gt_edidd-sdata = gs_segment_i4.
APPEND gt_edidd.
ENDIF.
ENDLOOP.
ENDLOOP. "at gt_h_kna1
ENDFORM. " create_idoc
*& Form distribute_idoc
FORM distribute_idoc .
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = gs_control_rec
TABLES
communication_idoc_control = gt_edidc
master_idoc_data = gt_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
IF sy-subrc <> 0.
WRITE:/ 'Error'.
ELSE.
LOOP AT gt_edidc.
WRITE:/ gt_edidc-docnum.
ENDLOOP. "at gt_edidc
ENDIF.
ENDFORM. " distribute_idoc -
Outbound function module for IDOC WMMBID02
Hi,
Do we have any outbound function module for basic IDOC type WMMBID02 (Stock movements from ext. systems) which has message type WMMBXY.
I searched with hot keys OUTBOUND_WMMBXY in SE37 but unable to find a standard FM. My task is to extend that FM by a user-exit so as to populate my extended IDOC which is of basic type WMMBID02.
Any help would be greatly appreciated.
Regards,
HarshHi Kamal,
Have you looked standard program <b>RBDSEINF</b> or transaction code <b>ME18</b>?
This program will call function module <b>MASTERIDOC_CREATE_REQ_INFREC</b> to generate purchasing info record IDoc.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful. -
XI-- IDOC scenario, how to link process code with function module
Hi Forum,
I have a XI--->IDOC (R/3) scenario,
where i m creating a IDOC in XI and sending it to R/3,
i have done all settings to send the IDOC from XI to the R/3,
i also have the function module to process that IDOC in R/3,
the problem is:
I want to know in details (step by step) how to make a Idoc Inbound process code, link it with the function module and use the process code in the Partner Profile in R/3,
pls helpHI,
FOr this u need to go to transaction WE41 for inbound and WE40 for outbound there u assign the function module.
Now u go to WE20 transaction for partner profile and u can assign the proces code to the inbound message.
Go to the below help for more information:
http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
Inbound process code:
http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
Thnx
Chirag -
When we go for Views and Function Modules for Generic Extraction
Hi Experts,
Can you please explain when we go for extracting the data using Views and when we got using Function Modules using Generic Extraction from R/3 system to BW with examples. And also can you explain when we go for delta for the above both scenarios.
Thanks for you help in advance
RohithHi,
Scenario for Extarction using FM
Imagine the scenario where you need to extract data from
tables having no common field between them and thereby preventing you from creating a view on top of those tables..
Or simply consider tables that are highly unrelatd in terms of fields, but you have a requiremnt to extract data from them.
Also Refer.
create generic extractor based on 2 tables
Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Steps.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
http://help.sap.com/saphelp_nw04/helpdata/en/86/1c8c3e94243446e10000000a114084/frameset.htm
Scenario for Extraction using View
If there are more number of tables and data in those tables can be represented using joins then we can use this type of extraction
For more info Refer these links
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
Difference between "Help View" and "Search Help"
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
For GEneric Delta refer these links
[generic with delta;
[https://forums.sdn.sap.com/click.jspa?searchID=11388803&messageID=5164737] -
ALV sorce codes and function modules
Hi Experts,
Can anyone please send me the ALV source codes,the various fuction modules used in it.
Regards,
Narreshalv is abap list viewer where in u can eliminate the pain of writing the source code
for all manipulations of data on the list.
u have all predifned sort of keys where u can manipulate by using those buttons....
also u can display the list in grid format...
have a look at the most commonly used alv's in these sites..
http://help.sap.com/saphelp_nw04/helpdata/en/66/bc7aab43c211d182b30000e829fbfe/frameset.htm
http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
hope this helps u...
with regards,
sampath
*award all helpful answers -
BADI in VA02 at SAVING and function module for POP where i enter email id
Hi All,
Its urgent.
1. I want a BADI name for VA02 at the time of saving .
2. a POP up where i can enter email id .
in SALES ORDER in SHIPPING TAB when i select DELIVERY BLOCK BADI should trigger and a pop up should come.
I will enter the mail id and mail will go to a concern person.
Sending a mail i can do , but BADI name and POPUP with entering mail id is the PROBLEM.
Please friends i want it ASAP.
Regards,
Kumar.Problem is solved .
I have created the POP box using CALL SCREEN..
It worked .
Thank you all -
Custom Function Module for the New Process Codes
I want to distribute the custom table data . For that i have written the program using MASTER_IDOC_DISTRIBUTE. I have created the custom message & idoc types along with their assignments.
I got struck up at the process code. I have to assign the function module for that process code. Can anyone kindly help me in writting the code at that function module ?Hi Friends,
My requirement is , i need to transfer the table records. For that i have created the Message/Idoc Types and also created the Partner profile and the Distribution model view .....all alll i have done.
My doubt is , in the we20, at the outbound parameters , i can give the Message/Idoc types that i have created. Ok thats fine
But at the inbound parameters, i have to give the inbound process code. So i have created the Inbound process code. As we know that for every process code a function module is attached, now i have to create the function module which posts the records in receiver side.
so 1. Does the Function module need to be RFC Enabled ?
2. Do we need to create Object type in SWO1 once i
create and release the function module ? -
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.
Maybe you are looking for
-
When i connect my iphone to pc itunes not recognize. But phone getting charge.
Any one can help for my above issue. Itunes not recognise my phone when i connect my phone to pc, but phone is getting charge.
-
Beginners Problem with Z_TUTORIAL1
Hi, i try to create a web dynpro Z_TUTORIAL1. I edit it with se80, check it and activate it. Everything is OK. The URL: 'http://system.hn.company.de:8000/sap/bc/webdynpro/sap/z_tutorial1' was created. In C:WINDOWSsystem32driversetchosts i insert the
-
I am having trouble with my G5 dual processor powermac. I am getting a fuzzy distortion in all audio outputs, external and internal, when I am in my main user profile. I have run disk first aid, restarted, replaced as many audio preferences in my hom
-
"Item 10 IPC:TTE:Calculation error: Pricing error: Mandatory condition & is
Hello Experts, I need your help to solve this TTE pricing error. In Service Order, I am getting this error message for one particular material only "Item 10 IPC:TTE:Calculation error: Pricing error: Mandatory condition & is missing". Remaining ma
-
Manual Item category determination
Hi friends , I need to do a manual item category determination for the third party item ,as the material is not always a trading item, so the item category group is maintained as NORM in the material master and trying to change the Item category dete