cancel
Showing results for 
Search instead for 
Did you mean: 

Tansformation problem

former_member269849
Participant
0 Kudos

Hi Folks,

Please I have a problem , I have Consultant and module like dimension, and I have Default_module like property of the consultant dimension  and i'm loading data from a flat file .

I want to check that if a value of the Module column is empty i want to get data from the property default_module and to put it at his cell ? how could I do that?

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

You can't do it in transformation file! You can load data for empty module to some dummy member and then using script - copy this data to the module in property.

Vadim

former_member186338
Active Contributor
0 Kudos

Like:

*XDIM_MEMBERSET MODULE=DUMMYMODULE

*WHEN MODULE

*IS*

*REC(EXPRESSION=%VALUE%, MODULE=CONSULTANT.DEFAULT_MODULE)

*ENDWHEN

former_member269849
Participant
0 Kudos

I Understand but please for exapmle if a cell of module is empty how can i replace it by Dummy module ?

former_member186338
Active Contributor
former_member269849
Participant
0 Kudos

How should I do the condition if it's empty ?

former_member186338
Active Contributor
0 Kudos

Easy:

If you have header in the file with the column MODULE

MODULE=*IF(STR(ZZ)+MODULE=*STR(ZZ) THEN *STR(DUMMYMODULE); MODULE)

without header use *COL(n) instead of MODULE...

Vadim

former_member186338
Active Contributor
0 Kudos

And by the way, how you get this text file for import? May be it's possible to create this file with dummy member instead of empty?

former_member269849
Participant
0 Kudos

it's not working i have modul as header at my flat file

former_member269849
Participant
0 Kudos

I extract it from another database, could I do this at the conversion file for example External :EMPTY and Internal DUMYMEMBER ?

former_member186338
Active Contributor
0 Kudos

Sorry, but it's working if everything is done correctly...

Please provide full details including transformation file, datafile sample, screenshots of the package log, module dimension members including created dummy member etc...

former_member186338
Active Contributor
0 Kudos

"I extract it from another database" - what database? how do you extract? query?

"could I do this at the conversion file for example External :EMPTY and Internal DUMYMEMBER" - no! "EMPTY" - is not a keyword...

former_member269849
Participant
0 Kudos

Here are the screeshot you asked for , for the member of MODUL normally i should Have SD or MM ..

former_member186338
Active Contributor
0 Kudos

"screenshots of the package log, module dimension members including created dummy member"???

try:

MODUL=*IF(STR(ZZ)+*COL(6)=*STR(ZZ) THEN *STR(DEFAULT); *COL(6))

MODUL dimension administration screenshot? DEFAULT member?

former_member186338
Active Contributor
0 Kudos

By the way, do you have MODUL column in the text file or you just added it?

former_member269849
Participant
0 Kudos

For MODUL'S Member it's MM SD PP BI..

former_member186338
Active Contributor
0 Kudos

First please English screenshot or translation of each line!

Second - I don't see any DEFAULT member...

former_member186338
Active Contributor
0 Kudos

And my typo error:

Not: MODUL=*IF(STR(ZZ)...

But: MODUL=*IF(*STR(ZZ)...

former_member269849
Participant
0 Kudos

Validation of the format of the transformation file

Validation of the options..

the problem is at the line 22 ZZ inexcpected of the mapping formula

error at the mapping.

What do you mean by the DEFAULT Member ?

former_member186338
Active Contributor
0 Kudos

First - correct missing "*" before STR

Second - you need to have dummy member in the MODUL dimension - DEFAULT is the ID of this member (or you can use any other ID like DUMMY etc...)

former_member269849
Participant
0 Kudos

I correcte it not i don't have the same error now I have added a default Member now

  Failure of the command *COL(6)the column index is out of range

former_member269849
Participant
0 Kudos

I Had it

former_member186338
Active Contributor
0 Kudos

Sorry, please test yourself...

Move MODUL column before signeddata etc...

former_member269849
Participant
0 Kudos

Thank you so much  Vadim it's working now

former_member186338
Active Contributor
0 Kudos

Then close the discussion!

Answers (1)

Answers (1)

jrg_finster3
Active Participant
0 Kudos

Hi Fatima

another way could be to use START_ROUTINE Parameter in the Transformation file and write a little BADI to do this mapping. But you will need some ABAP skills to do so.

A first How To can be found here:

http://scn.sap.com/docs/DOC-4230

The "2 Step - Logic Import" will be much faster to implement, but if you have similar problems in different Imports, I think the routines are a nice feature to have a look at.

Regards

Jörg