cancel
Showing results for 
Search instead for 
Did you mean: 

SXDA+LSMW from heaven to hell

former_member182421
Active Contributor
0 Kudos

Hi folks,

I'm creating BP via SXDA+LSMW and until I needed to create various segments of the same type from one single row of a file I thought this combinations is really cool, but now is a completly pain. So I'm open to hear your opinions, any help will be very welcome

I have a plane file with 2 telephones and what I understood (Note 634300 - XIF: Loading Multiple Text Lines From LSMW) is that you need to split this in items, for example:

Header: BP 1|

Item:     BP 1 | Phone 1|

item:     BP 1 | Phone 2|

Before, I tryied a lot of things in the END_OF_RECORD but the system doesn't save the PSGNUM so when the SAVE is performed only stores one telephone. DoI really need to create a custom program to change the file from a plane file to a hierarchical file? I can't belive it

But I have a better scenario, the same process but instead adding phones from a file, you want assign the same two phone numbers to all the BPs via constants.

I really don't want to create custom programs for this, but I SXDA+LSWM is starting to be a pain!!

Cheers!

Luis

Accepted Solutions (1)

Accepted Solutions (1)

former_member182421
Active Contributor
0 Kudos

Hi,

Regarding the phones, the idoc structure is:

E102BUS_EI_TEL_DATA - Min Segments 1 / Max Segments 1

E102S_EI_BUPA_TELEPHONE_CON - Min Segments 1 / Max Segments 999999

E102BUS_EI_STRUC_TEL_DATA  - Min Segments 1 / Max Segments 1

What I did is a transfer_record at the END_OF_RECORD event for each segment, so the system saved something like:

E102BUS_EI_TEL_DATA

E102S_EI_BUPA_TELEPHONE_CON

E102S_EI_BUPA_TELEPHONE_CON

E102BUS_EI_STRUC_TEL_DATA 

E102BUS_EI_STRUC_TEL_DATA

But the right order is:

E102BUS_EI_TEL_DATA

E102S_EI_BUPA_TELEPHONE_CON

E102BUS_EI_STRUC_TEL_DATA 

E102S_EI_BUPA_TELEPHONE_CON

E102BUS_EI_STRUC_TEL_DATA

I tried to map the right PSGNUM but looks like it doesn't take it into account, so the physcal order is more important than the logical order.

I imagine If I put all the code in the event END_OF_RECORD of the segment E102S_EI_BUPA_TELEPHONE_CON will work, I said I imagine, because I didn't tried, I prefer to do what the note said, it's a little of excel work but at least the mapping is more clean.

But in other hand I also needed to add marketing attributes, and this is more easy/clean to do it in the END_OF_RECORD event. First I enhanced the BP interface according to the notes:

609236  - Import of Business Partner Marketing Attributes

1081545 - Extending note 609236 for CRM version above 4.0

1239018 - XIF:errors not captured in FM ZCRM_MKTBP_CRMOU_WRITE

569723  - Export of Business Partner Marketing Attributes

947715  - Problems after implementing note 569723

1710612 - Attribute set could not be saved

1791266 - Upload of marketing attribute in LSMW create inconsistencies

Z101ZCRM_MKTBP_PROFILE  - Min Segments 1 / Max Segments 1    

Z101MKTPFCHR_ATTRIBUTE_LINE - Min Segments 1 / Max Segments 999999

I mapped via normal mapping COL1 to the segment Z101MKTPFCHR_ATTRIBUTE_LINE  and I put some code on the END_OF_RECORD (all atributes belong to the same set)

transfer_record.

Z101MKTPFCHR_ATTRIBUTE_LINE-ATNAME = 'XXXXXXXX'.

Z101MKTPFCHR_ATTRIBUTE_LINE-ATVALUE = FILE-COL2.

transfer_record.

Z101MKTPFCHR_ATTRIBUTE_LINE-ATNAME = 'YYYYYYY'.

Z101MKTPFCHR_ATTRIBUTE_LINE-ATVALUE = FILE-COL3.

transfer_record.

I hope this post/miniblog save you some troubles!

Luis

pedro_murias
Participant
0 Kudos

Sorry my friend but I don't get where are you exactly duplicating the structures?

- On Tx Lsmw?  I can't edit the Field Mapping and conversion rules to add the duplicated structures?

- On We30? Even defined as 1-9999 when i try to assign the segment it says thats already defined.

-On SXDA??

Regards

former_member182421
Active Contributor
0 Kudos

On the field mapping events on LSMW, press the modify button on the field mapping and conversion rules section, once there, press the button layout and check the processing times.

All the crappy code was done at the _END_OF_RECORD_ of the Z101MKTPFCHR_ATTRIBUTE_LINE segment, but as I said this will work for my scenario (converting column base marketing a attributes to tabular base)

it's quite complex and a pain, this approach was taken before I learned how to use structures typed as hierarchy on LSMW, if you have an input file of hierarchy type you don't need to do stuff like I did.

I believe this blog will help you a lot:

About SXDA, well, that's another different thing:

Cheers!

Luis

Answers (0)