SAP for Oil, Gas, and Energy Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and navigate the evolving energy landscape. Join the conversation today!
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a file to be used by report ROIUH_LOAD_JEINTF for journal entry

Former Member
0 Kudos

Hello everyone,

My doubt is related to the PRA module -

I have to create a file to be used by program ROiUH_LOAD_JEINTF for journal entry creation. There are other programs also creating a similar file to what I am expected to create.

When I observe the existing programs, they have not used OPEN DATASET statement, instead directly used the TRANSFER dataset and then CLOSE DATASET.

What that does is it creates a file on the app server in a different format with only 1 line even if there may be like 10 lines of journal entry. The file mainly contains # which seems like some internal coding by the system.

When I tried using the OPEN DATASET statement, it wrote all the lines to the app server that were there in my internal table.

However, when I do not use the OPEN DATASET statement, it creates a file with just one line and maily # instead of the actual data from internal table.

Can any one explain what difference does it make to the system when we do not use the OPEN DATASET statement.

You help would be highly appreciated.

Thanks and Regards,

Shipra.

4 REPLIES 4

Former Member
0 Kudos

Hi Shipra,

When I observe the existing programs, they have not used OPEN DATASET statement, instead directly used the TRANSFER dataset and then CLOSE DATASET.

--> FYI, w/o open dataset we can't retriew any file from application server.

once open dataset call, then we will transfer file to other destination in different formats like EXCEL, TXT, LOTUS FILE & SO ON....

However, when I do not use the OPEN DATASET statement, it creates a file with just one line and maily # instead of the actual data from internal table.

-->Yes, in application server tcode AL11, contents NO folders. file path should be mentioned in internal table, then it converts into ASCII, BIN, XLS file & retrievs to AL11 tcode. pls inform to ABAP folks to debug.

Can any one explain what difference does it make to the system when we do not use the OPEN DATASET statement?

OPEN DATASET syntax,

OPEN DATASET dset FOR access IN mode

This statement opens the file specified in dset for the access specified in access in a storage mode specified in mode. OPEN DATASET does not reopen the file but moves the read or write position depending on the access mode.

when we perform this, use the OPEN DATASET statement

Operating system could not open file.

if you have any issue, Pls let me know.

Best Regards

Satish

0 Kudos

Hello Satish,

Thank you for your response.

I think I was not clear enough about my doubt. I do not have any confusion about what OPEN DATASET would do.

In my case, there is a file being written to the app server without using an OPEN DATASET for OUTPUT statement. The Z program directly calls a TRANSFER statement.

The file that is created on the app server looks like:

7042008-11-01 000200100840 ######RD##################203 #### #####10012888 #####RI01 MC3

This file is used by the program ROIUH_LOAD_JEINTF. There are several lines in the internal table for Journal Entry creation but only 1 line shows in the file. However, when you debug the program ROIUH_LOAD_JEINTF with the above filename, you would see that it takes up all the JE lines that were passed from the previous program (the Z program) which created this file.

However, when I changed the Z program to have an OPEN DATASET statement, it had all the lines displayed in the file, the file was very readable.

I just wanted to know how does the system write to app server when no OPEN DATASET statement is written in the program.

Hope I am clear this time. Thanks again.

Regards,

Shipra.

0 Kudos

Hi Shipra

In std program, called READ statement like, READ DATASET filename INTO datatab, check it.

When uploading the data to application server the tab delimitor may be used because of which you are getting # symbols.

Best Regards

Satish

Former Member
0 Kudos

I dont need an answer to this anymore, Thanks.