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

Using an idoc segment

Former Member
0 Likes
1,304

Hello,

I have an extension of ORDERS02 called ZORDERS1. In ZORDERS1 I am trying to fill in the segments E1EDPA1.

I have a case statement in my user exit that creates the idoc and it looks like this:

case int_edidd-segnam.

when 'E1EDPA1'.
* code to fill the segment

but for some reason int_edidd-segnam never equals E1EDPA1. When I look at ZORDERS1 in WE30 I can see that E1EDPA1 exists within the idoc. So what do I need to do to get SAP to recognize that I need to fill that segment?

Thanks,

Matt

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,190

Part of the process RSNAST00 does is it builds an internal table with each segment (int_edidd-segnam). Everytime a segment is proposed it checks my user exit to see if I have some code that will fill in the segment fields. My problem is that SAP is not proposing E1EDPA1 and therefore it is not appearing in the int_edidd table. I'm trying to figure out what I need to do so the internal table will include the segment I need to fill (E1EDPA1).

Thanks,

Matt

8 REPLIES 8
Read only

former_member187255
Active Contributor
0 Likes
1,190

Matt, Did u check in the Idoc Reduction?

Read only

Former Member
0 Likes
1,190

The segment exists and I am not trying to reduce it. I'm try to have RSNAST00 and my user exit fill it in.

I am new to this. This is my first time attempting to add data to a segment.

So the question is:

How do I tell RSNAST00 that it needs to include E1EDPA1 within E1EDP01 so I can use my "Case" statement to fill the segment?

Thanks,

Matt

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,190

Hello Matt

There are two possible explanations:

(1) Segment E1EDPA1 is not yet filled in your user-exit.

(2) You need to LOOP over the segment itab until you reach segment E1EDPA1:


  DATA: ls_edidd    TYPE edidd.

  LOOP AT int_edidd INTO ls_edidd
            WHERE ( segnam = 'E1EDPA1' ).
   ... " your coding here
  ENDLOOP.

Regards

Uwe

Read only

Former Member
0 Likes
1,191

Part of the process RSNAST00 does is it builds an internal table with each segment (int_edidd-segnam). Everytime a segment is proposed it checks my user exit to see if I have some code that will fill in the segment fields. My problem is that SAP is not proposing E1EDPA1 and therefore it is not appearing in the int_edidd table. I'm trying to figure out what I need to do so the internal table will include the segment I need to fill (E1EDPA1).

Thanks,

Matt

Read only

0 Likes
1,190

My guess is that you are using a wrong user exit, thus not hitting the condition.

Read only

Former Member
0 Likes
1,190

My first mistake was trying to use the wrong idoc segment E1EDPA1 instead of our custom segment Z1EDPA1 that was already in place. Secondly, I needed to find the correct user exit for my code.

Thanks,

Matt

Read only

Former Member
0 Likes
1,190

Is the ORDERS IDoc an inbound or outbound?? Because they use different user exits to fill in the extended segments.

Read only

Former Member
0 Likes
1,190

This message was moderated.