‎2015 Apr 08 11:38 PM
Hello Experts,
I need to build a global report which sends files (Data) dynamically based on the input
Business Scenario
For example Based on the Purchasing Org entered on my selection screen, I need to send the data (different files) one for each as below
I will have radio buttons each for Header, item, Accounting, Classification
Now I want to build a global program which should dynamically read the total number of fields based on Purchase org enter and create a dynamic structure and create a dynamic file for the radio button selected.
For example
For Purchase Org OKMN should send a file with 14 fields when PO Header is selected
MNBV should send a file with 23 fields for PO header etc
Technical Solution
I have started developing the report, and unable to proceed further as how to fetch these dynamic field information based on my Purchase ORG entered on my selection screen..
Should I create a table with all the fields for PO header and maintain entries in that custom table with Purchase as key field and all the fields marked as 'X' are required in the final output..
or is there any other solution
Can any one let me know how can I proceed further...
Regards
Aditi..
‎2015 Apr 09 12:49 AM
Hi Aditi,
this is indeed a good option, but I reckon it's not very flexible ie you might have to enhance your table if you need to add another field not yet used for any PurchOrg.
Another way you structure your table could be something like this (all fields are key):
| PurchaseOrg | Table | Field |
|---|---|---|
| AAAA | EKKO | EBELN |
| AAAA | EKKO | EKORG |
| BBBB | EKKO | EKORG |
| BBBB | EKKO | EKGRP |
and so on. In this case you can keep it dynamically if you add a new field or even a new table. Of course there are other (maybe better) ways to do it, ie using BRF+ to determine which fields for which EKORG etc, but I just want to give you something simple and a bit more flexible
Regards,
Custodio