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

User exit

Former Member
0 Likes
830

Hi,

I am using IDOC_OUTPUT_ORDERS and user exit exit_****_002.

I had to add one custom segment under e1edk01 which is working fine.

Apart from this, i need to populate two segments e1edkt1 and e1edkt2. But, these two segments doesn't come while doing case check. Please let me know how to do it.

Code example:

CASE INT_EDIDD-SEGNAM.

WHEN 'E1EDK01'.

SELECT SINGLE VBELN FROM EKKN INTO W_VBELN WHERE

EBELN = XEKKO-EBELN.

IF SY-SUBRC EQ 0.

X_Z1EDK8X-BELNR = W_VBELN.

MOVE 'Z1EDK8X' TO INT_EDIDD-SEGNAM.

MOVE X_Z1EDK8X TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

ENDIF.

WHEN 'E1EDKT1'.

E1EDKT1-TDID = 'Z003'.

MOVE 'E1EDKT1' TO INT_EDIDD-SEGNAM.

MOVE x_E1EDKT1 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

E1EDKT1-TDID = 'Z006'.

MOVE 'E1EDKT1' TO INT_EDIDD-SEGNAM.

MOVE E1EDKT1 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

The first case is working, but the second case is not at all going because it comes after e1edk36 which doesn't get created at all.

5 REPLIES 5
Read only

Former Member
0 Likes
722

Hi Anandha,

I think this is also related to your previous post.

Yes, customer function 002 will be called only if the segments are filled (in your case E1EDK36).

I think you should also code in EXIT_SAPLEINM_011 (Enhancement MM06E001) which is called at the very end after all the segments are added. That is the final exit call. There I guess you can check whether E1EDKT1/2 exist if not you can add them.

On another note, if E1EDK36 does not exist then can you still add E1EDKT1/2?

If your requirement is to add these texts any way then try using the above exit.

Hope this helps..

Sri

Read only

Former Member
0 Likes
722

Hi Krishnan,

In the second case

Your checking E1EDKT1-TDID values.

Use the if condition...

Thanks

Read only

Former Member
0 Likes
722

Hi srikanth,

As per ur suggestions it is right!, e1edk18 is the last segment which is filling up my idoc.

So i made a case check with e1edk18 and created e1edkt1 with all the parameters.

It is also working fine, but now the question is e1edkt2 is not working which is also checked under e1edk18.

Read only

0 Likes
722

Hi Anandha,

I think you have to check E1EDKT1 for E1EDKT2.

That means may be you have to check under E1EDKT1 for E1EDKT1.

Hope this helps..

Sri

Read only

Former Member
0 Likes
722

Hi Anandha,

Is it your question has been answered? If not, I have a suggestion.

To display the Segment E1EDKT1 and E1EDKT2 then you need write the code under the segment E1EDK18. Under this segment E1EDK18 first add the records for the segment E1EDKT1 then in the next step add the records for the segment E1EDKT2. I think this will work.

WHEN 'E1EDK18'.

INT_EDIDD-SEGNAM = 'E1EDKT1'.

X_E1EDKT1-TDID = 'Z003'.

MOVE x_E1EDKT1 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

INT_EDIDD-SEGNAM = 'E1EDKT2'.

X_E1EDKT2-TDLINE = 'ZZZZZZZ'

MOVE X_E1EDKT2 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

CLEAR X_E1EDKT2.

INT_EDIDD-SEGNAM = 'E1EDKT1'.

X_E1EDKT1-TDID = 'Z006'.

MOVE E1EDKT1 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

INT_EDIDD-SEGNAM = 'E1EDKT2'.

X_E1EDKT2-TDLINE = 'YYYYYY'

MOVE X_E1EDKT2 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

CLEAR X_E1EDKT2.

Please let we know if the problem is solved?

Regards,

Noorul