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

Basic Idoc Type & message type

Former Member
0 Likes
16,225

Hi,

1. I am a novice in IDOC. What is the exact difference between Basic Idoc Type & message type ?

Basic Idoc Type - DELVRY03

Message type - SHPCON

2. I know NACE is used configure an output type. But can you tell in simple terms as to what is an output type (and the different output types)

3. What is the FM 'master_idoc_distribute' all about ? What can we achieve by debugging it ?

4. What does an entry in NAST signify ? Also RSNAST00 is used for what ?

cc

1 ACCEPTED SOLUTION
Read only

Former Member
3,414

1. Basic Idoc Type

Some IDoc types are supplied by SAP in the standard system, these are the basic types. Other IDoc types are customer extensions. In these cases, a basic type is combined with an extension which is created by the customer, according to certain rules. Unlike customer extensions , these extended

basic types are upward compatible

Message Type

Message Type – How to Know What the Data Means

Data exchanged by an IDoc via EDI is known as message. Messages of the same kind belong to the same message type.

The message type defines the semantic context of an IDoc. The message type tells

the receiverhow the message has to be interpreted.

2.what is an output type ?

The Output type - An output type defines the characteristics and attributes of the output.

3. What is the FM 'master_idoc_distribute' all about ? What can we achieve by debugging it ?

In case of stand alone programs and function modules based on change pointers method the function module "MASTER_IDOC_DISTRIBUTE" is used to send the IDOC to ALE layer for distribution ,in case of message control it is handled automatically by the RSNASTED program invoked by the message control.

Stand alone programs

Generally used for Master Data transfer and as such depending upon the requirement can have different interfaces.The programs have a selection screen which has select options to select the objects, and parameters for specifying the recipient Logical System and the Message Type.

Data is selected based on the specified objects from the tables . and control record of type EDIDC is created and filled with important values like DIRECTION ,IDOCTP,RCVPRT,RCVPRN and MESTYP .

Data is filled in an internal table of TYPE EDIDD according to segment definitions

and in same order and the function module MASTER_IDOC_DISTRIBUTE is called passing the control record and the internal table containg IDOC data and importing an internal table consisting of control records for each communication IDOCS created.

4. What does an entry in NAST signify ? Also RSNAST00 is used for what ?

message table NAST.

If the application thinks that data needs to be distributed to a foreign system, it

triggers the IDoc mechanism, usually by leaving a descriptive message record in the

message table NAST.

The ABAP RSNAST00 is the standard ABAP, which is used to collect unprocessed NAST message and to execute the assigned action.

RSNAST00 can be executed as a collector batch run, that eventually looks for unprocessed IDocs. The usual way of doing that is to define a batch-run job with transaction SM37. This job has to be set for periodic processing and start a program that triggers the IDoc re-sending.

Cave! RSNAST00 will only look for IDocs which are set to NAST-VSZTP = '1' or '2' (Time of processing). VSZPT = '3' or '4' is ignored by RSNAST00.

Start RSNAST00 in the foreground first and find the parameters that match your required selection criteria. Save them as a VARIANT and then define the periodic batch job using the variant.

If RSNAST00 does not meet 100% your needs you can create an own program similar to RSNAST00. The only requirement for this program are two steps:

  • Read the NAST entry to process into structure NAST

tables nast.

data: subrc like sy-subrc.....

select from NAST where .......

  • then call FORM einzelnachricht(rsnast00) to process the record

PERFORM einzelnachricht(rsnast00) USING subrc

Message processing through IDoc dispatch: the central selection program of the Message Control module, RSNAST00, locates and triggers the form routine EDI_PROCESSING in the program RSNASTED in table TNAPR for the selected output type.

Regards,

Maha

2 REPLIES 2
Read only

Former Member
3,415

1. Basic Idoc Type

Some IDoc types are supplied by SAP in the standard system, these are the basic types. Other IDoc types are customer extensions. In these cases, a basic type is combined with an extension which is created by the customer, according to certain rules. Unlike customer extensions , these extended

basic types are upward compatible

Message Type

Message Type – How to Know What the Data Means

Data exchanged by an IDoc via EDI is known as message. Messages of the same kind belong to the same message type.

The message type defines the semantic context of an IDoc. The message type tells

the receiverhow the message has to be interpreted.

2.what is an output type ?

The Output type - An output type defines the characteristics and attributes of the output.

3. What is the FM 'master_idoc_distribute' all about ? What can we achieve by debugging it ?

In case of stand alone programs and function modules based on change pointers method the function module "MASTER_IDOC_DISTRIBUTE" is used to send the IDOC to ALE layer for distribution ,in case of message control it is handled automatically by the RSNASTED program invoked by the message control.

