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

Deleting data from Data Buffer(import/Export from data buffer)

Former Member
0 Likes
1,780

Hello Experts,

I am using following Statement for passing data between two BSP pages,

DATA: xcookie TYPE xstring.

EXPORT it_item FROM it_item TO DATA BUFFER xcookie.

and importing same data using


IMPORT it_item = it_item FROM DATA BUFFER xcookie.

My problem is next time this import statement gets the old data i want to delete data from data buffer.

can anybody tell me how to delete data ftom data buffer.

Thanks in advance.



6 REPLIES 6
Read only

JonathanM
Contributor
0 Likes
1,289

Hi Paresh,

You can use on of those lines:

  • DELETE FROM { {MEMORY ID id}
  • FREE MEMORY ID id.

Best regards,

Jonathan

Read only

Former Member
0 Likes
1,289

Hi ,

As Xcookie is of type string it is giving me error as id should be of type C

Read only

0 Likes
1,289

Hi Paresh,

You can take a look at the include "RHESS00REP01" where they store a xstring into memory.

If your system is unicode this have an impact.

If you want to clear you xstring, you can also update an initial one...

Best regards,

Jonathan

Read only

Former Member
0 Likes
1,289

Hi Jonathan,

I am storing internal table to data buffer xcookie.

xcookie is of type string.

i want to clear data buffer after each import. Other Wise it takes data which has been stored last time.

EXPORT it_item FROM it_item TO DATA BUFFER xcookie.


IMPORT it_item = it_item FROM DATA BUFFER xcookie.

i want to clear data in data buffer xcookie.

Regards,

Paresh G

Read only

0 Likes
1,289

Maybe just:      FREE xcookie.

Read only

Former Member
0 Likes
1,289

Hi,

you can use free or delete.

CLEAR dobj [ {WITH val [IN {CHARACTER|BYTE} MODE] }

  | {WITH NULL} ].

DELETE FROM MEMORY ID id.