Skip to Content
0

Dynamic file name from idoc segment-sap po

Nov 02, 2017 at 09:42 AM

74

avatar image

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

var1.jpg (25.3 kB)
var2.jpg (181.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Evgeniy Kolmakov Nov 02, 2017 at 10:46 AM
0

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.

Show 10 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeniy,

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

Br,

Guru

0

Hi,

And do I need to check Use adapter specific message attributes

var3.jpg (37.8 kB)
0

Hi!

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

Regards, Evgeniy.

0

Do you use any additional modules in receiver adapter?

Regards, Evgeniy.

0

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

Br,

Guru

0

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

0

Hi Manoj!

Are you sure about that?

This works without any issues.

Regards, Evgeniy.

0

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

0

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.

1

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


var5.jpg (33.6 kB)
0
gurudatta d Nov 06, 2017 at 05:23 AM
0

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!!!!


var5.jpg (33.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Raghuraman S Nov 02, 2017 at 10:03 AM
0

Try removing the space after

EDI_DC40 ,

and check once.

Show 6 Share
10 |10000 characters needed characters left characters exceeded

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

0
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 ?

0

Hi Raghu,

Yes,simple one to one mapping ...

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

Br,

Guru

0
0

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

0
Great Guru.
0