2008 Mar 31 3:30 AM
hi friends
i am adding two segments in Purchase orders ORDERS ---/ afs/orders05
i found the exit and implemented the logic, but when i triggered the idoc
i noticed that custom segment is coming after every segment
like e1edk01 ---
ze1edka1 --- (repeating)
e1edkb1 ---
ze1edka1 -
(repeating)
how to make changes in code so that it will come in right way (means it should not repeated)
thanks
Anil
hi friends
i am adding two segments in Purchase orders ORDERS ---/ afs/orders05
i found the exit and implemented the logic, but when i triggered the idoc
i noticed that custom segment is coming after every segment
like e1edk01 ---
ze1edka1 --- (repeating)
e1edkb1 ---
ze1edka1 -
(repeating)
how to make changes in code so that it will come in right way (means it should not repeated)
thanks
Anil
2008 Mar 31 4:41 AM
Hi,
Can you send me the code written in the user exits so that i can check and tell you what you can do.
Regards,
PRASANNA
2008 Mar 31 4:43 AM
Hello Anilkumar
I assume you want to add your custom segments just behind some standard segments.
Probably your logic looks like this:
DATA: ls_edidd TYPE edidd.
DATA: ld_idx TYPE i.
LOOP AT int_edidd INTO ls_edidd
WHERE ( segnam = '<name of standard segement>' ).
ld_idx = syst-tabix + 1.
" Add custom segment
ls_edidd-segnam = '<name of custom segment>'.
...
ls_edidd-sdata = ... .
INSERT ls_edidd INTO TABLE int_edidd INDEX ld_idx.
ENDLOOP.
If the default segment is repeated the custom segement will be repeated as well. Therefore, add a counter logic:
LOOP AT int_edidd TRANSPORTING NO FIELDS
WHERE ( segnam = '<name of custom segment>' ).
EXIT.
ENDLOOP.
CHECK ( syst-subrc NE 0 ).
" NOTE: if customer segment already found leave exit, ELSE...
DATA: ls_edidd TYPE edidd.
DATA: ld_idx TYPE i.
LOOP AT int_edidd INTO ls_edidd
WHERE ( segnam = '<name of standard segement>' ).
ld_idx = syst-tabix + 1.
...
Regards
Uwe
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |