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

SEGMENT E1EDK04 is not getting populated.

Former Member
0 Likes
2,900

Hi Gurus,

We have an outbound Idoc for INVOIC (message type) and the process code attached to it is SD09.

In Function Module, IDOC_OUTPUT_INVOIC, the below form fills the table ikomvd.

PERFORM get_header_prices.

FORM get_header_prices.

IF komk-knumv NE vbdkr-knumv.

CLEAR komk.

komk-mandt = sy-mandt.

komk-kalsm = vbdkr-kalsm.

komk-fkart = vbdkr-fkart.

komk-kappl = pr_kappl.

IF vbdkr-kappl NE space.

komk-kappl = vbdkr-kappl.

ENDIF.

komk-bukrs = vbdkr-bukrs.

komk-waerk = h_waerk.

komk-hwaer = h_t001_waers.

komk-knumv = vbdkr-knumv.

komk-vbtyp = vbdkr-vbtyp.

komk-knuma = vbdkr-knuma.

komk-land1 = vbdkr-lland.

komk-vkorg = vbdkr-vkorg.

komk-vtweg = vbdkr-vtweg.

komk-spart = vbdkr-spart.

komk-prsdt = vbdkr-erdat.

komk-kurst = vbdkr-kurst.

komk-kurrf = vbdkr-kurrf.

komk-kurrf_dat = vbdkr-kurrf_dat.

ENDIF.

CALL FUNCTION 'RV_PRICE_PRINT_HEAD' " Kopfkonditionen lesen

EXPORTING comm_head_i = komk

language = object-spras

IMPORTING comm_head_e = komk

TABLES tkomv = ikomv

tkomvd = ikomvd.

ENDFORM. "get_header_prices

Basically the value for komk-kappl should be passed as blank, but here in the below code, they are initially passing pr_kappl which holds an value 'V'. pr_kappl is defined with an default value as 'V'.

Actually when the FM CALL FUNCTION 'RV_PRICE_PRINT_HEAD' is executed, it gets all the header taxes from KONV table and if we pass the kappl as 'V', it will not get all the records, but only fetch 1 record.

So the below loop fails and E1EDK04 is not getting populated, but we need that info.

LOOP AT ikomvd.

*---Steuern Kopf

IF ikomvd-koaid EQ 'D'.

IF ikomvd-kstat EQ ' ' AND

ikomvd-kinak EQ ' '.

  • IKOMVD-KWERT NE '0'.

PERFORM fill_e1edk04.

ENDIF.

ENDIF.

ENDLOOP.

I would really appreciate for all the possible answers and solution for the above.

For the right answer, full points will be awarded.

Thanks,

Suresh Ganti

Hi Gurus,

We have an outbound Idoc for INVOIC (message type) and the process code attached to it is SD09.

In Function Module, IDOC_OUTPUT_INVOIC, the below form fills the table ikomvd.

PERFORM get_header_prices.

FORM get_header_prices.

IF komk-knumv NE vbdkr-knumv.

CLEAR komk.

komk-mandt = sy-mandt.

komk-kalsm = vbdkr-kalsm.

komk-fkart = vbdkr-fkart.

komk-kappl = pr_kappl.

IF vbdkr-kappl NE space.

komk-kappl = vbdkr-kappl.

ENDIF.

komk-bukrs = vbdkr-bukrs.

komk-waerk = h_waerk.

komk-hwaer = h_t001_waers.

komk-knumv = vbdkr-knumv.

komk-vbtyp = vbdkr-vbtyp.

komk-knuma = vbdkr-knuma.

komk-land1 = vbdkr-lland.

komk-vkorg = vbdkr-vkorg.

komk-vtweg = vbdkr-vtweg.

komk-spart = vbdkr-spart.

komk-prsdt = vbdkr-erdat.

komk-kurst = vbdkr-kurst.

komk-kurrf = vbdkr-kurrf.

komk-kurrf_dat = vbdkr-kurrf_dat.

ENDIF.

