2007 Jun 12 1:32 PM
Hi!
do I need to maintain Idoc in WE30 if I need to add some lines to one segment in User Exit ZXEDFU02?
Here is my sample code placed in ZXEDFU02 for adding a line, but it is not making an effect:
WHEN 'E1EDP01'.
CLEAR E1EDP26.
E1EDP26-QUALF = '003'.
E1EDP26-BETRG = 777.
or maybe it depends on Idoc that I use in We19?
For example, if Idoc that I use in WE19 for testing my User Exit does not has qualifier 003 in segment E1EDP26... could it be a reason?
Will reward,
Mindaugas.
2007 Jun 12 1:38 PM
Hi
The IDOC which you are using should have a segment
called E1EDP26
and this segment should have the fields QUALF and BETRG
other wise there is no use by writing the user exit
So keep a break point and see whether it is stopping there or not.
Why you arewriting the code under line WHEN 'E1EDP01'
write the code like
WHEN 'E1EDP26'.
clear e1edp26.
E1EDP26-QUALF = '003'.
E1EDP26-BETRG = 777.
Reward points for useful Answers
Regards
Anji
2007 Jun 12 1:36 PM
Hi,
Saple Code:
----
INCLUDE ZXEDFU02 *
----
data: ls_ka1 like e1edka1,
ls_edidd like edidd,
l_lines type i.
describe table int_edidd lines l_lines.
check l_lines ne 0.
read table int_edidd into ls_edidd index l_lines.
check ls_edidd-segnam eq 'E1EDKA1' and
ls_edidd-sdata(2) eq 'RS'.
ls_ka1-parvw = 'ZC'.
case xvbdkr-bukrs.
when '1000'.
ls_ka1-lifnr = '41010005823845840'.
when others.
exit.
endcase.
ls_edidd-sdata = ls_ka1.
append ls_edidd to int_edidd.
Regards
2007 Jun 12 1:38 PM
Hi
The IDOC which you are using should have a segment
called E1EDP26
and this segment should have the fields QUALF and BETRG
other wise there is no use by writing the user exit
So keep a break point and see whether it is stopping there or not.
Why you arewriting the code under line WHEN 'E1EDP01'
write the code like
WHEN 'E1EDP26'.
clear e1edp26.
E1EDP26-QUALF = '003'.
E1EDP26-BETRG = 777.
Reward points for useful Answers
Regards
Anji
2007 Jun 12 1:49 PM
E1EDP26 is subsegment of E1EDP01, so I write
WHEN 'E1EDP01'
CLEAR E1EDP26.
E1EDP26-QUALF = '003'.
E1EDP26-BETRG = 777.
I mean Idoc looks like this:
E1EDP01
.....E1EDP26
.....E1EDP26
The thing is that E1EDP26 contains both of needed fields QUALF and BETRG, because it already contains some lines filled, I just try to add some more lines...
M.
2007 Jun 12 2:32 PM
Hi,
Try the following code, I believe it is close to what you are looking for:
DATA: edidd TYPE edidd,
e1edp26 TYPE e1edp26,
l_tabix type sy-tabix.
WHEN 'E1EDP01'
CLEAR E1EDP26, EDIDD.
Setup new IDOC segment
E1EDP26-QUALF = '003'.
E1EDP26-BETRG = 777.
EDIDD-SEGNAM = 'E1EDP26'.
EDIDD-SDATA = E1EDP26.
Insert the new segment after the E1EDP01 segment
l_tabix = sy-tabix + 1.
INSERT EDIDD into IDOC_DATA index l_tabix