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

Sending IDOC form the ABAP Program

Former Member
0 Likes
1,205

hi friends,

can we send IDOC ( of type MATMAS) form ABAP Program. if it possible how can we send, are there any function modules to do so....could any one tell me the procedure to accomplish the task...i have finished the configuration sting in both reciver and sender systems....just need to send material in form of IDOC from abap program.

( Note: not form BD10).

Thanks in advance,

Santosh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
983

Hi

Use function module MASTER_IDOC_DISTRIBUTE for generatring and sending IDocs of any message type.

Cheers,

Aditya

3 REPLIES 3
Read only

Former Member
0 Likes
984

Hi

Use function module MASTER_IDOC_DISTRIBUTE for generatring and sending IDocs of any message type.

Cheers,

Aditya

Read only

Former Member
0 Likes
983

Hi Santosh,

We have got a transaction for replicating the materials of matmas ie; /GLB/RGTDS01_MATMAS . you can put this transaction in tstc table in transaction se16 to get the respective program for replication. By doing this we get the program as /GLB/RGTDSR_RBDSEMAT. This program you can run in se38 .

If useful please reward points .

Regards,

Adarsh Srivastava

Read only

Former Member
0 Likes
983

Function MG_IDOC_CREATE_FULL_MAT

( to send the material in full) or

MASTERIDOC_CREATE_REQ_MATMAS (based on idoc reduction)

Just pass

1 ) receiving system: fields rcvprn /

rcvprt. If you leave these 2 fields blank, then it will determine the receiving system(s) via the distribution model.

2 ) marakey = list of material numbers you want to send

3 ) message type.

example :

CALL FUNCTION 'MG_IDOC_CREATE_FULL_MAT'

EXPORTING

rcvpfc = ' '

rcvprn = receiver_prn

rcvprt = receiver_prt

sndpfc = ' '

sndprn = ' '

sndprt = ' '

message_type = mestyp

TABLES

marakey = t_matkeypack

EXCEPTIONS

OTHERS = 0.