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 IDOC report

Former Member
0 Likes
2,003

Hi,

We want to make a report in which we have to send material master data to non sap system through IDOC. Our Message type will be MATMAS and Basic type would be MATMAS05.

All ALE settings will be taken care.But in our scenerio we need to pass some particular segments so we will use BD56 for the same.

Could you pls let me know how to perform the same as I am new in IDOCs.We have standard program BD10. Please let me know how to start in report for generating outbound IDOC.

Thnx in advanced,

Raghav

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,198

hi

Hi,

We want to make a report in which we have to send material master data to non sap system through IDOC. Our Message type will be MATMAS and Basic type would be MATMAS05.

All ALE settings will be taken care.But in our scenerio we need to pass some particular segments so we will use BD56 for the same.

Could you pls let me know how to perform the same as I am new in IDOCs.We have standard program BD10. Please let me know how to start in report for generating outbound IDOC.

Thnx in advanced,

Raghav

5 REPLIES 5
Read only

Former Member
0 Likes
1,198

hi

try this reference coding

report ycoe_idoc30.

tables : mara.

types : begin of t_mara,

matnr type mara-matnr,

mtart type mara-mtart,

end of t_mara.

data : itab type table of t_mara.

data : wa type t_mara.

data : i_edidd type edidd occurs 0 with header line,

i_edidc type edidc occurs 0 with header line.

data : cdata type edidc.

data : i_final type ymmsd. (YMMSD is the structure with 2 fields MATNR,MTART)

selection-screen : begin of block b1 with frame title text-008.

select-options : matnr for mara-matnr.

parameters : log_sys like tbdlst-logsys.

selection-screen : end of block b1.

start-of-selection.

select matnr mtart from mara

into corresponding fields of table itab

where matnr in matnr.

cdata-mestyp = 'MATMAS'.

cdata-idoctp = 'YIDOC62'.

cdata-rcvprt = 'LS'.

cdata-rcvprn = log_sys.

loop at itab into wa.

i_final-matnr = wa-matnr.

i_final-mtart = wa-mtart.

i_edidd-segnam = 'YSEG62'.

i_edidd-sdata = i_final.

append i_edidd.

endloop.

call function 'MASTER_IDOC_DISTRIBUTE'

exporting

master_idoc_control = cdata

tables

communication_idoc_control = i_edidc

master_idoc_data = i_edidd.

if sy-subrc = 0.

loop at i_edidc.

write:/ 'IDOC GENERATED ',i_edidc-docnum.

endloop.

In the selection screen enter the Inputs as

1)Material No

2)LOG_SYS --> Logical system name of the Receiver System.

after executing this program u get IDOC no generated which u can then

check in tcode : WE02/WE05.

Regards

Read only

Former Member
0 Likes
1,199

hi

Read only

Former Member
0 Likes
1,198

I think what you need to know id how to run BD10.

Press i button next to Execute button and you will find the required information.

Material - Which material you need to send

Class - What material calls to be sentmessage Type will be MATMAS

Logical System - Logical system name of the receiver system, this would be same as to what appears in distribution model.

Once Done, Execure RSEOUT00 with Logical Message as MATMAS.

Read only

manubhutani
Active Contributor
0 Likes
1,198

Hii

If you need to change the standard way of BD10, use user exit,

otherwise just create a logical system from t-code SALE

ur data can be sent to only a logical system (ie SAP box)

create a partner profile from t-code we20

maintain port from we21

and in BD65 tcode, maintain sender system , rec system and message type..

and run BD10

idocs will be sent to the rec system

Read only

Former Member
0 Likes
1,198

thnx