cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Filename from source IDOC payload

Former Member
0 Kudos

Hi,

I have a scenario IDOC --> ABAP Mapping --> Flat File. I need to create the receiver file name dynamically with the document number from souce IDOC. Since the target payload is flat file I don't know whether I can use the variable substitution. Also can I use the dynamic configuration with ABAP Class mapping.

Please help.

Thanks.

Srini

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Actually Henrique's reply in this thread has the exact code,

METHOD if_mapping~execute.
 
DATA l_record type mpp_dynamic.
 
* copy payload
result = source.
 
* add an adapter specific attribute
l_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_record-name = 'FileName'.
l_record-value = 'test.xml'.
dynamic_configuration->add_record( l_record ).
 
ENDMETHOD.

Regards

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh.

My issue is resolved, and I awarded the full points to you.

Srini

bhavesh_kantilal
Active Contributor
0 Kudos

Srini,

To be frank, all I did here was a search on SDN. "ABAP Mapping Dynamic Configuration" and I cam across this old thread of which I also was a participant.

Searching on SDN always helps Most of the times..

Regards

Bhavesh

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos