cancel
Showing results for 
Search instead for 
Did you mean: 

File name from RFC

Former Member
0 Kudos

Hello,

I have scenario from RFC to File(CSV).

The RFC structure is:

<Z_PORTAL_PURCH>

<LAND></LAND>

<PURCH_PRICE>

<item>

<a></a>

<b></b>

<c></c>

</item>

</PURCH_PRICE>

</Z_PORTAL_PURCH>

The target is:

<ECC_PURCH_PORTAL>

<item>

<a></a>

<b></b>

<c></c>

</item>

</ECC_PURCH_PORTAL>

I able to create the file with correct stracture

Now I try to change the file name and take the paramer from <LAND> field in the RFC

How can I do this?

Elad

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Your UDF will have one input parameter (say land) and will get input from LAND node

LAND -


> UDF -


> Target(any target node)

your UDF will be:

DynamicConfigurationKey DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

key = DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Fileu201D,u201CFileNameu201D);

conf.put(key, land);

you dont need any return statement here....

Check it out.....for configuring the FILE CC you can refer the blog given by Umar

Regards,

Abhishek.

Former Member
0 Kudos

Hello,

When Itried to use with the UDF.

I received this error message:

14:25:50 Start of test

Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map4b141341503111de99ce001635c5b25f/source/com/sap/xi/tf/_ecc_purch_price_MM_.java:64: ';' expected DynamicConfigurationKey DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map4b141341503111de99ce001635c5b25f/source/com/sap/xi/tf/_ecc_purch_price_MM_.java:64: ';' expected DynamicConfigurationKey DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error

14:25:51 End of test

Elad

Shabarish_Nair
Active Contributor
0 Kudos

if you are trying to test this independently it wouldnt work since this is a runtime component.

hence the values are filled only during runtime. So try an end to end testing.

Former Member
0 Kudos

Hello,

Thank you for your answers

I configured the message mapping like Abhishek recommendation.

The scenario work but the file name is not dynamicly.

I loking the way to configure the CC to make it work.

Elad

Edited by: Elad Peleg on Jun 3, 2009 4:14 PM

Shabarish_Nair
Active Contributor
0 Kudos

did you check the adapter specific attributes in the receiver file adapter?

Former Member
0 Kudos

Hello,

Right now when I try to acuvate the UDF I recived this message:

Activation of the change list canceled Check result for Message Mapping ecc_purch_price_MM | com:netafim:pricing:ecc_purch_price: Starting compilation Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapbe599140504511dea73a001635c5b25f/source/com/sap/xi/tf/_ecc_purch_price_MM_.java:64: ';' expected DynamicConfigurationKey DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error

Elad

Shabarish_Nair
Active Contributor
0 Kudos

why dnt you post your complete code here?

Answers (4)

Answers (4)

sunilchandra007
Active Contributor
0 Kudos
Hello,
When Itried to use with the UDF.
I received this error message:

14:25:50 Start of test
Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map4b141341503111de99ce001635c5b25f/source/com/sap/xi/tf/_ecc_purch_price_MM_.java:64: ';' expected DynamicConfigurationKey DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map4b141341503111de99ce001635c5b25f/source/com/sap/xi/tf/_ecc_purch_price_MM_.java:64: ';' expected DynamicConfigurationKey DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error 
14:25:51 End of test

Elad

Hi,

It seems that you are testing this UDF from Test tab. If yes, it wont work.

You need to run the whole scenario.

Regards,

Chandra

Former Member
0 Kudos

hi,

check these links

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5336] [original link is broken] [original link is broken] [original link is broken];

[http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm]

Regards,

Syed

Shabarish_Nair
Active Contributor
0 Kudos

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

refer that to populate your file name dynamically

former_member200962
Active Contributor
0 Kudos

Use a UDF in your mapping which will have the logic for Dynamic Configuration...correspondingly you will need to set the ASMA parameters in your receiver FILE CC.

Just make a search with Dynamic FileName and you will find many threads with the UDF on SDN..