cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to append 2 structures with same field name into Generic extractor

Former Member
0 Kudos

Hi ,

I am not able to append 2 structures with same field name,I am creating generic extractor on top of View.when i try to append 2 structures with same field name.Its not allowing.

eg:having 1 segment with 5 different structure.1st structure is for Bill_to_party,2nd structure is for ship_to_party,3rd structure is for remitto.whereas all the strutures having same field name as name1,name2,Sreet , City, State.

After adding 1st structure,system is not allowing me to add 2nd structure with same field name.

Regards,

J.sakthikumar

Accepted Solutions (0)

Answers (1)

Answers (1)

RamanKorrapati
Active Contributor
0 Kudos

Mean your adding same ecc fields(same technical name) to multiple structures?

if yes then it won't allow you. Same field  can't be added multiple times.

it will allow you once only.

Why you want add such way that.

you can utilize bw attributes(name,city,name1...etc) concepts and drill down at reports based on ship to part/ bill to party if you needed

Former Member
0 Kudos

Hi Ram,

Thanks for the reply.

Actually 4 different structures are available for segment(WE30),all the 5 structures contains same field name1,name2,Sreet , City, State.

4 structures in the segment are

ZMM_INVOIC_REMITTO

ZMM_INVOIC_SHIPTO

ZMM_INVOIC_BILLTO

ZMM_INVOIC_SHIPFROM

same fields in the all 4 structures are

Z_NAME1

Z_NAME2

Z_STREET

Z_CITY

Z_STATE

Z_ZIP

Table EDID4 contains SDATA field,which is a single field contains all the 6 fields shown above as single value.

my requirement is to segregate single value in SDATA into 6 different values using CMOD.

Regards,

J.sakthikumar

former_member185132
Active Contributor
0 Kudos

Hi,


my requirement is to segregate single value in SDATA into 6 different values using CMOD.

How do you expect to do that if multiple fields have the same name? Even if the system allowed you to add all those append structures into the extract structure, how would you populate the fields individually given that they have the same name? How would BW be able to tell those fields apart when they all have the same name? You would not expect a table to have multiple fields with the same name, and structures are no different in this respect.

You should create append structures with unique names (so Z_NAME1 appears in the first struct, Z_NAME2 in the second etc). Add those append structures to the extract structure and populate them using CMOD.

Regards,

Suhas

Former Member
0 Kudos

Same name only but in different Structures,Actually z fields were created and same z fields were added by the Abaper with same technical name in all the structures

So you mean to say instead of adding as a 4 different structure,need to append as a different fields right with different technical names(zname1,zname2,zname3)?

please correct me if i am wrong

former_member185132
Active Contributor
0 Kudos

Even if they are in different append structures, once you add the appends to the extract structure, all those fields are now part of the extract structure. That's how you can declare a work area of the type as the extract structure, and refer to the fields like this:


DATA my_work_area TYPE zextract_structure.

my_work_area-ZNAME1 = 'Joe'.

Because when you add the append structure ZMM_INVOIC_REMITTO to the extract structure, all fields of ZMM_INVOIC_REMITTO effectively become members of the extract structure.

The obvious consequence of that is that if there are multiple append structures with the same field names and you try to add those appends to the same extract structure, the system sees it just as if you were adding duplicate fields to the extract structure directly. And that is not allowed.


So you mean to say instead of adding as a 4 different structure,need to append as a different fields right with different technical names(zname1,zname2,zname3)?

Yes.