Application Development and Automation 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: 
Read only

Problem Address distribution BAPI structure (International Address Version)

matthias_bruning
Explorer
0 Likes
16,319

Hello Community,

we want to maintain an international address version of customers with the LSMW BAPI method. For this we war using ADRMAS03. In the field mapping of structure E1BPAD1VL1 we have set the field ADDR_VERS to 'C' (Chinese)

Within the IDOC Generation we will get the following information and error message:

Use another function to maintain the SPACE Version of the address


We only want the extend the Address for Chinese. Default Address is maintained.

Hope somebody can help.

Best regards

Matthias

1 ACCEPTED SOLUTION
Read only

JL23
Active Contributor
0 Likes
15,888

the message is AM028

If you go to transaction SE91 and click the where used button for this message then you only get 3 hits, if you open the first of those programs then you can see that SAP only expects either a Handle or an address number , but not both.

First proposal I have to check. That means I have for the same address two lines in my source file and in the column for the Addr_vers I have in the first line a blank and in the second line a C??

Second proposal sounds great but I cannot develop ABAP and our partner is not so fast that I get the coding as far as needed. 😞

23 REPLIES 23
Read only

JL23
Active Contributor
0 Likes
15,889

the message is AM028

If you go to transaction SE91 and click the where used button for this message then you only get 3 hits, if you open the first of those programs then you can see that SAP only expects either a Handle or an address number , but not both.

Read only

0 Likes
15,888

Hello Juergen,

and how can this solve my problem? I'm not sure what I have to change in my LSMW structure field settings.

Best regards

Matthias

Read only

JL23
Active Contributor
0 Likes
15,888

Without showing your structure with content it is not easy to tell what you have to change

Make a screenshot of the detail of converted data

Read only

0 Likes
15,888

Hello Juergen,

sorry my mistake. I have made some screenshots from the Converted Data and the results:

Converted Data:

Results

Regards Matthias

Read only

JL23
Active Contributor
0 Likes
15,888

Before I check in detail, can you add a screenshot of the record(s) in ADRC for this customer

Read only

0 Likes
15,888

no problem,

here the results of the address of this customer:

Read only

JL23
Active Contributor
0 Likes
15,888

I just tested it and it looks like you can't create an address with this BAPI without submitting records for the NATION = ' '

I got the same error as you had when I just had the Chinese address alone, but when I had the normal address together with the chinese then it worked right away.

Make sure your Idoc structure looks finally like this, first the version with the blank, then the version with the C for chinese.

Read only

0 Likes
15,888

This sounds great. I'm not sure how I can reach your results above. I don't know how I can create two E1BPAD1VL Structures under the Header segment. If I enter two lines in the ADDR_VERS

E1BPAD1VL-ADDR_VERS = ' '

E1BPAD1VL-ADDR_VERS='C'

then the program will read my file but the same error.

Looking forward to hear from you.

BR Matthias 

Read only

JL23
Active Contributor
0 Likes
15,888

There are many ways to achieve this.

The easiest is eventually a second line with the international address in the source file .

Alternative you can also add a few line ABAP coding in the transfer_record section of E1ADRMAS, where you read the existing address from table ADRC table and fill the structure E1BPAD1VL and E1BPAD1VL1  and then use the commands transfer_this_record 'E1BPAD1VL' and transfer_this_record 'E1BPAD1VL1' to write the segments for the blank address version before the other segments for the Chinese address version are created by the LSMW

Read only

0 Likes
15,888

First proposal I have to check. That means I have for the same address two lines in my source file and in the column for the Addr_vers I have in the first line a blank and in the second line a C??

Second proposal sounds great but I cannot develop ABAP and our partner is not so fast that I get the coding as far as needed. 😞

Read only

JL23
Active Contributor
0 Likes
15,888

regarding the first proposal:

if you use international addresses then you have the address in - lets call it - English

and again in Chinese.

So the blank version has to have the English address and the C version has to carry the Chinese address.

As you can only load Addresses with this BAPI via LSMW if the customer already exists then you should already have this English address in your database table ADRC.

So you may need to download it from there and add it into your source file.

Be aware that the IDoc updates your English address, make sure it is 100%  equal to the address in your database.

Read only

0 Likes
15,888

Now I have the same structure like you but I hope we speak now only from a small problem.. I'm not able to set the "Blank" for the first address. In my source field, I have set a blank for the English Adress but within the IDOC generation the system ignores this field and the ADDR_VERS is not filled.

DATA RECORDS

E1ADRMAS

     E1BPAD1VL -> Blank will be ignored

     E1BPAD1VL

Read only

JL23
Active Contributor
0 Likes
15,888

Not sure I understand, what is the difference between blank and not filled?

And what do you mean by "ignored"

this would be the coding for having a blank in the address version:

E1BPAD1VL-ADDR_VERS = ' '.

Read only

0 Likes
15,888

ok here the screenshots

converted data -> both Addresses (one with C and the first one with blank

The IDOC with the both segments

Segment 3 is the Address for C. Here you can see the field ADDR_VERS

Segment 2 is the SPACE Address. Field is missing because the program do not understand the blank and then the field is nit inside of the segment.

Read only

JL23
Active Contributor
0 Likes
15,888

SAP shows only fields that are not empty in this "preview".

If you double click the icon in front to the segment then SAP takes you the segment detail and from there you can select from the first menu to Edit the record.

After doing that you can see the entire segment even with all empty fields.

Read only

0 Likes
15,887

Also in the detail no Version

Read only

JL23
Active Contributor
0 Likes
15,887

You have to  choose EDIT from the menu to see it complete

Or you take the idoc number and display it in WE19

Read only

0 Likes
15,887

Ok this is the IDOC

Read only

0 Likes
15,885

maybe different error. I have found an answer from you in an other discussion

Read only

JL23
Active Contributor
0 Likes
15,885

In many occasions SAP just stops with the first error, and once that one is solved you get the next one until you solved all.

The easiest way to know what data you need to maintain would be to send a fully maintained customer  as IDOC, then check the ADRMAS idocs in BD87. Maybe you have already ALE in your system where customers or vendors are distributed, this would make it even easier to check. Otherwise follow the introduction in my blog

Read only

0 Likes
15,885

Problem is solved. I have to spend you a drink. Have a great day and thanks again for the great support.

BR Matthias

Read only

JL23
Active Contributor
0 Likes
15,885

Please close the discussion, see

Read only

Former Member
0 Likes
15,885

Very useful for an issue I was having.