cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Usage of IDOC_INPUT_COND_A/supplementary conditions

Weiskopf
Participant
0 Kudos
2,317

Hello,

I would like to develop a report to copy the supplementary conditions (such as FRA1, etc.) from a generic article to its variants.

For this Iu2019ll use the function module IDOC_INPUT_COND_A to create the additional conditions.

Does someone have some experiences with this function module?

Is there a another way to create the supplementary conditions?

Thanks in advance for your support.

Best regards,

Kurt.

Accepted Solutions (0)

Answers (3)

Answers (3)

evillafuerte
Explorer
0 Kudos

Hi

When you use this function do a submit for Updating field NETPR. Use LIFNR and MATNR.

SUBMIT rm06inp0

       WITH if_lifnr-low EQ gw_eina-lifnr

       WITH tk_matnr-low EQ gw_eina-matnr

       AND RETURN.

Regards.

Weiskopf
Participant
0 Kudos

Hello together,

To create the supplementary condition type I use the function module IDOC_INPUT_COND_A as described above.

The conditions will be created properly, but the net-price was not changed; I guess it is necessary to trigger the pricing.

How can I trigger the pricing thru supplementary condition IDOC_INPUT_COND_A?

Thanks for your support in advance.

Regards,

Kurt

Former Member
0 Kudos

Hi Kurt,

We do have similar requirement to create supplementary conditions for PIR. I was following your guideline above.

But, somehow it was not adding supplementary condition.

In segment E1KONP, I adding base condition and next adding supplementary condition. Not able to trace where it is going wrong.

Could you please elaborate the population of E1KONP.

Thanks.

Mat98
Explorer
0 Kudos
Hello, what if the varkey is more than 50 characters in E1KOMG? it is suppose that KONH - VARKEY is up to 100 😞
Former Member
0 Kudos
Weiskopf
Participant
0 Kudos

Hello Reddy,

thank you for your very useful document.

I also need the more detailed technical information how to create supplementary conditions.

Thanks & best regards,

Kurt.

Weiskopf
Participant
0 Kudos

This is only a short approach

- Get supplementary condition types on generic material level

* Get basic condition:
  select single * from konh into ls_konh
         where knumh eq iv_knumh. " condition number of PB00
  if sy-subrc eq 0.
* Get condition items (expect purchase price PB00):
    select * from konp into table lt_konp
             where knumh eq <cond_ek>-knumh
             and   kopos ne '01'.
  endif.

- Get purchase price of variant (PB00)

Now, you will have the purchase price of variant & supplementary condition types of variant.

- Build segment E1KOMG


  es_e1komg-kvewe   = is_konh-kvewe.
  es_e1komg-kotabnr = is_konh-kotabnr.
  es_e1komg-kappl   = is_konh-kappl.
  es_e1komg-kschl   = is_konh-kschl.
  es_e1komg-vakey   = is_konh-vakey.

- Build segment E1KONH


* Condition is valid from now ad infinitum:
  es_e1konh-datab = sy-datlo.
  es_e1konh-datbi = '99991231'.

- Build segments E1KONP: first bild E1KONP for base condition type PB00, next build entries for supplementary condition types.


e1konp-kschl = {PB00, suppl. cond 1, suppl. cond 2, ...}
e1konp-kstbm = ls_konp-kstbm.
e1konp-kstbw = ls_konp-kstbw.
e1konp-krech = ls_konp-krech.
e1konp-kbetr = ls_konp-kbetr.
case ls_e1konp-krech.
      when 'A'.
          e1konp-konwa = '%'.
      when 'B' or 'C'.
          if not gv_use_konp is initial.
             e1konp-konwa = ls_konp-konwa.
          else.
             e1konp-konwa = <supplcond>-supplkonwa.
          endif.
      when others.
endcase.
e1konp-kpein = ls_konp-kpein.
e1konp-kmein = gv_kmein.
e1konp-kumza = ls_konp-kumza.
e1konp-kumne = ls_konp-kumne
e1konp-stfkz = 'A'.

- Finally fill IDOC data structure and call function IDOC_INPUT_COND_A

There are not really IDOCs, the function module will create the supplementary condition types.

Regards,

Kurt.

Former Member
0 Kudos

Hi Kurt,

I need your help, currently I am working on condition records creation/Change using FM-IDOC_INPUT_COND_A via PO create/change, GR create/Change and GR reverse.

when I am using above scenarios, my logic should check all the cases and should create the unique record with latest changes.

Basically  this funcitonality looks VK11 or VK12

Please could you share your idea how does works? If possible please send me sample code for field mapping process.