cancel
Showing results for 
Search instead for 
Did you mean: 

Variable substitution

d_chandrasekhar
Explorer
0 Kudos
118

Hi all,

I think Variable substitution, to get the file name dynamically, refers the target payload. Correct me if I am wrong. If i need a field from the source payload , is it possible?

Thanks and Regards

Sekhar

Accepted Solutions (0)

Answers (7)

Answers (7)

d_chandrasekhar
Explorer
0 Kudos

Hi,

The UDF is a bit confusing. Here , the input is the field from source. The output of the UDF is filename with the source field. Where should I map the output of the UDF ? I donot need to create any field in the target structure.

Thanks and Regards

Sekhar

d_chandrasekhar
Explorer
0 Kudos

Hello Santosh,

Your solution of using a UDF to get the file name from the source itself seems fine. But what do i need to give in the "Target file name scheme" which is a mandatory field?

Thanks and Regards

Sekhar

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

>>But what do i need to give in the "Target file name scheme" which is a mandatory field?

It can be anything. However the option Use Adapter-Specific Message Attributes and File Name needs to be selected in the receiver adapter so that the filename that is set in the UDF will overwrite the one which is specified in the File Name Scheme in the CC.

Thanks

SaNv...

former_member183906
Active Contributor
0 Kudos
santhosh_kumarv
Active Contributor
0 Kudos

>>If i need a field from the source payload , is it possible?

Yes Possible. Dont use Variable Substution use Dynamic Configuration.

Check my reply to this thread

and

Variable sustution will require to have the data in the target message. If in case this data is not required in the receiver file content then you have to do FCC to remove it.

Thanks

SaNv...

former_member192295
Active Contributor
0 Kudos

Hi,

It is possible from source structure, follow below steps.

1. At target structure file name write %var1%.txt

2. Select Variable Substitution option under write

var1 PAYLOAD:MESSAGETYPE,1,FIELDNAME,1

It will work

Former Member
0 Kudos

refer the bleow link:

Advance page tab:

Variable Substitution (Target Directory/File Name Scheme)

http://help.sap.com/saphelp_nw04/helpdata/en/44/79973cc73af456e10000000a114084/frameset.htm

chirag

Former Member
0 Kudos

You can give Receiver Fields only.