Controlling of IDOCs in XI
HI frnds,
I hav a scenario IDOC(R/3)-IDOC(ECC5.0).. where we need to post material data into ECC system..
Problem is 6 idocs generating in R/3 per minute and the same transferring into XI system..but here my ECC system is not capable of handling 6 idocs in a minute.. its very slow..
its giving error in xi system.. so how can i controll idocs in XI system so that they can transfer into ECC system atleast with 1 minute gap..
Hello,
I'm not sure of your problem.
If the problem is that your ECC system can't process six Idocs at a time, then I think you can set the "pack size" of Idocs that get processed when the background program RBDAPP01 is run to perform the processing.
In ECC, you must ensure that the inbound partner profile for the receiving system is set to ""Trigger by background program" and not "Trigger immediately" for the specific message type.
Then schedule in SM37 a background job with variant, for the message type to run program RBDAPP01.
Set the "pack size" field to 1.
Hope this helps you in the right direction.
Darryl
Similar Messages
-
How to control IDOC processing in XI
hi
I have scenario where File --> XI --> IDOC
Source structure
Header 1...1
Detail 0..unbounded
Trailer 1..1
For every detail i need to generate 1 doc
My requirement is that i dont want to send all the IDOCs at one shot from XI.
trfc connection should be open just once for all the IDOCs and not single IDOCs are posted.
Is there any transaction from where i can control my IDOC processing.
Need urgent help.
Thanks ,
LoveenaHi Loveena,
in a scenario, for instance, where you send IDOCs of type LS (logical system):
1. In the sender system, call transaction WE05 to display the outbound IDoc. The IDoc partner type of both receiver and sender is LS.
2. On the Integration Server, call transaction SXMB_MONI (Integration Engine Monitoring Monitor for Processed XML Messages) to display the message.
3. In the receiver system, call transaction WE05 to display the inbound IDoc.
if it helpful reward points are appreciated -
IDoc Control Record and Status Record Code, where is it!!!
Hi,
Where can i see the code for generation of control record and status record of IDoc.
Thanks in advance for your answershi ,
1.first create an segment with the fields u want tcode we31 relase it .
2. create an idoc and assign segment to it tcode we30.
3.crate a message type tcode we81
4.assign that message to idoc tcode we 82.
do the ale configarations .
now u can write the code in our sender system
*1. Create parameters/select-options for input data. i.e., message type, logical system.
parameters : p_mestyp like edmsg-msgtyp default 'ZKKUMSG',
p_logsys like tbdlst-logsys obligatory.
*2. Create Data objects for control record, data record and database table.
data : c_segment like edidd-segnam value 'ZKKUSEG', "Data record (IDoc)-Segment type
c_idoctp like edidc-idoctp value 'ZKKUIDOC'. "Control record (IDoc)-Basic type
data : begin of i_tab occurs 0,
ZKSNO like ZKSTD-ZKSNO,
ZKSNAME like ZKSTD-ZKSNAME,
end of i_tab.
data : w_itab like i_tab.
data : s_segment like ZKKUSEG.
data : i_edidd like edidd occurs 0 with header line.
data : i_control_record like edidc.
data : i_comm_idoc like edidc occurs 0 with header line.
*3. Select the data from responding tables into internal table for a defined condition.
here you have take ur internal table
*select single zsno zsname from zkiran into corresponding fields of itab where zsno = p_sno.
*4. create control record into internal table.
i_control_record-mestyp = p_mestyp. "Message Type
i_control_record-idoctp = c_idoctp. "Basic type
i_control_record-rcvprt = 'LS'. "Partner Type of Receiver
i_control_record-rcvprn = p_logsys. "Partner Number of Recipient
*5. create data record into internal table.
*i_edidd-segnam = c_segment.
loop at i_tab into w_itab.
s_segment-zksno = w_itab-ZKSNO. "Application Data
s_segment-zksname = w_itab-ZKSNAME.
i_edidd-sdata = s_segment.
i_edidd-segnam = c_segment.
clear w_itab.
append i_edidd.
endloop.
*6. Process ALE Service Layer using the function module MASTER_IDOC_DISTRIBUTE. It returns the corresponding IDoc No.s.
call function 'MASTER_IDOC_DISTRIBUTE'
exporting
master_idoc_control = i_control_record
tables
communication_idoc_control = i_comm_idoc
master_idoc_data = i_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.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*7. Display Communication IDocs.
loop at i_comm_idoc.
write : / 'Communication IDoc No. is : ', i_comm_idoc-docnum.
endloop.
*8. Commit Work.
commit work.
i hope this sample code help u .
thanks -
Multiple IDocs-XI-Single File Scenario
Hi All,
We need to send multiple IDocs from R/3 to XI and then to a single file using File Adapter. Please help us with your suggestions on how to proceed using a simple solution.
Regards,
PeterI made a program that solved the issue of collecting the IDOC in to one file.
1. The partent profile should be setup for collect idocs
2. Make a report that will select and dispatch the idocs
seudo code:
select tables with select criteria:
edidc (idoc control)
edid4 (idoc data)
one yo have made you selection into internal tables
it_final_edidc
it_final_edid4
*you can apply rules and data tranformations, eg. PEXR2002 batch per payment type.
CALL FUNCTION 'EDI_OUTPUT_NEW'
EXPORTING
onl_option = 'B'
ERROR_FLAG = ' '
NAST_RECORD =
TABLES
i_edidc = it_final_edidc
i_edidd = it_final_edid4
EXCEPTIONS
OTHERS = 1.
" EDI mesages dispatched
IF sy-subrc EQ 0.
COMMIT WORK.
CALL FUNCTION 'DEQUEUE_ALL'
EXPORTING
_SYNCHRON = ' '
EXCEPTIONS
OTHERS = 1.
That work like a charm when writting the IDOC to a single file.
But when I send the IDOCS to XI like XML-IDOC I still receive one transaction per IDOC.
if anyone know how to solve that, let me know.
juan -
EDI IDOC General Flow of Inbound to Outbound
Anyone guide me the step by step process for creating an inbound IDoc of purchase order to Outboud IDoc of sending order confirmation back to system? The whole flow including EDI and IDOC from start to finish..
Also it would be helpful if someone give me where to get IDOC list and EDI ..no'sfor this you need to write a program .
once you get the data form file to Internal table. then
pass your internal table data to idoc control and idoc dta
like pass all segemnts data then pass all segments data to this FM
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = wa_edidc
TABLES
communication_idoc_control = gt_edidc
master_idoc_data = gt_edidd -
Need help for IDOC inbound function module !
Hi guys please help me to create a IDOC inbound function module.
What are the parameters and tables.
How to write the code.
What it does.
Please send me one inbound func module code if possuble
ThanksHi,
You need to create an inbound function module. Then define the process code in transaction we42 and attach the function module to this process code.
In the function module you create you need to define tables of types EDIDC (Control record (IDoc)), EDIDD (Data record (IDoc)) and BDIDOCSTAT (ALE IDoc status (subset of all IDoc status fields)).
Regards,
Soumya. -
Process code for extended idoc
Hi,
If we are creating an extended idoc, do we have to assign a new process code to it ?
Or will the process code and the associated function module for the basic type work as well for the extended idoc ?Process code will come in to picture when you deal with IDOCS .. you need to assign a code which internally will have a Function module or a Include, that will have entire code to run your bussiness for an IDOC or EDI or ALE.
Process Code is a different name for specific purposes like function module. IDocs are written in this process.
Outbound Process Code - if you are using outbound processing under Message Control, the IDoc is generated in the IDoc Interface. The process code names the relevant function module
Inbound Process Code - names the function module or workflow which reads the IDoc data and transfers the data to the application document.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/content.htm
Enter transaction WE30 (ALE->Extension-> IDOC types->Maintain Idoc type)
Type in your name of the extended IDOC type (usually starting with 'Z') and click on the Basic IDoc type, click the create icon.
Click on Create new and enter a description and press enter.
Click on ZIDOCTYPE01 and then on the Create icon.
Enter ZIDOCTYPE as the segment type, click on Segment Editor.
Enter a description for your segment type and create.
Enter a description for your segment, enter each field required in your IDoc and press enter to validate.
Save and generate, press back
To release the segment choose Goto, Release from the menu.
Check the box on the line of your segment.
Save, back and enter.
Your Idoc type structure should be displayed with your new segment.
Save and back.
To release the Idoc type choose Extras, Release type from the menu and Yes.
Reward points if useful. -
Hi Guys
Could anybody tell me if there is any table wherein I can read the content of an IDOC?
I have around 400 MBGMCR type IDOCs and I need to get the PO number for each of them. Is there any table where I just retrieve them from by giving the IDOC number.
Thanks and any help will be much appreciatedEDID2 IDoc Data Record from 3.0C onwards
EDID3 IDoc Data Record from 3.0 onwards
EDID4 IDoc Data Records from 4.0 onwards
EDIDC Control record (IDoc)
EDIDD_OLD IDoc Data Record
EDIDO Value table for IDoc types
EDIDOCINDX Control record (IDoc)
EDIDOT Short description of IDoc types
EDIDS Status Record (IDoc) -
Hi Friends,
I have one extension idoc type requirement, now i want to insert the code in userexit. how can i find the user exit related to the idoc.Hi,
can u explen what is your Scenario, here i am given some userexit for idoc.
u can find it from SMOD
MWMIDO01
MWMIDO02
MWMIDO03
MWMIDO04
MWMIDO07
MWMIDO08
MWMIDO09
MWMIDO10
MWMIDO11
MWMIDO12
MWMIDO13
SIDOC001
SIDOC002
EX......
MWMIDO01 (User Exit)
With this user exit, the contents and structure of IDOC WMTOID01
'Transfer order' can be influenced customer-specifically in the outbox.
Call transaction and other important requirements
The user exit is performed in the function module that sets up IDOC
WMTOID01. This is done after the IDOC setup but before it is transferre
to the ALE interface. The standard function module for setting up IDOC
WMTOID01 is called L_IDOC_CREATE_WMTOID01. The IDOC setup is part of th
transfer order generation. This means that the source code can run both
asynchronously in the update program and online. For this reason, all
error messages must be issued as abend messages to guarantee a correct
termination with rollback. Furthermore, you must not use any key words
such as COMMIT WORK, ROLLBACK WORK, LEAVE, or the like.
Parameters and options
The user exit in the program is function module EXIT_SAPLLIDO_001. In
order to be able to use the user exit, you must create Include ZXLIDU01 and activate the enhancement with transaction CMOD. As parameters, you
can use the transfer order and IDOC data:
o TO header (import parameter I_LTAK)
o TO items (table parameter T_LTAP)
o Control record of the IDOC that has been set up (import parameter
X_IDOC_CONTROL)
o Data records of the IDOC that has been set up (table parameter
T_IDOC_DATA)
This user exit can basically be used to:
o change or redetermine the data in IDOC WMTOID01 that were determined
during the standard procedure or provide partners with additional
information using empty fields of this IDOC.
o change or enhance the data for controlling the IDOC processing in
the control record of the IDOC.
o If you enhanced the basic IDOC WMTOID01 with your own segments, you
have to fill these segments including the necessary data.
The user exit returns the modified IDOC data to the calling program by
means of the following parameters:
o Control record of the IDOC that has been set up (export parameter
X_IDOC_CONTROL)
o Data records of the IDOC that has been set up (table parameter
T_IDOC_DATA)
The modified IDOC is passed on by the calling program to the ALE
interface for sending.
Although changes to table T_LTAP are without any meaning, they should
still not be made.
Examples
Below, you will find some conceivable changes including the necessary
source code.
o You want to send additional data on TO item level. These data are
transferred in the standard segment of IDOC WMTOID01.
With field 'Goods recipient', information is transferred whether the
external system should additionally print accompanying documents for
the sent transfer order. The indicator for printout from the TO
header and the printer from the TO items are specified in this
field.
In addition, a separate description is written into the field
'Unloading point'.
INCLUDE ZXLIDU01
tables: e1ltori,
loop at t_idoc_data.
*........Zusatzinfos aus dem Transportauftrag..........................
if t_idoc_data-segnam = 'E1LTORI'.
move t_idoc_data-sdata to e1ltori.
loop at t_ltap
where tanum eq i_ltak-tanum
and tapos eq e1ltori-tapos.
exit.
endloop.
if sy-subrc eq 0.
move i_ltak-drukz to e1ltori-wempf.
move t_ltap-ldest to e1ltori-wempf+2.
move e1ltori to t_idoc_data-sdata.
modify t_idoc_data.
endif.
*........Zusatzinfos die individuell beschafft werden..................
move 'USER-EXIT' to e1ltori-ablad.
move e1ltori to t_idoc_data-sdata.
modify t_idoc_data.
endif.
endloop.
o The IDOCs that have been set up are to be transferred to the
external system via two different logical destinations, depending on
the transport type. This requires two different partner profiles.
The partner profile depends on the message type, message variant and
message function. Message function 'EIN' is used for stock
placements whereas 'RES' is used for all other movements. You have
to maintain the partner profile for these two message functions
'EIN' and 'RES' as well.
INCLUDE ZXLIDU01
if i_ltak-trart eq 'E'.
move 'EIN' to x_idoc_control-mesfct.
else.
move 'RES' to x_idoc_control-mesfct.
endif.
For transfer orders on deliveries, the external system requires
additional delivery data such as name of the goods recipient, route,
shipping point, and the like. In this case, the large amount of
additional data can only be transferred via an additional IDOC
segment. That is, you have to define a seprate IDOC type that
consists of the basic IDOC type WMTOID01 and a separate enhancement
type. In the enhancement type, you define the new segment, for
example Z1LTORZ, that refers to the standard segment E1LTORH. Filling the data of the new segment can be done as follows.
INCLUDE ZXLIDU01
tables: e1ltori,
z1ltorz,
edidd,
likp.
data: flg_neues_segment.
data: begin of xidoc_data occurs 0.
include structure edidd.
data: end of xidoc_data.
*....>>> Neues Segment anlegen Z1LTORZ <<<.............................
*........Bestehendes IDOC sichern......................................
loop at t_idoc_data.
move t_idoc_data to xidoc_data.
append xidoc_data.
endloop.
*........Neuen IDOC-Typ und Erweiterungs-Typ im Kontrolsatz fortschr...
move:
'ZZWMTOID' to x_idoc_control-doctyp,
'ZWMTOID1' to x_idoc_control-cimtyp.
*........Aus dem bestehenden IDOC ein neues IDOC erstellen.............
dabei wird das neue Segment aufgebaut und eingebettet
refresh t_idoc_data.
loop at xidoc_data.
*........Merken:neues Segment soll nach dem Segment E1LTORH kommen.....
if xidoc_data-segnam = 'E1LTORH'.
flg_neues_segment = 'X'.
endif.
*........Standard-Segmente übernehmen..................................
move xidoc_data to t_idoc_data.
append t_idoc_data.
*........Neues Segment übernehmen......................................
if flg_neues_segment eq 'X'.
*........Lesen Lieferung und Daten in neues Segment übergeben..........
if not i_ltak-vbeln is initial.
select single * from likp
where vbeln eq i_ltak-vbeln.
if sy-subrc eq 0.
clear t_idoc_data.
move-corresponding likp to z1ltorz.
*........Neues Segment sichern.........................................
move 'Z1LTORZ' to t_idoc_data-segnam.
move z1ltorz to t_idoc_data-sdata.
append t_idoc_data.
endif.
endif.
endif.
move space to flg_neues_segment.
endloop.
if it is help full to u please give max rewad point. -
Publish idocs to external system
Hi,
We have a business requirement to publish Idocs to an external system, however we don't have any kind of middleware to perform that action.
Since it is HR master data, we can use change pointers internal table, to create a flat file with that data, and the external system could read it from a shared folder.
Do you know other options to send idocs to that external system? There is any function to publish idoc via webservices for example?
How can I solve it technically?
Thanks in advance!
Luis TeixeiraHI,
Check if this code for automatic processing of idoc helps you.
REPORT ZFI_BD87 NO STANDARD PAGE HEADING
MESSAGE-ID ZZ
LINE-SIZE 132.
*& Program Name : ZFI_BD87 *
*& Module Name : FINANCE *
*& Author : DEEPTHI REDDY KAUKUNTLA
*& Creation Date : 09/22/2006 *
*& Program Type : Report *
*& SAP Release : 4.6C *
*& Description : To automate the manual IDoc *
processing. *
*-- TABLES
TABLES: EDIDC, " Control record(IDoc) Table
EDIDS. " Status Record (IDoc) Table
RANGES : R_DOCNUM FOR EDIDC-DOCNUM.
*-- INTERNAL TABLES
*-- Table for holding Control Record details.
DATA: BEGIN OF IT_EDIDC OCCURS 100,
DOCNUM LIKE EDIDC-DOCNUM,
UPDDAT LIKE EDIDC-UPDDAT,
UPDTIM LIKE EDIDC-UPDTIM,
END OF IT_EDIDC.
*-- Table for holding Control Record details.
DATA: BEGIN OF IT_EDIDS OCCURS 100,
DOCNUM LIKE EDIDS-DOCNUM,
STAMID LIKE EDIDS-STAMID,
STAMNO LIKE EDIDS-STAMNO,
END OF IT_EDIDS.
*-- Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK S WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_STATUS FOR EDIDC-STATUS,
S_MESTYP FOR EDIDC-MESTYP,
S_UPDDAT FOR EDIDC-UPDDAT,
S_STAMNO FOR EDIDS-STAMNO,
S_STAMID FOR EDIDS-STAMID.
SELECTION-SCREEN END OF BLOCK S.
*-- START OF SELECTION
START-OF-SELECTION.
PERFORM GET_IDOCNUM.
*& Form GET_IDOCNUM
text
--> p1 text
<-- p2 text
FORM GET_IDOCNUM.
REFRESH R_DOCNUM.
CLEAR R_DOCNUM.
SELECT DOCNUM
UPDDAT
UPDTIM
FROM EDIDC INTO TABLE IT_EDIDC
WHERE STATUS IN S_STATUS
AND MESTYP IN S_MESTYP
AND UPDDAT IN S_UPDDAT.
IF NOT IT_EDIDC[] IS INITIAL.
SELECT DOCNUM
STAMID
STAMNO
FROM EDIDS INTO TABLE IT_EDIDS
FOR ALL ENTRIES IN
IT_EDIDC WHERE DOCNUM = IT_EDIDC-DOCNUM
AND LOGDAT = IT_EDIDC-UPDDAT AND
LOGTIM = IT_EDIDC-UPDTIM
AND STAMNO IN S_STAMNO
AND STAMID IN S_STAMID.
LOOP AT IT_EDIDS.
R_DOCNUM-LOW = IT_EDIDS-DOCNUM.
R_DOCNUM-SIGN = 'I'.
R_DOCNUM-OPTION = 'EQ'.
APPEND R_DOCNUM.
CLEAR R_DOCNUM.
ENDLOOP.
ENDIF.
IF SY-SUBRC = 0.
SUBMIT RBDMANI2
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT'
USING SELECTION-SETS OF PROGRAM 'ZFI_BDC87'
WITH SO_DOCNU IN R_DOCNUM
WITH SO_MESTY IN S_MESTYP
AND RETURN.
ENDIF.
ENDFORM. " GET_IDOCNUM
regards,
deepthi -
Message type and IDoc type for PGI-GR?
hi all,
I have to send the PGI through ALE which have to create GR . So please mention the Message type , output type of message control and IDoc type?
Thanks
VamshiHi,
The Idoc Types for Post Goods Issue are
MBGMCR01 / MBGMCR02.
Pls check the Message type in tcode WE82.
For output type GOTO transaction NACE-->Application V2.
hope this helps.
Regards,
Sharath
Edited by: sharath on Jun 24, 2008 7:16 PM -
Hi,
I have an IDOC problem and im not sure if it is a performance issue or a customization.
I have a job that runs program RBDAPP01 and processes all IDOCS of status 64.
The thing is the program terminates with a timeout error of maximum runtime exceeded.
The timeout is because of the long idoc processing (more than 600 segs).
Im not sure how to apporach the problem if the IDOC data is in question or a new code should be added. The dumps may be caused in ZXVEDF02 a custom user exit.
I also need to copy an existing IDOC and change the status to 64 so that there is test data that i could work with.
Any Input on this would be greatly appreciated.
Many Thanks.charlesf,
Follow the below steps.
1. First find the program name by Job name.
For this goto sm37-->enter jobname and user name is ' * ' -
> Execute -
>slect your job and press the button "STEP" which is in Application tool bar (OR)
press (Ctrl_shift+F9). You will get the program name.
2. Goto program in SE38 and find the code where the program passing all the IDocs to program RBDAPP01.
Ther you put the LOOP .
Ex: suppose your program is passing the idocs 10000 so that program is going for dump. Instead of that control the idocs passing to 1000 . when Idoc reaches the 1000 call the processing progarm so no dump will occur.
Reason for dump is Basis guys use to set the max.process time of seeion is 30 min. so if you run all idocs it exceeds more that 30minu and will go for dump.
Don't forget to reward if useful. -
plz tell me the meaning and necesity of processcodes(we41 and we42) in idocs.
hi
good
Definition
Another name for a specific process, for example function module or workflow. IDocs are read or written in this process.
Use
In the partner profiles, the processing is never addressed directly but rather always via a process code. You can therefore replace an old process with a new one for any number of partners by assigning the existing process code to the new process.
Two types of process code are used in conjunction with the partner profiles:
Outbound Process Code - if you are using outbound processing under Message Control, the IDoc is generated in the IDoc interface. The process code names the relevant function module.
Inbound Process Code - names the function module or workflow which reads the IDoc data and transfers the data to the application document.
If you do not know what process code is relevant for your business process, but you know the message type, then you can display the process code defined for this message type: Choose Documentation ® Process codes in the initial node of the IDoc interface or use the F4 Help in the partner profiles after you have entered the message type.
There are also the process codes for exception handling:
System Process Code - names the workflow which is triggered in inbound or outbound processing when an exception occurs.
Status Process Code - names the exception workflow which is triggered when an incorrect status is returned by the external system.
These two types are configured centrally and not on a partner-specific basis and therefore do not have to be maintained when a new process is defined. They were introduced for the sake of completeness, so that each process in the IDoc interface is addressed via a process code.
http://help.sap.com/saphelp_46c/helpdata/en/dc/6b804043d711d1893e0000e8323c4f/content.htm
thanks
mrutyun^ -
Hi,
iam working on an inbound IDOC TPSSHT01, i need to add an extrta field and segment , so i create an data element and Z segment and add the field in the segment
i have to copy the TPSSHT01 to a ZTPSSHT01 and do the IDoc extension ,
i have to copy the function module IDOC_INPUT_SHIPPL to Z_IDOC_INPUT_SHIPPL
Can any body let me know what are the steps that i have to follow to process the inbound idoc with the above requirment
Cheers,
SaiHi ,
Follow this procedure .
In bound Idoc
Step 1: Create segment
a. T.code WE31
b. Enter a new segment type and press create button
c. Give a short text
d. Enter the field names say FIELD NAME : MATNR ;; DATA ELEMENT: CHAR(18)
e. Save the segment (zkrishseg)
Step 2: Create IDOC type
a. T.code WE30
b. Enter a new IDOC type name
c. Choose the basic type and press the create button.
d. Choose the create new option button and enter a description and press enter
e. Place the cursor on the type name and then press create button.
f. Enter the segment name created in step 1 and check the mandatory segment check box
g. Enter minimum number and maximum number as 1 and press enter.
h. Then save the IDOC type. (zkrishtyp)
Step 3: Create message type
a. T.code WE81
b. Press change button.
c. Press new entries button.
d. Enter a message type and short text and press save button. (zkrishmsg)
Step 4: Assign message type to IDOC type.
a. T.code WE82
b. Press change button
c. Press new entries button.
d. Enter the created message type, IDOC type and version release (46B or 46C)
Step 5: Create a function module for inbound. (Z_IDOC_KRISH_INBOUND)
Step 5A: Create characteristics of inbound FM.
a. T.code BD51
b. Click New entries
c. Enter the IDOC function module name and 1(individual type) in input t..
d. Save it.
Step 6: Assignment of FM to log, message and type.
a. T.code WE57
b. Go for change mode and click new entries.
c. In processing by enter FM name and enter F as type.
d. Enter basic type (idoc type-zkrishtyp) and message type (zkrishmsg) in the respective text boxes.
e. Choose the direction as 2 Inbound.
f. Save the data.
Step 7. : Creation of inbound process code.
a. T.code WE42
b. Go to change mode and click create entries.
c. Enter a new process code and description (zidockrish)
d. Enter the FM name in the identification text box
e. Choose processing with ALE service
f. Choose processing by FM and click Save button
g. In the next screen, select the FM name and click save button
Step 7a : Creation of inbound process code.
h. T.code SM59
i. Select R/3 connection and click create.
j. Enter all system related things(for Eg. Connection type as 3, Target host as SAP04,
Description , and Logon details and save.
Step 8: Define a port
a. T.code WE21
b. Click on Transactional RFC and press the Create button
c. Enter a port name and description. (ztestkrish)
d. Choose the release type.
e. Choose the RFC destination.
f. To create RFC destination go to SPRO and search RFC destination and create.
g. Save the data.
Step 9. Define logical system
a. T.code SALE
b. Click down the sending and receiving systems
c. Click down the logical systems
d. Choose Define logical system.
e. Go for new entries.
f. Enter a new name and description and save it. (zkrishlog)
Step 10. Create partner profile
a. T.code WE20
b. Choose partner type LS and click create.
c. Enter the logical system name in partner number
d. Then Save . Here Type is US.
e. click + icon(create inbound parameter) in the bottom. Note: Two table control subscreens will appear. One for inbound and the other for outbound. Click + icon in inbound area.
f. Enter the message type, process code and save the data.
Step 11. Checking the Idoc
a. T.code WE19,
b. Choose radio Basic type , enter the type name(zkrishtyp) and press execute button.
c. Click on EDIDC Number.
d. Enter partner Number, Partner type, Port Number for sender and recipient ( data remains same here for sender and recipient)
e. Enter Message type and press ENTER.
f. Click on empty space corresponding to SEGMENT name and enter Paarameters like MATNR, WERKS and CHARG etc .
g. Click standard inbound properties here and press enter see the result .
h. T.code WE02
i. Enter IDOC number press ENTER see the status.
Function Module in Inbound
Import Parameters
INPUT_METHOD LIKE BDWFAP_PAR-INPU Inbound method for the IDoc inb
MASS_PROCESSING LIKE BDWFAP_PAR-MASS Flag: Mass processing
Export Parameters
WORKFLOW_RESULT LIKE BDWF_PARAM-RESULT Final value of method
APPLICATION_VARIABLELIKE BDWF_PARAM-APPL_VAR Variable to be used by
IN_UPDATE_TASK LIKE BDWFAP_PAR-UPDATETASK Flag: Application has
CALL_TRANSACTION_DONLIKE BDWFAP_PAR-CALLTRANS Flag: Application
tables
IDOC_CONTRL LIKE EDIDC Control record (IDoc)
IDOC_DATA LIKE EDIDD Data record (IDoc)
IDOC_STATUS LIKE BDIDOCSTAT ALE IDoc status (subset of al
RETURN_VARIABLES LIKE BDWFRETVAR Assignment of IDoc or documen
SERIALIZATION_INFO LIKE BDI_SER Serialization objects for one
Source code
FUNCTION ZASHOKMODULE.
""Local interface:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWF_PARAM-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWF_PARAM-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
data: begin of w_data occurs 0.
include structure edidd.
data: end of w_data.
data: wa_data like ZASH1.
data : i_data like standard table of wa_data initial size 0.
*tables : zhemal1.
data : begin of wa_zhemal1.
include structure zhemal1.
data : end of wa_zhemal1.
data : i_ZHEMal1 like standard table of wa_ZHEMal1 initial size 0.
read table idoc_data with key SEGNAM = 'ZASH1'.
loop at IDOC_DATA into W_DATA where segnam = 'ZASH1'.
WA_DATA = W_DATA-SDATA.
wa_data = w_data-sdata.
append wa_data to i_data.
endloop.
MOVE IDOC_DATA-DOCNUM TO IDOC_STATUS-DOCNUM.
IDOC_STATUS-MSGID = 'ZABC'.
IDOC_STATUS-STATUS = 53.
IDOC_STATUS-MSGTY = 'S'.
IDOC_STATUS-MSGNO = '001'.
APPEND IDOC_STATUS.
LOOP AT i_data into wa_data.
wa_ZHEMal1-VBELN = wa_data-VBELN.
wa_ZHEMal1-POSNR = wa_data-POSNR.
wa_ZHEMal1-MATNR = wa_data-MATNR.
wa_ZHEMal1-MATWA = wa_data-MATWA.
wa_ZHEMal1-MATKL = wa_data-MATKL.
append wa_ZHEMal1 to i_ZHEMal1.
insert ZHEMal1 from table i_ZHEMal1 accepting duplicate keys .
ENDLOOP.
ENDFUNCTION.
For Out bond Steps are
1. Create segment
2. Create Type
3. Create Message Type
4. Assign message Type to Idoc Type.
5. Create Port
6. Define Logical systems.
7. Define Partner profile.
8. Create a Report program.
Report program Out bond
REPORT ZASH1 .
Outbound standalone idoc creation *
Program Name : Y_VENMAST_OUTBOUND_STANDALONE *
Description : Outbound standalone idoc creation for training *
to Unilever offshore team members *
Created by : Satyam Computer Services Ltd. *
Created on : 04.01.2002 *
Modification Log *
Developer Date Transport # Details *
Subramony 04.01.2002 *
Tables Declaration *
TABLES : zhemal1.
Internal table declaration *
data : i_zhem1 Like standard table of zhem1 with header line.
data : control_record_out like edidc.
*data: p type p decimals 2,
c(10) type c.
start-of-selection.
p = '3.14'.
c = p.
overlay c with '0000000000000'.
write c.
DATA : BEGIN OF I_EDIDD OCCURS 0.
INCLUDE STRUCTURE EDIDD.
DATA : END OF I_EDIDD.
DATA : BEGIN OF I_EDIDC OCCURS 0.
INCLUDE STRUCTURE EDIDC.
DATA : END OF I_EDIDC.
DATA : BEGIN OF I_zhemal1 OCCURS 0,
VBELN LIKE zhemal1-VBELN,
POSNR LIKE zhemal1-POSNR,
MATNR LIKE zhemal1-MATNR,
MATWA LIKE zhemal1-MATWA,
MATKL LIKE zhemal1-MATKL,
END OF I_zhemal1.
SELECT-OPTIONS : S_vbeln FOR zhemal1-vbeln .
START-OF-SELECTION.
PERFORM F_GET_zhemal1.
END-OF-SELECTION.
Building Control record
CONTROL_RECORD_OUT-MESTYP = 'ZASH1'.
CONTROL_RECORD_OUT-IDOCTP = 'ZASH1'.
CONTROL_RECORD_OUT-RCVPRT = 'LS'.
CONTROL_RECORD_OUT-RCVPRN = 'ZASH1'.
CONTROL_RECORD_OUT-sndPRT = 'LS'.
CONTROL_RECORD_OUT-sndPRN = 'ZASH1'.
PERFORM F_PROCESS_OUTPUT.
*PERFORM F_FILL_EDIDD.
PERFORM F_CREATE_IDOC.
Form F_GET_Y1COTU110 *
FORM F_GET_zhemal1.
SELECT VBELN POSNR MATNR MATWA MATKL
FROM ZHEMAL1
INTO TABLE I_ZHEMAL1
WHERE VBELN IN S_VBELN.
ENDFORM. " F_GET_zhemal1
Form f_process_output *
FORM F_PROCESS_OUTPUT.
LOOP AT I_zhemal1.
I_zhem1-VBELN = I_zhemal1-VBELN.
I_zhem1-POSNR = I_zhemal1-POSNR.
I_zhem1-MATNR = I_zhemal1-MATNR.
I_zhem1-MATWA = I_zhemal1-MATWA.
I_zhem1-MATKL = I_zhemal1-MATKL.
i_edidd-segnam = 'ZASH1'.
i_edidd-sdata = I_zhem1.
append i_edidd.
clear i_edidd.
ENDLOOP.
ENDFORM. " f_process_output
Form f_create_edidc *
FORM F_CREATE_IDOC.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = CONTROL_RECORD_OUT
TABLES
COMMUNICATION_IDOC_CONTROL = I_EDIDC
MASTER_IDOC_DATA = I_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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
LOOP AT I_EDIDC.
WRITE :/ 'IDoc Generated :' , I_EDIDC-DOCNUM.
ENDLOOP.
COMMIT WORK.
ENDIF.
ENDFORM. " f_create_idoc
Please reward if useful. -
i need an example how to use the message type in IDOC
Hi Manohar,
This is custom IDoc prgm.Award points if useful
IDocs Standalone program
This Prgm will upload data in flat file into internal table and sends that data to inbound system
REPORT ZMMMC9403_UPLOAD_MATERIAL_IDOC.
*1.Create parameters/select-options for input data. i.e., empno, message type, logical system.
parameters : p_mestyp like edmsg-msgtyp default 'zmsgkk',
p_logsys like tbdlst-logsys obligatory.
*2.Create Data objects for control record, data record and database table.
data : c_segment like edidd-segnam value 'ZKSEGTYPE', "Data record (IDoc)-Segment type
c_idoctp like edidc-idoctp value 'ZKIDOC'. "Control record (IDoc)-Basic type
data : begin of itab occurs 0,
zsno like zkiran-zsno,
zsname like zkiran-zsname,
end of itab.
data : w_itab like itab.
data : s_segment like zksegtype.
data : i_edidd like edidd occurs 0 with header line.
data : i_control_record like edidc.
data : i_comm_idoc like edidc occurs 0 with header line.
*3. Select the data from flatfile/corresponding tables into internal table for a defined condition.
*select single zsno zsname from zemp into corresponding fields of it_zemp where empno = p_empno.
call function 'GUI_UPLOAD' "since the data is coming from flatfile, GUI_UPLOAD is used
exporting
filename = 'C:\DATA.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
tables
data_tab = itab.
*4. create control record into internal table.
i_control_record-mestyp = p_mestyp. "Message Type
i_control_record-idoctp = c_idoctp. "Basic type
i_control_record-rcvprt = 'LS'. "Partner Type of Receiver
i_control_record-rcvprn = p_logsys. "Partner Number of Recipient
*5. create data record into internal table.
*i_edidd-segnam = c_segment.
loop at itab into w_itab.
s_segment-zsno = w_itab-zsno. "Application Data
s_segment-zsname = w_itab-zsname.
i_edidd-sdata = s_segment.
i_edidd-segnam = c_segment.
append i_edidd.
endloop.
*6. Process ALE Service Layer using the function module MASTER_IDOC_DISTRIBUTE. It returns the corresponding IDoc No.s.
call function 'MASTER_IDOC_DISTRIBUTE'
exporting
master_idoc_control = i_control_record
tables
communication_idoc_control = i_comm_idoc
master_idoc_data = i_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.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*7. Display Communication IDocs.
loop at i_comm_idoc.
write : / 'Communication IDoc No. is : ', i_comm_idoc-docnum.
endloop.
*8. Commit Work.
commit work.
Maybe you are looking for
-
"automate web photo gallery" missing in Photoshop CS4
Just thought I upgraded from my CS2 photoshop and realize I can't automate the very practical web photo galleries anymore? I tried to transfer the added plugin from the additional "goodies" file into the photoshop automate plugins BUT a message pops
-
Access Database Opens in Read Only for Users
I just moved an Access Database to a new server (from Server 2003 to Server 2012). From the server, using Office 2010, I can open the database without issue but, if a user try's to open the same database from either a shortcut or mapped with Office 2
-
I understand this can be done in some previous generations, and am just not sure whether it works in my situation. I have a MacBook Pro (2009) and a brand new iMac 27" (2011). It seems that MBP has a mini displayport and iMac has 2 thunderbolt ports.
-
Hi there, I'm reverting to an older version of the skype client due to the fact that the ability to block people in group conversations was removed, along with conversation topic pictures. I have an offline installer for the version of the client tha
-
I use iTunes 9.1.1 on Windows XP and want to import about 1.500 cd's of classical music (AAC 320 kbps). I see that every album is stored in folders the following way: first name of the artist and then in a subfolder the name of the album. (Artist / A