Stand alone programs

Generally used for Master Data transfer and as such depending upon the requirement can have different interfaces.The programs have a selection screen which has select options to select the objects, and parameters for specifying the recipient Logical System and the Message Type.

Data is selected based on the specified objects from the tables . and control record of type EDIDC is created and filled with important values like DIRECTION ,IDOCTP,RCVPRT,RCVPRN and MESTYP .

Data is filled in an internal table of TYPE EDIDD according to segment definitions

and in same order and the function module MASTER_IDOC_DISTRIBUTE is called passing the control record and the internal table containg IDOC data and importing an internal table consisting of control records for each communication IDOCS created.

4. What does an entry in NAST signify ? Also RSNAST00 is used for what ?

message table NAST.

If the application thinks that data needs to be distributed to a foreign system, it

triggers the IDoc mechanism, usually by leaving a descriptive message record in the

message table NAST.

The ABAP RSNAST00 is the standard ABAP, which is used to collect unprocessed NAST message and to execute the assigned action.

RSNAST00 can be executed as a collector batch run, that eventually looks for unprocessed IDocs. The usual way of doing that is to define a batch-run job with transaction SM37. This job has to be set for periodic processing and start a program that triggers the IDoc re-sending.

Cave! RSNAST00 will only look for IDocs which are set to NAST-VSZTP = '1' or '2' (Time of processing). VSZPT = '3' or '4' is ignored by RSNAST00.

Start RSNAST00 in the foreground first and find the parameters that match your required selection criteria. Save them as a VARIANT and then define the periodic batch job using the variant.

If RSNAST00 does not meet 100% your needs you can create an own program similar to RSNAST00. The only requirement for this program are two steps:

  • Read the NAST entry to process into structure NAST

tables nast.

data: subrc like sy-subrc.....

select from NAST where .......

  • then call FORM einzelnachricht(rsnast00) to process the record

PERFORM einzelnachricht(rsnast00) USING subrc

Message processing through IDoc dispatch: the central selection program of the Message Control module, RSNAST00, locates and triggers the form routine EDI_PROCESSING in the program RSNASTED in table TNAPR for the selected output type.

Regards,

Maha

Read only

Former Member
0 Likes
3,414

1. I am a novice in IDOC. What is the exact difference between Basic Idoc Type & message type ?

Basic Type:

Basic IDoc type defines the structure and format of the business document that is to be exchanged between two systems.

Segments:

Segments form the basic building blocks of an IDoc type and are used to store the actual datta. A segment type is the name of a segment and is independent of the SAP elease. A segment definition is the release-specific name of a segment.

Steps in creating Segments:

T.Code WE31

Enter the name for your segment type and click on the create icon.

Type the Short text.

Enter the variable names and data elements.

Save and Go back.

Go to Edit -> Set Release.

Repeat the steps to create more segments.

IDOC TYPE:

Business data is exchanged with an external system using the IDoc Interface.

IDoc types (Special Structures) An IDoc type is defined through its permitted segments. Segments can be dependent on each other (parent and child segments). The IDoc interface can check for each IDoc whether thhe segments contained are compatible with thhe definitiion of its type. This systax check is activated or deactivated in the Partner Profiles.

Steps in creating IDoc Type:

T.Code WE30 to create IDoc Type.

Enter the Object Name, Select Basic Type and click Create Icon

Select the create new option and enter a description for your basic IDOC type and press enter

Select the IDoc name and click Create icon

The system prompts us to enter a segment type and its attributes

Choose the appropriate values and press enter

The system transfers the name of the segment type to the IDoc editor.

Follow these steps to add more number of segments to Parent or as Parent-child relation.

Save it and go back.

Go to Edit -> Set Release.

Message Type:

Steps in Creating Message Type:

T.Code WE81.

change the details from Display mode to Change mode

After selection, the system will give this message "The table is cross client (See help for further info)". Press enter.

Click New Entries to create new Message Type.

Fill details

Save it and go back.

Assign Message Type to IDoc Type:

T.Code WE82

Change the details from Display mode to change mode.

After selection, the system will give this message "The table is cross client (See help for further info)". Press enter.

Click New Entries to create new Message Type.

Fill details

Save it and go back.

2. I know NACE is used configure an output type. But can you tell in simple terms as to what is an output type (and the different output types)

Output type is basically used ro connect your form and program.

As one output type is associated with a printer with specific instructions,

so in short if you have to define printimg for different type to invoices like duty paid, stock transfer etc, you have to associate the output type to them.

Example :- O/p type NEU is a print output from ME21N (PO)

Regards.