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: 

IDOC_OUTPUT_DELINS - fill enhancement for DELFOR02

Former Member
0 Kudos

Hello,

this is something new for me so I hope that somebody here can give me the necessary hints to solve this issue.

I have added an enhancement to IDOC type DELFOR02. It is only a segment with three fields on position level.

My problem is, how to fill this enhancement?

I have identified via the processing code ME14 the function module IDOC_OUTPUT_DELINS where I found a perform for an user exit.

Looks like I can fill the additional segment here.

But I have no idea how the structure will look like that is filled with the idoc data as there is only this table INT_EDIDD general structure type EDIDD .

As this is a background function it is not easy to find when debugging from the moment of saving the form LPA.

So, how can I step forward to have an idea how to fill the additional segment correctly?

Any help is appreciate!

Thank you in advance!

Dirk

1 ACCEPTED SOLUTION

asik_shameem
Active Contributor
0 Kudos

Hi

You an use the exit EXIT_SAPLEINM_019 or EXIT_SAPLEINM_002.

There what you need to do is.

Check for the previous segment. For example you inserted a ZSEGMNET under E1EDP10 in WE30.

DATA: lw_edidd TYPE edidd.
      lw_zsegment TYPE zsegment.
	  
lw_edidd-segnam = 'ZSEGMENT'.
lw_zsegment-field1 = '1000'.
lw_zsegment-field2 = 'ABCD'.
MOVE lw_zsegment TO lw_edidd-sdata.

LOOP AT int_edidd.
  lv_index = sy-tabix.
  ADD 1 TO lv_index.
  IF int_edidd-SEGNAM = 'E1EDP10'.
    INSERT lw_edidd INTO int_edidd INDEX lv_index. " Insert your segment
  ENDIF.
ENDLOOP.

5 REPLIES 5

asik_shameem
Active Contributor
0 Kudos

Hi

You an use the exit EXIT_SAPLEINM_019 or EXIT_SAPLEINM_002.

There what you need to do is.

Check for the previous segment. For example you inserted a ZSEGMNET under E1EDP10 in WE30.

DATA: lw_edidd TYPE edidd.
      lw_zsegment TYPE zsegment.
	  
lw_edidd-segnam = 'ZSEGMENT'.
lw_zsegment-field1 = '1000'.
lw_zsegment-field2 = 'ABCD'.
MOVE lw_zsegment TO lw_edidd-sdata.

LOOP AT int_edidd.
  lv_index = sy-tabix.
  ADD 1 TO lv_index.
  IF int_edidd-SEGNAM = 'E1EDP10'.
    INSERT lw_edidd INTO int_edidd INDEX lv_index. " Insert your segment
  ENDIF.
ENDLOOP.

0 Kudos

Hello Asik,

sorry for answering that late. But I was away from my project till today.

Ok, that is not that difficult!

No idea, where to get such exits from but possibly this is such experience.

From your answer I see that I can add the segment really simple.

I will try and come back later!

Best regards

Dirk

0 Kudos

Hello again,

is there any method to debug and move easily into this exit during creation of the IDOC?

I start with transaction ME84 to create my delivery plan.

But this looks like this is really deep deep behind lots of code.

A break in the exit was not successful!

Any ideas are welcome!

Best regards

Dirk

0 Kudos

HI Dirk,

you have to add a project for this at tcode: CMOD.

You havre to find out which component is used for your EXIT.

after that you can activate this exit and you can debug this !

0 Kudos

Hello,

Problem solved!

Thanks, Asik.

Your code was easy to adapt.

I used transaction WE19 and debugged it to see how the

content for the Idoc data and the control record looks like.

First shot! Hit!

This really saved my evening!

Regards

Dirk