cancel
Showing results for 
Search instead for 
Did you mean: 

Date in File name

Former Member
0 Kudos

Hi Experts,

1)Can i get the date only insted of timestamp. can anyone please tell me how can we achieve this.

i did add one extra field and i map that field to current date and in CC i used variable substitution but i dont want that field in my file.

Is there any possible to ignore that field in my file?

Kind Regards,

Kiran.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kiran,

Add one more node to u r sender datatype and define one field which is going to holding the date value.

Suppose u r data type to look like

DT_File

-Record

--Node1

--Noden

--Date 0..1(Node for Date Field make sure that the Node is last node in ur structre)

Date 0..1 ( Field which is going to holding Date Value)

In variable subtiution of Channel, give refrence like payload:MT_File,1,Record,1,Date,1,Date,1

In content conversion add as below

Date.fieldNames -- Date

Date.fieldFixedLengths -- 0 ( ZERO )

Date.fixedLengthTooShortHandling -- Cut

That Date field would not come into the file.

It will solve u r problem.Try this and let me know u r proceedings.

Cheers

Veera

>>> Reward points,if it is needful.

Former Member
0 Kudos

Hi Veera,

Thank you very much for your help it solved my problem but the only the last record of the file contains the date value, the whole file is not populating the date field but only last record is showing.

Can you please help me why it is doing like this?

Kind regards,

kiran

prateek
Active Contributor
0 Kudos

Just a suggestion. If u could modify the sender side filename, and provide that name to be the current date, then this name could be picked up and transferred as receiver filename using Adapter specific parameters.

http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

Regards,

Prateek

nisarkhan_n
Active Contributor
0 Kudos

prateek,

one clarification, this guys req is to get that in variable substution, is it possible to get the variable substution value from else were i mean not from the payload of target....i was thinking on the adapter specific on the reciver but again we have to put this value in payload of target and then in variable subtution....kindly let me know your views

nisarkhan_n
Active Contributor
0 Kudos

if you have used this in the target structure then it is difficult to ignore....why dnt oyu read the date from the Header details of the message instaed from the payload. (just check this not sure about this 1)

Former Member
0 Kudos

Hi

If i want to extract from header what is the variable name and reference?

Can you please tell me how can i extract the date from the header?

Kind Regards,

kiran

nisarkhan_n
Active Contributor
0 Kudos

I am sorry....even if date value is taken from the header, for variable substution you have to add that in the target strucutre....i am not sure without including the field in the target strucutre you can use the vriable substution...and if you put the field in target struvtur then you cannot supress it appearing in target file until you write some module......but i thnk it is possible i had read it some thread....:-)