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: 

Problem clearing field in XK02 with BDC

Former Member
0 Kudos

I am working on a BDC program to change vendor data using the XK02 transaction. I am having a problem when I want to clear out the data contained in the Telephone (LFA1-TELF1) and Fax (LFA1-TELFX) fields. If I use the BDC to change either of these field to ' ' (there is a space in there), it just reverts to the old value. I can use the BDC to change the data in those fields, or even add phone numbers if they weren't there previously. I just can't remove the data. I should note that I do not have this problem when setting any of the other fields on the form to ' ', and also have no problem removing the phone numbers when I run XK02 manually. It only happens when I try and use the BDC to remove the telephone and fax numbers. Any ideas?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

It seems I misunderstood - the problem is deleting data.

Select the line and press '/14'. This should delete the item.

Rob

14 REPLIES 14

Former Member
0 Kudos

Make sure that the field USE_ZAV is set to 'X' on screen 101 of the batch input session. This will use central address management.

Rob

Former Member
0 Kudos

Hmm, I tried checking the USE_ZAV check box with the BDC, but now it doesn't change any of my vendor data at all. If I run it in display mode A, it just stops processing when it gets to the data screen. In mode N it runs to completeion, but none of my data changes.

I'm curious, what does that check box do?

0 Kudos

You have to go through the individual screens for maintaining this data.

The checkbox activates central address management which stores some of the data.

Rob

Edited by: Rob Burbank on Sep 22, 2008 3:57 PM

Former Member
0 Kudos

Did you ever try using this character to reset the field value ' ! '.

If you want to reset a field value send the value as ' ! '

Amandeep

0 Kudos

Just tried setting the value to '!' in the BDC. That didn't work either. It is still reverting to the old value.

Former Member
0 Kudos

It seems I misunderstood - the problem is deleting data.

Select the line and press '/14'. This should delete the item.

Rob

0 Kudos

I'm not quite sure what you mean by selecting the line. I had the BDC program enter '/14' into the fields for the telephone and fax, now those fields contain the string literal '/14'.

I'm not sure of maybe some background info would be helpful: A bit ago another developer used a BDC program against some of our inactive vendor data which contained hard-coded values and thus corrupted the data it touched by overwriting the real data with hard-coded values. My task is to write a one-time-use program that will restore the old data that got messed up using the change logs obtained from program RFKABL00. There are about 900 vendors that need to be fixed, so I am trying to keep the program as automatic as possible.

0 Kudos

You have to do both things:

Press the 'Other communication...' button

On the next screen, select the line and press delete.

Try this manually.

Rob

0 Kudos

Ok, this worked to clear out the telephone and fax numbers when I did it manually. I went in to SM35 to try and capture the code for this procedure, but the "Other Communications" button does not show up when I run the transaction while recording. Is there a way for me to translate this into BDC code?

0 Kudos

Did you turn on central address management?

Rob

0 Kudos

Aha! With central address management turned on it takes me to screen 0111 instead of 0110. Not sure why that is, but 0111 has the Other Communications button so I was able to capture pushing that. The names of the fields are all different so I had to rewrite the BDC codes, but I am able to get it to delete the Fax number and make it stick. We're getting close!

Just one more hurdle it seems: When I press the Other Communications button it pops up a window that allows me to select which field I want to work with (Fax, Email, Telephone, etc.). My recording, however, does not capture my selection for this window and I can't figure out how to get at it. The Fax field happens to be on top, which is what it defaults to, so the BDC can select that one just fine. I can't figure out how to get it to select the other fields, like the Telephone field. Telephone is 8th from the top in the pop-up.

0 Kudos

I don't think you need to press the "Other Communication" button. You can press the arrow beside the telephone number or fax number and go directly to the correct screen.

Rob

0 Kudos

I've got it! I should have tried this earlier. Now with the "Use central data management" box checked I go to screen 0111 for changing the data instead of screen 0110, like I did before. Turns out on screen 0111, you CAN enter an empty string into those fields and it will save that way. No need for using the buttons or anything.

Thanks for all the help. It got me pointed in the right direction.

Former Member
0 Kudos

Hi Friends,

I am working on a BDC program to change vendor data using the XK02 transaction. I am having a problem when I want to clear out the data containing in Name2, Name3 & Name4, I have used all the above steps which u have mentioned but nothing working out.

Thanks in advance,

Ragu