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

Idoc has more than 0 Syntax Error

Former Member
0 Likes
1,952

Hi,

In Idoc I am getting Status 26 Idoc has more than 0 syntax. I have searched and implied the solutions. But still couldn't clear the Error.

Any help Experts.

Thanks,

Arun

Hi,

In Idoc I am getting Status 26 Idoc has more than 0 syntax. I have searched and implied the solutions. But still couldn't clear the Error.

Any help Experts.

Thanks,

Arun

15 REPLIES 15
Read only

PeterJonker
Active Contributor
0 Likes
1,919

Status 26 means error during syntax check (outbound IDoc).

Which IDoc are you using ? Standard SAP then look in the user exits, custom IDOc then change the program to create the IDoc.

Read only

0 Likes
1,919

Hi,

In User exit EXIT_SAPMM06E_012. I am using idoc "MASTER_IDOC_DISTRIBUTE". I found out about the program RBDSYNEO. If I run this program. it look likes it overrides the error and forces it to send the idoc. But the Error is clearly visible in t-code we02 under status records. though I get the output. I am searching for alternate solution.

Thanks,

Arun

Read only

0 Likes
1,919

Hi,

can you check in debug mode what messages are getting after MASTER_IDOC_DISTRIBUTE FM.

Regards,

Swarna

Read only

0 Likes
1,919

Before you call MASTER_IDOC_DISTRIBUTE you are constructing the IDoc I presume? That's where something goes wrong. Check the code and compare this with the structure of the IDoc.

Also use where used on MASTER_IDOC_DISTRIBUTE to see how this FM should be called.

Read only

0 Likes
1,919

Hi,

I checked in debug and I saw only status 26 (idoc has more than 0 syntax error).

Thanks,

Arun

Read only

0 Likes
1,919

Hi,

Yes I am constructing the idoc. and I checked I couldn't find anything out of it. I actually simplified  it. so I didn't find anything fishy.

Thanks,

Arun

Read only

0 Likes
1,919

Hi,

Can you share your code?

Regards,

Swarna

Read only

0 Likes
1,919

Hi,

data : begin of inttab,

        EBELN TYPE EKKO-EBELN,

        AEDAT TYPE EKKO-AEDAT,

        BSART TYPE EKKO-BSART,

        EKORG TYPE EKKO-EKORG,

        EKGRP TYPE EKKO-EKORG,

        EBELP TYPE EKPO-EBELP,

        TXZ01 TYPE EKPO-TXZ01,

        MATNR TYPE EKPO-MATNR, "MATERIAL NO

        NETPR TYPE string, "NETPRICE

        WERKS type ekpo-WERKS,

        MENGE TYPE EKPO-MENGE,

       end of inttab.



data : gen_segment like edidd-segnam value 'ZIDOC'.

DATA : BEGIN OF INTTAB1,

        CARRID(1000) TYPE C,

       END OF INTTAB1.

data : control_dat like edidc,

          gen_data like inttab1.

data : int_edidd like edidd occurs 0 with header line,

          int_edidc like edidc occurs 0 with header line,

          lit_tab   like inttab occurs 0 with header line.

control_dat-mestyp = 'ZIDOC'.

control_dat-Idoctp = 'ZIDOC'.

control_dat-rcvpor = 'ZDATA'.

control_dat-rcvprt = 'LS'.

control_dat-rcvprn = '800'.



loop at tekpo.

lit_tab-ebeln = i_ekko-ebeln.

lit_tab-aedat = i_ekko-aedat.

lit_tab-bsart = i_ekko-bsart.

lit_tab-ekorg = i_ekko-ekorg.

lit_tab-ekgrp = i_ekko-ekgrp.

lit_tab-ebelp = tekpo-ebelp.

lit_tab-txz01 = tekpo-txz01.

lit_tab-matnr = tekpo-matnr.

lit_tab-netpr = tekpo-netpr.

append lit_tab.

endloop.

loop at lit_tab.

  concatenate LIT_TAB-EBELN LIT_TAB-AEDAT LIT_TAB-BSART LIT_TAB-EKORG

LIT_TAB-EKGRP LIT_TAB-EBELP LIT_TAB-TXZ01 LIT_TAB-MATNR LIT_TAB-NETPR

into gen_data-carrid separated by ','.

*  gen_data-carrid = lit_tab-carrid.

*  gen_data-connid = lit_tab-connid.

*  GEN_DATA-SSN = INTTAB-SSN.

*  GEN_DATA-DOB = INTTAB-DOB.

  int_edidd-segnam = gen_segment.

  int_edidd-sdata  = gen_data.

  int_edidd-psgnum = '0'.

  int_edidd-hlevel = '0'.

  append int_edidd.

endloop.

call function 'MASTER_IDOC_DISTRIBUTE'

  exporting

    master_idoc_control                  = control_dat

*   OBJ_TYPE                             = ''

*   CHNUM                                = ''

  tables

    communication_idoc_control           = int_edidc

    master_idoc_data                     = int_edidd

  exceptions

   error_in_idoc_control                = 1

   error_writing_idoc_status            = 2

   error_in_idoc_data                   = 3

   sending_logical_system_unknown       = 4

   others                               = 5


          .

Read only

0 Likes
1,919

Your IDoc definiton ZIDOC holds only 1 segment ZIDOC with one field CARRID ? Is the field carrid in the IDoc also 1000 long ?

And also you might have to give a commit after master_idoc_create. I don't know if a commit is  coming after the user exit.

Otherwise you need to place this code in a fucntion module and call it in a new task.

Read only

0 Likes
1,919

Hi,

I dont think this is correct.

  concatenate LIT_TAB-EBELN LIT_TAB-AEDAT LIT_TAB-BSART LIT_TAB-EKORG

LIT_TAB-EKGRP LIT_TAB-EBELP LIT_TAB-TXZ01 LIT_TAB-MATNR LIT_TAB-NETPR

into gen_data-carrid separated by ','.

You need to pass each field seperately.

  gen_data-carrid = lit_tab-carrid.

  gen_data-connid = lit_tab-connid.

  GEN_DATA-SSN = INTTAB-SSN.

  GEN_DATA-DOB = INTTAB-DOB.

Regards,

Swarna

Read only

0 Likes
1,919

Yes the carrid in the idoc has 1000 long. Please provide some details about commit.

Thanks,

Arun

Read only

0 Likes
1,919

Hi,

Even without the concatenate the error came.

Thanks,

Arun.

Read only

0 Likes
1,919

What do you mean without the concatenate ? Do you actually know what you are doing ?

You need to fill all IDoc fields that are mandatory and you cannot place values that are not allowed according to the datatype as defined in the IDoc.

Check this first.

Read only

0 Likes
1,919

Hi,

I did a sample code in that I passed only gen_data-carrid = 'LH'.  I got the same error.

can you tell me what are mandatory fields in it.

Read only

0 Likes
1,919

Hi,

Are you passing data to all fields. Also check whether the segment and IDoc are released?

Regards,

Swarna