cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to XML file - AS2 adapter - Dynamic File Name

tharaka_fernando
Contributor
0 Kudos

Dear all,

I have a requirement to send an IDOC as an XML file via AS2 adapter. but need to set the XML file name dynamic (IDOC to XML - AS2 scenario ).

PI version - 7.4 (single stack)

Ex : File name --> DOCNUM + CREDAT + CRETIM  (IDOC document number + Created Date + Created Time) in IDOC control document (EDI_DC40)

I referred to below responses about this issue but need more clarification..

http://scn.sap.com/thread/3745045

I have set the "Dynamic Configuration" option enabled in Receiver Communication Channel - (AS2)

  • If I need to write  a UDF in message mapping, then where should I map this UDF in inbound message structure ?

  • What value should I enter in AS2 receiver communication for the file name ?

  • any configurations to be done on IDOC communication channel (sender) ?

  • Any other configurations to be done ?

Thanking all in advance....

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Fernarido,

  • If I need to write  a UDF in message mapping, then where should I map this UDF in inbound message structure ?

-->> you can map the UDF to any output node (not the element).

  • What value should I enter in AS2 receiver communication for the file name ?

-->> you can write any thing in receiver file, that name will be over right by the dynamic file name at run time.

  • any configurations to be done on IDOC communication channel (sender) ?

-->> No configuration is req. at sender side.

  • Any other configurations to be done ?

-->> No

Hope it help!!

Harish

tharaka_fernando
Contributor
0 Kudos

Dear Harish,

Thanks for always providing quick reply and proper answers for my queries.

little more things (as usual )...

  • If I map the UDF to "header" node in my inbound message in mapping ( as per below) , how will the program identify to use "header" node for file name at run time in AS2?

  • Can't I user Graphical mapping instead of UDF ? (Cos I'm not much familiar with JAVA UDF )

(because file name is the combination of IDOC number and Date which relies in IDOC contral data . )

ex :

     IDOC Number + Date ---> header node

Thanks again..

Harish
Active Contributor
0 Kudos

Hi Fernando,

The value of Filename will be set in dynamic configuration variable and the receiver channel will use the value of dynamic configuration variable to put in file name.

If you have any field in the output structure where you can input the file name (store the file name) then you can also use the variable substitution (which not required the file name).

refer the below links

Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integr...

For UDF

http://scn.sap.com/community/pi-and-soa-middleware/blog/2009/03/26/dynamic-configuration-vs-variable...

regards,

Harish

Answers (1)

Answers (1)

former_member183816
Active Participant
0 Kudos

Configuring the AS2 Receiver Channel - SAP NetWeaver Process Integration, business-to-business add-o...

Write a dynamic configuration udf to generate file name as per your requirement. Place ur file name at http://sap.com/xi/XI/AS2/AS2Filename

You can map the udf value to parent node. file name will be fetched at runtime from above parameter automatically. Refer above doc.