cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Config issue

Former Member
0 Kudos

Hi All,

I have an IDOC to Flatfile scenario. The IDOC is MATMAS. The E1MARCM segment in the IDOC repeats multiple times corresponding to the data. Suppose the IDOC has 4 E1MARCM segments then it has 4 WERKS fields and hence has data corresponding to 4 Plants in a single IDOC. The value in WERKS represents a PLANT.

I have to generate 4 flat files corresponding to each PLANT and route each flat file to the Folder corresponding each PLANT.

The constraint that I have is that I can not use Variable Substitution  as the WERKS field is NOT mapped to any field on the target side. I tried using Dynamic Config but I am unable to do so as Multiple Files are getting generated.

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

check this if u want to use DC with multimapping

http://scn.sap.com/people/praveen.gujjeti/blog/2011/03/29/multi-mapping-assigning-asmas-for-child-me...

but i would suggest that add one more field in the target structure and assign WERKS value to it so that you can use variable substitution and while doing FCC use below parameter to remove the filename from generated flat file:

NameA.fixedLengthTooShortHandling = Cut

http://scn.sap.com/thread/1708974

Message was edited by: Amit Srivastava

Former Member
0 Kudos

BANG ON !!!! ..

I implemented the 'fixedLengthTooShortHandling" parameter and this works perfectly Fine..

Thanks a Ton Amit !!!

Former Member
0 Kudos

welcome

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

Hi,

Have you try with the enhanced receiver determination?

It's available since XI 3.0 SP 16

Here, you could follow this great how-to:

http://wiki.sdn.sap.com/wiki/display/SI/Step+by+Step+guide+to+Explain++Enhanced+Receiver+Determinati...

You could determine the number of receivers in a Message Mapping level

Regards.

Former Member
0 Kudos

try this: WERKS - splitByValue(Each value) - exists - createIf - Header node of target msg structure

in msg mapping, change the occurrance of target msg type to 0..unbounded

in UDF invoke Dynamic Configuration to generate filename dyanamically using WERKS data. Now for this have WERKS - your UDF - Header node of target msg structure.

Now merge the first maping and the second mapping for header node of target msg structure using concat e.g.

WERKS - splitByValue(Each value ) -

                                                       concat - exists - createif - Header node of target msg structure

WERKS - your UDF -

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Fisrt you have to write a mapping logic to genarate multiple records at mapping level,change the occurance of target structure root element to 1 to unbounded then write a mapping as per your bussiness requirement.

If still no luck then use multi mapping without BPM , it should work definetly.

search in sdn for the same

Regards,

Raj

Former Member
0 Kudos

Raj,

I have implemented the logic for Multimapping and I have got the result. All i am stuck with is the Routing to Multiple Directories part.

I am unable to use Variable Substitution as the WERKS field is not mapped to any target field. The Dynamic Config code is throwing an error.