Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

creating a custom idoc

Former Member
0 Likes
3,381

Hi All,

1.Is it necessary to create process codes using we41 , we42 , we57 while creating a custom idoc and what is the need of them.

2.Once idoc is created using we30 do we need to release it.If it is released can we extend it later by adding more segments?

Thanks

Bala Duvvuri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,810

Hi,

Outbound process codes are necessary if the idoc is to be triggered based on the output type of transaction. Inbound process codes are used to initiate the processing of target transaction.

You can add additional segments by "cancel release" or already released idoc.

Regards

Vinod

Hi All,

1.Is it necessary to create process codes using we41 , we42 , we57 while creating a custom idoc and what is the need of them.

2.Once idoc is created using we30 do we need to release it.If it is released can we extend it later by adding more segments?

Thanks

Bala Duvvuri

16 REPLIES 16
Read only

Former Member
0 Likes
2,811

Hi,

Outbound process codes are necessary if the idoc is to be triggered based on the output type of transaction. Inbound process codes are used to initiate the processing of target transaction.

You can add additional segments by "cancel release" or already released idoc.

Regards

Vinod

Read only

0 Likes
2,810

I am planning to send data from HR to PI system in that case do i need to both the process codes using we41 and we42?

so i can add segments by cancel release?Is it really required to set release before using the idoc?

Thanks

Bala Duvvuri

Read only

Former Member
0 Likes
2,810

Hi Bala,

1. Process code is not a must when processing IDOCs, especially for outbound IDOCs. Usually we use Process Code when we are sending/receiving SAP standard orders or documents(such as PO, SO, Invoice, FI Document...) .

For outbound custom IDOC, you may just develop a custom program to fill the data you need into table EDIDD and distribute it using the FM: MASTER_IDOC_DISTRIBUTE.(Of course you also have to do some configuration for ALE or EDI before execute the program... )

But for inbound IDOC, using process code is a better choice.

2.You need to release the IDOC type in WE30 for further steps. And of course you can cancel release it in WE30. Menu->Edit->Cancel Release

Good luck

Richard

Read only

0 Likes
2,810

Hi Richard,

You mentioned

For outbound custom IDOC, you may just develop a custom program to fill the data you need into table EDIDD and distribute it using the FM: MASTER_IDOC_DISTRIBUTE.(Of course you also have to do some configuration for ALE or EDI before execute the program... )

I cannot use tcode PFAL to send data to target system for the custom message type?do i need to write a custom program for filling the data in custom message type?

Thanks

Bala Duvvuri

Read only

0 Likes
2,810

Hi Bala,

I don't think you can use PFAL to send the data related to custom message type. You can use function module 'MASTER_IDOC_DISTRIBUTE" to send the idoc.

If you are not using output types, you dont need outbound process codes.

But you may need inbound process codes in the receiving system for further processing.

Regards

Vinod

Edited by: Vinod Kumar on May 13, 2010 10:53 AM

Read only

Former Member
0 Likes
2,810

Hi Bala,

> 1.Is it necessary to create process codes using we41 , we42 , we57 while creating a custom idoc and what is the need of them.

>

Yes, it's necessary to create process codes when we use message control to trigger the outputs. If you are creating the idocs using some ABAP program it's not necessary.

WE41: outbound process code creation. we can find the link between process code and logical message type here.

WE42: inbound process code creation.

we57: we link up the inbound function module + message type + idoc type. This link is usefull to validate whether right FM is called to process the message type & idoc type. This validation should be done in all inbound FMs. If this validation fails, wewill get error 'wrong function module was called'.

> 2.Once idoc is created using we30 do we need to release it.If it is released can we extend it later by adding more segments?

>

Yes we need to release the idoc type & every segment in the idoc defination. If you want to extend the released idoc type, first u should calcel the release and extend then again release the idoc type.

--

Reddy

Read only

0 Likes
2,810

Reddy,

I am planning to use tcode PFAL and program RBDMIDOC to generate idoc so i dont need to use process codes right?

Thanks

Bala Duvvuri

Read only

0 Likes
2,810

Yes right. PFAL is already designed for standard IDOc type. If you r going to use custome idoc type, you may need to create ur own report to create idocs for PI.

If you are just extending the standard idoc type, we should have some exits in PFAL to fill extended segments.

you can still use PFAL for custom message type by entering the custom message type on selection screen of PFAL. This is usefull when we go for reduced message type. If we dont want to distribute some segments or fields, we can reduce them in idoc and assign it to some custom message type.

--

Reddy

Edited by: V.V.Reddy on May 13, 2010 7:28 AM

Read only

0 Likes
2,810

