This website is not affiliated with, sponsored by, or approved by SAP AG.

Direct table update

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Direct table update

Postby Nikki » Mon Mar 10, 2003 5:56 am

Hi All,

I'm trying to update a customer master with an email address (on the address tab).

I've tried a direct table update of tables ADRT and ADR6. Even though the tables are updated, the new email address does not appear on the screen!

Does anyone know why?

Thanks.

:cry:
Nikki
 
Posts: 64
Joined: Wed Oct 23, 2002 9:06 am

Postby Rich » Mon Mar 10, 2003 6:30 am

That's one of the biggest no-no's in any integrated database system, unless you actually wrote the system yourself and know it's innards initmately and even then if SAP follows good programming practice there should be a function module to do the update so every conforms to the same way of doing things.

If you are updating SAP standard tables you should only use BDC's, Idocs, or BAPI's to do the job for you.

Rich
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool

Postby Nikki » Mon Mar 10, 2003 6:36 am

I've tried everything else!

The field is not available on standard BDC recording.

The BAPI I tried to get working but again it wasn't updating the screen fields.

I've never worked with idocs before - any tips on where I should start?
Nikki
 
Posts: 64
Joined: Wed Oct 23, 2002 9:06 am

Postby Rich » Mon Mar 10, 2003 6:43 am

Idocs are for transporting external data from an external system into SAP and are not the way to go here. What version of SAP ?

Rich
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool

Postby Nikki » Mon Mar 10, 2003 6:50 am

4.6C

When I record the transaction XD01 from SHDB I'm only given access to an older version of the create customer screen - and it doesn't have the email address on it.

I then concentrated my efforts on BAPI BAPI_CUSTOMER_CHANGEFROMDATA1 - but couldn't get this to work either. Then I found a SAPNote that said:
"The BAPIs of function group V02D are only meant to be used for the Online Store, in other words you can use them to create or change Online Store consumers in the R/3 system.You cannot use them to create or change customer masters or consumers in the standard system; this can only be done via ALE or Batch Input.
When you use the mentioned BAPIs outside of the Online Store or with customer master records which were created or changed outside of the Online Store DATA MAY BE LOST !"

I couldn't find another suitable BAPI! So the last resort was the direct table stuff!

Any help would be much appreciated.

Thanks Rich.
Nikki
 
Posts: 64
Joined: Wed Oct 23, 2002 9:06 am

Postby Rich » Mon Mar 10, 2003 7:23 am

I'm not on 46c at the moment. I would check OSS first to make sure there isn't a patch to fix XD01. I've just checked a BDC I have for XD01 with no luck. I would try and persevere with the BAPI.

Rich
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool

Postby Sunny » Mon Mar 10, 2003 7:37 am

I am on 4.7 and the email address field is available.
It does sound a bit strange for me to see that it is not available in recording in 46C. But do write a BDC and execute to see if it works. Sometimes it does not appear in recording but appears(!) when you run a program in 'A' mode.
Sunny
Sunny
 
Posts: 94
Joined: Mon Oct 21, 2002 5:07 am
Location: United Kingdom

Postby Nikki » Mon Mar 10, 2003 8:33 am

Hi,

I found a note - all I had to do was flag 'use central address management' on the initial screen!

Phew. :oops:

Thanks for your help.
Nikki
 
Posts: 64
Joined: Wed Oct 23, 2002 9:06 am

Postby Pep » Wed Nov 05, 2003 3:46 am

Hi,
Ive been following this thread and managed to get 'BAPI_CUSTOMER_CHANGEFROMDATA1' to work. However when I look at the customer using VD03 the changes are not reflect but I see the changes updated in KNA1 table.

?? :shock: ??

All I need is to update field NAME1..4
Any suggestion is appreciated.
Pep
 

Postby ocvantol » Wed Nov 05, 2003 4:47 am

BAPI_TRANSACTION_COMMIT
Functionality

This method executes a COMMIT WORK command. It is required for
transactions developed externally to the R/3 System that change data in
the R/3 System via BAPI calls.

When you call BAPIs in your program that change data in the R/3 System,
afterwards you must call this method to write the changes to the
database.
Oscar.
ocvantol
 
Posts: 929
Joined: Tue Oct 22, 2002 3:19 am
Location: The Hague

Re: Direct table update

Postby Nazim » Wed Nov 05, 2003 6:53 am

I guess the email address is in SMTP_ADDR.
Hope this helps.
Nazim
Nikki wrote:Hi All,

I'm trying to update a customer master with an email address (on the address tab).

I've tried a direct table update of tables ADRT and ADR6. Even though the tables are updated, the new email address does not appear on the screen!

Does anyone know why?

Thanks.

:cry:
Nazim
 


Return to ABAP

Who is online

Users browsing this forum: No registered users and 7 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.