CALL FUNCTION 'RV_PRICE_PRINT_HEAD' " Kopfkonditionen lesen

EXPORTING comm_head_i = komk

language = object-spras

IMPORTING comm_head_e = komk

TABLES tkomv = ikomv

tkomvd = ikomvd.

ENDFORM. "get_header_prices

Basically the value for komk-kappl should be passed as blank, but here in the below code, they are initially passing pr_kappl which holds an value 'V'. pr_kappl is defined with an default value as 'V'.

Actually when the FM CALL FUNCTION 'RV_PRICE_PRINT_HEAD' is executed, it gets all the header taxes from KONV table and if we pass the kappl as 'V', it will not get all the records, but only fetch 1 record.

So the below loop fails and E1EDK04 is not getting populated, but we need that info.

LOOP AT ikomvd.

*---Steuern Kopf

IF ikomvd-koaid EQ 'D'.

IF ikomvd-kstat EQ ' ' AND

ikomvd-kinak EQ ' '.

  • IKOMVD-KWERT NE '0'.

PERFORM fill_e1edk04.

ENDIF.

ENDIF.

ENDLOOP.

I would really appreciate for all the possible answers and solution for the above.

For the right answer, full points will be awarded.

Thanks,

Suresh Ganti

5 REPLIES 5
Read only

Former Member
0 Likes
1,436

Hi,

Try changing

IF ikomvd-koaid EQ 'D'.

to

IF ikomvd-koaid EQ<b> 'V'.</b>

Read only

0 Likes
1,436

Don,

The Fm is standard SAP and I don't want to change the standard code. I think there is something which needs an value and that would fix this issue, but I'm clueless what that value is or were it needs to be passed from.

Thanks,

Suresh Ganti

Read only

0 Likes
1,436

Hello Suresh,

I am not sure whether this info could help you.But suggest you to give a shot.

This is the piece of code from "form fill_header_tkomvd"

process print indicators

if not p_xkomv-drukz is initial.

  • prepare P_TKOMVD data

move-corresponding p_xkomv to p_tkomvd.

This print indicator comes from pricing procedure. If you go to v/08->RVAA01, u could see the P field. This is the print indicator which silently controls many info which goes out of SAP. Check that, it might help u...

Regards

Meenakshi

Read only

0 Likes
1,436

Hello Meenakshi,

We are using an custom pricing procedure, but for which condition type do I have to put an X in the P field.

Can you be more clear. I see there is an Customer Function '002' which is called in this FM IDOC_OUTPUT_INVOIC.

But the whole issue is with the PERFORM get_header_prices, in this FM, I do not understand why they are trying to pass pr_kappl & it's value as 'V'.

Appreciate all your help.

Thanks,

Suresh Ganti

Read only

0 Likes
1,436

Hello Suresh,

Consider the pricing procedure RVAA01. There if you see 933 step, MW15 is the output type which controls priting of taxes. Put an F4 help on the 'P' field. It says blank=not printing, X=item level,etc...

Here u can try keeping an X in your corresponding tax output type in your pricing procedure.

In get header prices, u see

case p_xkomv-drukz.

when 'A'.

  • print condition line in total block

append p_tkomvd.

memo_xkomv = p_xkomv.

when 'B'.

  • print line in total block if value <> zero

if p_xkomv-kwert ne 0.

append p_tkomvd.

memo_xkomv = p_xkomv.

endif.

when 'C'.

This actually fills ur komvd table.

Later this loop comes..

LOOP AT ikomvd.

*---Steuern Kopf

IF ikomvd-koaid EQ 'D'.

IF ikomvd-kstat EQ ' ' AND

ikomvd-kinak EQ ' '.

  • IKOMVD-KWERT NE '0'.

PERFORM fill_e1edk04.

ENDIF.

ENDIF.

ENDLOOP.

Conditions inside the loop might not supress ur output, because it just checks whether the conditions are active..

and kappl as 'V' just means it is sales application, think it has nothing to do with supression of your tax segments...

Regards

Meenakshi

    • Reward helpful answers **