2013 May 08 8:01 AM
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
2013 May 08 10:05 AM
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.
2013 May 08 10:28 AM
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
2013 May 08 10:38 AM
Hi,
can you check in debug mode what messages are getting after MASTER_IDOC_DISTRIBUTE FM.
Regards,
Swarna
2013 May 08 10:41 AM
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.
2013 May 08 10:41 AM
Hi,
I checked in debug and I saw only status 26 (idoc has more than 0 syntax error).
Thanks,
Arun
2013 May 08 10:47 AM
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
2013 May 08 12:31 PM
2013 May 08 12:46 PM
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
.
2013 May 08 1:01 PM
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.
2013 May 08 1:11 PM
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
2013 May 08 1:25 PM
Yes the carrid in the idoc has 1000 long. Please provide some details about commit.
Thanks,
Arun
2013 May 08 1:26 PM
Hi,
Even without the concatenate the error came.
Thanks,
Arun.
2013 May 08 2:29 PM
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.
2013 May 08 3:06 PM
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.
2013 May 09 7:48 AM
Hi,
Are you passing data to all fields. Also check whether the segment and IDoc are released?
Regards,
Swarna