Application Development 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: 

plz help on populating idoc extention invoic02

Former Member
0 Kudos
76

I have extenden the invoic02 idoc with the segmenta zfaktura as a child segmet for E1EDKA1

The name of the extention is ZINVOIC02_EXTENTION

I want the segment to apear only once based on the condition of partner function

, but it appears each time the segment E1EDKA1 which in this case appears 5 times.

When I try to populate the new fields .

Any help would do

Thanks.

This is the code I am using in the user exit ‘001’. Enhancement LVEDF001.

TABLES : KNA1 , MARA , EQUI , E1EDK01 , ZFAKTURA.

CHECK control_record_out-mestyp EQ 'INVOIC'.

CHECK int_edidd-segnam EQ 'E1EDKA1'.

LOOP AT int_edidd.

CASE int_edidd-segnam.

WHEN ' E1EDKA1'.

control_record_out-cimtyp = 'ZINVOIC02_EXTENTION'.

MOVE int_edidd-SDATA TO E1EDKA1.

If E1EDKA1- PARVW eq ‘RE’

clear int_edidd.

Select from equi.

ZFAKTURA-equnr = equi-equnr.

ZFAKTURA-eqart = equi-eqart.

Select from KNA1

ZFAKTURA-EAN11 = KNA1-EAN11

int_edidd-segnam = 'ZFAKTURA'.

int_edidd-sdata = ZFAKTURA.

append int_edidd.

CLEAR E1EDKA1

Endif.

ENDCASE.

ENDLOOP.

1 REPLY 1

Former Member
0 Kudos
27

answered