cancel
Showing results for 
Search instead for 
Did you mean: 

DAT File to PI to RFC

Former Member
0 Kudos

Dear All

I have been trying to search for the SAP PI /XI File to RFC scenario (.DAT File).

My dat file contains data in below format

31201602020838000100000001760000

31201602020838000100000021990000

31201602020838000100000030140000

31201602020838000100000021000000

31201602020838000100000042030000

31201602020838000100000036730000

31201602020838000100000042550000

31201602020839000100000020750000

31201602020839000100000020840000

which can be read n below attributes and some of the attributes will be sent to the BAPI (RFC).

31

2012

07

16

1209

00

01

0000023036

00

01

Limton-Code

Year

Month

Day

Time

Shift code

Status(In/ Out)

EmployeeID

Management Code

Terminal No

Can anyone guide me how to achieve this in SAP PI.

I need to develop a scenario in which PI scedules a file read (dynamic file name everyday) and send it to SAP ECC ( BAPI_CC1_UPLOAD_TIMEEVENT).

Your support will be approeciated.

Thanks & Regards

Sidra Hasan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hasan,

If you are getting same number of digits in one line every time then yo can go for sub string to break the data into small parts.


Example:31201602020838000100000001760000 - total 32 Digits


31 2016 02 02 0838 00 01 0000000176 00 00




Regards,

Bhavin

Former Member
0 Kudos

Thanks Bhavin

Yes, number of digits will remain same in each line.

Can you please advise how to read this file and pass it to BAPI.

Thanks & Regards

Sidra HAsan

nitindeshpande
Active Contributor
0 Kudos

Hi Hasan,

As all the fields are of fixed length, you can use Transactions.FixedLength for this.

RecordSet - Transactions,*

Transactions.FixedLengths - 2,4,2,2,4,2,2,10,2,2

Regards,

Nitin

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks All for Help, I have created the sender adapter as advised but RWB shows error in my channel when i try to schedule it.

Kindly advise.

vicky20691
Active Contributor
0 Kudos

Hi Hasan,

A lot of things are wrong in this

Document name must be the sender Message type name which you created in ESR

Provide document namespace too- which is the namespace of message type provided above

and your recordset structure has substr*, it should be substr,* ... you forgot coma.

and yes endSeparator is missing.. substr.endSeparator='nl'

Regards,

Vikas

Former Member
0 Kudos

Can you please advise, my channel monitoring shows polling successfully completed but i don't see any message in SXMB_MONI

Former Member
0 Kudos

thanks vikas

I have corrected the parameters, and now it doesn't give me that error but also dosent send any message in SXMB_MONI. attached is my sender adapter and MT Interface screnshots. Can you please check and advise if it is correct now

vicky20691
Active Contributor
0 Kudos

Hi Hasan,

It is not reading the file.

Please check whether file is there in source directory or not and also check for permissions of file if you are placing via filezilla and winscp.

Do one more thing- Keep the recordset Name as blank for time being.. don't put Record in the recordset Name. keep it blank

Regards,

Vikas

former_member182412
Active Contributor
0 Kudos

Hi Hassan,

  • You dont have RecordSet created in your sender structure so you can use ignoreRecordset = true in FCC in sender file adapter.

  • Check empty file handling is set to Do Not Create Message in sender channel, may be your FCC is creating empty file and ignoring the message in PI because of this parameter.

  • I did not see the Substr.endSeparator in your configuration.

Regards,

Praveen.

Former Member
0 Kudos

Thanks Vikas

I deleted that recordsetname, its still not working. there is no error in channel but no msg in SXMB_MONI

I have checked, file is editable in notepad

Former Member
0 Kudos

Thanks Praveen

I am unable to find where to maintain ignoreRecordset= true, i have removed recordset name from FCC, channel is not in error anymore but no message is processed in sXMB_MONI, i can update the file in notepad so no read only file.

former_member182412
Active Contributor
0 Kudos

Hi Hasan,

  • You can use below FCC.

  • Uncheck the Process Read-Only Files option and Processing Mode to Archive or Delete.

Regards,

Praveen.

umesh_badveli
Participant
0 Kudos

Hi Hasan

You need to add ignore Record set name=true in parameters

Refer below screen shot

Regards

Umesh

Former Member
0 Kudos

Still no message in SXMB_MONI

Former Member
0 Kudos

Hi Umesh

I did change the attribute as you recommended, but still no msg was processed in SXMB_MONI.

There is no error anywhere to find out the issue.

umesh_badveli
Participant
0 Kudos

Hi Hasan

I am able to read the file with same parameters

Can you post your error log ?

Regards

Umesh

Former Member
0 Kudos

Thanks Umesh

Can you please advise where should i place the file, on my local PC or server drive?

umesh_badveli
Participant
0 Kudos

if you are having FTP server then change Transport protocol to FTP and place the file in FTP server location give those login details in Source tab and if you want use NFS then file need to place in server location, place can you post your datatype structure.?

Regards

Umesh

Former Member
0 Kudos

I tried both, running on my local PC and on PI server path ( I am not using FTP)

Below is my structure

former_member182412
Active Contributor
0 Kudos

Hi Hasan,

Did you change the processing mode to archive and uncheck process read only option in file adapter?

Regards,

Praveen.

Former Member
0 Kudos

Thanks Praveen

YEs i did, but still i see no message exchange to Integration engine.

My scenario is to File-XI-RFC, can you advise how i can test my scenario, i have completed all the mapping in IB components.

Many Thanks

Sidra HAsan

vicky20691
Active Contributor
0 Kudos

Hi Hasan,

I don't know why this is happening. You channels are not even showing any logs of reading the files.

You have to test it in the same manner place it at NFS location in PI server and then it will be picked up.

Tell me one thing how are you placing your file on the PI server? Remotely login to the server or via winscp or via filezilla?

Regards,

Vikas

Former Member
0 Kudos

This message was moderated.

vicky20691
Active Contributor
0 Kudos

Hi Hasan,

For this scenario, pick all the files and apply File Content Conversion with separation as fieldFixedLength

http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/08/21/content-conversion-for-fixed-leng...

so the length will be 2,4,2,2,4,2 and so on...

After FCC just normal map to the BAPI.

Regards,

Vikas

manoj_khavatkopp
Active Contributor
0 Kudos