Application Development 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: 

How to extend the basic IDOC type COD_REPLICATE_SALES_ORDER01

0 Kudos

Dear All,

I have a requirement where I have to extend basic IDOC type COD_REPLICATE_SALES_ORDER01.

This IDOC is generated and hence does not allow doing that. Also request you to tell how can we pass multiple data to extended IDOC.

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

To extend any basic IDoc type (of course it should be generated anyway), create an Extension Type in transaction WE30.

bertrand_delvallee
Active Participant
0 Kudos

Hello,

Basically :

- WE31 : create a new segment (ZCOD_REP_SO01_S1 for example) with only new fields you want to add. Edit > Set release.

- WE30 : create a new extension (ZCOD_REP_SALES_ORDER01_E1 for example) with basic type COD_REPLICATE_SALES_ORDER01. Add segment ZCOD_REP_SO01_S1 in it. Release.

Then 2 possible ways to perform (as fas as I know as I only dealt with HR Idocs):

Not recommended : change standard scenario

-WE82 : change message type COD_REPLICATE_SALES_ORDER01 entry to add extension ZCOD_REP_SALES_ORDER01_E1

- Change your program/scenario to fill new fields in COD_REPLICATE_SALES_ORDER01 idoc. Have a look at BD60 entry to know FM used (and debug the very end of it until you find a enhancement spot where to fill your new fields).

Best practice : replace by a new scenario.

- First have a look at transactions SPRO and SALE. May be there is a detailed article about what you want to do.

- WE81 : create a new message type ZCOD_REPLICATE_SALES_ORDER01

-WE82 : copy message type COD_REPLICATE_SALES_ORDER01 entry to ZCOD_REPLICATE_SALES_ORDER01. Add extension ZCOD_REP_SALES_ORDER01_E1.

-BD60/WE57/WE42 : copy message type COD_REPLICATE_SALES_ORDER01 entry to ZCOD_REPLICATE_SALES_ORDER01 and modify to fit your new scenario (copy actual FM used for COD_REPLICATE_SALES_ORDER01 into Z* and modify them to fill your new fields)

That's barely all I can say. 🙂

Best regards

Bertrand

Hello, Bertrand.

We can't extend IDoc types that are part of generated interfaces using transaction BDBG or BDFG. In this case, there is the SAP note 1579037 that give us the right solution.

Regards,

Eduardo Pagoto