Application Development 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: 

Import and Export statements does not work in TO creation Customer Exits

p_vaish
Explorer
0 Kudos
1,301

Hi Gurus,

I am working on the auto TO creation process via LT05 t-code where I am using EXPORT statements in EXIT_SAPLL03A_001 and IMPORT statement in EXIT_SAPLL03T_001 to perform the DB update in FM L_TA_HINZUFUEGEN when the TO get created but it is not working.

Could you advise what could be a possible reason that I am unable to pass my internal table results from EXIT_SAPLL03A_001 to EXIT_SAPLL03T_001 via EXPORT/ IMPORT statements? or you could advise a way through which I would be able to get my internal table data.

Below were code used in customer-exits -

EXIT_SAPLL03A_001 --> EXPORT lt_lagp TO MEMORY ID 'LAGP_UPD'.

EXIT_SAPLL03T_001 --> IMPORT lt_lagp FROM MEMORY ID 'LAGP_UPD'.

Regards,

Pooja

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos
820

EXIT_SAPLL03A_001 is part of MWMTO003 enhancement, and is called in LT05 dialog (before the Update Task).

EXIT_SAPLL03T_001 is part of MWMTO001 enhancement, and is called in the Update Task (second part of save when the tables are to be updated).

Dialog and Update Task are executed in different ABAP sessions, so EXPORT in LT05 dialog and IMPORT in the update task cannot communicate.

If you want to send some information from the dialog to the Update Task, you can do it only via CALL FUNCTION 'Z...' IN UPDATE TASK EXPORTING <your LT_LAGP variable>, your Z update function will be executed in the update task, and you can then use EXPORT. Of course, you must call your Z update function before the standard update function which calls EXIT_SAPLL03T_001 in which you use IMPORT.

For more information, read the ABAP documentation about the Update Task concept.

7 REPLIES 7

DominikTylczyn
Active Contributor
0 Kudos
820

Hello p_vaish

First of all, why don't you describe in details what you are trying to achieve here? It would be much easier to help you if you do.

Second, you don't really need to use EXPORT/IMPORT statements to communicate data between LE-WM user-exits. They all belong to XLTO function group. Therefore you can put your lt_lagp internal table into the function group's global data. It'll be available to all LE-WM enhancements. It's much easier than EXPORT/IMPORT.

Best regards

Dominik Tylczynski

0 Kudos
820

Hi 3a9e4ce873a94034b33dc62b0ce600ee

I had tried your suggested solution but it did not work either.

Warm Regards,

Pooja

tom_wan
Product and Topic Expert
Product and Topic Expert
820

Hi p_vaishIMPORT/EXPORT to memory uses ABAP MEMORY. An ABAP session is opened for each user session. Each ABAP session is assigned its own memory area ABAP memory.

If IMPORT/EXPORT doesn't work, it is possible that IMPORT and EXPORT is executed in different ABAP sessions.

For example, additional ABAP sessions for a user session can be opened as follows:

Enter a transaction code after "/o" in the command field in the toolbar.

Call the function module TH_CREATE_MODE.

Call a dynpro during the processing of asynchronous RFC. In the RFC client, an additional ABAP session for communication with the SAP GUI is required.

Regards

Tom

Sandra_Rossi
Active Contributor
0 Kudos
821

EXIT_SAPLL03A_001 is part of MWMTO003 enhancement, and is called in LT05 dialog (before the Update Task).

EXIT_SAPLL03T_001 is part of MWMTO001 enhancement, and is called in the Update Task (second part of save when the tables are to be updated).

Dialog and Update Task are executed in different ABAP sessions, so EXPORT in LT05 dialog and IMPORT in the update task cannot communicate.

If you want to send some information from the dialog to the Update Task, you can do it only via CALL FUNCTION 'Z...' IN UPDATE TASK EXPORTING <your LT_LAGP variable>, your Z update function will be executed in the update task, and you can then use EXPORT. Of course, you must call your Z update function before the standard update function which calls EXIT_SAPLL03T_001 in which you use IMPORT.

For more information, read the ABAP documentation about the Update Task concept.

820

Thanks Sandra Rossi. This had helped in my current case scenario.

Gourab_Dey
Product and Topic Expert
Product and Topic Expert
0 Kudos
820

In the latest patches, export and import to memory don't work. To pass the value from one place to another, you can take the help of static variables of the class.

Here how you can proceed:-

  • Create a "Z" class in SE24.
  • In the attribute tab, define a new attribute itab, which is the internal table in your case, which will be used to hold the value.
  • Make the attribute as static, by default it will instance
  • Make the variable as public
  • In FM EXIT_SAPLL03A_001, set the value of the internal table of the class with the value which needs to be transported. Below is the syntax:
<strong>   ZCL_HOLD_TEMP_VALUE=>ITAB = lt_lagp.</strong>
  • Now, in FM EXIT_SAPLL03T_001, you can get the valueas as follows
lt_lagp = <strong>ZCL_HOLD_TEMP_VALUE=>ITAB </strong>

Your value has been passed from EXIT_SAPLL03A_001 to EXIT_SAPLL03A_001.

Let me know if you need any other info in this.

Reward if helpful.

Cheers!

Gourab

0 Kudos
820

This did not work for me but thanks for helping