Can Std. FM fill Z-segments in Outbound IDocs?
Hello All,
In the outbound DESADV from our system, there is a Z segment and the FM used to create this DESADV is the std one. How is the std FM populating the segment which is part of the extension? Should not every extended IDoc be using a modified or custom FM for its processing??
Thanks,
Charles.
Most function modules that populate Outbound IDOCs should have user exits available in the standard FM to populate Z Segments.
Best Regards,
Chris H.
Similar Messages
-
Add segment to outbound Idoc for Sales order
HI experts,
I need to add segment E1EDP02 under Existing segment E1EDP01 for outbound IDOC for Sales order. FM" IDOC_OUTPUT_ORDRSP".
I have used the Exit : "EXIT_SAPLVEDC_003" for the FM "IDOC_OUTPUT_ORDRSP" in the include of the Exit i wrote my code also for adding segment and activate it.
But when i am trying to debug the code it's not working
So please guide me how to debug it
I have followed below steps to Debug.
1. In VA02 i have repeat the output.
2. Put the breakpoint in the Exit include program .
3. put the Breakpoint in ALE processing Routine in RSNASTED program also
4. Trigger the program RSNAST00 by giving the Parameter value of SALES ORDER number and execute.
But not working
And i need to know whether i have used the Correct EXIT or not.In that case how to identify the correct exit's
Thanks In advanceHi,
I hope you have to add your segments through WE30 first for your IDOC type.
Cheers,
Raja.D -
Adding several standard segments in Outbound IDoc
Hi All,
I have a requirement in Orders05 Idoc type (Extension created). I want to pass Segment E1EDP19 three times based on the value of qualifier (3 qualifiers) in the customer exit.
As per my understanding, Loop at idoc_data is used when updating a Segment field with some value. But in this case I have to pass/add the same segment to internal table.
Please suggest the approach for this.
Thanks in advance!
Regards
TanuHi Tanu,
There are several ways to do this, below mentioned are a couple of them,
1) In the mentioned user exit, you will have all the Segments filled in. Your requirement if i understand correctly is to add E1EDP19 segments under E1EDP01 segments. So all that you have to do is build the logic to insert(not append as append would put E1EDP19 at the very which is not correct as per the structure/syntax of ORDERS05) E1EDP19 under E1EDP01 segments accordingly.
2) The other way to accomplish(this should be relatively easy i guess) this would be to append the E1EDP19 segments into INT_EDIDD with corresponding Segment Num, Parent Segnam and parent Segnum accordingly and the use the FM SPCM_SORT_IDOC_STRUCTURE to re-structure the IDOC as per the structure of ORDERS05.
Refer the below thread where i have provided my inputs for a similar requirment.
Sorting Idoc Segments
Regards,
Chen
Edited by: Chen K V on Jun 23, 2011 11:40 AM -
How to fill data in to extended idoc segments for outbound program
Hi all,
I am new to this Community In the extension of Standard idoc INVOIC02 with some custom segments like zemail, zfax,,,,how to fill the data into both standard segments and custom segments for outbound idoc using exit EXIT_SAPLVEDF_002 of standard function module IDOC_OUTPUT_INVOIC...
i need some sample code
THANKS
PAVAN KHi all,
I am new to this Community In the extension of Standard idoc INVOIC02 with some custom segments like zemail, zfax,,,,how to fill the data into both standard segments and custom segments for outbound idoc using exit EXIT_SAPLVEDF_002 of standard function module IDOC_OUTPUT_INVOIC...
i need some sample code
THANKS
PAVAN K -
About Orders05 outbound Idoc.
Hi,
I am using an outbound idoc of basic type Orders05 with an extension of the idoc header segment.This outbound idoc will get triggered once a PO is saved and sent through EDI.
I have to do an enhancement wherein I have to populate the mode of transport field(EXPVZ) and place of loading(LADEL) in the fields of the extended segment selecting them from EIKP depending upon the BELNR value in the header of the idoc(E1EDK01-BELNR).
I am unable to understand how do I populate the fields.
Could you please help me.
Thanks,
Sandeep.HI,
see the below steps you will completely understand the processing outbound..
2.1 Outbound Interface
PROCESS DIAGRAM
Outbound Interface
1. Analyse Hierarchy Levels
2. Create New segment
3. Create New IDoc Type
4. Create New Message Type
5. Link Message with IDoc Type
6. Create an entry in EDP13 via transactions WE20 and BD64
7. Populate the Custom IDoc via ABAP Program
7b Error Handling
7c. Send Status Email
8. Test the Population of the Custom IDoc
<b>Step 1 Analyse Hierarchy Levels:</b>
Analyse the data relationships being processed in the interface. Define the appropriate hierarchical Parent-to-Child relationships.
Navigate to transaction code WEDI
Transaction WEDI displays the IDOC main menu. This allows navigation around the various development and control areas to create a customised IDOC.
<b>Step 2 Create a new segment:</b>
via wedi : Development - IDOC Segments or Transaction code WE31.
Enter segment name and click on Create.
 The name of the segment type must start with Z1 , and have a maximum of eight characters.
Enter description and enter the relevant field names and data elements.
 The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.
Save the segment and enter Person Responsible and Processing Person .
Go to Edit and Set Release.
Repeat this procedure for each new Segment in the IDOC.
<b>Step 3 Create a new IDOC Type</b>
via wedi Development - IDOC Types or Transaction WE30.
Enter segment name (starting with Z), click on Basic Type and then Create.
Create as new, enter Person Responsible and Processing Person and enter description.
On Create Basic Type screen decide where segments should be inserted and go to Edit/Create Segment.
Complete relevant fields in the Maintain Attributes screen:
From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a Child.
When IDOC created return to initial screen. Go to Edit and Set Release.
Go to Transaction WE60 to view the IDoc Type you have created.
<b>Step 4 Create new Message Type</b>
via wedi Development - Message Types or Transaction WE81.
Display/Change and click on New Entries
Create a new Message Type and Save.
Step <b>5 Link Message Type to IDOC Type</b>
via wedi Development - IDOC Type/Message or Transaction WE82.
Display/Change and then click on New Entries.
Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
<b>Step 6 Create an entry in EDP13 via transactions WE20 and BD64.</b>
The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
WE20 Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
BD64 Create a Model View, Enter Sender and Receiver Ports, Attach Message Type. Go to Environment on Menu and click on Generate Partner Profiles and generate (not save) profile.
<b>Step 7 Populate the custom IDOC via ABAP Program</b>
See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
The control record is filled into a structure like EDIDC. The message type and the Idoc type for the Idoc must be populated into the eddic structure.
- PERFORM populate_Control_structure USING c_mestyp
c_SEGMENT_type1.
The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
- PERFORM transfer_Parent_data_to_seg.
The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
- PERFORM master_idoc_distribute.
NOTE: This function module is only called for stand alone programs and Shared Master Data programs (SMD). It is not called when using extensions or output determination.
The ALE Layer handles the sending of the IDOC to the receiving system.
Error Handling (see Step 7b).
Commit work.
Project Specific
<b>Step 7b Error Handling</b> Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
Declare a structure of type MCMAILOBJ for sending instructions.
Enter values for the internal table based on structure MCMAILOBJ
For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module MC_SEND_MAIL.
Enter values in the following parameters: -
MS_MAIL_SENDMODE = B (Batch Mode)
MS_MAIL_TITLE = 'Mail Title'
MS_MAIL_DESCRIPTION = Error description (e.g. MATNR not given)
MS_MAIL_RECEIVER = Name of Receiver (To be determined)
MS_MAIL_EXPRESS = E (Express Delivery)
MS_MAIL_DLINAME = Leave Blank
MS_MAIL_LANGU = 'E' (Language)
MS_MAIL_FUNKOBJ_NAME = Leave Blank
TABLES
MS_MAIL_CONT = I_MCMAILOBJ
Note:
It has to be determined separately for each interface how these errors and mail notifications are to be grouped dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
<b>Step 7c Send status mail</b>
Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.
Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).
Use function Module MC_SEND_MAIL to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.
<b>Step 8 Test the population of the custom IDOC</b>
via wedi IDoc - Display IDoc or Transaction WE02.
Enter your message type and execute.
Status should be green, double click on one of the Idocs you have created to view its contents.
If a problem has occurred click on Status which will give you a description of the error.
Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.
Click on each individual segment and view the content to check that the correct data has been read.
If you have UNIX access by using AL11 you can view the file that you have created.
Note:
For some interfaces it may be valid to send an empty file to SAP. This empty file is converted to the custom IDOC format expected by SAP. This custom IDOC will contain dummy information. In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.
rewards if useful
regards,
nazeer -
Creation of Inbound Idoc for the Outbound Idoc in same client
Hi,
My requirement:
Whenver an PO is created an Outbound IDOC is generated in system ABC with client 100.I want to pass this IDOC data to create an Inbound Idoc for Sales Order(SO) in the same client.
It would be helpful if anyone can answer on how to Transfer the Outbound Idoc after it crosses the port.
I found there is a field for function module in WE21,can this be used to get the requirement done.
Please suggest.
Regards,
AmarExample of a program that create and post an inbound idoc....maybe that will help you:
report zzinbound_idoc.
data: g_idoc_control_record like edi_dc40 occurs 0 with header line.
data: g_edidd like edi_dd40 occurs 0 with header line.
data: g_e1bpache09 like e1bpache09.
parameter: mode type c default 'A'.
refresh: g_idoc_control_record, g_edidd.
clear: g_idoc_control_record, g_edidd.
*-Build Control Record -*
g_idoc_control_record-mestyp = 'ACC_DOCUMENT'. "Message type
g_idoc_control_record-idoctyp = 'ACC_DOCUMENT03'. "IDOC type
g_idoc_control_record-direct = '2'. "Direction
* Receiver
case sy-sysid.
when 'DE2'.
g_idoc_control_record-rcvpor = 'SAPDE2'. "Port
g_idoc_control_record-rcvprn = 'IDOCLEGACY'. "Partner number
endcase.
g_idoc_control_record-rcvprt = 'LS'. "Partner type
g_idoc_control_record-rcvpfc = ''. "Partner function
* Sender
g_idoc_control_record-sndpor = 'A000000002'. "tRFC Port
case sy-sysid.
when 'DE2'.
g_idoc_control_record-sndprn = 'IDOCLEGACY'. "Partner number
endcase.
g_idoc_control_record-sndprt = 'LS'. "Partner type
g_idoc_control_record-sndpfc = ''. "Partner function
g_idoc_control_record-refmes = 'Customer clearing'.
append g_idoc_control_record.
*-Build Idoc Segments -*
*---E1KOMG
clear g_edidd.
clear g_e1bpache09.
g_edidd-segnam = 'E1BPACHE09'.
g_edidd-segnum = 1.
move g_e1bpache09 to g_edidd-sdata.
append g_edidd.
*-Create idoc -*
*-Syncronous
if mode = 'S'.
call function 'IDOC_INBOUND_SINGLE'
exporting
pi_idoc_control_rec_40 = g_idoc_control_record
* PI_DO_COMMIT = 'X'
* IMPORTING
* PE_IDOC_NUMBER =
* PE_ERROR_PRIOR_TO_APPLICATION =
tables
pt_idoc_data_records_40 = g_edidd
exceptions
idoc_not_saved = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*-Asynchronus
else.
call function 'IDOC_INBOUND_ASYNCHRONOUS'
in background task as separate unit
tables
idoc_control_rec_40 = g_idoc_control_record
idoc_data_rec_40 = g_edidd.
commit work.
endif.
write: / 'Well done!'. -
Outbound Idoc for Goods Recept
Hi All,
I need to setup Idoc for transfer posting from storage location to storage location,So currently there is no outbound process code for trigerring outbound idoc from SAP system to external system.
I hope we have to create a new output type and segments to do this.
B'coz , WMMMBXY and its segments are used for inbound idoc creation during GR. and theFM for this process is L_IDOC_INPUT_WMMBXY
Can somebody help me in writing an outbound idoc program for goods receipt done in MIGO.
Thanks in advance.Hi Shazia,
Speaking in terms of EDI Idocs, system is not prepared for send Goods Receipts because normally is an incoming message not the opposite. All the output messages you can find are for printing purposes.
So you need to configure everything for Output Determination and create a new function module to capture NAST message determination, retreive GR data, populate the Idoc and distribute it. Finally you have to create output process code, partner profile, port, rfc, distribution model, etc. etc.
Your starting point is next IMG activities to configure new output type for EDI medium for application ME: Material Management>Invetory management and Physical inventory>Output Determination.
Reward points if useful
Roger -
Hi all . I have come up with a requriement. The scenario is as the following
once we raise a sales order and save it ,an outbound IDOC gets triggered and send to the customer via EDI. after some time customer asks for one more copy and there is a need to change the values of some of the fields and resend to the customer. This can be done in two ways
1.Go to va02 make the requried changes and issue the output
2. change the idoc which is already processed and resend it
our client wants to go for the second option.
Can anyone help me out
1.' Where we can change and resend an already processed outbound idoc '?
2.if we make any changes in an outbound idoc at idoc processing level will the changes reflect in the order?
3. Can we restrict the user to change certain fields only?
Any inputs given by you people will help me a lot.
Thanks in advance
SriniHi srini,
As i Understand the senario, Their might be some changes to the document required by the customer. This also needs to reflect in the changes in Order.
It will be complex way to update both the IDOC and order, if you are changing in the IDOC and resending it. It would be more wise to go ahead with the first option making changes in through VA02 and then sending it accross . And most of the companies do not hold the IDOCs for too long & hence it would be wise to make changes in VA02 and send the IDOC once more. This can be done by minor code change based on the edit checks business wants to perform.
Well if you still want to go ahead with the second option here are answer to the questions.
.' Where we can change and resend an already processed outbound idoc '?
First the IDOC status needs to be changed from program RC1_IDOC_SEt_status
then you need to reporces it throught program RSEout00
2.if we make any changes in an outbound idoc at idoc processing level will the changes reflect in the order?
The changes will not reflect in the order unless you have a code written in SAPLxved.
3. It is not possible to restirct the change to certian fields only.
Reward points if this helps
Thanks,
Kamal
Message was edited by:
Kamalakar vp -
New Header Segment in Extension IDoc
Hi,
I want to create a new header segment in Extension IDoc.
I am not able to create. I want to extend the Basic IDoc DESADV01 by adding a new header segment (Batch numbers, ID's and with time stamp).
The remaining segments should be under this segment only.
Is it possible that or shall I create Custom IDoc?
Thanks in advance.Hi,
You can not create new header segment when extending IDoc type DESADV01.
System only allows you to insert as child segment instead.
If you still want to create new header segment, then you need to create a custom IDoc.
Regards,
Ferry Lianto -
hi ,
How i can set break point in FM , for outbound idoc .
Thanks,
Sridhar
Moderator Message: Please search before posting
Edited by: kishan P on Sep 6, 2010 7:19 PMhi ,
How i can set break point in FM , for outbound idoc .
Thanks,
Sridhar
Moderator Message: Please search before posting
Edited by: kishan P on Sep 6, 2010 7:19 PM -
Filling DOCFLOW segment in CRMXIF_ORDER_SAVE_M02
Hi
We are using the IDoc CRMXIF_ORDER_SAVE_M02 to upload data using LSMW> Here we face a problem with the preceding and succeeding documents. What values should we fill in for the DOCFLOW segment to get an object assigned? I understood that OBJECTID is the Transaction ID. But I am in the dark about the other fields especially the RELATIONSHIPTYPE and ROLETYPE.
Can anyone help me with this?
Thanks and regards,
SowmiyaHi Sowmiya,
Try to give below values,
RELATION_TYPE = 'LOP'. Look for the valid value from the table ORBRELTYP
RELOBJ_ROLETYPE = 'CRM_ORDER' .Look for the valid value from the table ORROLETYP
Other option is generate an outbound IDOC for correct order in your CRM system using program CRMXIF_ORDER_TEST. Keep this outbound IDOC as reference and build your new inbound idoc.
//Bhanu -
EDI Outbound IDOC Remove unused fields from segment
Hi All,
I am configuring a outbound idoc scenario for Message type ORDERS. The basic type for this message type is ORDERS05.
The segment E1EDKA1 has 44 fields, I need only the first field and the last field of this segment.
How do I remove the unused fields in this segment ? I Tried BD56 and BD32 But they are for removing the complete segment and so does not serve my purpose.
Any pointers to this issue is appreciable .
Regards,Hi,
Segmetns of standard message types can be deleted from BD53. But I don't think deleting fields would be possible from segments of standard idoc type. What you can do is you can create your own custom idoc type with the fields you want and allign it with the standard message type ORDERS. This should solve your purpose.
BR,
Atanu Mukherjee -
Problem in filling Custom segment data using User Exit for ZORDERS05
Hi,
I am using Process Code SD10 to generate the custom Idoc ZORDERS05.
The function module used is IDOC_OUTPUT_ORDRSP.
I am able to succesfully generate the Custom Idoc (VA02->Extras->Header->Edit) but unable to populate the custom segments in the IDOC.
I have tried to write the code in User Exit EXIT_SAPLVEDC_003 -> ZXVEDU15. But still I'm unable to populate the Z segments.
Even though I place a break point in the FM or in the User Exit during the generation of Idoc the control doesn't stop in FM nor in the User Exit.
I am unable to understand how to go about this.
Can anybody please help me with this?
Thanks in Adavance,
Rohan.Okay I under what you are speaking about NACE.
Yes that configuration has been done and I am sucessfully able to generate the IDOC.
But even though I know that in FM IDOC_OUTPUT_ORDRSP, I have to write code in User Exit EXIT_SAPLVEDC_003 to populate the Z segments; I'm unable to understand y the control doesn't pick the FM and Exit.
Right now I have code in the Exit to fill Z segments.
Thanks
Rohan. -
How can I avoid using rollback segment for batch updates.
I am currently trying to avoid associating a large amount of space for rollback segment as this gets filled up only during the nightly batch updates. All that space will never be used during the day. Hence want to know if there is any way of avoiding the use of rollback segment at the session level.
RajeshNo, but what you can do is create a large rollback segment to use with your batch job, at the start of your batch job bring the segment online, then use set transaction to use that rollback segment, when the batch job is finished and committed, you can then bring the rollback segment offline.
If you are really pressed for space, as an alternate plan, you could actually create the large segment before the batch job and drop it after. -
Outbound IDoc taking wrong segments
Hi All,
Outbound Custom IDoc is taking wrong segments when it is created. Message type, IDoc Type, process code and Function Module all are properly set.
This IDoc sometimes takes correct segments and sometimes wrong. because of this it is going into status 26 with syntax error.
Since the IDoc does not contain correct segments.
Can anyone help me please.
Thanks in Advance
PragnaHI,
Make your outbound IDOC restricted with for particular PLANT or Storage location in the using filter option in BD60.
Hope this might be helpful to you
Maybe you are looking for
-
Java run time error while executing JavaFX code
Hi I copied the code from [http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx|http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx] while reading in [http://java.sun.com/javafx/1/tutorials/ui/overview/#controls|http://java.s
-
Trouble syncing....
Every time I try to sync my iphone with my computer, my computer shuts down. I have windows Vista. I can sync my ipod without any trouble, but my iphone cannot sync because my computer shuts down as soon as I plug it in. I have uninstalled itunes and
-
So I just recently purchased a new ipod touch everything worked fine until today when i tried to play some songs and they would not play. It showed the song playing but it wouldnt start and always was on paused even when I clicked play.. Anyone know
-
80 GB iPod and a dial-up connection
Hello everyone, Can someone please tell me if it is possible to use the 80GB iPod with a dial-up connection? I know that it is a lot slower and I am worried that it may affect the downloading process of a movie or book. Thank you for taking the time
-
when do we use : after { braces while writing code in java i.e a format like {: