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

re: Ale outbound processing module

Former Member
0 Likes
489

Hi,

I want to distribute one data from one r/3 to another r/3. I done all the configurations. And i written outbound processing fmodule. I done the testing from the standard tcode bd10. All the connections are working ok. When ever i post the idoc through my outbound it is showing yellow status that

Idoc generated and it is ready for dispatch . But it could not show any error message and it could not post to port .

my fm code contains.:

data: begin of f_idoc_header.

include structure edidc.

data: end of f_idoc_header.

data: begin of t_idoc_data occurs 10.

include structure edidd.

data: end of t_idoc_data.

data: begin of t_idoc_comm_control occurs 10.

include structure edidc.

data: end of t_idoc_comm_control.

data: active_flag(1) type c.

data: comm_control_lines like sy-tabix.

data: idoc_cimtype like edidc-cimtyp.

data: partner_type like tpar-nrart. "P30K057526

data: country_iso like t005-intca.

  • initial

clear t_idoc_comm_control.

refresh t_idoc_comm_control.

clear t_idoc_data.

refresh t_idoc_data.

clear idoc_cimtype.

  • *fill IDOC_HEADER

f_idoc_header-mestyp = 'YTEXT'.

f_idoc_header-idoctp = 'ZIDOC_TEXT'.

  • F_IDOC_HEADER-CIMTYP = IDOC_CIMTYPE.

f_idoc_header-sndpfc = 'LS'.

f_idoc_header-sndprn = 'HPL600'.

f_idoc_header-sndprt = 'LS'.

f_idoc_header-rcvpfc = 'LS'.

f_idoc_header-rcvprn = 'REC11'.

f_idoc_header-rcvprt = 'LS'.

f_idoc_header-serial = space.

*

data: it_tline type table of tline.

data: wa_tline like line of it_tline.

data: wa_header like thead.

call function 'READ_TEXT'

exporting

  • CLIENT = SY-MANDT

id = 'ST'

language = 'E'

name = '0001'

object = 'TEXT'

importing

header = wa_header

tables

lines = it_tline

exceptions

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

others = 8.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

t_idoc_data-segnam = 'YTEXT_HEAD'.

t_idoc_data-mandt = sy-mandt.

move: wa_header to t_idoc_data-sdata.

append t_idoc_data.

clear t_idoc_data.

t_idoc_data-segnam = 'YTEXT_LINE'.

t_idoc_data-mandt = sy-mandt.

loop at it_tline into wa_tline.

move: wa_tline to t_idoc_data-sdata.

append t_idoc_data.

endloop.

clear t_idoc_data.

call function 'MASTER_IDOC_DISTRIBUTE'

exporting

master_idoc_control = f_idoc_header

tables

communication_idoc_control = t_idoc_comm_control

master_idoc_data = t_idoc_data

exceptions

error_in_idoc_control = 01

error_writing_idoc_status = 02

error_in_idoc_data = 03.

describe table t_idoc_comm_control lines comm_control_lines.

  • CREATED_COMM_IDOCS = COMM_CONTROL_LINES.

write: comm_control_lines.

what will be problem. Please help me.

rgds

p. krishnaprsad

3 REPLIES 3
Read only

Former Member
0 Likes
447

krishna,

Try to reprocess the idoc using BD87.

Since u have said that the idoc could not be posted in the port. Try to create ur port manually using we21.

Regards...

Arun.

Read only

0 Likes
447

Hi,

I could able to send data through bd87, but why it is happening. Why i could not dispatch automatically. Is any drawback in my configuration.

rgds

p. krishna prsad

Read only

0 Likes
447

Hi,

1.Change the partner profile settings in WE20 - Trigger immediately

2.Use COMMIT WORK after call function MASTER_IDOC_DISTRIBUTE

now i doc will automatically tranferred to the target system.

Regards

L Appana