2006 Aug 10 9:40 PM
Hi,
Can anyone tell about how to change the field VALUE of IDOC type QALITY02,segment E1ADRM1,field PARTNER_ID? Currently the system is pulling the value from system address table, where as I need to pull from KNKK-KRAUS. Can the transaction code BD66 be used for this?
2006 Aug 10 10:31 PM
Something like this.
DATA: s_e1adrm1 LIKE e1adrm1.
LOOP AT int_edidd.
CASE int_edidd-segnam.
WHEN '...'.
WHEN 'E1ADRM1'.
MOVE int_edidd-sdata TO s_e1adrm1.
make changes to S_E1ADRM1-PARTNER_ID.
MODIFY int_edidd.
ENDCASE.
ENDLOOP.
Hi,
Can anyone tell about how to change the field VALUE of IDOC type QALITY02,segment E1ADRM1,field PARTNER_ID? Currently the system is pulling the value from system address table, where as I need to pull from KNKK-KRAUS. Can the transaction code BD66 be used for this?
2006 Aug 10 9:51 PM
Assuming this is with respect to outbound, I would use the user-exit at the end of IDOC_OUTPUT_QALITY02 to maintain the data in int_edidd as needed. I don't believe BD66 will work for this.
2006 Aug 10 9:57 PM
Hi Shiva,
Go to the user exit for populating the segment E1ADRM1.
add your logic for fetching the KNKK-KRAUS value and assign it to the PARTNER_ID field.
2006 Aug 10 10:00 PM
Unforunately, there are no user-exits after individual segment addition so you need to wait until the data table is built completely.
2006 Aug 10 10:22 PM
Hi Michael,
Will the enhancement EXIT_SAPLQCE1_005 helps?
Thanks for all the feedback.
2006 Aug 10 10:26 PM
That's the one to which I am referring. Many IDoc functions have a recurring user-exit provided after each segment is added to the data table, but there are cases (like this one) where you only have access to the data at the end of the data table population.
2006 Aug 10 10:27 PM
EXIT_SAPLQCE1_005 is the last user exit that is triggered in this IDoc processing function module. You should be able to change the field value. You have to loop at the internal table INT_EDIDD and have a CASE INT_EDIDD-SEGNAM inside the loop. When segnam is your segment, you can make the changes to the field you want to. Declare a structure of your segment type, move INT_EDIDD-SDATA to that structure and then you can individually refer to the fields of that segment. Once you make the change, you can go back and modify the INT_EDIDD internal table.
Srinivas
2006 Aug 10 10:28 PM
I'm not sure of your familiarity level, but here's a brief guide to the logic:
1. Read (or loop) INT_EDIDD for SEGNAM = your segment
2. Move INT_EDIDD-SDATA to a structure defined like your segment
3. Change your field value
4. Update INT_EDIDD
2006 Aug 10 10:31 PM
Something like this.
DATA: s_e1adrm1 LIKE e1adrm1.
LOOP AT int_edidd.
CASE int_edidd-segnam.
WHEN '...'.
WHEN 'E1ADRM1'.
MOVE int_edidd-sdata TO s_e1adrm1.
make changes to S_E1ADRM1-PARTNER_ID.
MODIFY int_edidd.
ENDCASE.
ENDLOOP.
2006 Aug 10 10:31 PM
Hi,
You can use Enhancement QCE10002 to change the values in the IDoc before dispatching it. This way you can change the value of this field.
Hope this helps
Vamsi
2006 Aug 11 8:47 PM