2008 Dec 08 3:10 PM
Hi,
I am trying to update entries in a DB Table.
There about 1000 entries at once, but whenever I am trying to do that it gives me error:
SAPSQL_WA_TOO_SMALL
Work area too small for ABAP/4 Open SQL work area operation.
The table to be updated has about 2 million recs.
I am using the FM: RSAR_ODS_API_PUT to update this table. This is a BW FM.
Any tips to get around this error.
Thanks,
CD
2008 Dec 08 3:20 PM
Can you show us the definition of the work area and the table?
Rob
Can you show us the definition of the work area and the table?
Rob
2008 Dec 08 3:17 PM
2008 Dec 08 3:20 PM
I have an IT which has about same recs as the table to be updated (about 2million).
I load 1000 entries from this IT to another IT (IT_2) and then call the FM with this new IT (IT_2).
But when the program calls the FM, i get this dump,.
2008 Dec 08 3:18 PM
create your work area with all table fields and update it....
2008 Dec 08 3:20 PM
Can you show us the definition of the work area and the table?
Rob
2008 Dec 08 3:24 PM
example:
data: gt_tab type standard table of mara.
gwa_tab type mara.
2008 Dec 08 3:28 PM
Table: /BIC/B0000578000 (this a PSA table in BW)
Field dataelement type
REQUEST RSREQUNR CHAR 30
DATAPAKID RSDATAPID NUMC 6
RECORD RSARECORD INT4 10
/BIC/ZITM_STAT /BIC/OW_BICZITM_STAT_AF CHAR 4
/BIC/ZBIB_ID /BIC/OW_BICZBIB_ID_AF NUMC 9
/BIC/ZITM_CLAS /BIC/OW_0000000481 CHAR 5
/BIC/ZITM_REQ /BIC/OW_BICZITM_REQ_AF CHAR 17
IT definition:
DATA: BEGIN OF i_dp OCCURS 0,
request TYPE rsrequnr,
datapakid TYPE rsdatapid,
record TYPE rsarecord,
zitm_stat(4) TYPE c,
zbib_id(9) TYPE c,
zitm_clas(5) TYPE c,
zitm_req TYPE n,
END OF i_dp.
DATA: z_dp LIKE i_dp OCCURS 0.
from i_dp I load 1000 entries at a time to z_dp and then call the FM
CALL FUNCTION 'RSAR_ODS_API_PUT'
EXPORTING
i_request = req_id
TABLES
e_t_data = i_dp
EXCEPTIONS
parameter_failure = 1
no_ods_found = 2
put_data_failure = 3
put_header_failure = 4
decide_partno_failure = 5
write_partno_failure = 6
OTHERS = 7.
This FM will update the table /BIC/B0000578000 with entries of z_dp.
Within the FM program terminates at following point:
* Update the ODS table
UPDATE /BIC/B0000578000 FROM TABLE P_T_DATA.
IF SY-SUBRC NE 0.
ROLLBACK WORK.
P_SUBRC = 13.
ENDIF.
ENDFORM. "UPDATE_ODS
2008 Dec 08 3:29 PM
I cant create table with type /BIC/B0000578000 coz this table name will be different in all the 3 systems (dev, qa and prod)
2008 Dec 08 3:34 PM
2008 Dec 08 3:46 PM
This FM calls:
PERFORM ods_put TABLES e_t_data
USING i_request
i_datapakid
l_isource
l_s_ods-odsname_tech
rsods_s_formname-update
l_s_ods-progname
l_partval
CHANGING l_subrc.
and the form is:
FORM ods_put TABLES p_t_data
USING p_request TYPE rsa_request
p_datapakid TYPE rsa_datapakid
p_isource TYPE rsa_isource
p_odsname_tech TYPE rsa_odsdbname
p_formname TYPE rsa_formname
p_progname TYPE rsa_progname
p_partno TYPE rspartval " partition value!!!
CHANGING p_subrc TYPE sy-subrc.
.....
In the FM e_t_data is defined as:
*" IMPORTING
*" VALUE(I_REQUEST) TYPE RSARI_REQUESTID
*" VALUE(I_DATAPAKID) TYPE RSARI_PACKETNR OPTIONAL
*" VALUE(I_ISOURCE) TYPE RSA_ISOURCE OPTIONAL
*" VALUE(I_ISTYPE) TYPE RSA_ISTYPE OPTIONAL
*" VALUE(I_LOGSYS) TYPE RSA_LOGSYS OPTIONAL
*" VALUE(I_OLTPSOURCE) TYPE RSOLTPSOURCER OPTIONAL
*" VALUE(I_PUTSTATE) TYPE RSODS_PUTSTATE DEFAULT
*" RSODS_S_PUT-UPDATE
*" VALUE(I_SEGMENT_ID) TYPE RSSEGID OPTIONAL
*" EXPORTING
*" VALUE(E_ODSNAME) TYPE RSA_ODSNAME
*" TABLES
*" E_T_DATA
*" EXCEPTIONS
*" PARAMETER_FAILURE
*" NO_ODS_FOUND
*" PUT_DATA_FAILURE
*" PUT_HEADER_FAILURE
*" DECIDE_PARTNO_FAILURE
*" WRITE_PARTNO_FAILURE
2008 Dec 08 5:24 PM
solved it,
my it line was not as wide as the line structure of dbtab,
thank you guys for pointing it out..
2008 Dec 08 5:30 PM
>
> solved it,
> my it line was not as wide as the line structure of dbtab,
>
> thank you guys for pointing it out..
We're happy to take credit for it, but actually, everything was in the error message.
Rob
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |