on 03-19-2008 7:17 AM
Hi Experts,
I am doing IDoc->XI -> file Scenario. I sending material master data to a third party. At the target side i need to create a file name of this type "Material + MATNR+Timestamp.txt". In that file name "Material" is always constant and "MATNR" is dynamic, it will be fetched from payload and timestamp is also dynamic. How can i create this kind of file name at target side.
I know i have to use "Adpater Specific Attribute Message" but i dont know hw to do this. If some body know this please help out.
Thanks in Advance,
Venky
Hi Venkatesh,
This can be achieved by declaring the variable and assigning the value from the payload in the following way.
For eg:
Target Directory: /SYS/
File Name Scheme: Material%MATNR%.txt
Enable the Variable Substitution and define the variable name with its reference as follows
Variable Name Reference
MATNR payload:<messageType>,1,Record,1,MATNR,1
Understand that 1 is its occurence in the message.
Let me know if you have any issues. Also go through the below link
[Variable Substitution|http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6a316af5a23672e10000000a114a6b/frameset.htm]
Regards,
Yugandhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yugandhar Kotha ,
It is giving the following error
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: MATNR: 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: MATNR
In variable substitution table i gave
MATNR payload:ZMAT_MN,1,IDOC,1,E1MARAM,1,MATNR,1
Below i am sending the XSD structure please provide the payload path
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="ZMAT_MN">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC" type="ZMATMAS.MATMAS05.ZMAT_MN" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ZMAT_MN.E1MARAM">
<xsd:annotation>
<xsd:documentation>
Master material general data (MARA)
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="MSGFN" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Function
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="MATNR" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Material Number
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="18" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ERSDA" minOccurs="0">
Thanks,
Venky
Hi Yugandhar Kotha ,
I gave receiver payload path. still iam getting the following error.
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: java.text.ParseException: Variable 'mpn' not found in variable substitution table: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Variable 'mpn' not found in variable substitution table.
in the advanced tab Enable is checked
Variable name Refrence
MPN payload:MT_MAT_EXT_MN,1,MaterialMaster,1,MPN,1
In file name schema i gave this file name MATERIAL_%MPN%.TXT
Please let me knw wat else i hv to do. I wll reward points once it is resolved
Thanks,
Venky
Hi Venkatesh,
Variable name Refrence
MPN payload:MT_MAT_EXT_MN,1,MaterialMaster,1,MPN,1
The first error in the above is you should use only lower cases in the variable name, so use mpn at both the file name and also in the Variable table substitution.
secondly cehck do u have the elements MaterialMaster inside the MT_MAT_EXT_MN xml node and also MPN node in the MaterialMaster node.
Let me know if you have any issues, i think by doing the above u should be able to resolve this issue.
Regards
Yugandhar
Hi,
>>>> know i have to use "Adpater Specific Attribute Message" but i dont know hw to do this. If some body know this please help out
Some adapters support specific message attributes, which contain additional information about messages. This information is not located in the payload of the message, but in additional message header fields.
Every adapter has a defined set of attributes, which are described individually as part of the configuration for each of the adapters.
These attributes can be accessed in routing and mapping by using the attribute namespace and the technical name of the attribute. The attribute namespace comprises the namespace in the Integration Repository in which the adapter metadata for the adapter is saved and the name of the adapter metadata object.
The adapter namespaces for the adapters shipped by SAP therefore have the following format:
http://sap.com/xi/XI/System/<Adapter Metadata Object Name of Adapter>
The SAP adapter metadata objects are located in the namespace http://sap.com/xi/XI/System of software component SAP BASIS.
refer link http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/content.htm for more details.
regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check these
Using Variable substitution
/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
Using ASMA
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Regards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.