‎2009 May 25 10:18 AM
HI,
I have tried accessing data from a cluster table but was unable to do it. I tired using the statement IMPORT but, every time i run it, the staement fails and i am not able to work with it.
I even tried using the example in the keyword help, but was of little use.
Can some one help me on this front.
Regards,
Rishav
‎2009 Jul 23 7:36 PM
Hi,
" To post data to cluster
EXPORT tab = itab
TO DATABASE indx(XY)
ID 'TABLE'.
'or
EXPORT itab TO DATABASE indx(xy) ID ' TABLE'.
' To access data from cluster table
IMPORT tab = itab " here itab should the internal table with same structure as the cluster table else data will not get download
FROM DATABASE indx(xy)
ID 'TABLE'. " ID should be the same when passing with the EXPORT same
or
'you can use this way
IMPORT itab FROM DATABASE indx(xy) ID 'TABLE'.
Regards
Bala Krishna
‎2009 May 25 10:27 AM
Dear Rishav,
If you are working with Cluster table e.g. BSEG then its not possible to select only once at the time of data selection. you need to select data from cluster table in a loop and use accordingly. If this is not possible for you then find alternative transeparent table.
Feel free to ask if you have any doubt.
Regards,
Vijay
‎2009 May 25 10:33 AM
Hi Vijay,
I am not using BSEG but a table SMW3_BDOC2 and still i am not able to access the data.
TABLES : SMW3_BDOC2.
DATA : ls_rawdata TYPE /1CRMG0/BUPA_MAIN.
DATA : lv_bdoc_id TYPE SMOG_TID.
get the data id----
SELECT SINGLE BDOC_ID FROM SMW3_BDOC INTO lv_bdoc_id WHERE BDOC_TYPE = 'BUPA_MAIN'.
IF sy-subrc = 0.
select data from the cluster----
IMPORT /1CRMG0/BUPA_MAIN TO LS_rawdata FROM DATABASE SMW3_BDOC2(10) ID lv_bdoc_id.
ElSE.
WRITE : 'Data not retrieved'.
ENDIF.
Could you please tell me how to use the statement.
‎2009 May 25 10:47 AM
Hi,
Check this code. Even this is failing
TYPES:
BEGIN OF tab,
col1 TYPE i,
col2 TYPE i,
END OF tab.
DATA:
wa_indx TYPE indx,
wa_itab TYPE tab,
cl TYPE mandt VALUE '800',
itab TYPE STANDARD TABLE OF tab.
IMPORT tab = itab
FROM DATABASE indx(10)
TO wa_indx
CLIENT cl
ID 'TABLE'.
WRITE: wa_indx-aedat, wa_indx-usera, wa_indx-pgmid.
ULINE.
LOOP AT itab INTO wa_itab.
WRITE: / wa_itab-col1, wa_itab-col2.
ENDLOOP.
‎2009 Jul 23 6:17 PM
Hi Vijay,
I wanna read the cluster table how to do that, I have come across some FM HR_FORMS_TIM_GET_B2_RESULTS which will read the B2 cluster which I require, But I don't know how to access that data.
can you please put some code for the same.
Thanks in Advance,
Gaurav Patwari
‎2009 Jul 23 7:36 PM
Hi,
" To post data to cluster
EXPORT tab = itab
TO DATABASE indx(XY)
ID 'TABLE'.
'or
EXPORT itab TO DATABASE indx(xy) ID ' TABLE'.
' To access data from cluster table
IMPORT tab = itab " here itab should the internal table with same structure as the cluster table else data will not get download
FROM DATABASE indx(xy)
ID 'TABLE'. " ID should be the same when passing with the EXPORT same
or
'you can use this way
IMPORT itab FROM DATABASE indx(xy) ID 'TABLE'.
Regards
Bala Krishna
‎2009 Jul 24 3:52 AM
the problem of reading the cluster is solved.
We actually need to know the Type of cluster we want to import.
Eg:
IMPORT tab = itab
FROM DATABASE indx(10)
TO wa_indx
CLIENT cl
ID 'TABLE'.
The Tab marked in Bold and underlied must be known to the person who is importung the data.
then we mention the Database name and then the ID(in the database table ) required to fetch the data.
‎2015 Apr 28 1:32 PM
Hi,
how can you know the structure of the tab ??
This is where I am stuck. can anyone throw some light on this please..?
Thanks,
Saikat
‎2015 Apr 28 7:57 PM
Hi Saikat,
You need to figure out where the EXPORT TO DATABASE is done and look at that code to see what the structure of the cluster data is. You can't tell by looking at the data, only the programs that use the table will show you.
Jim
‎2015 May 07 11:40 AM
Thanks Jim, but we took a different approach for the requirement. But yes, your answer is spot on.
Regards,
Saikat