cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic file name from idoc segment-sap po

gurudatta
Participant
0 Kudos

Hi Guys,

Scenario Idoc--File

I am using same idoc in sender and receiver and i have done mapping

I am trying to generate a .xml file on FTP by using field(STAPA1) from idoc target structure and generate file name dynamically using variable substitution

i am getting below error

Exception caught by adapter framework: Error during variable substitution:

com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1

I have used

var1 payload:ALEAUD01,1,IDOC,1,EDI_DC40 ,1,E1ADHDR,1,E1STATE,1,STAPA1,1

Please suggest how to solve this issue

Accepted Solutions (0)

Answers (3)

Answers (3)

gurudatta
Participant
0 Kudos

Hi Guys,

Thank you for the help and inputs

I changed my Receiver structure from Standard Idoc to Simple structure(since i had flexibility) and then i just used Variable substitution;it was successful

variable name field "var1" should be in small case!!!!

former_member190293
Active Contributor
0 Kudos

Hi Gurudatta!

EDI_DC40 segment is not the parent segment for E1ADHDR.

var1 payload:ALEAUD01,1,IDOC,1,E1ADHDR,1,E1STATE,1,STAPA1,1

Check your expression once again.

Regards, Evgeniy.

gurudatta
Participant
0 Kudos

Hi Evgeniy,

I changed as suggested by you but still i get the same error..

Br,

Guru

gurudatta
Participant
0 Kudos

Hi,

And do I need to check Use adapter specific message attributes

former_member190293
Active Contributor
0 Kudos

Do you use any additional modules in receiver adapter?

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

Hi!

No, this option is to be used when you are going to use ASMA values stored in Dynamic Configuration.

Regards, Evgeniy.

gurudatta
Participant
0 Kudos

No..Nothing of that kind..its just simple one to one mapping nothing else and no other additional modules in receiver adapter

Br,

Guru

manoj_khavatkopp
Active Contributor
0 Kudos

The var1 should be in capital , update the same in filename schema as well.

former_member190293
Active Contributor
0 Kudos

Hi Manoj!

Are you sure about that?

This works without any issues.

Regards, Evgeniy.

former_member186851
Active Contributor
0 Kudos

If am not wrong,It should work for any names provided the same should be maintained in the file name schema.

manoj_khavatkopp
Active Contributor

Yes I remember this in my past experience, atleast the first character should be capital Var1. Not sure if this was fixed on later SP's/Patch. But it's worth trying.

gurudatta
Participant
0 Kudos

Hi Guys,

Thank you for the help and inputs

I changed my Receiver structure from Standard Idoc to Simple structure(since i had flexibility) and then i just used Variable substitution;it was successful

variable name field "var1" should be in small case!!!!



Br,

Guru


former_member186851
Active Contributor
0 Kudos

Try removing the space after

EDI_DC40 ,

and check once.

gurudatta
Participant
0 Kudos

Hi Raghu,

No luck..same error..And is my conf correct ??

some blogs say variable substitution doesn't support Capital letters and i tried with making small but that also desnt work

Br,

Guru

former_member186851
Active Contributor
0 Kudos
I am not finding anything wrong as such Guru.your doing a one to one mapping and this is the output structure right?

Instead of this why don't you go with ASMA ?

gurudatta
Participant
0 Kudos

Hi Raghu,

Yes,simple one to one mapping ...

ASMA--could you please tell for above conf how can it be done?

Br,

Guru

former_member186851
Active Contributor
gurudatta
Participant
0 Kudos

Hi Guys,

Thank you for the help and inputs

I changed my Receiver structure from Standard Idoc to Simple structure(since i had flexibility) and then i just used Variable substitution;it was successful

variable name field "var1" should be in small case!!!!

Br,

Guru

former_member186851
Active Contributor
0 Kudos
Great Guru.