Reddy,

This is little confusing.

you mentioned

If you r going to use custome idoc type, you may need to create ur own report to create idocs for PI.

you can still use PFAL for custom message type by entering the custom message type on selection screen of PFAL.

which one is correct?

Are you aware of the user exits to fill the extended segments

Thanks

Bala Duvvuri

Read only

0 Likes
2,810

Hi Bala,

If you create a custom idoc type, a new abap program is needed to create IDOcs for PI.

As we know message type is defferent from IDOc type. We can have multiple message types assigned to single idoc type.

There is concept called 'Reduced Message type' . we use this concept, if we dont want to send all the segments to target system, we can hide those segments in idoc type, so that final idoc type will have few segments which are needed for target system. in this case we create custome message type for reduced idoc. It may not relevant for your case. In this case we still use the standard idoc type and custom message type. still we can distribute these type of idocs through PFAL.

--

Reddy

Read only

0 Likes
2,810

Reddy,

Is HRMD_A is a message type or idoc type?can you give me examples for both the types

what i understood is HRMD_A is a message type and HRMD_A07 is a basic type and we can have any number of basic types to message type.

Message type is the one which we give in tcode PFAL

Please correct me if i am wrong

Thanks

Bala Duvvuri

Read only

0 Likes
2,810

Hi Bala,

HRMD_A is message type and HRMD_A0* (1 to 7) are the basic idoc types. You are correct in PFAL you pass Message type.

Regards

Vinod

Read only

0 Likes
2,810

Yes. you are right.

In we82 we link the message type and idoc type. on PFAL we can give only message type, because the program is designed for standard idoc type ie, HRMD_A0. Indeed message type is not needed on the selection screen of PFAL. They have provided it in case if we use reduced message type, as I explained in my previous answer. So that we can enter the custome message type here.BUT custome messahe type(ZHRMD_A) should be linked with standard idoc type(HRMD_A0) in WE82.

--

Reddy

Read only

0 Likes
2,810

Reddy,

This is what i observed

1.In PFAL message type is mandatory and only accepted values are HRMD_A ,HRMD_ABA and HRMD_B so i cannot use PFAL for custom message types.

2.This is what i did I created another basic type ZHRMD_A07 copied from HRMD_A07 and added to HRMD_A message type in we82.In partner profiles I gave message type as HRMD_A and basic type as ZHRMD_A07 .By doing this i can execute the PFAL by giving the message type HRMD_A.

what is the diff between creating a custom message type ZHRMD_A and assigning to standard idoc type HRMD_A07 AND assigining standard message type HRMD_A to custom idoc type ZHRMD_A07.

If i go for custom idoc type i can still use the tcode PFAL and find some userexits to populate some of the custom fields in idoc type .Is my understanding right?

Thanks

Bala Duvvuri

Read only

0 Likes
2,810

> 1.In PFAL message type is mandatory and only accepted values are HRMD_A ,HRMD_ABA and HRMD_B so i cannot use PFAL for custom message types.

I have used custom message type in material master distribution (BD10), So I am sure, we can give custom message type (normal we use custom messagtype in case we reduced the message type - BD53). did you include ur custom message type in customer distribution model? then tried in PFAL?

> 2.This is what i did I created another basic type ZHRMD_A07 copied from HRMD_A07 and added to HRMD_A message type in we82.In partner profiles I gave message type as HRMD_A and basic type as ZHRMD_A07 .By doing this i can execute the PFAL by giving the message type HRMD_A.

Did you check the idocs once u run the PFAL? there will be standard idoc type in control record. PFAL will only recognize the structure of HRMD_A07.

> what is the diff between creating a custom message type ZHRMD_A and assigning to standard idoc type HRMD_A07 AND assigining standard message type HRMD_A to custom idoc type ZHRMD_A07.

>

Normally in master data distribution, if we dont want to send all the segments of standard idoc to target system, we use reduced message type. in that case we use custom message type (which is created in BD53). in this case we assign standard idoc type to custom message type.In this case standard program still use the standard idoc type and it will consider the reduce message type and it will not populate those fields which are reduced.

second case will definately not work for master data destribution.

> If i go for custom idoc type i can still use the tcode PFAL and find some userexits to populate some of the custom fields in idoc type .Is my understanding right?

custom idoctype will not work for master data distribution thru standard trasactions like PFAL, BD10,BD12..etc. If we extend the standard idoc type, then there will be a need for user exit to fill those fields.

--

Reddy

Read only

Former Member
0 Likes
2,810

Have a look at

http://www saptechnical com/Tutorials/ALE/DataDistributeCustomIDOC/page1.htm