2015 Sep 16 8:09 AM
Hello All,
I am new in ABAP ,i am basically from BW background. My business requires me to write a code to get details of a DSO. I have searched SCN and found out that there is BAPI_ODSO_GETDETAIL. How do i use this in ABAP. I have searched in SCN for sample codes, i have found out for BAPI_PO_GETDETAIL but iam not able to use the simillar code for BAPI_ODS_GETDETAIL. My business requirement is to enter the technical name as input and the details of the ODS should be my output. I ahev tried with a sample code which i haev used but nothing is getting displayed. PLS help
the code whch i used
REPORT ZBAPIDSO.
DATA: begin of B_ODS occurs 0.
include structure BAPI6116.
DATA: end of B_ODS.
Parameter B_ODSOBJ like BAPI6116-ODSOBJECT default 'Z_DISC'.
CALL FUNCTION 'BAPI_ODSO_GETDETAIL' "Read Details for a DataStore
EXPORTING
* objvers = RS_C_OBJVERS-ACTIVE " bapi6116-objvers Object version
odsobject = B_ODSOBJ
" bapi6116-odsobject DataStore
IMPORTING
details = B_ODS " bapi6116 DataStore Object - Details
*return = " bapiret2 BAPI return parameter
* TABLES
* infoobjects = B_ODS " bapi6116io InfoObjects in DataStore Object
* navigationattributes = " bapi6116na Navigation Attributes for the DataStore Object
* indexes = " bapi6116in Indexes for a DataStore Object
* indexesinfoobjects = " bapi6116ii DataStore Object InfoObjects in Indexes
.
loop at B_ODS.
Write : / 'ODSOBJECT = ' ,
/ 'objvers = ',
/ 'owner = ' .
endloop .
Can you pls elaborate on what all mistakes i have done.
2015 Sep 16 9:04 AM
Hi Sashankan,
This is source which you can check. You can cross check with your code and see your self what you have missed.
In the table RSDODSO you can check all the details of the DSO records.
Make sure you give correct value for this parameter OBJVERS
REPORT ZR_BAPI_DSO.
TYPE-POOLS rsdg.
DATA: l_s_details TYPE BAPI6116.
DATA: l_s_return TYPE BAPIRET2.
DATA: l_t_infoobjects TYPE TABLE OF BAPI6116IO.
DATA: l_t_navigationattributes TYPE TABLE OF BAPI6116NA.
DATA: l_t_indexes TYPE TABLE OF BAPI6116IN.
DATA: l_t_indexesinfoobjects TYPE TABLE OF BAPI6116II.
Parameter B_ODSOBJ like BAPI6116-ODSOBJECT default '0D_FC_D01'.
START-OF-SELECTION.
CALL FUNCTION 'BAPI_ODSO_GETDETAIL'
EXPORTING
OBJVERS = 'D' "RS_C_OBJVERS-ACTIVE
ODSOBJECT = B_ODSOBJ
IMPORTING
DETAILS = l_s_details
RETURN = l_s_return
TABLES
INFOOBJECTS = l_t_infoobjects
NAVIGATIONATTRIBUTES = l_t_navigationattributes
INDEXES = l_t_indexes
INDEXESINFOOBJECTS = l_t_indexesinfoobjects
.
Write : / 'ODSOBJECT = ' ,l_s_details-odsobject,
/ 'objvers = ',l_s_details-objvers,
/ 'owner = ', l_s_details-owner .
Hello All,
I am new in ABAP ,i am basically from BW background. My business requires me to write a code to get details of a DSO. I have searched SCN and found out that there is BAPI_ODSO_GETDETAIL. How do i use this in ABAP. I have searched in SCN for sample codes, i have found out for BAPI_PO_GETDETAIL but iam not able to use the simillar code for BAPI_ODS_GETDETAIL. My business requirement is to enter the technical name as input and the details of the ODS should be my output. I ahev tried with a sample code which i haev used but nothing is getting displayed. PLS help
the code whch i used
REPORT ZBAPIDSO.
DATA: begin of B_ODS occurs 0.
include structure BAPI6116.
DATA: end of B_ODS.
Parameter B_ODSOBJ like BAPI6116-ODSOBJECT default 'Z_DISC'.
CALL FUNCTION 'BAPI_ODSO_GETDETAIL' "Read Details for a DataStore
EXPORTING
* objvers = RS_C_OBJVERS-ACTIVE " bapi6116-objvers Object version
odsobject = B_ODSOBJ
" bapi6116-odsobject DataStore
IMPORTING
details = B_ODS " bapi6116 DataStore Object - Details
*return = " bapiret2 BAPI return parameter
* TABLES
* infoobjects = B_ODS " bapi6116io InfoObjects in DataStore Object
* navigationattributes = " bapi6116na Navigation Attributes for the DataStore Object
* indexes = " bapi6116in Indexes for a DataStore Object
* indexesinfoobjects = " bapi6116ii DataStore Object InfoObjects in Indexes
.
loop at B_ODS.
Write : / 'ODSOBJECT = ' ,
/ 'objvers = ',
/ 'owner = ' .
endloop .
Can you pls elaborate on what all mistakes i have done.
2015 Sep 16 8:36 AM
2015 Sep 16 9:04 AM
Hi Sashankan,
This is source which you can check. You can cross check with your code and see your self what you have missed.
In the table RSDODSO you can check all the details of the DSO records.
Make sure you give correct value for this parameter OBJVERS
REPORT ZR_BAPI_DSO.
TYPE-POOLS rsdg.
DATA: l_s_details TYPE BAPI6116.
DATA: l_s_return TYPE BAPIRET2.
DATA: l_t_infoobjects TYPE TABLE OF BAPI6116IO.
DATA: l_t_navigationattributes TYPE TABLE OF BAPI6116NA.
DATA: l_t_indexes TYPE TABLE OF BAPI6116IN.
DATA: l_t_indexesinfoobjects TYPE TABLE OF BAPI6116II.
Parameter B_ODSOBJ like BAPI6116-ODSOBJECT default '0D_FC_D01'.
START-OF-SELECTION.
CALL FUNCTION 'BAPI_ODSO_GETDETAIL'
EXPORTING
OBJVERS = 'D' "RS_C_OBJVERS-ACTIVE
ODSOBJECT = B_ODSOBJ
IMPORTING
DETAILS = l_s_details
RETURN = l_s_return
TABLES
INFOOBJECTS = l_t_infoobjects
NAVIGATIONATTRIBUTES = l_t_navigationattributes
INDEXES = l_t_indexes
INDEXESINFOOBJECTS = l_t_indexesinfoobjects
.
Write : / 'ODSOBJECT = ' ,l_s_details-odsobject,
/ 'objvers = ',l_s_details-objvers,
/ 'owner = ', l_s_details-owner .
2015 Sep 16 11:02 AM
Hello Abdul,
Thanks i was able to get the data for ODSOBJECT,OBJVERS&OWNER<... Now if i have to display the data from the tables(infoobjects) i want to display the IO in DSO also, how do i code?
I tried it but it says the the table has no header line.
Thanks in advance.
2015 Sep 16 11:20 AM
Just use this code to display infoobjects
DATA: l_w_infoobjects TYPE BAPI6116IO.
LOOP AT l_t_infoobjects into l_w_infoobjects.
WRITE: / l_w_infoobjects-INFOOBJECT.
ENDLOOP.
2015 Sep 18 7:38 AM
Hello Abdul
Thanks for your help.. I have one more doubt is it possible to compare the DSO from dev and Quality by writing an ABAP code. I want compare the results of the above mentioned code..
2015 Sep 18 8:12 AM
2015 Sep 21 6:22 AM
So just to be clear, the code should also be present in the quality system ? Is it possible to write a code in DEV which calls teh quality system and get the result for quality?
2015 Sep 21 6:53 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |