Skip to Content
avatar image
Former Member

Import , Export problem in Internal table

Hi all,

I am using ver 4.6C.

I have 2 programs namely X an Y.

X is main program and Y is having some Internal table with data. I want to use Y internal table in X program.

In X program.

I used SUBmit to call Y program . After Submit I used Import as follows.

Import Itab from memory id 'ABC'.

In y program used Export as follows

Export itab from memory id 'ABC'.

When I put break-point and check ITAB in X program it is empty.

Anyone help me or send code will be appreciated.

Thanks

Rathnam

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 10:27 AM

    u can't export and import internal tables

    so it will not work.

    we can export only parameters and select-options only

    <b>Reward Points If Useful</b>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 10:37 AM

    A quick search on the forum returns the answer:

    exporting-internal-table-to-memory-variable

    Please try and search the forums for a reply first.

    Hope this helps.

    Sudha

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 10:39 AM

    Hi Stalin,

    i did it the following way:

    CONSTANTS: memid_zfo0consu_upl(13) TYPE c VALUE 'ZFO0CONSU_UPL'.

    TYPES: BEGIN OF t_zfo0consu_upl,

    zfo0consu type /bic/oizfo0consu.

    TYPES: END OF t_zfo0consu_upl.

    DATA: it_zfo0consu_upl TYPE STANDARD TABLE OF t_zfo0consu_upl

    WITH DEFAULT KEY.

    *&...Gesellschaft exportieren

    EXPORT zfo0consu_upl = it_zfo0consu_upl TO MEMORY ID

    memid_zfo0consu_upl.

    and then the import.

    CONSTANTS: memid_zfo0consu_upl(13) TYPE c VALUE 'ZFO0CONSU_UPL'.

    DATA: BEGIN OF it_zfo0consu_upl OCCURS 0,

    zfo0consu_upl TYPE /bic/oizfo0consu.

    DATA: END OF it_zfo0consu_upl.

    *&...Import der Upzuloadenden Gesellschaft

    IMPORT zfo0consu_upl = it_zfo0consu_upl

    FROM MEMORY ID memid_zfo0consu_upl.

    <b>Reward if useful.</b>

    Kind regards

    Henner

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2007 at 10:43 AM

    hello,

    use this syntax

    DATA: wa_indx TYPE indx.
    
        EXPORT tab = itab TO DATABASE indx(xy) FROM wa_indx CLIENT
        sy-mandt
        ID 'DETAILLIST'.

    and to get it back..

        IMPORT tab = itab FROM DATABASE indx(xy) TO wa_indx CLIENT sy-mandt
          ID 'DETAILLIST'.

    note that itab must be declared in both programs with the same structure

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2007 at 11:11 AM

    Hi...

    There is a syntax problem in ur code. In the Submit statement use AND RETURN also. Use the ITAB[ ] to indicate the BODY otherwise it may use the header only.

    Check this Example:

    You can ABAP MEMORY (EXPORT , IMPORT) for this.

    In the Report you have to use EXPORT to Transfer the Output Internal table to ABAP memory.

    EXPORT MTAB FROM IT_OUTPUT[] TO MEMORY ID 'ABC'.

    In the Called program you have to use IMPORT to Retreive the ITAB from ABAP MEMORY.

    IMPORT MTAB TO IT_DATA[] FROM MEMORY ID 'ABC'.

    <b>Reward if Helpful</b>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 27, 2007 at 09:13 AM

    Hi All,

    This is the scenario,

    1. PO Cretaed in 2005 and the costcentre was 1122.

    2. Blocked the cost centre 1122 in 2006. ( NO MORE USE)

    3. carryforwarded the same PO in 2007 and manually change the costcentre from

    1122 to 1123 in PO.

    4. the problem is Committment item not carry forwarded , in the customize report the committement doesn't show the amount. I came to know that once carryforward PO , the commitment also carryforwarded (IF IT IS SAME COST CENTRE) . My case is diffrent cost centre, that's why commitment not carryforwarded.

    5. The user don't want to cancel the PO .

    PLS ANYONE HELP ME SOLVE THIS PROBLEM?

    Thanks

    Nathan

    Add comment
    10|10000 characters needed characters exceeded