Generating DSOs by using a ABAP program
Hi Experts,
We have a requirement like mass generation of infoobjects through excel file as input. Similarly we need to create 20 to 30 dso's by giving excel file as input.In that file we mention DSO technical name,properties,key fields and data fields. By using this information we have to generate dso automatically in BI system.
Any one have had implemented this in their project. I searched in Google for this, but no information found.
Please share me the code/Program/Function Module to achieve it.
Your help is much appreciated.
Thanks in advance.
Regards,
Vijay.
Hi Vijay,
Yo have to use the BAPIs BAPI_ODSO_CREATE and BAPI_ODSO_ACTIVATE.
I have used these BAPIs in my approach for generating Reporting InfoObjects based on Business Content. Here you have the option to generate a "template" DSO. Please have a look at my document Implementing Reporting InfoObjects based on Business Content. Here you can find sample coding in Class YCL_BW_REP_IOBJ Method GENERATE_TEMPLATE_DSO.
Best regards,
Sander
Similar Messages
-
How to access Infocube content using an ABAP program
Hi,
I am trying to access infocube contents using a ABAP program in BW.
It is easy to access ODS content as we have NEW DATA or ACTIVE DATA
tables. Is there any way we can access Infocube content.
I tried using the FACT table but it has only Keyfigure data.
thanks
arshad.Hi,
I would suggest to use a transactionnal cube, even if you do not use BPS to feed it.
Then, you create a layout in transaction BPS0 (~ similar to a query), and you can access the cube content by simply using the SAP function <b>API_SEMBPS_GETDATA</b>.
This is easy and fast.
Regards, -
Attach files to a Shopping Cart in SRM portal using a ABAP program.
Hello.
We need to attach files to a Shopping Cart using a ABAP program and see them in SRM portal.
Currently we know how to attach files in the backend using the function Xxxxxxxxxx but with this function we can not see the attachment in the SRM portal.
Do you know someway to attach files direclty in the front-end using a program?
Maybe i have to attach first in the back-end and after that transfer to front-end?
I have seen some thread but the solution provided is in the other way arround (transfer from front-end to backend) and then is not useful for my proble.
Thanks in advance.
Kr,
Angel.Hello Angel,
You can attach a file to SC ,and it is a standard functionality provided in SRM.
While creating a Shopping cart,under Documents and attachements tab,there is an option to select a local file and attach it to a SC
If you are looking at attaching the document in SRM and sending it to BE system.(R/3 system), then have a look at SAP note Note 1057932 - FAQ: Atachment transfer to backend, Required Configurations.
The Following BADIs will have to be implemented to allow the above functionality
For transfer of attachments in PO , activate the BADI BBP_CREATE_PO_BACK. Set the values of the following parameters in the
method BBP_CREATE_PO_BACK~Fill_PO_INTERFACE
CV_ATTACH_TRANSFER_ACTIVE = 'X'
CV_ATTACH_BE_STORAGE_CAT = 'DMS_C1_ST'
CV_ATTACH_BE_DOC_TYPE = 'SRM'.
For transfer of attachments in PR, activate the BADI
BBP_CREATE_REQ_BACK. Set the values of the following parameters in the method BBP_CREATE_REQ_BACK~FILL_REQ_INTERFACE
CV_ATTACH_TRANSFER_ACTIVE = 'X'
CV_ATTACH_BE_STORAGE_CAT = 'DMS_C1_ST'
CV_ATTACH_BE_DOC_TYPE = 'SRM'.
Award points if useful.
Thanks
Arshad -
How to generate a PDF document from ABAP program
Hi experts,
I have arequirement where in i need to create a PDF document using program. I have all the data collected into tables and i have used the calss CL_FP_PDF_OBJECT.
A pdf document is successfully created, but unable to open it because of some error. I guess some encryption is missing.
As an alternative I have created a smartform and generated its OTF data in my program and created a PDF. This is working fine.
But as per my requirement, i cannot go for a smart form.
Any help to resolve this issue will be highly appreciated.
Thanks & regards,
Asrar Ahamed MA
Infosys Tech. Ltd. INDIAHi Asrar ,
create a report with this Copy and give your program name in the selection screen whose output need to be in PDF.
*report zanusha_spool_to_pdf.
---TABLES----
tables:
tsp01.
---STRUCTURES---
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
---INTERNAL TABLES---
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
---SELECTION SCREEN---
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:\'
p_repid
'.pdf'
into mc_filename.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
*-- Make sure that a printer destination has been set up.
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out the spool number
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
*-- Download the file
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(9)
f_uname+0(3)
into lc_rq2name.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
Thanx
Anusha. -
Can we update BW infocube from SAP using Custom ABAP program ?
Hi,
My requiremnet is to update the infocube using data from R/3 .
I have a custom report program and users want this data in BW.
Let me if there are any FM? from which we can call via RFC or any other alternatives?
Rgds
Praveenreport must be an ABAP program in ECC I guess...Why dont you look forward for generic extraction...
Check this one:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33 -
Re-use of ABAP Program ID from SAP Application in BODS 4.0
Objective:
1. We have used ABAP Program ID in DataStage 7.5. For example, ZDSYE001
2. The above ABAP Program ID is residing in SAP Application Server.
3. Now we need to use the same ABAP Program ID [ZDSYE001] in SAP BODS 4.0
=====================================================================
ISSUE/ERROR:
1. In SAP BODS 4.0, we create a Datastore for SAP Application with all the configuration details.
2. We are able to view external metadata for tables but not for ABAP Program ID.
3. For ABAP Program ID, we are getting below error while using Extractor Object in Datastore to get the ABAP program ID:
Cannot import the extractor<name=ZDSYE001>
Error creating RFC Fuction<Z_AW_EXTRACTOR_IMPORT>:<RFC_ABAP_EXTRACTION-Exception Key:FU_NOT_FOUND,SYS-MSGTY:E,SY-MSGID:FL,SY-MSGNO: 046)>.Notify Customer Support (BODI-1116153)
=======================================================================
Please provide your inputs ASAPHi,
Please check this wiki pages for more information on how to solve your issue:
http://wiki.sdn.sap.com/wiki/display/BOBJ/ReleasingExtractorsforusebytheODP+API
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=217449812
Hope it helps,
Pedro -
How to find which data elements are used in ABAP program ?
I wish to find out which data elements are used in some programs .
Is there any DD table which stores this information ?
I know we can go to program and look in fields, but do SAP stores this information somewhere ?Dear Kaushal,
Please check the table <b>TRDIR</b>.
Regards,
Abir
Don't forget to award points * -
Find dictionary object used in ABAP program
Dear All,
Pl help me find out all the dictionary objects used in report program and dialog program.
Input will be program name(report or module pool). output will give name of the database tables used in that program.
thanks.Hi,
Use the FM RS_PROGRAM_TABLES
pass the object type as PROG for report and the program name for object name
Vikranth -
Initiate BA00 (Order Confirmation) output manually using an ABAP program
Hi experts,
Does anyone have the experience of initiating BA00 print from an ABAP program? Similar to what happens when choosing "Issue Output To" from the "Sales Document" menu in VA01-VA03.
Best regards,
MagnusHi,
Check SAP Standard program RSNAST00.
Regards
Vinod -
How to use simple abap program O/P using bsp.
Hi All,
I want to know simple BSP program which will call normal abap program. It has to display simple output not in table format.
Thanks,Check the tutorials mentioned in the Wiki. Read the documentation. It is all simple.
Cheers
Graham Robbo -
I am extraction through an legacy system using some abap programs
hi all,
I am just curious to find out is there any debugingg procedure that can be carried out to check the data loading from external systems.
I am aware of simulate updation option at the infopackage level. Can anyone let me know how to debug the data that is been flowed in the bw system using an abap progm.
regds
hariOther than the simulate updating there is nothing in BW that let's you know the flow of the data, this debugging method actually does everything you need to debug, I really don't know why it is necessary to have a tool more than this. Line by line you will see what is happening to specific records and where it is throwing error.
thanks.
Wond -
Checking for running programs using a abap program
Is there a way in ABAP to detect from within a program that another process is running the same program? Meaning if PROG1 is running, could PROG1 check to see if another process is running program PROG1?
Use the locking concept. You can either create your own, or a popular one to use is ESINDX, passing parameters: relid 'ZZ', SRTFD program name, and SRTF2 = 0.
The logic is:
Attempt to get lock (FM ENQUEUE_ESINDX, perhaps).
If lock got -> run program
If lock not got -> quit.
You have to put this logic at the start of your program.
matt -
Using OO Abap programming optimally
Dear experts,
I developed a report purely on Object Oriented concepts.It works really fine.
Now my requirement is that in one of my module pool program i want to retrieve some data from that report itself
and show in my Input help. I deliberately made this report OO as i had anticipated that it will be required to me in future.
Now time has come.I want to call some method of the defined class.It is at this point that i am ignorant how to do.
Methodi want to call from different program is that
fetch_lc_info ()
Let me explain you the structure of program which i am willing to call.
[code]
report zsammrp01.
include zdata_definitions. //I definitions
include zselect_lc_params. // selection screen
start-of-selection.
include zmainlc. //main logic
Class Declarations
data : ob_get_all_lcinfo type ref to get_lc_details.
data: ob_alv_print type ref to alvprint.
Perform functionalities
end-of-selection.
create object ob_get_all_lcinfo.
ob_get_all_lcinfo->fetch_lc_info( ).
create object ob_alv_print.
ob_alv_print->print_details( ).
end-of-selection.
[/code]
Let me show the zmainlc where i defined classes.
[code]
class get_lc_details definition.
public section.
methods: fetch_lc_info.
endclass.
class get_lc_details implementation.
method fetch_lc_info.
select aebeln aebelp bekgrp awerks amenge ameins
bbedat amatnr atxz01 anetwr bwaers bwkurs anetpr azztest azzlcbt blifnr
from ekko as b inner join ekpo as a on
( aebeln = bebeln ) into table t_all_lcs where b~bsart like 'IM%'.
some other manipulation on this table done..............
endmehod.
[/code]Hi Aditya,
from your explanation, i get that you defined and implemented your classes locally.
To use local classes from outside their context is not supported, (though not impossible).
Instead, you can convert your local classes to global ones by accessing them by SE24 , using the import feature from the menu. Once they are globally defined, you can use them with every Program you like.
regards
Jörg
(Besides, there is an OO Forum) -
Logical path using in abap program
hay,
I want to create file in application server directory.
so i want the user to select the Logical path and file name from screen.so that he can create the file and seved in selected logical path.{path used must be from Instance profile DIR_LOGGING,GLOBALPATH directory etc).
could you pls tell me how to do this using parameter for user input selecting FILE PATH.
Do we have Functional module for Retrieving physical path
from logical path?
could you pls help me..
ambichan.hey,
Thanks for your reply.
Instead of using logical file name as input, can we allow the user to select logical path using parameter?
I want user to select Logical path or logical file name from parameter. is it possible?
(I want to avoid user to input insteal want to allow user to select the path)
ambichan
Message was edited by: ambi chan -
How to Raise Event in BW using ABAP program
Hi BW Experts,
Can anyone tell how to raise event in BW using a ABAP program.
Program should ask for the event to be raised and destination server.
Edited by: Arun Purohit on May 14, 2008 11:04 AMHi Arun,
By Using BP_EVENT_RAISE function module you can raise an event.Create an ABAP program and call the function module BP_EVENT_RAISE and create a avariant to specify the event to be raised. Schedule this ABAP code. Go to the start process type and set the schedule to "after event" and mention the event name that you created. Also, I think now you can mention the time as well and you can also schedule for periodic scheduling.
T Code : SM62 --> To Create an Event.
T Code : SE38 --> To Create an ABAP Program
Use Function Module : BP_EVENT_RAISE to raise an event.
Related links:
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset
Hope this helps
Regards
CSM Reddy
Maybe you are looking for
-
HELP needed !!! pleace help !!
I have a problem. this is the site ( http://home.planet.nl/~onbe1102/prikbord.html its a flash site and when i click to the name buttons i would like to open a *.XLS file or a site. the action fore the buttons ar now: btnWilliam_mc.onRollOver = funct
-
CE10 how to prevent user from view hostrical instance
hi, We are currently using CE10. One of our user used search functionality in enterprise to search for reports start with 'employee' and it came back with all the crystal reports on the server that started with employees, even the one the user does
-
Indesign CS3: Variable content and Excell
Hello everyone! I need to create an A5 spread booklet that contains price lists and product specifications. (see example.) The content will be available in different languages and for different regions. The content on the left is always the same, t
-
Existing PO in SAP PO#1 ROW ITEM QTY 0 item A 100000 Could we create a good receipt PO from PO as following using SAP SDK? GRPO#1 ROW ITEM QTY Base Type Base Ref. Base Key bas
-
Do you guys know if this is a bug? I created a custom USB Yosemite installer using the 'createinstallmedia' binary inside the Yosemite installer. Booted iMac with this USB installer and proceeded to install Yosemite (fresh formatted drive). No proble