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: 

Change Validity using IDOC_INPUT_COND_A

Former Member
0 Kudos

Hi all,

I am using the FM IDOC_INPUT_COND_A to change the validity of a record.

For ex: if I have a record as below.

MANDT KAPPL KSCHL HIENR PRODH1 KFRST DATBI DATAB KBSTAT KNUMH

140 V ZRET 0000000099 02 12/31/9999 04/20/2010 0000451885

and I want to change the validity of the record to 12/31/2010 then is it possible with this IDOC approach? Currently when I am trying to do its creating another record from 01/01/2011 to 12/31/9999 which I do not want.

Appreciate your help,

thanks,.

4 REPLIES 4

Former Member
0 Kudos

Hi,

The standard COND_A Inbound FM, i.e. "IDOC_INPUT_COND_A" will create a new record if you try to change the validity end date to certain date which is intermediate between the current validity from and to dates.

In your case 12/31/2010 falls in between the current validity dates, i.e. 04/20/2010 and 12/31/9999; hence it will create another condition record in the system.

To avoid the creation of new condition record, we used the FM "RV_KONDITION_SICHERN_V13A" in one of the developments in my project.

Regards,

Ganga

Former Member
0 Kudos

i didnt change the Validity Dates though ... but that can be done.. just by putting an enhancement in teh Inbound Function Module : "IDOC_INPUT_COND_A" .

Enhancement should be put below following lines of code :::

"ENHANCEMENT-POINT idoc_input_cond_a_g1 SPOTS es_saplvkoi.

$$-Start: IDOC_INPUT_COND_A_G1----


$$

ENHANCEMENT 1 MGV_GENERATED_IDOC_INPUT_CO005. "active version"

The Internal Table idoc_data contains all the segments and segment value is there asa string in "sdata" field of Idoc_data.

jsust need to find the position of the VALIDAITY DATE in this case and replace it with the required date...

i have tried it for changing fields like LIFNR, KSCHL, CONDITION, EKORG and replaced them with new values... the idoc posts with the new values and new value sare updated too... and no extra records are created.

i hope it answers the query...

Former Member
0 Kudos

Need to close because of 10 question

0 Kudos

I have the same issue. How did you solve your issue?