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: 

ADRC Table

Former Member
0 Kudos

Hi ,

I created a customer from XD01 and also filled the street field in same transaction but i did not fill street2 and street3 fields. I want to update street2 and street3 fields from an abap program.

I am trying to fill the customer's street2 and street3 field in ADRC table.

But sy-subrc = 4. It is failing.

UPDATE adrc SET str_suppl1 = 'street1'

str_suppl2 = 'street2'

WHERE addrnumber = 63534.

can someone tell y subrc is 4? why it is not getting updated?

Thank u

1 ACCEPTED SOLUTION

Former Member
0 Kudos

ADDRNUMBER is Character typr field. So you have to prefix with zero or to provide same ADDRNUMBER value getting from KNA1 Customer Master.

UPDATE ADRC SET STR_SUPPL1 = 'street1'

STR_SUPPL2 = 'street2'

WHERE ADDRNUMBER = '0000009941'.

6 REPLIES 6

Former Member
0 Kudos

Hi,

The address number should be in quotes.

UPDATE adrc SET str_suppl1 = 'street1'

str_suppl2 = 'street2'

WHERE addrnumber = <b>'63534'</b>.

Reward if helpful.

Former Member
0 Kudos

ADDRNUMBER is Character typr field. So you have to prefix with zero or to provide same ADDRNUMBER value getting from KNA1 Customer Master.

UPDATE ADRC SET STR_SUPPL1 = 'street1'

STR_SUPPL2 = 'street2'

WHERE ADDRNUMBER = '0000009941'.

0 Kudos

Thanks, Nilesh. The problem was with prefixing zeros.

And I believe if i update ADRC(master table for address), all the other tables refer to this table for address....if iam not correct please reply

Thank u

0 Kudos

First of all, SAP never recommands direct Databast table through any report.

Anyway still if you want to update all ADRC related table it will be the same. Just check the type of the field which you are updating and comparing in where clause.

Former Member
0 Kudos

Hi,

Rather going to update adrc table directly, go for BDC of XD02 to update street2 and street3 into ADRC table. it will update into all relative tables of customer master like knc1. And if u use update query only on ADRC then it will show inconsistancy into data base and give u sy-subrc = 4.

<b>Rewards points if it is useful.</b>

Regards,

Kinjal Rathod

Former Member
0 Kudos

Hi,

problem is the addrnumber-field. try this:

SELECT SINGLE * FROM ADRC WHERE ADDRNUMBER = '0000012427'.

Regards, Dieter