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

Mandatory Segment is Missing

Former Member
0 Likes
3,437

Hi Guru,

I need your help.

I made a customized segment ZDELXY2 and connected it to DELVERY01 by cretaing an enhancement Idoc ZDELVRY2 and I've tested in WE19 and it process sucessfully. Then I made my code in exit EXIT_SAPLV55K_002 under enhancment V56K0001 to assign a value to my customized segment. When I check my Idoc in we02, it gave me an error 'EDI: Syntax error in IDoc (mandatory segment missing)'. I tried to put breakpoint on my code but it doesn't show everytime iIpass an Idoc. I activated my enhancement and code in CMOD. CAn you help me with my issue. It seems that I'm using a incorrect exit.

Your help will be highly appreciated.

Thanks,

Mon Magallanes

1 ACCEPTED SOLUTION
Read only

dirk_freyaldenhoven
Active Participant
0 Likes
3,224

Hello Mon,

if you create a shipping order (delivery advice), you can use exit EXIT_SAPLV56K_002 to fill your own segments.

Best Regards, Dirk

16 REPLIES 16
Read only

dirk_freyaldenhoven
Active Participant
0 Likes
3,225

Hello Mon,

if you create a shipping order (delivery advice), you can use exit EXIT_SAPLV56K_002 to fill your own segments.

Best Regards, Dirk

Read only

0 Likes
3,224

Yes Dirk,

I'm using that exit. I can see the Idocs generated in WE02 which has an error. I used this exit so that I can put the new segment. I'm trying to point a breakpoint on thi sexit to help me with the debuging but it is not triggering. Hope you can help me.

Thanks.

Regards,

Mon Magallanes

Read only

0 Likes
3,224

EXIT_SAPLV56K_002 (56)

Read only

0 Likes
3,224

Yes Dirk,

I'm using EXIT_SAPLV56K_002 as my exit... sorry if i mistype my initial post. I'm using EXIT_SAPLV56K_002 to put my code.

Thanks!

Regards,

Mon Magallanes

Read only

0 Likes
3,224

And you want to create a IDoc with data based on existing delivery (for shipping order, delivery advice)?

Read only

0 Likes
3,224

Yes Dirk!

I made a custom segment and connected it in DELVRY01. I named my custom Idoc as ZDELVRY02. I tested in se19 and my custom segment was tranfered properly. But when I create an IDoc on VL02n, it returns a status of 26 at WE02.

Thanks!

Regards,

Mon Magallanes

Read only

0 Likes
3,224

Create a "break-point" in the user exit (Enter line "break-point.").

Create new message in VL02N and activate debugger "/h" than activate "Settings", "Debugger settings", "Update debugging"

and press "F8". Now the system should start debbuger for "Update debugging", if you now press "F7" the system should stop

at line "break-point".

Read only

0 Likes
3,224

The program is not stopping on the breakpoint i set. Am i using the wrong exit?

Thanks!

Regards,

Mon Magallanes

Read only

0 Likes
3,224

Just do an quick check (Just double click on IDOC segment and see) whether ZDELVRY02 is marked as an mandatory segment? Also make sure you are populating data in all mandatory IDOC segments.

Cheers

Read only

0 Likes
3,224

Hi Amit,

Yes my customized segment is marked as required because i want it to be required. also i tested my customized idoc on WE19 and it processed a succesful output at we02.

Thanks!

Regards,

Mon Magallanes

Read only

0 Likes
3,224

Hi Mon,

Sometimes I do not believe in WE19 test as it appears me with different results with the same cases. Probably from your user-exit data is not sitting appropriately into your custom segments. Just do a Debug with the way the other folk suggested you. Try to populate the data into mandatory segments. Thatu2019s where the problem lies.

Cheers

Read only

0 Likes
3,224

yes amit,

I'm debugging but it does not stopping on the breakpoint i created. Am i using the wrong exit? I already activated my exit on CMOD.

Thank!

Regards,

Mon Magallanes

Read only

0 Likes
3,224

>

> I'm debugging but it does not stopping on the breakpoint i created. Am i using the wrong exit? I already activated my exit on CMOD.

Hi Mon,

I believe it's good time to read

Cheers

Read only

0 Likes
3,224

Hi Mon Magallanes

In we19 you are able to generate idoc because you giving the value to the extended segment.

You are getting error because you not passing the value to the custom segment.

(Which is marked as Mandatory segment)

(when you use other than we19)

One more thing if your Process code DELV Then your user exit should be

EXIT_SAPLV56K_002 under enhancment V56K0001 (outbound)

EXIT_SAPLV55K_002 under enhancment V55K0002 (inbound)

Problem is with Not passing of data in to Custom Segment

If you are not passing data then you will get Error Message "'EDI: Syntax error in IDoc (mandatory segment missing)'."

Thanks

Ramesh...

Test this way. ..... then you will get idea....

Assing Dummy value to the custom segment then generate the idoc ..

Edited by: Ramesh on Feb 26, 2010 2:06 AM

Edited by: Ramesh on Feb 26, 2010 2:27 AM

Read only

0 Likes
3,224

Hi Ramesh,

I already assigning a dummy value on my custom segment. I used the user exit EXIT_SAPLV56K_002 under enhancement V56K000. Here is my cod efor your reference.

DATA: wa_edidd type edidd,

ls_data type edi_sdata,

wa_zdelxy2 type zdelxy2,

wa_e1edl20 type e1edl20.

read table idoc_data into wa_edidd with key segnam = 'ZDELXY2'.

check sy-subrc ne 0.

read table idoc_data into wa_edidd with key segnam = 'ZE1EDL22'.

check sy-subrc eq 0.

read table idoc_data into wa_edidd with key segnam = 'ZE1EDL20'.

wa_zdelxy2-status = 'A'.

idoc_data-segnam = 'ZDELXY2'.

MOVE wa_zdelxy2 to idoc_data-sdata.

append idoc_data.

clear idoc_data.

Thanks a lot!

Regards,

Mon Magallanes

Read only

0 Likes
3,224

I solved my issue. wrong in my code.

Thanks for all the help.

I appreciate it.

Thanks a lot!

Regards,

Mon Magallanes