cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to export master data and transaction data to a flat file using Custom BAdi

former_member339201
Participant
0 Likes
615

Hi,

We have a requirement to export transaction data along with master data based on some logic to a flat file on server.We are also passing some parameters while running the package to trigger the Custom BAdi.

We are yet to figure out some demo code to achieve it.

Please help.

Regards,
SHUBHAM

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member339201
Participant
0 Likes

Hi,

Suppose we have 6 dimensions :

A,B,C,D,E,F

Now what we have to show in export file with header something like this :

A,A_DESCRIPTION,CALCULATION1,B,B_DESCRIPTION,CALCULATION2,C,C_DESCRIPTION,CALCULATION3 ,....

Under this we will be having several records based on calculations done.

I will be doing the calculations, but how to export it to some flat file is to be known ..

SHUBHAM

Former Member
0 Likes

Hi Shubham,

As i told you, please see below.

You can save a file in Application server using following steps.

1. Open dataset <datasetname>

2. Transfer file

3. Close dataset

Regards

Rohit

Former Member
0 Likes

Hi Shubham,

Everything is possible, you need to speak to an ABAPer to help you to achieve this.

few options:

  • using export to file package:

          use end routine to extract MD as well and populate it in the same file.

  • using retraction package and BADI - /CPMB/EXPORT_TD_TO_BADI

          in that BADI you can read all master data as well, and find a way to save to the SAP file system.

Andy

Former Member
0 Likes

Hi Shubham,

I basically don't understand your requirement, why you want to save the file on server. regardless below is the approach.

You can save a file in Application server using following steps.

1. Open dataset <datasetname>

2. Transfer file

3. Close dataset

Application Server T-Code - AL11

Rohit

gajendra_moond
Contributor
0 Likes

Hi Shubham

What does this mean -

" export transaction data along with master data based on some logic"?

Do you have to export two files - one for transaction data and one for master data?

former_member186338
Active Contributor
0 Likes

Sorry, but can you explain what do you want to achieve?