cancel
Showing results for 
Search instead for 
Did you mean: 

Variable substitution

Former Member
0 Kudos

Hi all,

I have problem concerning <b>variable substition</b> in the file receiver CC. My scenario is IDoc to file.

I just want to add the <b>system, client and an element</b> of my IDoc to the filename.

This is my config:

<b>File Name Scheme:</b> %INSPLOT%.xml

Variable substitution enabled:

<b>Variable Name:</b> INSPLOT

<b>Reference:</b> payload:ZINSPLOT01,1,IDOC,1,ZILHEADER,1,INSPLOT,1

I send following IDoc XML schema:


  <?xml version="1.0" encoding="UTF-8" ?> 
<ZINSPLOT01>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
  <TABNAM>EDI_DC40</TABNAM> 
  <MANDT>150</MANDT> 
  <DOCNUM>0000000000001003</DOCNUM> 
  <DOCREL>40B</DOCREL> 
  <STATUS>30</STATUS> 
  <DIRECT>1</DIRECT> 
  <OUTMOD>2</OUTMOD> 
  <IDOCTYP>ZINSPLOT01</IDOCTYP> 
  <MESTYP>ZINSLOT</MESTYP> 
  <SNDPOR>SAPDEV</SNDPOR> 
  <SNDPRT>LS</SNDPRT> 
  <SNDPRN>SAPDEV</SNDPRN> 
  <RCVPOR>A000000001</RCVPOR> 
  <RCVPRT>LS</RCVPRT> 
  <RCVPRN>SAPXI</RCVPRN> 
  <CREDAT>20060911</CREDAT> 
  <CRETIM>144527</CRETIM> 
  <SERIAL>20060911144527</SERIAL> 
</EDI_DC40>
<ZILHEADER SEGMENT="1">
  <INSPLOT>020000000266</INSPLOT> 
  <PLANT>BE01</PLANT> 
  <INSPTYPE>03</INSPTYPE> 
  <TYPEDESCR>In-process insp.</TYPEDESCR> 
  <ORIGIN>03</ORIGIN> 
  <CREADATE>20060731</CREADATE> 
  <CREATIME>121119</CREATIME> 
  <MATERIAL>Q56836</MATERIAL> 
  </ZILHEADER>
...
</IDOC>
</ZINSPLOT01>

My output fiole isn't processed in the specified folder.

When I look in Visual Administr. I get the following error:

<i>File processing failed with

com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error

during variable substitution:

com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The

following variable was not found in the message payload: INSPLOT</i>

Someone who can help me solve this problem?

TIA!

Greets,

Wouter.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Think as the data does not contain any character , it is the problem.

<b>INSPLOT>020000000266</INSPLOT></b> is a complete numeral. Check if your file system allows a filename of this sort.

Also, try by enabling that check box.

<b> To disable the check the adapter performs for the element data, set the <i>Disable Security Checks indicator</i>.</b>

Regards,

Bhavesh

Message was edited by: Bhavesh Kantilal

Former Member
0 Kudos

Hi Bhavesh,

I had already set the Disable Security Checks indicator.

And I've tried with filename DEV150%INSPLOT%.xml but I get the same error of before...

Although my reference looks OK isn't it?

Anybody an idea?

Thx!

Former Member
0 Kudos

Hi Wouter,

Pls do make sure you are giving the full path in the variable substitution.

the INSPLOT variable should be declared in teh variable substitution table as

payload:ZINSPLOT01,1,ZILHEADER,1,INSPLOT,1

Cheers

JK

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The reference looks good to me.

payload:ZINSPLOT01,1,IDOC,1,ZILHEADER,1,INSPLOT,1

Just try create a file with the same filename manually and see if your Folder allows you to do that. Maybe the filename has some lenght restriction. Maybe wrtie authorization is not available to the userid.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

thx for your replies!

I've tried tio create the file manually and I've encountered no problems. So the length or the authorization is not the issue.

I also tried it with the reference without the IDOC segment, but that doesn't solved the trick also.

I'm realy curious what did I do wrong here...

Former Member
0 Kudos

Hi guys,

it was just a simple mapping error that caused the problem, thx for the help though!

Grtz,

Wouter.