Skip to Content
0

Dynamic File configuration using XSLT mapping and in Receiver AS2 B2B Adapter

Jun 05, 2017 at 09:39 AM

137

avatar image

Hello Experts,

I am facing 2 problems in dynamic file configuration scenario with XSLT mapping and in Receiver AS2-B2B adapter.

Scenario : Idoc to AS2 adapter (SAP PI/PO 7.31 single stack)

Requirement : 1) Need to use XSLT mapping only as business requirement, 2) text file need to created at target AS2-B2B adapter

Issue 1: (ESR issue)

1) I need to create file name with 'constant value + runtime value + timestamp.txt'

for e.g: here Filename should be - 'Resource_Prdnresourcevalue_timestamp.txt'

Here I using my attached code I am able to pass constant and timestamp value but unable to pass real time values.

Logic in ESR: I am using 2 Operation mappings, first for one to one field mapping and second for dynamic file configuration logic.

Queries 1 :

1) As we have to follow sequence during adding graphical mappings in OM , similar there is sequence need to follow in XSLT mapping?

2) In which parameter (Variable or Param) we need to select xpath for getting runtime values? In my code I am trying to fetching values from Variable as well as Param, but still values not getting fetched.

3) Source message Xpath need to use or Target message Xpath need to use, to get realtime values? I tried with both but still not getting values.

Issue 2: (ID issue)

2) I am using standard module 'DynamicConfigurationBean' to pass dynamic file name

Below are Module Parameters in Channel:-

Queries 2:

1) In message log I am able to see dynamic file name (without runtime value in it), but still after exit bean get called sender software component value get passed to file name?

Please se below screenshots of message logs:-

Kindly help.

Thanks & Regards,

Karan Kholakiya

1.png (174.2 kB)
2.png (37.3 kB)
3.png (30.4 kB)
4.png (36.6 kB)
5.png (41.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Karan Kholakiya Jun 05, 2017 at 12:56 PM
0

Hello All,

Both issue resolved. It was a very silly mistakes.

Soultions:-

1) There was no code issue, it was an issue in mapping sequence only, first should be dynamic config xslt mapping and than one to one xslt mapping need to add in OM.

2) As Manoj said above, AS2Filename context object is case sensitive. It should be 'AS2Filename' and not 'AS2FileName'.

Thanks & Regards,

Karan Kholakiya

Share
10 |10000 characters needed characters left characters exceeded
Manoj K Jun 05, 2017 at 10:04 AM
0

Karan,

Not really an XSLT expert but just want to know any specific reason to go for xslt because u already mentioned you have 1 : 1 mapping why not implement Dynamic there only.

Secondly the AS2Filename context object is case sensitive , try correcting that.

Br,

Manoj


as2.png (2.3 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Manoj,

Yeah ... it was a silly mistake in module parameter. After changing AS2FileName to AS2Filename it worked.

Regarding XSLT mapping :- It is a Client requirement, they are using XSLT mappings only for all interfaces, they are not looking forward to graphical mappings, so unfortunately i have to go with XSLT mapping only.

So now 2nd query got resolved, but still i am unable to pass runtime value using XSLT dynamic configuration.

Can you please help by looking into code.

Thanks & Regards,

Karan Kholakiya

0