Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RFC LOG

Former Member
0 Likes
1,273

Dear Abapers,

Non SAP ERP COSMOS is sending some data ,and SAP is receiving the same through an RFC and saved in SAP database tables.

Now I want to see these data before saving it in SAP as the data is something weared.

So for this i will have to write the data accumulated in the structure into a log file as in RFC i cannot use an Write Statment.

Can some one please guide me with an example of writing data to a log file in RFC?

Regards.................

10 REPLIES 10
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,194

Hi,

How about writing the data to application server. Use OPEN DATASET, TRANSFER and CLOSE DATASET statements in your RFC.

Thanks,

Vinod.

Read only

Former Member
0 Likes
1,194

Hi,

Another way I can think is display data in ALV and make a button in ALV which will post the entries.

so, it will be like view and approve.

Regards

Bikas

Read only

0 Likes
1,194

Guys ,

Can u please give nme a sample code as I have never used opend data set and after writing the code how shd. i view the file?

Regards...............

Read only

0 Likes
1,194

Hi Sudha,

Just search the forum with OPEN DATASET. You can see lots of sample codes.

eg:


OPEN DATASET po_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

LOOP at itab into wa.
TRANSFER wa TO po_file.
ENDLOOP.

CLOSE DATASET po_file.

You can check F1 help on OPEN DATASET for more details.

You can view the application server files in T-code AL11 and download the application server file to your PC using CG3Y

Thanks,

Vinod.

Read only

0 Likes
1,194

Dear vinod,

Appreciate ur assisatnce ,but when I browse i am unbale to find how do we declare the file tyep to be opened on application server.

In above example how shd. I declare the file "po_file"

Regards..............

Read only

0 Likes
1,194

Hi,

You can declare as character type of sufficient length say 150.

DATA: po_file(150) TYPE c.

Thanks,

Vinod.

Read only

0 Likes
1,194

Vinod ,

I need ur assistance to know that i am sending Arabic charatcers to the application server.here instead of Arabic characters it prints "????".

I have already installed Arabic in SAP .And if I execute the same RFC locally i see Arabic Characters in my data base.

Doe OPEN DATA work for other language?

Regards................

Read only

0 Likes
1,194

HI,

OPEN DATASET can be used for any language. Did you use ENCODING DEFAULT with OPEN DATASET?

In debug mode were you able to see the values? Try to download the data to PC file and see. Also try to use Arabic codepage with OPEN DATA SET(BASIS team can give you the code page for arebic)

Thanks,

VInod.

Read only

Former Member
0 Likes
1,194

closed

Read only

Former Member
0 Likes
1,194

closed