Skip to Content
author's profile photo Former Member
Former Member

Import/Export statement not working..

Hi all,

I want to export some data from BADI & Import it back in user exit.

I wrote following line of code in BADI

export P1 FROM xstr to memory id 'ZABHI'.

& following line of code in User Exit

import P1 to xstr FROM memory id 'ZABHI'.

After export sy-subrc becomes 0 hence export statement is working fine but when aftr import xstr remains blank.(sy-subrc = 4)

I tried to execute same code in single ztest abap program & it works fine there.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:08 AM

    Hi,

    You could also try the EXPORT TO DATABASE statement

    EXPORT pname = cname TO DATABASE indx(xy) FROM wa_indx CLIENT

    sy-mandt ID 'ZABHI'.

    and import from database likewise, but be sure to delete it from that location

    once u've read it into the user exit.

    Regards,

    Samson Rodrigues.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi abhijeet,

      you are most welcome.... 😊

      to delete, use

      ** deletes the data to save wastage of memory
      delete from database indx(xy)
        client sy-mandt
        id 'ZABHI'.

      you need to delete it coz, its available to all programs in the R/3

      server via the ID and you don't want anybody to view the data u are

      sending into memory.

      the statement that u used earlier was program specific and hence

      not accessible to the user exit.

      Regards,

      Samson Rodrigues.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:02 AM

    try set and get

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 05:08 AM

    Hi,

    If the memory is cleared before the import, then it can be blank.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:12 AM

    Hi

    Check Program demo_data_ext_cluster_import

    in ur system . Hope it Helps.

    Praveen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:13 AM

    hi

    pls check the ur import parameter type and fm import parameter types .

    doublie click on that fm check the impoty parameter types

    regards

    kk.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.