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: 

Extending BATMAS03 BAPI-IDOC

Former Member
0 Kudos

I need to add a custom segment to the BATMAS IDOC for the batch short text. I created a new basic message type ZBATMAS with a new segment and am now stuck.

How do I get the BAPI to use the custom message type so I can fill in the new segment from a user exit? Can this be done with a BAPI IDOC? Is there a better way?

Any help is very much appreciated!

Thanks,

Chuck

4 REPLIES 4

Former Member
0 Kudos

Finally got it figured out. Steps I used to generate the new customer BAPI-IDOC interface:

1. Created custom structure with data elements desired

2. Copied the BAPI_BATCH_REPLICATE and BAPI_BATCH_SAVE_REPLICA function modules to custom function modules

3. Add parameter for custom segment to BAPI_BATCH_SAVE_REPLICA

4. Extend BAPI object with custom segment

5. Generate the ALE interface (this was where I got stuck originally)

6. Assign function module to generate message type (BD60)

7. Assigned additional change pointer field to message type (BD52)

0 Kudos

Hi Charles,

What transaction is used for step 4 (Extend Bapi with custom segment) ?

Thanks!

0 Kudos

Hi Charles,

If you dont mind, can you email me your custom function module code , if you have it with you or just tell me what is the difference between the 2 function modules and why do we need to copy 2 function modules instead of having one.


Please dont mind, as i am having same requirement i am asking this.

my mail id is janagarsundaramoorthy@gmail.com

Regards

S.Janagar

Janagar
Explorer
0 Kudos

as it is generated IDOC , can’t extend BATMAS . Instead create a copy of message type and IDOC . Populate IDOC on event save .