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 build a control record

Former Member
0 Kudos

How to build a control record

Posted: Jul 7, 2005 5:26 PM Reply E-mail this post

can anyone tel me how to create a control record and what are the sap tables needed to retrieve the port and partner information from?

&----


*& Form BUILD_CONTROLRECORD

&----


*

  • The IDOC control record contains message type, port and

  • partnerinformation

*----


  • build the EDIDC record

IDOC_CONTROL-MESTYP = C_ZCUSCRT_MES_TYPE.

IDOC_CONTROL-IDOCTP = C_ZCUSCRT_IDOC_TYPE.

IDOC_CONTROL-RCVPRN = TARGET_SYS.

  • confirm partner type

SELECT PARTYP INTO IDOC_CONTROL-RCVPRT FROM EDPP1

WHERE PARNUM = 'ZBIZTALK'.

IF IDOC_CONTROL-RCVPRT = 'LS'.

    • subrc

EXIT.

ENDIF.

ENDSELECT.

ENDFORM. " F_BUILD_CONTROLRECORD

how do i get the port number should i also include sender details

please help urgent

2 REPLIES 2

christian_wohlfahrt
Active Contributor
0 Kudos

Hi!

You have to define a partner profile in WE20. When this is done, you should fill corresponding values in the control segment of the IDOC.

Please search forum for IDOC settings, in case you need more details.

Regards,

Christian

Former Member
0 Kudos

Hi Ashadeep,

It depends on whether you are creating an IDOC to be sent out or to be recieved into your SAP system. Let me explain both scenarios -

1. Sending out of SAP system (Outbound) - In this case relevant information is reciever partner information. System will automatically fill sender partner information. As Christian told earlier, once you create the partner profile you will know what values to fill for partner number and port number.

2. Recieving into SAP system (Inbound) - In this case relevant information is sender partner information. System will ignore reciever partner information. Again after creating partner profile (WE20) you will know what value to fill for partner number, need not fill anything for port.

In both the cases I will suggest not to hard code these values, take them from selection screen as these may change in quality and production system.

Regards,

Sanjeev