Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hi....SAP EXPORT statement

Former Member
0 Likes
2,647

Hello All,

Please provide ur valuable solutions for the following

i am trying to call a report in background with Submitt Job FM ... To the called report i need to pass internal table so i am making use of "Export to shared Buffer " statement, this is working only when internal table to be exported contains limited no of records.. when it exceeds certain limit , it gives me dump...... please provide the solution

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,008

Hi,

IMPORT/EXPORT to the memory area doesnot work in the background..so you need to use the IMPROT/EXPORT using database.

EXPORT i_tab
TO DATABASE INDX(LV) ID L_IKEY.

15 REPLIES 15
Read only

Former Member
0 Likes
2,009

Hi,

IMPORT/EXPORT to the memory area doesnot work in the background..so you need to use the IMPROT/EXPORT using database.

EXPORT i_tab
TO DATABASE INDX(LV) ID L_IKEY.

Read only

0 Likes
2,008

Thankx.... but still problem is not solved.... with datadase addition import is not importing the data......

any other solution ?

.....

Read only

0 Likes
2,008

Hi,

Are you exporting the data database id from where you are trying to import ?

Read only

0 Likes
2,008

yes.... i have passed same ids to both import n export........

it seems working..plz wait ... i am transfering huge data so its taking time i guess..... will update u soon..... thanx ....

Read only

0 Likes
2,008

Thank you so much Avinash... it is working... ... Thanks again......

Read only

Former Member
0 Likes
2,008

Hi,

For internal table because of size limit execeeded, it is going to ABAP dump. Because, there is a limitation on the SAP ABAP memory for each and every user. So based on the number of columns, the number of rows will depend.

Usually this will be around 5 Lakh records. Please check in your scenario, whether this is the approximate number. If yes, either try reducing the selection criteria or else, ask the BASIS people to increase the ABAP memory, but usually they are not going to do. Since it affects the performance of the system.

Regards,

Santhosh.

Read only

Former Member
0 Likes
2,008

Hi,

You can export up to 30000 bytes only not more than that.

Here is an extract from SAP HELP.

EXPORT_BUFFER_NO_MEMORY: The EXPORT data cluster is too large for the application buffer. This error should not often occur, since the buffer works with a displacement procedure working on the least recently used principle. If the error does occur, you can increase the profile parameter rsdb/obj/buffersize (see Profile parameter attributes.

Effect

Specifies the objects to be exported in the internal table itab. You can use this variant instead of a static object list in each of the variants 1 to 4. All of the additions allowed in the static cases are also allowed in this 'dynamic' variant. The internal table itab may not be a HASHED TABLE or ANY TABLE.

The first column of the table contains the object name in a data cluster. In other words, it corresponds to the static obj1 ... objn . The second column contains the different name in the program (if applicable), and corresponds to field f in the FROM f addition. If the table only has one column, or the second column only contaisn blanks, this corresponds to a static EXPORT without a FROM addition. In this case, the first column of the table (and second if applicable) should be of type Character.

DATA: BEGIN OF OBJ_TAB OCCURS 5,

CLUSTERNAME(30),

PROGRAMNAME(10),

END OF OBJ_TAB.

DATA: BEGIN OF B_PROG OCCURS 2,

FIELD_1 TYPE I,

FIELD_2 TYPE N,

END OF B_PROG.

DATA: A(10),

C_PROG LIKE SYST.

MOVE: 'A' TO OBJ_TAB-CLUSTERNAME.

APPEND OBJ_TAB. CLEAR OBJ_TAB.

MOVE: 'B' TO OBJ_TAB-CLUSTERNAME,

'B_PROG' TO OBJ_TAB-PROGRAMNAME.

APPEND OBJ_TAB. CLEAR OBJ_TAB.

MOVE: 'C' TO OBJ_TAB-CLUSTERNAME,

'C_PROG' TO OBJ_TAB-PROGRAMNAME.

APPEND OBJ_TAB. CLEAR OBJ_TAB.

EXPORT (OBJ_TAB) TO MEMORY ID 'ABCD'.

The dynamic EXPORT statement corresponds to a static EXPORT statement.

EXPORT A B FROM B_PROG C FROM C_PROG TO MEMORY ID 'ABCD'.

The system exporst the field A with name A, the internal table B_PROG under the name B , and the structure C_PROG under the name C.

Note

Runtime errors:

DYN_IMEX_OBJ_NAME_EMPTY: The object name in the cluster (the contents of the first column of itab is empty.

DYN_IMEX_OBJ_NAME_TWICE: An object name (in the cluster) occurs twice in the first column of the internal table.

DYN_IMEX_OBJ_NOT_FOUND: The data object for export (the object whose name is entered in column 2 (or column 1 if column 2 is empty), does not exist.

- Shankar

Read only

0 Likes
2,008

how can we compare 30000 bytes in terms of records .. can u plz guess ...... i am passing 47000 records

Read only

0 Likes
2,008

how can we compare 30000 bytes in terms of records .. can u plz guess ...... i am passing 47000 records

Read only

Former Member
0 Likes
2,008
Read only

0 Likes
2,008

thanx.. but it does not work when call the report in background...... any other solution?

Read only

Former Member
0 Likes
2,008

Hai,

I hope the following code will help you to solve your problem.

REPORT  ytest_report.

DATA : int_0000 TYPE TABLE OF pa0000,
       int_0001 TYPE TABLE OF pa0001.

SELECTION-SCREEN BEGIN OF BLOCK b1.
PARAMETERS: p_var(1) TYPE c NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK b1.

IMPORT int_0000 TO int_0000 FROM MEMORY ID 'M_0000'.

SELECT * FROM pa0001 INTO TABLE int_0001 FOR ALL ENTRIES IN int_0000 WHERE
              pernr EQ int_0000-pernr.

IF p_var EQ 'X'.
  EXPORT int_0001 TO MEMORY ID 'M_0001'.
ENDIF.

FUNCTION ytest_fm.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      T_0001 STRUCTURE  PA0001 OPTIONAL
*"----------------------------------------------------------------------

  DATA : int_0000 TYPE TABLE OF pa0000.

  DATA: seltab TYPE STANDARD TABLE OF rsparams,
        wa_seltab LIKE LINE OF seltab.

  CLEAR seltab.

  wa_seltab-selname = 'P_VAR'.
  wa_seltab-kind = 'P'.
  wa_seltab-low = 'X'.
  APPEND wa_seltab TO seltab.
  CLEAR wa_seltab.

  SELECT * FROM pa0000 INTO TABLE int_0000.

  EXPORT int_0000 TO MEMORY ID 'M_int_0000'.

  SUBMIT ytest_report WITH SELECTION-TABLE seltab AND RETURN
             EXPORTING LIST TO MEMORY.

  IMPORT int_0001 TO t_0001 FROM MEMORY ID 'M_0001'.

ENDFUNCTION.

Regards,

Harish

Read only

0 Likes
2,008

thanx... but this does not work when we put the report in background execution.....

Read only

0 Likes
2,008

thanx... but this does not work when we put the report in background execution.....

Read only

0 Likes
2,008

thanx... but this does not work when we put the report in background execution.....